Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developers.hubspot.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

In HubSpot, courses store information about programs such as a series of lessons, trainings, or educational modules. The courses endpoints allow you to create and manage course records in your HubSpot account, as well as sync course data between HubSpot and other systems. The course object must be activated in the HubSpot account to manage course records. Learn more about objects, records, properties, and associations APIs in the Understanding the CRM guide.

Create courses

To create new courses:
  • To create one course, make a POST request to /crm/objects/2026-03/courses.
  • To create multiple courses, make a POST request to /crm/objects/2026-03/courses/batch/create.
In your request, include your course data in a properties object. You can also add an associations object to associate your new course with existing records (e.g., contacts, companies), or activities (e.g., meetings, notes).
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.

Create courses with property values

When creating a course, include course properties to store the course’s details. For example, to create a new course, your request may look similar to the following:
{
  "properties": {
    "hs_course_name": "Introduction to Inbound Marketing",
    "hs_course_id": "course-101",
    "hs_course_description": "A foundational course covering inbound marketing principles.",
    "hs_enrollment_capacity": "50"
  }
}
For a list of default course properties, refer to the courses object definition page. To view all available course properties in your account, including custom properties, make a GET request to /crm/properties/2026-03/courses. Learn more about the properties API.

Create courses with associations

When creating a new course, you can also associate the course with existing records or activities by including an associations array. For example, to associate a new course with an existing contact, your request would look like the following:
{
  "properties": {
    "hs_course_name": "Introduction to Inbound Marketing",
    "hs_course_id": "course-101",
    "hs_course_description": "A foundational course covering inbound marketing principles."
  },
  "associations": [
    {
      "to": {
        "id": "123456"
      },
      "types": [
        {
          "associationCategory": "HUBSPOT_DEFINED",
          "associationTypeId": 860
        }
      ]
    }
  ]
}
ParameterDescription
toThe record or activity you want to associate with the course, specified by its unique id value.
typesThe type of the association between the course and the record/activity. Include the associationCategory and associationTypeId. Default association type IDs are listed on the associations API guide, or you can retrieve the value for custom association types via the associations API.

Retrieve courses

You can retrieve courses individually or in batches. Include the following query parameters in your request URLs to retrieve certain data.
ParameterDescription
propertiesA comma-separated list of the properties to be returned in the response. If a requested property isn’t defined, it won’t be included in the response. If a requested property is defined but a course doesn’t have a value, it will be returned as null.
propertiesWithHistoryA comma-separated list of the current and historical properties to be returned in the response.
associationsSupported when retrieving an individual course or all courses, a comma-separated list of objects to retrieve associated IDs for. Learn more about the associations API.

Retrieve an individual course

To retrieve an individual course by its record ID, make a GET request to /crm/objects/2026-03/courses/{courseId}.

Retrieve all courses

To request a list of all courses, make a GET request to /crm/objects/2026-03/courses. You can retrieve up to 100 courses in one request.
  • To retrieve a specific amount under 100, add a value to the limit parameter. For example, ?limit=50.
  • To paginate through results, include the after parameter with the after value returned from the previous request.

Retrieve a batch of courses

To retrieve courses in batches, make a POST request to /crm/objects/2026-03/courses/batch/read. Include the id values of the courses you want to retrieve.
Please note: the batch endpoint cannot retrieve associations. To view associations for a specific batch of courses, retrieve the courses’ id values first, then include them in a request to the batch read associations API endpoint. Learn how to retrieve associations with the associations API.
For example, to retrieve a batch of courses by their record ID values:
{
  "properties": ["hs_course_name", "hs_course_id", "hs_course_description"],
  "inputs": [
    {
      "id": "1234567"
    },
    {
      "id": "987456"
    }
  ]
}

Update courses

You can update courses individually or in batches.

Update an individual course

To update an individual course by its record ID, make a PATCH request to /crm/objects/2026-03/courses/{courseId}, and include the data you want to update. For example:
{
  "properties": {
    "hs_enrollment_capacity": "75"
  }
}

Update a batch of courses

To update multiple courses, make a POST request to /crm/objects/2026-03/courses/batch/update. In your request body, include each course’s record ID as the id and include the properties you want to update. For example:
{
  "inputs": [
    {
      "id": "123456789",
      "properties": {
        "hs_enrollment_capacity": "75"
      }
    },
    {
      "id": "56789123",
      "properties": {
        "hs_enrollment_capacity": "30"
      }
    }
  ]
}

Upsert courses

You can batch create and update courses at the same time using the upsert endpoint. Following the request, if the courses already exist, they’ll be updated; if they don’t exist, they’ll be created. To upsert courses, make a POST request to /crm/objects/2026-03/courses/batch/upsert.

Associate existing courses with records or activities

To associate a course with other CRM records or an activity, make a PUT request to /crm/objects/2026-03/courses/{courseId}/associations/{toObjectType}/{toObjectId}/{associationTypeId}.
To retrieve the associationTypeId value, refer to the list of default values, or make a GET request to /crm/associations/2026-03/{fromObjectType}/{toObjectType}/labels.
Learn more about the associations API.

Delete courses

You can delete courses individually or in batches, which will add the course to the recycling bin in HubSpot. You can later restore the record within HubSpot.
  • To delete an individual course, make a DELETE request to /crm/objects/2026-03/courses/{courseId}.
  • To delete courses in batches, make a POST request to /crm/objects/2026-03/courses/batch/archive.
Last modified on May 7, 2026