> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scanova.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Test a HubSpot configuration

> POST /webhook/hubspot/test/

Builds a sample record from a proposed field mapping and upserts it directly into HubSpot, to validate the configuration before it's saved. This is **stateless** — it does not create or persist a webhook; the webhook is only created once you separately call [List / create webhooks](/api-reference/management-api/integrations/webhooks-list-create) with `type: "hubspot"`.

<Note>
  Requires the account's `INTEGRATION_HUBSPOT` quota.
</Note>

<ParamField body="connection_id" type="integer" required>
  HubSpot connection id, from [List HubSpot connections](/api-reference/management-api/integrations/hubspot-status).
</ParamField>

<ParamField body="object_type" type="string" default="contact">
  One of `contact`, `company`, `deal`, `ticket`.
</ParamField>

<ParamField body="field_map" type="array" required>
  Non-empty list of `{"hubspot_property": "..."}` mappings — the properties to populate on the test record. Properties not valid for `object_type`, or internal/read-only ones, are silently skipped; if every mapped property gets skipped, the request fails with `400`.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.scanova.io/webhook/hubspot/test/' \
    --header 'Authorization: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
      "connection_id": 5,
      "object_type": "contact",
      "field_map": [{"hubspot_property": "email"}, {"hubspot_property": "firstname"}]
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  { "success": true }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "detail": "None of the mapped fields are valid contact properties. Invalid for this object type: dealname. Re-open the field mapping and choose properties that belong to contact."
  }
  ```
</ResponseExample>

`404` if `connection_id` isn't owned by this account. `400` if the connection isn't currently active, or if `field_map` is empty.

## Related

* [CRM properties](/api-reference/management-api/integrations/hubspot-properties) — valid mapping targets for `object_type`.
* [List / create webhooks](/api-reference/management-api/integrations/webhooks-list-create) — where the configuration is actually saved, once tested.
* [Management API overview](/api-reference/management-api/overview) — the auth scheme and quota architecture this endpoint is part of.


## OpenAPI

````yaml api-reference/openapi/management-api.json POST /webhook/hubspot/test/
openapi: 3.1.0
info:
  title: Scanova Management API (v2)
  description: >-
    The complete Scanova Management API — every endpoint available at
    api.scanova.io (QR codes, folders, tags, leads, forms, analytics, plans,
    shared users & roles), plus the token-creation and usage-stats endpoints
    used to authenticate against it. Every path and request/response shape below
    was verified live against a real API key and the actual running backend
    (Phase 7, 2026-08-16) — not guessed from reading urls.py alone.
  version: 2.0.0
servers:
  - url: https://api.scanova.io
    description: Management API — QR/folder/tag/lead/form/analytics/plans endpoints
security:
  - apiKeyAuth: []
paths:
  /webhook/hubspot/test/:
    post:
      summary: Test a HubSpot configuration
      description: Stateless — does not create or persist a webhook.
      operationId: testManagedHubspotConfig
      requestBody:
        content:
          application/json:
            example:
              connection_id: 5
              object_type: contact
              field_map:
                - hubspot_property: email
                - hubspot_property: firstname
      responses:
        '200':
          description: Test result.
          content:
            application/json:
              example:
                success: true
        '400':
          description: >-
            Connection inactive, empty field_map, or no mapped field valid for
            the object type.
        '404':
          description: No connection with this id owned by this account.
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Send your Management API key as the raw value of the Authorization
        header — no "Bearer " or "Token " prefix, and no other characters.
        Example: `Authorization: 401f7ac837da42b97f613d789819ff93537bee6a`. A
        header containing more than one space-separated part is rejected
        outright. Requests also require the request's Host header to be the
        management API host (e.g. api.scanova.io) — the same key sent to the
        regular API host will not authenticate.

````