Scope requirements
Scope requirements
- Auditing a connected source account before the migration
- Starting and managing data transfers
- Configuring transfer settings
- Checking transfer readiness
- Reverting migrated data
- Marking migrated properties for cleanup
- Reviewing past data transfers
Audit your source account
Before starting a migration, you can run an audit to inspect the source account, understand which records can be migrated, and preview field mappings.Start an audit
To start an audit, make aPOST request to /crm/smart-transfer/2027-03-beta/audits/async.
On success, the response returns
202 Accepted with the audit id and a URL you can use to poll the audit’s status. For example:
Track audit status
To poll an audit’s status, make aGET request to /crm/smart-transfer/2027-03-beta/audits/{auditId}. You can also retrieve an audit by accountId using /crm/smart-transfer/2027-03-beta/audits?accountId={accountId}.
The response includes the audit’s current status, which moves through the following stages: PENDING, IN_PROGRESS, COMPLETED, or FAILED. When status is FAILED, an errorMessage field is also returned.
Your response will look similar to:
Read audit errors
To list which records the audit flagged as unable to migrate and why, make aGET request to /crm/smart-transfer/2027-03-beta/audits/{auditId}/errors.
Your response will look similar to:
Read record counts
To see how many records of each source object would be migrated, make aGET request to /crm/smart-transfer/2027-03-beta/audits/{auditId}/record-counts.
Your response will look similar to:
Read object mappings
To retrieve the source object to HubSpot object mappings the audit discovered, make aGET request to /crm/smart-transfer/2027-03-beta/audits/{auditId}/mappings. Use the returned id from each mapping to retrieve detailed field-level mappings.
Your response will look similar to:
Read mapping details
To retrieve individual field mapping entries within a single object mapping, make aGET request to /crm/smart-transfer/2027-03-beta/audits/{auditId}/mappings/{mappingId}/details. The endpoint supports limit and after query parameters for pagination.
To understand the schema of each
detailType, prior to retrieving mapping details, make a GET request to /crm/smart-transfer/2027-03-beta/audits/mapping-details/metadata.PROPERTY detail types, the propertyTransferType field indicates how the field is migrated. Valid values are SYNC, POST_SYNC, and UNSUPPORTED.
Read mapping diffs
To see changes detected for a mapping since the previous audit, make aGET request to /crm/smart-transfer/2027-03-beta/audits/{auditId}/mappings/{mappingId}/diffs. Filter by status (ADDED, REMOVED, or UPDATED) using the status query parameter.
Your response will look similar to:
Configure transfer settings
Transfer settings control which objects are included in a migration and how each type is configured. Settings are stored per connected account and keyed bydataType.
List connected accounts
To retrieve all connected source accounts available for migration, make aGET request to /crm/smart-transfer/2027-03-beta/accounts.
Your response will look similar to:
List transfer settings
To retrieve all configured settings for a connected account, make aGET request to /crm/smart-transfer/2027-03-beta/accounts/{accountId}/settings. You can filter by data type using the dataTypes query parameter. Supported values for your migration can be retrieved using the read data types endpoint.
The returned source field in each result indicates whether a setting was explicitly saved (SAVED) or generated dynamically from the connected source system (DEFAULT).
Your response will look similar to:
Upsert transfer settings
To create or update settings for a specific data type, make aPUT request to /crm/smart-transfer/2027-03-beta/accounts/{accountId}/settings/{dataType}. Existing entries for the specified data type are updated and new entries are created. Returns 204 No Content on success.
To retrieve the schema for each supported setting type before updating, make a
GET request to /crm/smart-transfer/2027-03-beta/accounts/settings/metadata.Delete transfer settings
To remove settings for a specific data type, make aDELETE request to /crm/smart-transfer/2027-03-beta/accounts/{accountId}/settings/{dataType}. A 204 No Content response is returned on success.
Read configured data types
To retrieve the data types available for configuration, make aGET request to /crm/smart-transfer/2027-03-beta/accounts/{accountId}/settings/data-types.
dataType values you can use in the PUT and DELETE settings endpoints.
Check stage readiness
Stages are the migration units for a given CRM type (for example,contact-property-zendesk or deal-property-dynamics365). Check stage readiness before starting a transfer to confirm each stage is configured correctly.
List stages with validation status
To retrieve all active stages for a connected account and see whether each is ready to run, make aGET request to /crm/smart-transfer/2027-03-beta/stages?accountId={accountId}.
To understand the schema of each
configurationRule type in validation results, make a GET request to /crm/smart-transfer/2027-03-beta/stages/validation-rules/metadata.validationResults array with OK, WARNING, DISABLED, or VALIDATION_ERROR status indicators. Your response will look similar to:
Start and manage a transfer
Once your source account is audited and settings are configured, you can start a transfer to migrate records into HubSpot.Start a transfer
To start a transfer, make aPOST request to /crm/smart-transfer/2027-03-beta/transfers/async. The transfer runs asynchronously and returns an id.
The response returns
202 Accepted with a transfer id:
GET /crm/smart-transfer/2027-03-beta/transfers/{transferId}/tasks to retrieve individual task IDs.
Track transfer status
To poll the transfer status, make aGET request to /crm/smart-transfer/2027-03-beta/transfers/{transferId}. You can also retrieve a transfer by accountId using /crm/smart-transfer/2027-03-beta/transfers?accountId={accountId}.
The status field moves through the following stages: PENDING, IN_PROGRESS, RESUMING, COMPLETED, FAILED, CANCELLED, or PAUSED. RESUMING is returned after a resume is requested, but can be treated as in-progress.
List transfer tasks
To retrieve a summary for every task in a transfer, make aGET request to /crm/smart-transfer/2027-03-beta/transfers/{transferId}/tasks. Each result maps to a specific migration stage.
Cancel, pause, or resume transfer tasks
To control individual tasks within a running transfer, make aPOST request to the following endpoints:
/crm/smart-transfer/2027-03-beta/transfers/cancel/crm/smart-transfer/2027-03-beta/transfers/pause/crm/smart-transfer/2027-03-beta/transfers/resume
For example, your request will look similar to:
204 No Content response is returned on success.
Review transfer results
After a transfer completes, review the per-task results, any errors, and the record ID mappings from source to HubSpot.Search transfer mappings
To retrieve source object to HubSpot object record ID mappings created by a transfer, make aGET request to /crm/smart-transfer/2027-03-beta/transfers/{transferId}/mappings/search. Filter by task IDs using taskIds and narrow by a search term using q.
Your response will look similar to:
List completed transfer tasks
Use the task tracking endpoint to review the tasks completed in a past transfer.List transfer task errors
To retrieve hard task-level errors for a transfer, make aGET request to /crm/smart-transfer/2027-03-beta/transfers/{transferId}/tasks/errors. Supports limit and after for pagination.
Your response will look similar to:
GET request to /crm/smart-transfer/2027-03-beta/transfers/{transferId}/errors/search. Filter by taskIds and q.
Your response will look similar to:
Revert a transfer
A revert removes HubSpot objects imported by specific transfer tasks, restoring your account to its pre-migration state for those records. Reverts cannot be undone.Start a revert
To start a revert, make aPOST request to /crm/smart-transfer/2027-03-beta/reverts/async.
Include the following in your request body:
202 Accepted with a task id:
Track revert status
Poll the revert status by making aGET request to /crm/smart-transfer/2027-03-beta/reverts/{revertId}. You can also retrieve a revert by accountId using /crm/smart-transfer/2027-03-beta/reverts?accountId={accountId}.
Your response will look similar to:
List revert tasks
To retrieve the individual cleanup tasks within a revert, make aGET request to /crm/smart-transfer/2027-03-beta/reverts/{revertId}/tasks. Filter by dataTypes and paginate with limit and after.
Your response will look similar to:
Search revert errors
To retrieve errors encountered during revert tasks, make aGET request to /crm/smart-transfer/2027-03-beta/reverts/{revertId}/errors/search. Filter by taskIds, dataTypes, and q.
Your response will look similar to:
Label migrated records
Post-migration markup flags the properties created by a transfer by moving them into a “Migration Cleanup” property group and adding suffixes to their labels, so they can be identified and cleaned up after the transfer. Before you can start a markup job, the transferstatus must be COMPLETED, otherwise it returns a 400 error. Learn how to poll transfer status.
Start a markup
To start a markup job, make aPOST request to /crm/smart-transfer/2027-03-beta/markups/async. In the request body, include the source account ID.
202 Accepted with a task id:
Track markup status
Poll the markup status by making aGET request to /crm/smart-transfer/2027-03-beta/markups/{markupId}. You can also retrieve a markup by accountId using /crm/smart-transfer/2027-03-beta/markups?accountId={accountId}.
The returned status field reflects the current state within each phase: PENDING, IN_PROGRESS, COMPLETED, or FAILED. The phase field distinguishes between the two phases: MARKUP (the property labeling) and CLEANUP (removal of markup labels).
Your response will look similar to:
List markup properties
To retrieve the HubSpot properties that a markup job set, or will set, on migrated records, make aGET request to /crm/smart-transfer/2027-03-beta/markups/{markupId}/properties. This endpoint is paginated and supports limit and after query parameters.
The returned markupLabel field indicates the category assigned to the property. Valid values are QA, NONE, USED, UNUSED, ENUMERATION, and TEXT_PLACEHOLDER.
Your response will look similar to:
List markup errors
To retrieve records the markup job failed to label, make aGET request to /crm/smart-transfer/2027-03-beta/markups/{markupId}/errors. Supports limit and after for pagination.
Your response will look similar to:
Trigger markup cleanup
To remove the markup labels from migrated records, make aPOST request to /crm/smart-transfer/2027-03-beta/markups/cleanup/async. Include the markupId in your request body.
202 Accepted with the markup id and a status URL:
View past transfers
To retrieve a paged history of all transfer task runs across previous transfers for your account, make aGET request to /crm/smart-transfer/2027-03-beta/past-transfers. Supports limit and after for pagination.
The status field for each past transfer entry can be TRANSFERRED, TRANSFER_FAILED, REVERTED, or REVERT_FAILED.
Your response will look similar to:
Scope reference
The smart transfer API uses the following scopes, which give permissions for specific endpoints.
Some operations require additional object scopes beyond the smart transfer scopes:
- Transfers: migrating objects requires the corresponding write scopes for each object being transferred.
- Reverts: reverting transferred records requires the corresponding scope for deleting the objects being reverted.
For example, to transfer or revert contacts, the
crm.objects.contacts.write scope is required.
Learn more about the available scopes.
Error responses
All error responses use a standard body:400 VALIDATION_ERROR: a required parameter is missing or invalid. For example, a non-numeric ID, an emptytaskIdslist, an unknown enumeration value, alimitout of range (up to 1,000), or a duplicate markup start for the same account.403: the request is missing a required scope.404 OBJECT_NOT_FOUND: the ID does not belong to the authenticated account. Cross-account access returns404to prevent leaks.409 OBJECT_ALREADY_EXISTS: the operation is not allowed given the current state. Returned byPOST /markups/cleanup/asyncif cleanup has already been requested, and byGET /markups/{markupId}/propertiesif called after cleanup has completed.422 UNPROCESSABLE_ENTITY: returned byPOST /markups/cleanup/asyncif a cleanup is requested while the markup is still running.429: the rate limit was exceeded. Check theRetry-Afterheader for how long to wait before retrying.500 INTERNAL_ERROR: an unexpected server error. Retry the request shortly or contact support if the problem persists.