openapi: 3.1.0 info: title: HubSpot Engagement Tasks API description: >- The tasks endpoints allow you to create and manage task engagement records in HubSpot CRM. Tasks represent to-do items that can be assigned to users and associated with contacts, companies, and deals to track follow-up actions. Task records follow the standard CRM object pattern at /crm/v3/objects/tasks. version: v3 contact: name: HubSpot Developer Support url: https://developers.hubspot.com/ servers: - url: https://api.hubapi.com description: HubSpot API security: - oauth2: [] tags: - name: Associations description: Operations for managing task associations - name: Batch description: Batch operations for tasks - name: Tasks description: Operations for managing task engagement records paths: /crm/v3/objects/tasks: get: operationId: listTasks summary: Hubspot List Tasks description: >- Returns a page of task engagement records. Use the limit and after parameters to paginate through tasks. You can also specify which properties to return using the properties parameter. tags: - Tasks parameters: - name: limit in: query description: The maximum number of results to return per page. schema: type: integer default: 10 maximum: 100 example: 10 - name: after in: query description: The cursor for pagination to get the next page of results. schema: type: string example: example-value - name: properties in: query description: A comma-separated list of property names to return. schema: type: string example: example-value - name: archived in: query description: Whether to return archived tasks. schema: type: boolean default: false example: false responses: '200': description: Successful response with a list of tasks. content: application/json: schema: $ref: '#/components/schemas/CollectionResponseTask' examples: Listtasks200Example: summary: Default listTasks 200 response x-microcks-default: true value: results: &id005 - id: '500123' properties: &id001 key: value createdAt: '2025-03-15T14:30:00Z' updatedAt: '2025-03-15T14:30:00Z' archived: true associations: &id002 key: value paging: next: {} '401': $ref: '#/components/responses/Unauthorized' x-microcks-operation: delay: 0 dispatcher: FALLBACK post: operationId: createTask summary: Hubspot Create a Task description: >- Creates a new task engagement record with the provided properties. Common task properties include hs_task_subject, hs_task_body, hs_task_status, hs_task_priority, hs_task_type, and hs_timestamp for the due date. tags: - Tasks requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SimplePublicObjectInput' examples: CreatetaskRequestExample: summary: Default createTask request x-microcks-default: true value: properties: &id003 key: value responses: '201': description: Task created successfully. content: application/json: schema: $ref: '#/components/schemas/Task' examples: Createtask201Example: summary: Default createTask 201 response x-microcks-default: true value: id: '500123' properties: *id001 createdAt: '2025-03-15T14:30:00Z' updatedAt: '2025-03-15T14:30:00Z' archived: true associations: *id002 '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' x-microcks-operation: delay: 0 dispatcher: FALLBACK /crm/v3/objects/tasks/{taskId}: get: operationId: getTask summary: Hubspot Get a Task description: >- Returns a single task engagement record by its ID. You can specify which properties to return using the properties parameter. tags: - Tasks parameters: - name: taskId in: path required: true description: The ID of the task to retrieve. schema: type: string example: '500123' - name: properties in: query description: A comma-separated list of property names to return. schema: type: string example: example-value - name: archived in: query description: Whether to return archived tasks. schema: type: boolean default: false example: false responses: '200': description: Successful response with the task record. content: application/json: schema: $ref: '#/components/schemas/Task' examples: Gettask200Example: summary: Default getTask 200 response x-microcks-default: true value: id: '500123' properties: *id001 createdAt: '2025-03-15T14:30:00Z' updatedAt: '2025-03-15T14:30:00Z' archived: true associations: *id002 '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' x-microcks-operation: delay: 0 dispatcher: FALLBACK patch: operationId: updateTask summary: Hubspot Update a Task description: >- Performs a partial update of a task engagement record. Only the properties included in the request body will be updated. tags: - Tasks parameters: - name: taskId in: path required: true description: The ID of the task to update. schema: type: string example: '500123' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SimplePublicObjectInput' examples: UpdatetaskRequestExample: summary: Default updateTask request x-microcks-default: true value: properties: *id003 responses: '200': description: Task updated successfully. content: application/json: schema: $ref: '#/components/schemas/Task' examples: Updatetask200Example: summary: Default updateTask 200 response x-microcks-default: true value: id: '500123' properties: *id001 createdAt: '2025-03-15T14:30:00Z' updatedAt: '2025-03-15T14:30:00Z' archived: true associations: *id002 '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' x-microcks-operation: delay: 0 dispatcher: FALLBACK delete: operationId: deleteTask summary: Hubspot Archive a Task description: >- Archives (soft deletes) a task engagement record by its ID. Archived tasks can be restored using the HubSpot UI or API. tags: - Tasks parameters: - name: taskId in: path required: true description: The ID of the task to archive. schema: type: string example: '500123' responses: '204': description: Task archived successfully. '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' x-microcks-operation: delay: 0 dispatcher: FALLBACK /crm/v3/objects/tasks/batch/read: post: operationId: batchReadTasks summary: Hubspot Batch Read Tasks description: >- Reads a batch of task records by their IDs. Useful for retrieving multiple tasks in a single API call. tags: - Batch requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BatchReadInput' examples: BatchreadtasksRequestExample: summary: Default batchReadTasks request x-microcks-default: true value: properties: &id006 - example-value inputs: &id007 - id: '500123' responses: '200': description: Batch read completed successfully. content: application/json: schema: $ref: '#/components/schemas/BatchResponseTask' examples: Batchreadtasks200Example: summary: Default batchReadTasks 200 response x-microcks-default: true value: status: active results: &id004 - id: '500123' properties: *id001 createdAt: '2025-03-15T14:30:00Z' updatedAt: '2025-03-15T14:30:00Z' archived: true associations: *id002 completedAt: '2025-03-15T14:30:00Z' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' x-microcks-operation: delay: 0 dispatcher: FALLBACK /crm/v3/objects/tasks/batch/create: post: operationId: batchCreateTasks summary: Hubspot Batch Create Tasks description: Creates multiple task engagement records in a single API call. tags: - Batch requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BatchCreateInput' examples: BatchcreatetasksRequestExample: summary: Default batchCreateTasks request x-microcks-default: true value: inputs: &id008 - properties: *id003 responses: '201': description: Tasks created successfully. content: application/json: schema: $ref: '#/components/schemas/BatchResponseTask' examples: Batchcreatetasks201Example: summary: Default batchCreateTasks 201 response x-microcks-default: true value: status: active results: *id004 completedAt: '2025-03-15T14:30:00Z' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' x-microcks-operation: delay: 0 dispatcher: FALLBACK /crm/v3/objects/tasks/batch/update: post: operationId: batchUpdateTasks summary: Hubspot Batch Update Tasks description: Updates multiple task engagement records in a single API call. tags: - Batch requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BatchUpdateInput' examples: BatchupdatetasksRequestExample: summary: Default batchUpdateTasks request x-microcks-default: true value: inputs: &id009 - id: '500123' properties: key: value responses: '200': description: Tasks updated successfully. content: application/json: schema: $ref: '#/components/schemas/BatchResponseTask' examples: Batchupdatetasks200Example: summary: Default batchUpdateTasks 200 response x-microcks-default: true value: status: active results: *id004 completedAt: '2025-03-15T14:30:00Z' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' x-microcks-operation: delay: 0 dispatcher: FALLBACK /crm/v3/objects/tasks/search: post: operationId: searchTasks summary: Hubspot Search Tasks description: >- Searches for task engagement records using filter groups, sorts, and other query parameters. tags: - Tasks requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SearchRequest' examples: SearchtasksRequestExample: summary: Default searchTasks request x-microcks-default: true value: filterGroups: &id010 - filters: - {} sorts: &id011 - propertyName: Example Record direction: ASCENDING query: example-value properties: &id012 - example-value limit: 100 after: example-value responses: '200': description: Search results returned successfully. content: application/json: schema: $ref: '#/components/schemas/CollectionResponseTask' examples: Searchtasks200Example: summary: Default searchTasks 200 response x-microcks-default: true value: results: *id005 paging: next: {} '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' x-microcks-operation: delay: 0 dispatcher: FALLBACK /crm/v3/objects/tasks/{taskId}/associations/{toObjectType}: get: operationId: listTaskAssociations summary: Hubspot List Task Associations description: >- Returns all associations of a task record to objects of a specified type, such as contacts, companies, or deals. tags: - Associations parameters: - name: taskId in: path required: true description: The ID of the task. schema: type: string example: '500123' - name: toObjectType in: path required: true description: The type of associated object. schema: type: string example: standard responses: '200': description: List of associations returned successfully. content: application/json: schema: $ref: '#/components/schemas/CollectionResponseAssociation' examples: Listtaskassociations200Example: summary: Default listTaskAssociations 200 response x-microcks-default: true value: results: &id013 - id: '500123' type: standard paging: next: {} '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' x-microcks-operation: delay: 0 dispatcher: FALLBACK /crm/v3/objects/tasks/{taskId}/associations/{toObjectType}/{toObjectId}/{associationType}: put: operationId: createTaskAssociation summary: Hubspot Create a Task Association description: Creates an association between a task record and another CRM object. tags: - Associations parameters: - name: taskId in: path required: true schema: type: string example: '500123' - name: toObjectType in: path required: true schema: type: string example: standard - name: toObjectId in: path required: true schema: type: string example: '500123' - name: associationType in: path required: true schema: type: string example: standard responses: '200': description: Association created successfully. content: application/json: schema: $ref: '#/components/schemas/Association' examples: Createtaskassociation200Example: summary: Default createTaskAssociation 200 response x-microcks-default: true value: id: '500123' type: standard '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' x-microcks-operation: delay: 0 dispatcher: FALLBACK delete: operationId: deleteTaskAssociation summary: Hubspot Delete a Task Association description: Removes an association between a task record and another CRM object. tags: - Associations parameters: - name: taskId in: path required: true schema: type: string example: '500123' - name: toObjectType in: path required: true schema: type: string example: standard - name: toObjectId in: path required: true schema: type: string example: '500123' - name: associationType in: path required: true schema: type: string example: standard responses: '204': description: Association deleted successfully. '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' x-microcks-operation: delay: 0 dispatcher: FALLBACK components: securitySchemes: oauth2: type: http scheme: bearer description: OAuth 2.0 Bearer token (access token from OAuth flow) schemas: Task: type: object description: A HubSpot task engagement record. properties: id: type: string description: The unique identifier for the task. example: '500123' properties: type: object description: The task's properties as key-value pairs. additionalProperties: type: string example: *id001 createdAt: type: string format: date-time example: '2025-03-15T14:30:00Z' updatedAt: type: string format: date-time example: '2025-03-15T14:30:00Z' archived: type: boolean example: true associations: type: object additionalProperties: $ref: '#/components/schemas/CollectionResponseAssociation' example: *id002 CollectionResponseTask: type: object properties: results: type: array items: $ref: '#/components/schemas/Task' example: *id005 paging: $ref: '#/components/schemas/Paging' BatchResponseTask: type: object properties: status: type: string example: active results: type: array items: $ref: '#/components/schemas/Task' example: *id004 completedAt: type: string format: date-time example: '2025-03-15T14:30:00Z' SimplePublicObjectInput: type: object properties: properties: type: object additionalProperties: type: string example: *id003 BatchReadInput: type: object properties: properties: type: array items: type: string example: *id006 inputs: type: array items: type: object properties: id: type: string example: *id007 BatchCreateInput: type: object properties: inputs: type: array items: $ref: '#/components/schemas/SimplePublicObjectInput' example: *id008 BatchUpdateInput: type: object properties: inputs: type: array items: type: object properties: id: type: string properties: type: object additionalProperties: type: string example: *id009 SearchRequest: type: object properties: filterGroups: type: array items: $ref: '#/components/schemas/FilterGroup' example: *id010 sorts: type: array items: type: object properties: propertyName: type: string direction: type: string enum: [ASCENDING, DESCENDING] example: *id011 query: type: string example: example-value properties: type: array items: type: string example: *id012 limit: type: integer maximum: 200 example: 100 after: type: string example: example-value FilterGroup: type: object properties: filters: type: array items: $ref: '#/components/schemas/Filter' example: - propertyName: Example Record operator: EQ value: example-value Filter: type: object properties: propertyName: type: string example: Example Record operator: type: string enum: [EQ, NEQ, LT, LTE, GT, GTE, BETWEEN, IN, NOT_IN, HAS_PROPERTY, NOT_HAS_PROPERTY, CONTAINS_TOKEN, NOT_CONTAINS_TOKEN] example: EQ value: type: string example: example-value Association: type: object properties: id: type: string example: '500123' type: type: string example: standard CollectionResponseAssociation: type: object properties: results: type: array items: $ref: '#/components/schemas/Association' example: *id013 paging: $ref: '#/components/schemas/Paging' Paging: type: object properties: next: type: object properties: after: type: string example: after: example-value Error: type: object properties: status: type: string example: active message: type: string example: This is an example description. correlationId: type: string example: '500123' category: type: string example: standard responses: Unauthorized: description: Authentication credentials are missing or invalid. content: application/json: schema: $ref: '#/components/schemas/Error' BadRequest: description: The request is invalid or missing required parameters. content: application/json: schema: $ref: '#/components/schemas/Error' NotFound: description: The requested resource was not found. content: application/json: schema: $ref: '#/components/schemas/Error'