Access & visibility
Allow customers.PreviewCrmImport on your API key.
Workspace access by default. Private member data requires approved member delegation through Brigg-Act-As; the key supplies permissions while private ownership and project boundaries remain enforced.
Request
No parameters. Send an empty JSON object ({}).
Import from a connected CRM
Use Get CRM import status to inspect the HubSpot connection, supported objects and the most recent run. Preview CRM import reads a sample without writing contacts. A missing provider scope requires reconnecting in Brigg; an API grant cannot supply missing provider consent.
Start the connected-CRM import in Brigg. Get CRM import run reads its progress and detailed report. Review created, updated, skipped and not-imported counts; a finished run does not mean every source object was supported.
To import through the public API, use Start record import with a file and permanent external references. That workflow keeps the credential’s approved operation and resource permissions throughout background processing.
Response
Returns 200 OK with a JSON body.
This operation has no continuation cursor. An empty items array means no matching visible results were returned.
A preview can partially succeed. Check every row's missing_scope before selecting categories. A zero count without missing_scope may mean no records or a per-category provider read failure; the preview is advisory, not proof that the CRM is empty. Only open tasks are candidates. No Brigg records are changed.
itemsarray of CRM import previewRequiredSource records available for preview from the connected CRM. This does not import them. This operation has no cursor pagination.
Item fields
objectstringRequiredHubSpot object category: companies, contacts, deals, notes or tasks. Choose the categories to import later when starting the run.
totalnumberRequiredEstimated importable count for this category. Known skipped records in the fetched preview page are deducted, so larger sets may still overestimate; use the completed run report for actual counts. Zero can also accompany a per-category provider failure.
samplesarray of stringRequiredUp to three human-readable labels from candidate records, not record IDs or full objects. These help recognize the source data, not address individual import items.
missing_scopestringOptionalWhen present, this category could not be previewed because the connection lacks this provider scope. Its total is zero and samples is empty; this does not prove the source category has no data. Other categories can still be available.
Errors & retries
Set BRIGG_REQUEST_ID once for each logical action. The samples send it as Idempotency-Key. Reuse the same value and body on retries, including after a timeout; a missing response does not prove the action failed.
For rate limits, follow the server’s retry guidance and back off. See HTTP errors and safe retries and limits.
| HTTP status | Code | What to do |
|---|---|---|
| 400 | invalid_json |
Send a JSON object with Content-Type: application/json. |
| 400 | invalid_input |
Check the request fields and types. Supply a stable Idempotency-Key containing 1–200 characters. |
| 401 | invalid_key |
The workspace API key is missing, invalid or revoked. |
| 403 | forbidden |
Check the key’s operation and resource grants. If Brigg-Act-As is supplied, the key must be authorized to delegate to that member. |
| 404 | not_found |
The requested operation or resource is not available to this credential. |
| 429 | rate_limited |
Wait for Retry-After before retrying. Reuse the original Idempotency-Key. |
| 409 | not_connected |
Connect the workspace HubSpot account in Brigg first. |
| 409 | auth_expired |
Renew the HubSpot connection before previewing again. |
Next steps
JSON schemas
Use the complete schemas for validation or client generation.
Full request JSON schema
{
"type": "object",
"properties": {},
"additionalProperties": false,
"examples": [
{}
]
}Full response JSON schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"object": {
"type": "string",
"description": "HubSpot object category: companies, contacts, deals, notes or tasks. Choose the categories to import later when starting the run.",
"examples": [
"companies"
]
},
"total": {
"type": "number",
"description": "Estimated importable count for this category. Known skipped records in the fetched preview page are deducted, so larger sets may still overestimate; use the completed run report for actual counts. Zero can also accompany a per-category provider failure.",
"examples": [
12
]
},
"samples": {
"type": "array",
"items": {
"type": "string"
},
"description": "Up to three human-readable labels from candidate records, not record IDs or full objects. These help recognize the source data, not address individual import items.",
"examples": [
[
"Northwind Consulting AS"
]
]
},
"missing_scope": {
"type": "string",
"description": "When present, this category could not be previewed because the connection lacks this provider scope. Its total is zero and samples is empty; this does not prove the source category has no data. Other categories can still be available.",
"examples": [
"crm.objects.companies.read"
]
}
},
"required": [
"object",
"total",
"samples"
],
"additionalProperties": false,
"title": "CRM import preview"
},
"description": "Source records available for preview from the connected CRM. This does not import them. This operation has no cursor pagination."
}
},
"required": [
"items"
],
"additionalProperties": false,
"examples": [
{
"items": [
{
"object": "companies",
"total": 42,
"samples": [
"Northstar Ltd",
"Harbor Studio"
]
},
{
"object": "contacts",
"total": 86,
"samples": [
"Alex Morgan",
"Sam Lee"
]
},
{
"object": "deals",
"total": 0,
"samples": [],
"missing_scope": "crm.objects.deals.read"
},
{
"object": "notes",
"total": 12,
"samples": [
"Pilot planning notes"
]
},
{
"object": "tasks",
"total": 8,
"samples": [
"Confirm kickoff date"
]
}
]
}
]
}