Skip to main content
Using the object APIs, you can create and manage records and activities within HubSpot. The object APIs have the same basic functionality for all supported objects, so you can substitute the 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.
Some objects have limited API functionality. For more details, click the link to an object’s endpoints reference documentation in the table below. If an object listed doesn’t have its own guide, you can refer to the objects API guide and substitute the {objectTypeId} in each endpoint to your desired object.
Expand the section below to view objects and their object type ID values.
In this article, learn the basics of how to use the object APIs.
New objects (e.g., appointments, courses, listings, services) must be activated in the HubSpot account before you can manage their records via API. Learn how to check if they’re activated via API and how to activate them in HubSpot.

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 GET request to /crm/objects/2026-03/{objectTypeId}/{recordId}.
  • To request a list of all records for an object, make a GET request to /crm/objects/2026-03/{objectTypeId}.
  • To retrieve a batch of specific records by record ID or a custom unique identifier property, make a POST request to crm/objects/2026-03/{objectTypeId}/batch/read and include the id values 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 these endpoints, you can include the following query parameters in the request URL: 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 batch of deals, your request could look like either of the following:
You can retrieve up to 100 records in a batch request.
  • To retrieve a specific number of records under 100, add a value to the limit parameter. For example, you would use ?limit=50 to retrieve 50 records.
  • To retrieve additional records in subsequent requests (i.e. the records after the limit was reached in your request), include the after parameter with the after value returned from the previous request. This value is the Record ID of the next record. For example, ?after=123456.
For example, to retrieve 50 listings, your request URL would be 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. The id 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 POST request to crm/objects/2026-03/{objectTypeId}.
  • To create multiple records, make a POST request to /crm/objects/2026-03/{objectTypeId}/batch/create.
In your request, include data for each record in a 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 a GET 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.
For example, to create a new ticket without associations, your request may look similar to the following:
For example, to create multiple contacts without associations, your request may look similar to the following:

Associations

When creating a new record, you can also associate it with existing records or activities by including an associations 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 example, to create multiple deals and associate them with existing companies and meetings, your request would look similar to 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 the idProperty 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 PATCH request to /crm/objects/2026-03/{objectTypeId}/{recordId}, and include the data you want to update.
  • To update multiple records, make a POST request 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.
If you’ve merged records, you can use the previous record ID values stored in the hs_merged_object_ids field to update a record using the basic update endpoint. However, these values are not supported when updating records using the batch update endpoint.
For example, to update a contact, your request would look similar to the following:

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 or email 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.
Partial upserts are not supported when using email as the idProperty for contacts. To complete a partial upsert, use a custom unique identifier property as the idProperty instead.
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 PUT request to /crm/objects/2026-03/{objectTypeId}/{fromRecordId}/associations/{toObjectTypeId}/{toRecordId}.
  • To remove an association between a record and a record or activity, make a DELETE request 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 the hs_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:
To create a new deal, associate it with an activity, and pin that activity, you request would 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 DELETE request to /crm/objects/2026-03/{objectTypeId}/{recordId}.
  • To delete multiple records, make a POST request to /crm/objects/2026-03/{objectTypeId}/batch/archive and include the record ID values as the id inputs in your request body.
For example, to delete multiple appointments, your request would look like:

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.read scope, 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 unique objectWriteTraceId 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:
In the response, statuses are grouped so you can see which creates were successful and which failed. For the above request, your response would look like:
Last modified on June 4, 2026