objectTypeId in the endpoints to work with different objects. For example, to create contacts, you’d make a POST request to crm/objects/2026-03/0-1 and to create courses, the request would be to crm/objects/2026-03/0-410.
Expand the section below to view objects and their object type ID values.
Object type ID values
Object type ID values
Retrieve records
You can retrieve records individually or in batches. You can use the objects API to retrieve all records of an object or retrieve specific records by unique identifier values. To retrieve records based on specific criteria, use the CRM search API.Retrieve all records or specific records by ID
- To retrieve an individual record, make a
GETrequest to/crm/objects/2026-03/{objectTypeId}/{recordId}. - To request a list of all records for an object, make a
GETrequest to/crm/objects/2026-03/{objectTypeId}. - To retrieve a batch of specific records by record ID or a custom unique identifier property, make a
POSTrequest tocrm/objects/2026-03/{objectTypeId}/batch/readand include theidvalues of records in the request body.
Although the batch endpoint only retrieves records, it requires the
POST method because batch requests send up to 100 record IDs in the request body. Using the POST method avoids the URL length limits that are applied to GET requests.
For example, to retrieve a meeting with the meeting’s text body and starting time, you’d make a
GET request to /crm/objects/2026-03/0-47/{meetingId}?properties=hs_meeting_body,hs_timestamp and your response would look similar to the following:
- To retrieve a specific number of records under 100, add a value to the
limitparameter. For example, you would use?limit=50to retrieve 50 records. - To retrieve additional records in subsequent requests (i.e. the records after the limit was reached in your request), include the
afterparameter with theaftervalue returned from the previous request. This value is the Record ID of the next record. For example,?after=123456.
GET /crm/objects/2026-03/0-420?limit=50. In your response, under the paging object below the list of returned listings, the after value is the id of the next listing that would’ve been returned. To request 50 more listings, starting with the next returned value, make a GET request to /crm/objects/2026-03/0-420?limit=50&after={id}.
The after field is highlighted in the example response below:
Retrieve records based on criteria
To include filters that retrieve records based on specific criteria, use the CRM search API. Theid values of returned records can then be used to manage records via the objects API endpoints.
For example, to retrieve all deals in the Presentation scheduled stage with a value over $10,000, you’d make a POST request to /crm/objects/2026-03/deals/search, and your request would look like the following:
Create records
- To create a record for an object, make a
POSTrequest tocrm/objects/2026-03/{objectTypeId}. - To create multiple records, make a
POSTrequest to/crm/objects/2026-03/{objectTypeId}/batch/create.
properties object. You can also add an associations object to associate your new record with existing records (e.g., companies, deals), or activities (e.g., meetings, notes).
If you want to create and update records at the same time, learn how to upsert records below.
Properties
Record details are stored in properties. To view all available properties for an object, you can retrieve a list of your account’s properties by making aGET request to /crm/properties/2026-03/{objectTypeId}. Learn more about the properties API and how to format property values.
Expand the section below to view the objects for which records can be created via API, and the properties required for creation.
Required properties to create records
Required properties to create records
Associations
When creating a new record, you can also associate it with existing records or activities by including anassociations object. In the associations object, you should include the following:
For example, to create a new contact and associate with an existing company and email, your request would look like the following:
For batch create actions, you can enable multi-status errors which tell you which records were successfully created and which were not. Learn more about setting up multi-status error handling.
Update records
You can update records individually or in batches. For existing records, the Record ID is a default unique value that you can use to update the record via API, but you can also identify records using theidProperty parameter with a custom unique identifier property. If you want to create and update records at the same time, learn how to upsert records.
- To update an individual record, make a
PATCHrequest to/crm/objects/2026-03/{objectTypeId}/{recordId}, and include the data you want to update. - To update multiple records, make a
POSTrequest to/crm/objects/2026-03/{objectTypeId}/batch/update. In the request body, include an array with the identifiers for the records and the properties you want to update.
Upsert records
You can also batch create and update records at the same time using the upsert endpoint. For this endpoint, you can use a custom unique identifier property oremail for contacts. Following the request, if the records already exist, they’ll be updated and if the records don’t exist, they’ll be created.
To upsert records, make a POST request to /crm/objects/2026-03/{objectTypeId}/batch/upsert. In your request body, include the idProperty parameter to identify the unique identifier property you’re using. Include that property’s value as the id and add the other properties you want to set or update.
For example, to upsert contacts to set the phone number property using email as the identifier, your request would look similar to the following:
Update associations
Once records are created, you can update their associations using the associations API.- To associate a record with other records or an activity, make a
PUTrequest to/crm/objects/2026-03/{objectTypeId}/{fromRecordId}/associations/{toObjectTypeId}/{toRecordId}. - To remove an association between a record and a record or activity, make a
DELETErequest to the following URL:/crm/objects/2026-03/{objectTypeId}/{fromRecordId}/associations/{toObjectTypeId}/{toRecordId}.
To retrieve the
associationTypeId value, refer to this list of default values, or make a GET request to /crm/associations/2026-03/{fromObjectTypeId}/{toObjectTypeId}/labels.Pin an activity on a record
You can pin an activity on a record by including thehs_pinned_engagement_id field in your create, update, or upsert request. In the field, include the id of the activity to pin, which can be retrieved by making a GET request to /crm/objects/2026-03/{objectTypeId}/{recordId} for calls, communications, emails, meetings, notes, postal mail, or tasks. You can pin one activity per record, and the activity must already be associated with the record prior to pinning.
For example, to set or update an existing deal’s pinned activity, your request could look like:
Delete records
You can delete records individually or in batches, which will add the record to the recycling bin in HubSpot. You can restore the record within HubSpot for up to 90 days after deletion.- To delete an individual record by its record ID, make a
DELETErequest to/crm/objects/2026-03/{objectTypeId}/{recordId}. - To delete multiple records, make a
POSTrequest to/crm/objects/2026-03/{objectTypeId}/batch/archiveand include the record ID values as theidinputs in your request body.
Limits
Object API batch endpoints are limited to 100 inputs per request. For example, create or retrieve up to 100 contacts per request.Error handling
The following are common errors you may encounter when using the object APIs. Refer to the error handling guide for details about more error responses and how to resolve them.
For example:
- If you attempt to create a company with an invalid property name, your error response would look like:
400 Bad Request
- If you attempt to retrieve deals without the
crm.objects.deals.readscope, your response would look like:
403 Forbidden
Multi-status errors for batch create requests
For the object APIs’ batch create endpoints, you can enable multi-status responses that include partial failures by including a uniqueobjectWriteTraceId value for each input in your request. The objectWriteTraceId can be any unique string that helps you identify which records succeeded or failed.
For example, a request to create tickets could look like: