{ "openapi" : "3.0.1", "info" : { "title" : "CRM Exports", "description" : "Basepom for all HubSpot Projects", "version" : "v3", "x-hubspot-product-tier-requirements" : { "marketing" : "FREE", "sales" : "FREE", "service" : "FREE", "cms" : "FREE", "commerce" : "FREE", "crmHub" : "FREE", "dataHub" : "FREE" }, "x-hubspot-related-documentation" : [ { "name" : "Export CRM Guide", "url" : "https://developers.hubspot.com/docs/guides/api/crm/exports" } ] }, "servers" : [ { "url" : "https://api.hubapi.com" } ], "tags" : [ { "name" : "Advanced" }, { "name" : "Basic" } ], "paths" : { "/crm/v3/exports/export/async" : { "post" : { "tags" : [ "Advanced" ], "summary" : "Start an export", "description" : "Begins exporting CRM data for the portal as specified in the request body", "operationId" : "post-/crm/v3/exports/export/async_start", "parameters" : [ ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PublicExportRequest" }, "example" : null } }, "required" : true }, "responses" : { "202" : { "description" : "accepted", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TaskLocator" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "security" : [ { "oauth2" : [ "crm.export" ] } ] } }, "/crm/v3/exports/export/async/tasks/{taskId}/status" : { "get" : { "tags" : [ "Advanced" ], "summary" : "Get the status of the export including the URL to download the file", "description" : "Returns the status of the export with taskId, including the URL of the resulting file if the export status is COMPLETE", "operationId" : "get-/crm/v3/exports/export/async/tasks/{taskId}/status_getStatus", "parameters" : [ { "name" : "taskId", "in" : "path", "description" : "", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "integer", "format" : "int64", "example" : null } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ActionResponseWithSingleResultURI" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "security" : [ { "oauth2" : [ "crm.export" ] } ] } }, "/crm/v3/exports/export/{exportId}" : { "get" : { "tags" : [ "Basic" ], "summary" : "Retrieve details of a specific export by its unique ID.", "description" : "Retrieve detailed information about a specific CRM export, including its current state and properties.", "operationId" : "get-/crm/v3/exports/export/{exportId}_getById", "parameters" : [ { "name" : "exportId", "in" : "path", "description" : "", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "integer", "format" : "int64", "example" : null } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PublicExportResponse" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "security" : [ { "oauth2" : [ "crm.export" ] } ] } } }, "components" : { "schemas" : { "ActionResponseWithSingleResultURI" : { "required" : [ "completedAt", "startedAt", "status" ], "type" : "object", "properties" : { "completedAt" : { "type" : "string", "description" : "The timestamp when the export was completed, in ISO 8601 format.", "format" : "date-time", "example" : null }, "errors" : { "type" : "array", "example" : null, "items" : { "$ref" : "#/components/schemas/StandardError" } }, "links" : { "type" : "object", "additionalProperties" : { "type" : "string", "example" : null }, "description" : "A collection of related links associated with the export.", "example" : null }, "numErrors" : { "type" : "integer", "description" : "The number of errors encountered during the export process.", "format" : "int32", "example" : null }, "requestedAt" : { "type" : "string", "description" : "The timestamp when the export request was made, in ISO 8601 format.", "format" : "date-time", "example" : null }, "result" : { "type" : "string", "description" : "The URL of the resulting file if the export status is COMPLETE.", "example" : null }, "startedAt" : { "type" : "string", "description" : "The timestamp when the export process started, in ISO 8601 format.", "format" : "date-time", "example" : null }, "status" : { "type" : "string", "description" : "The current status of the export, which can be PENDING, PROCESSING, COMPLETE or CANCELED.", "example" : null, "enum" : [ "CANCELED", "COMPLETE", "PENDING", "PROCESSING" ] } }, "example" : null }, "Error" : { "required" : [ "category", "correlationId", "message" ], "type" : "object", "properties" : { "category" : { "type" : "string", "description" : "The error category", "example" : null }, "context" : { "type" : "object", "additionalProperties" : { "type" : "array", "example" : null, "items" : { "type" : "string", "example" : null } }, "description" : "Context about the error condition", "example" : "{invalidPropertyName=[propertyValue], missingScopes=[scope1, scope2]}" }, "correlationId" : { "type" : "string", "description" : "A unique identifier for the request. Include this value with any error reports or support tickets", "format" : "uuid", "example" : "aeb5f871-7f07-4993-9211-075dc63e7cbf" }, "errors" : { "type" : "array", "description" : "further information about the error", "example" : null, "items" : { "$ref" : "#/components/schemas/ErrorDetail" } }, "links" : { "type" : "object", "additionalProperties" : { "type" : "string", "example" : null }, "description" : "A map of link names to associated URIs containing documentation about the error or recommended remediation steps", "example" : null }, "message" : { "type" : "string", "description" : "A human readable message describing the error along with remediation steps where appropriate", "example" : "An error occurred" }, "subCategory" : { "type" : "string", "description" : "A specific category that contains more specific detail about the error", "example" : null } }, "description" : "Represents an error response returned by the API when an operation fails. This component is used in various endpoints to provide detailed information about the error encountered.", "example" : { "message" : "Invalid input (details will vary based on the error)", "correlationId" : "aeb5f871-7f07-4993-9211-075dc63e7cbf", "category" : "VALIDATION_ERROR", "links" : { "knowledge-base" : "https://www.hubspot.com/products/service/knowledge-base" } } }, "ErrorDetail" : { "required" : [ "message" ], "type" : "object", "properties" : { "code" : { "type" : "string", "description" : "The status code associated with the error detail", "example" : null }, "context" : { "type" : "object", "additionalProperties" : { "type" : "array", "example" : null, "items" : { "type" : "string", "example" : null } }, "description" : "Context about the error condition", "example" : "{missingScopes=[scope1, scope2]}" }, "in" : { "type" : "string", "description" : "The name of the field or parameter in which the error was found.", "example" : null }, "message" : { "type" : "string", "description" : "A human readable message describing the error along with remediation steps where appropriate", "example" : null }, "subCategory" : { "type" : "string", "description" : "A specific category that contains more specific detail about the error", "example" : null } }, "description" : "Represents detailed information about an error that occurred in the API. This component is used to provide additional context and specifics about errors, typically as part of an error response.", "example" : null }, "Filter" : { "required" : [ "operator", "propertyName" ], "type" : "object", "properties" : { "highValue" : { "type" : "string", "description" : "The upper boundary value when using ranged-based filters.", "example" : null }, "operator" : { "type" : "string", "description" : "The comparison operator used in the filter, such as \"EQ\" or \"GT\".", "example" : null, "enum" : [ "BETWEEN", "CONTAINS_TOKEN", "EQ", "GT", "GTE", "HAS_PROPERTY", "IN", "LT", "LTE", "NEQ", "NOT_CONTAINS_TOKEN", "NOT_HAS_PROPERTY", "NOT_IN" ] }, "propertyName" : { "type" : "string", "description" : "The name of the property to apply the filter to.", "example" : null }, "value" : { "type" : "string", "description" : "The value to match against the property.", "example" : null }, "values" : { "type" : "array", "description" : "The values to match against the property.", "example" : null, "items" : { "type" : "string", "example" : null } } }, "description" : "Defines a single condition for searching CRM objects, specifying the property to filter on, the operator to use (such as equals, greater than, or contains), and the value(s) to compare against. ", "example" : null }, "FilterGroup" : { "required" : [ "filters" ], "type" : "object", "properties" : { "filters" : { "type" : "array", "description" : "A list of individual filter criteria that are applied together as a group. Each filter specifies a condition that records must meet to be included in the results.", "example" : null, "items" : { "$ref" : "#/components/schemas/Filter" } } }, "description" : "Represents a group of filters used to query data within HubSpot. This component is used to define criteria for filtering records in various API endpoints.", "example" : null }, "PublicCrmSearchRequest" : { "required" : [ "filterGroups", "filters", "sorts" ], "type" : "object", "properties" : { "filterGroups" : { "type" : "array", "example" : null, "items" : { "$ref" : "#/components/schemas/FilterGroup" } }, "filters" : { "type" : "array", "example" : null, "items" : { "$ref" : "#/components/schemas/Filter" } }, "query" : { "type" : "string", "description" : "The search query string, to filter CRM records.", "example" : null }, "sorts" : { "type" : "array", "description" : "Defines the order in which the CRM records should be returned.", "example" : null, "items" : { "type" : "string", "example" : null } } }, "example" : null }, "PublicExportListRequest" : { "required" : [ "associatedObjectType", "exportInternalValuesOptions", "exportName", "exportType", "format", "includeLabeledAssociations", "includePrimaryDisplayPropertyForAssociatedObjects", "language", "listId", "objectProperties", "objectType", "overrideAssociatedObjectsPerDefinitionPerRowLimit" ], "type" : "object", "properties" : { "associatedObjectType" : { "type" : "array", "example" : null, "items" : { "type" : "string", "example" : null } }, "exportInternalValuesOptions" : { "type" : "array", "example" : null, "items" : { "type" : "string", "example" : null, "enum" : [ "NAMES", "VALUES" ] } }, "exportName" : { "type" : "string", "example" : null }, "exportType" : { "type" : "string", "example" : null, "default" : "LIST", "enum" : [ "LIST" ] }, "format" : { "type" : "string", "example" : null, "enum" : [ "CSV", "XLS", "XLSX" ] }, "includeLabeledAssociations" : { "type" : "boolean", "example" : null }, "includePrimaryDisplayPropertyForAssociatedObjects" : { "type" : "boolean", "example" : null }, "language" : { "type" : "string", "example" : null, "enum" : [ "AF_ZA", "AR_EG", "BG", "BN", "CA_ES", "CS", "DA_DK", "DE", "EL_GR", "EN", "EN_GB", "ES", "ES_MX", "ET_EE", "FI", "FR", "FR_CA", "HE_IL", "HI_IN", "HR", "HU", "ID", "IT", "JA", "KO_KR", "LT_LT", "MS", "NL", "NO", "PL", "PT_BR", "PT_PT", "RO", "RU", "SK_SK", "SL", "SV", "TH", "TL", "TR", "UK", "VI_VN", "ZH_CN", "ZH_HK", "ZH_TW" ] }, "listId" : { "type" : "string", "example" : null }, "objectProperties" : { "type" : "array", "example" : null, "items" : { "type" : "string", "example" : null } }, "objectType" : { "type" : "string", "example" : null }, "overrideAssociatedObjectsPerDefinitionPerRowLimit" : { "type" : "boolean", "example" : null } }, "example" : null, "x-hubspot-sub-type-impl" : true }, "PublicExportRequest" : { "properties" : { }, "example" : null, "oneOf" : [ { "$ref" : "#/components/schemas/PublicExportViewRequest" }, { "$ref" : "#/components/schemas/PublicExportListRequest" } ] }, "PublicExportResponse" : { "required" : [ "createdAt", "exportState", "exportType", "id", "objectProperties", "objectType", "updatedAt" ], "type" : "object", "properties" : { "createdAt" : { "type" : "string", "description" : "The timestamp when the export was created, in ISO 8601 format.", "format" : "date-time", "example" : null }, "exportName" : { "type" : "string", "description" : "The name assigned to the export.", "example" : null }, "exportState" : { "type" : "string", "description" : "The current state of the export process.", "example" : null, "enum" : [ "CANCELED", "CONFLICT", "DEFERRED", "DELETED", "DONE", "ENQUEUED", "FAILED", "PENDING_APPROVAL", "PROCESSING" ] }, "exportType" : { "type" : "string", "description" : "The type of export, which can be either VIEW or LIST.", "example" : null, "enum" : [ "LIST", "VIEW" ] }, "id" : { "type" : "string", "description" : "The unique ID of the export.", "example" : null }, "objectProperties" : { "type" : "array", "description" : "The list of properties exported for the associated object.", "example" : null, "items" : { "type" : "string", "example" : null } }, "objectType" : { "type" : "string", "description" : "The associated CRM object being exported.", "example" : null }, "recordCount" : { "type" : "integer", "description" : "The total number of records included in the export.", "format" : "int32", "example" : null }, "updatedAt" : { "type" : "string", "description" : "The timestamp when the export was last updated, in ISO 8601 format.", "format" : "date-time", "example" : null } }, "example" : null }, "PublicExportViewRequest" : { "required" : [ "associatedObjectType", "exportInternalValuesOptions", "exportName", "exportType", "format", "includeLabeledAssociations", "includePrimaryDisplayPropertyForAssociatedObjects", "language", "objectProperties", "objectType", "overrideAssociatedObjectsPerDefinitionPerRowLimit" ], "type" : "object", "properties" : { "associatedObjectType" : { "type" : "array", "example" : null, "items" : { "type" : "string", "example" : null } }, "exportInternalValuesOptions" : { "type" : "array", "example" : null, "items" : { "type" : "string", "example" : null, "enum" : [ "NAMES", "VALUES" ] } }, "exportName" : { "type" : "string", "example" : null }, "exportType" : { "type" : "string", "example" : null, "default" : "VIEW", "enum" : [ "VIEW" ] }, "format" : { "type" : "string", "example" : null, "enum" : [ "CSV", "XLS", "XLSX" ] }, "includeLabeledAssociations" : { "type" : "boolean", "example" : null }, "includePrimaryDisplayPropertyForAssociatedObjects" : { "type" : "boolean", "example" : null }, "language" : { "type" : "string", "example" : null, "enum" : [ "AF_ZA", "AR_EG", "BG", "BN", "CA_ES", "CS", "DA_DK", "DE", "EL_GR", "EN", "EN_GB", "ES", "ES_MX", "ET_EE", "FI", "FR", "FR_CA", "HE_IL", "HI_IN", "HR", "HU", "ID", "IT", "JA", "KO_KR", "LT_LT", "MS", "NL", "NO", "PL", "PT_BR", "PT_PT", "RO", "RU", "SK_SK", "SL", "SV", "TH", "TL", "TR", "UK", "VI_VN", "ZH_CN", "ZH_HK", "ZH_TW" ] }, "objectProperties" : { "type" : "array", "example" : null, "items" : { "type" : "string", "example" : null } }, "objectType" : { "type" : "string", "example" : null }, "overrideAssociatedObjectsPerDefinitionPerRowLimit" : { "type" : "boolean", "example" : null }, "publicCrmSearchRequest" : { "$ref" : "#/components/schemas/PublicCrmSearchRequest" } }, "example" : null, "x-hubspot-sub-type-impl" : true }, "StandardError" : { "required" : [ "category", "context", "errors", "links", "message", "status" ], "type" : "object", "properties" : { "category" : { "type" : "string", "description" : "The main category of the error.", "example" : null }, "context" : { "type" : "object", "additionalProperties" : { "type" : "array", "example" : null, "items" : { "type" : "string", "example" : null } }, "description" : "Context about the error condition", "example" : null }, "errors" : { "type" : "array", "description" : "The detailed error objects.", "example" : null, "items" : { "$ref" : "#/components/schemas/ErrorDetail" } }, "id" : { "type" : "string", "description" : "A unique ID for the error instance.", "example" : null }, "links" : { "type" : "object", "additionalProperties" : { "type" : "string", "example" : null }, "description" : "URLs linking to documentation or resources associated with the error.", "example" : null }, "message" : { "type" : "string", "description" : "A human readable message describing the error along with remediation steps where appropriate", "example" : null }, "status" : { "type" : "string", "description" : "A text status code for the error, typically \"error\".", "example" : null }, "subCategory" : { "type" : "object", "properties" : { }, "description" : "A specific category that contains more specific detail about the error", "example" : null } }, "description" : "Represents a standard error response in the HubSpot API, providing detailed information about an error that occurred during an API request.", "example" : null }, "TaskLocator" : { "required" : [ "id" ], "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "The unique ID of the export.", "example" : null }, "links" : { "type" : "object", "additionalProperties" : { "type" : "string", "example" : null }, "description" : "An object containing relevant links related to the export process.", "example" : null } }, "example" : null } }, "responses" : { "Error" : { "description" : "An error occurred.", "content" : { "*/*" : { "schema" : { "$ref" : "#/components/schemas/Error" }, "example" : null } } } }, "securitySchemes" : { "developer_hapikey" : { "type" : "apiKey", "name" : "hapikey", "in" : "query" }, "oauth2" : { "type" : "oauth2", "flows" : { "authorizationCode" : { "authorizationUrl" : "https://app.hubspot.com/oauth/authorize", "tokenUrl" : "https://api.hubapi.com/oauth/v1/token", "scopes" : { "crm.export" : "" } } } }, "private_apps" : { "type" : "apiKey", "name" : "private-app", "in" : "header" }, "private_apps_legacy" : { "type" : "apiKey", "name" : "private-app-legacy", "in" : "header" } } }, "x-hubspot-available-client-libraries" : [ "Node", "Python", "Ruby", "PHP" ], "x-hubspot-product-tier-requirements" : { "marketing" : "FREE", "sales" : "FREE", "service" : "FREE", "cms" : "FREE", "commerce" : "FREE", "crmHub" : "FREE", "dataHub" : "FREE" } }