openapi: 3.1.0 info: title: HubSpot Analytics Events Access Tokens Action Definitions API description: "The HubSpot Analytics Events API allows you to retrieve event completion data \nfrom your HubSpot account. Use this API to query event instances associated with \nCRM objects, filter by event types, and analyze user behavior and engagement patterns.\n\n## Key Features\n- Retrieve event instances for CRM objects\n- Filter events by type, date range, and object\n- Paginate through large result sets\n- Query available event types\n" version: 3.0.0 contact: name: HubSpot Developer Support url: https://developers.hubspot.com license: name: MIT url: https://opensource.org/licenses/MIT servers: - url: https://api.hubapi.com description: HubSpot Production API Server tags: - name: Action Definitions description: Operations to create and manage custom workflow action definitions paths: /automation/v4/actions/{appId}: get: tags: - Action Definitions summary: Hubspot List Action Definitions description: "Retrieves a paginated list of all custom action definitions for the specified \napplication. Use query parameters to filter by archived status and control pagination.\n" operationId: listActionDefinitions x-microcks-operation: delay: 100 dispatcher: SCRIPT dispatcherRules: 'def response = mockRequest.requestContent return "ActionDefinitionCollectionSuccessExample" ' security: - oauth2: - automation - privateApp: [] parameters: - $ref: '#/components/parameters/AppIdPath' example: example-value - $ref: '#/components/parameters/LimitQuery' example: example-value - $ref: '#/components/parameters/AfterQuery' example: example-value - $ref: '#/components/parameters/ArchivedQuery' example: example-value responses: '200': description: Successfully retrieved action definitions content: application/json: schema: $ref: '#/components/schemas/ActionDefinitionCollection' examples: ActionDefinitionCollectionSuccessExample: $ref: '#/components/examples/ActionDefinitionCollectionSuccessExample' '400': description: Bad request - Invalid parameters content: application/json: schema: $ref: '#/components/schemas/Error' examples: Listactiondefinitions400Example: summary: Default listActionDefinitions 400 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: &id001 - message: This is an example description. code: example-value in: example-value subCategory: standard context: key: value context: &id002 key: value links: &id003 key: value '401': description: Unauthorized - Invalid or missing authentication content: application/json: schema: $ref: '#/components/schemas/Error' examples: Listactiondefinitions401Example: summary: Default listActionDefinitions 401 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: *id001 context: *id002 links: *id003 '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' examples: Listactiondefinitions500Example: summary: Default listActionDefinitions 500 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: *id001 context: *id002 links: *id003 post: tags: - Action Definitions summary: Hubspot Create an Action Definition description: "Creates a new custom workflow action definition for the specified application. \nThe action definition includes input fields, output fields, labels, and configuration \nfor how the action appears in the HubSpot workflow editor.\n" operationId: createActionDefinition x-microcks-operation: delay: 100 dispatcher: SCRIPT dispatcherRules: 'def response = mockRequest.requestContent return "ActionDefinitionSuccessExample" ' security: - oauth2: - automation - privateApp: [] parameters: - $ref: '#/components/parameters/AppIdPath' example: example-value requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ActionDefinitionInput' examples: ActionDefinitionInputExample: $ref: '#/components/examples/ActionDefinitionInputExample' responses: '201': description: Successfully created action definition content: application/json: schema: $ref: '#/components/schemas/ActionDefinition' examples: ActionDefinitionSuccessExample: $ref: '#/components/examples/ActionDefinitionSuccessExample' '400': description: Bad request - Invalid parameters content: application/json: schema: $ref: '#/components/schemas/Error' examples: Createactiondefinition400Example: summary: Default createActionDefinition 400 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: &id004 - message: This is an example description. code: example-value in: example-value subCategory: standard context: key: value context: &id005 key: value links: &id006 key: value '401': description: Unauthorized - Invalid or missing authentication content: application/json: schema: $ref: '#/components/schemas/Error' examples: Createactiondefinition401Example: summary: Default createActionDefinition 401 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: *id004 context: *id005 links: *id006 '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' examples: Createactiondefinition500Example: summary: Default createActionDefinition 500 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: *id004 context: *id005 links: *id006 /automation/v4/actions/{appId}/{definitionId}: get: tags: - Action Definitions summary: Hubspot Retrieve an Action Definition description: "Retrieves a specific custom action definition by its ID. Returns the complete \naction definition including all input fields, output fields, and configuration.\n" operationId: getActionDefinitionById x-microcks-operation: delay: 100 dispatcher: SCRIPT dispatcherRules: 'def response = mockRequest.requestContent return "ActionDefinitionSuccessExample" ' security: - oauth2: - automation - privateApp: [] parameters: - $ref: '#/components/parameters/AppIdPath' example: example-value - $ref: '#/components/parameters/DefinitionIdPath' example: example-value - $ref: '#/components/parameters/ArchivedQuery' example: example-value responses: '200': description: Successfully retrieved action definition content: application/json: schema: $ref: '#/components/schemas/ActionDefinition' examples: ActionDefinitionSuccessExample: $ref: '#/components/examples/ActionDefinitionSuccessExample' '400': description: Bad request - Invalid parameters content: application/json: schema: $ref: '#/components/schemas/Error' examples: Getactiondefinitionbyid400Example: summary: Default getActionDefinitionById 400 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: &id007 - message: This is an example description. code: example-value in: example-value subCategory: standard context: key: value context: &id008 key: value links: &id009 key: value '401': description: Unauthorized - Invalid or missing authentication content: application/json: schema: $ref: '#/components/schemas/Error' examples: Getactiondefinitionbyid401Example: summary: Default getActionDefinitionById 401 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: *id007 context: *id008 links: *id009 '404': description: Action definition not found content: application/json: schema: $ref: '#/components/schemas/Error' examples: Getactiondefinitionbyid404Example: summary: Default getActionDefinitionById 404 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: *id007 context: *id008 links: *id009 '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' examples: Getactiondefinitionbyid500Example: summary: Default getActionDefinitionById 500 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: *id007 context: *id008 links: *id009 patch: tags: - Action Definitions summary: Hubspot Update an Action Definition description: "Updates an existing custom action definition with the provided changes. \nOnly the specified fields will be updated; other fields remain unchanged.\n" operationId: updateActionDefinitionById x-microcks-operation: delay: 100 dispatcher: SCRIPT dispatcherRules: 'def response = mockRequest.requestContent return "ActionDefinitionSuccessExample" ' security: - oauth2: - automation - privateApp: [] parameters: - $ref: '#/components/parameters/AppIdPath' example: example-value - $ref: '#/components/parameters/DefinitionIdPath' example: example-value requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ActionDefinitionPatch' examples: ActionDefinitionPatchExample: $ref: '#/components/examples/ActionDefinitionPatchExample' responses: '200': description: Successfully updated action definition content: application/json: schema: $ref: '#/components/schemas/ActionDefinition' examples: ActionDefinitionSuccessExample: $ref: '#/components/examples/ActionDefinitionSuccessExample' '400': description: Bad request - Invalid parameters content: application/json: schema: $ref: '#/components/schemas/Error' examples: Updateactiondefinitionbyid400Example: summary: Default updateActionDefinitionById 400 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: &id010 - message: This is an example description. code: example-value in: example-value subCategory: standard context: key: value context: &id011 key: value links: &id012 key: value '401': description: Unauthorized - Invalid or missing authentication content: application/json: schema: $ref: '#/components/schemas/Error' examples: Updateactiondefinitionbyid401Example: summary: Default updateActionDefinitionById 401 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: *id010 context: *id011 links: *id012 '404': description: Action definition not found content: application/json: schema: $ref: '#/components/schemas/Error' examples: Updateactiondefinitionbyid404Example: summary: Default updateActionDefinitionById 404 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: *id010 context: *id011 links: *id012 '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' examples: Updateactiondefinitionbyid500Example: summary: Default updateActionDefinitionById 500 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: *id010 context: *id011 links: *id012 delete: tags: - Action Definitions summary: Hubspot Archive an Action Definition description: "Archives (soft deletes) a custom action definition. Archived definitions can be \nrestored by updating their archived status. Active workflows using this action \nwill continue to work until modified.\n" operationId: archiveActionDefinitionById x-microcks-operation: delay: 100 dispatcher: SCRIPT dispatcherRules: 'def response = mockRequest.requestContent return "ArchiveActionDefinitionSuccessExample" ' security: - oauth2: - automation - privateApp: [] parameters: - $ref: '#/components/parameters/AppIdPath' example: example-value - $ref: '#/components/parameters/DefinitionIdPath' example: example-value responses: '204': description: Successfully archived action definition '401': description: Unauthorized - Invalid or missing authentication content: application/json: schema: $ref: '#/components/schemas/Error' examples: Archiveactiondefinitionbyid401Example: summary: Default archiveActionDefinitionById 401 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: &id013 - message: This is an example description. code: example-value in: example-value subCategory: standard context: key: value context: &id014 key: value links: &id015 key: value '404': description: Action definition not found content: application/json: schema: $ref: '#/components/schemas/Error' examples: Archiveactiondefinitionbyid404Example: summary: Default archiveActionDefinitionById 404 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: *id013 context: *id014 links: *id015 '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' examples: Archiveactiondefinitionbyid500Example: summary: Default archiveActionDefinitionById 500 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: *id013 context: *id014 links: *id015 components: schemas: ActionFunctionReference: type: object description: A reference to a function associated with an action required: - functionType - id properties: functionType: type: string enum: - PRE_ACTION_EXECUTION - PRE_FETCH_OPTIONS - POST_FETCH_OPTIONS - POST_ACTION_EXECUTION description: The type of function example: PRE_ACTION_EXECUTION id: type: string description: The unique identifier of the function example: '500123' OutputField: type: object description: An output field returned by the action required: - typeDefinition properties: typeDefinition: $ref: '#/components/schemas/FieldTypeDefinition' FieldTypeDefinition: type: object description: Definition of a field's type and configuration required: - name - type properties: name: type: string description: The programmatic name of the field example: Example Record type: type: string enum: - STRING - NUMBER - BOOL - DATE - DATETIME - ENUMERATION - PHONE_NUMBER - CURRENCY description: The data type of the field example: STRING fieldType: type: string enum: - TEXT - TEXTAREA - NUMBER - SELECT - BOOLEANCHECKBOX - DATE - FILE description: The UI field type for input example: TEXT label: type: string description: Human-readable label for the field example: Example Record description: type: string description: Description of the field example: This is an example description. options: type: array description: Options for enumeration fields items: $ref: '#/components/schemas/FieldOption' example: - label: Example Record value: example-value displayOrder: 100 ErrorDetail: type: object description: Detailed error information required: - message properties: message: type: string description: The error message example: This is an example description. code: type: string description: An error code example: example-value in: type: string description: The location of the error example: example-value subCategory: type: string description: A specific error subcategory example: standard context: type: object additionalProperties: type: array items: type: string example: key: value ObjectRequestOptions: type: object description: Options for requesting CRM object data properties: properties: type: array description: CRM properties to include in the action execution request items: type: string example: - example-value ActionDefinitionInput: type: object description: Input for creating a new action definition required: - actionUrl - labels - objectTypes properties: actionUrl: type: string format: uri description: The URL that HubSpot will call when the action executes example: https://app.hubspot.com/contacts/12345 labels: $ref: '#/components/schemas/ActionLabels' inputFields: type: array description: Input fields for the action items: $ref: '#/components/schemas/InputField' example: - typeDefinition: {} supportedValueTypes: - {} isRequired: true outputFields: type: array description: Output fields for the action items: $ref: '#/components/schemas/OutputField' example: - typeDefinition: {} objectTypes: type: array description: CRM object types this action can operate on items: type: string enum: - CONTACT - COMPANY - DEAL - TICKET - QUOTE example: - CONTACT objectRequestOptions: $ref: '#/components/schemas/ObjectRequestOptions' published: type: boolean description: Whether to publish the action immediately example: true Paging: type: object description: Pagination information properties: next: type: object properties: after: type: string description: Cursor for the next page example: after: example-value ActionDefinition: type: object description: A custom workflow action definition required: - id - revisionId - actionUrl - labels - objectTypes properties: id: type: string description: The unique identifier of the action definition example: '500123' revisionId: type: string description: The current revision identifier example: '500123' actionUrl: type: string format: uri description: The URL that HubSpot will call when the action executes example: https://app.hubspot.com/contacts/12345 labels: $ref: '#/components/schemas/ActionLabels' inputFields: type: array description: Input fields that users can configure for the action items: $ref: '#/components/schemas/InputField' example: - typeDefinition: {} supportedValueTypes: - {} isRequired: true outputFields: type: array description: Output fields that the action returns items: $ref: '#/components/schemas/OutputField' example: - typeDefinition: {} objectTypes: type: array description: CRM object types this action can operate on items: type: string enum: - CONTACT - COMPANY - DEAL - TICKET - QUOTE example: - CONTACT objectRequestOptions: $ref: '#/components/schemas/ObjectRequestOptions' published: type: boolean description: Whether the action is published and available for use example: true functions: type: array description: Functions associated with this action items: $ref: '#/components/schemas/ActionFunctionReference' example: - functionType: PRE_ACTION_EXECUTION id: '500123' ActionLabels: type: object description: Human-readable labels for the action required: - actionName properties: actionName: type: string description: The display name of the action example: Example Record actionDescription: type: string description: A description of what the action does example: This is an example description. appDisplayName: type: string description: The name of the app providing this action example: Example Record actionCardContent: type: string description: Content to display on the action card in the workflow editor example: example-value ActionDefinitionCollection: type: object description: A paginated collection of action definitions required: - results properties: results: type: array description: List of action definitions items: $ref: '#/components/schemas/ActionDefinition' example: - id: '500123' revisionId: '500123' actionUrl: https://app.hubspot.com/contacts/12345 labels: {} inputFields: - typeDefinition: {} supportedValueTypes: - {} isRequired: true outputFields: - typeDefinition: {} objectTypes: - CONTACT objectRequestOptions: {} published: true functions: - functionType: PRE_ACTION_EXECUTION id: '500123' paging: $ref: '#/components/schemas/Paging' ActionDefinitionPatch: type: object description: Input for updating an action definition properties: actionUrl: type: string format: uri description: The URL that HubSpot will call when the action executes example: https://app.hubspot.com/contacts/12345 labels: $ref: '#/components/schemas/ActionLabels' inputFields: type: array items: $ref: '#/components/schemas/InputField' example: - typeDefinition: {} supportedValueTypes: - {} isRequired: true outputFields: type: array items: $ref: '#/components/schemas/OutputField' example: - typeDefinition: {} objectTypes: type: array items: type: string example: - standard objectRequestOptions: $ref: '#/components/schemas/ObjectRequestOptions' published: type: boolean example: true Error: type: object description: An error response required: - category - correlationId - message properties: category: type: string description: The error category example: standard correlationId: type: string format: uuid description: A unique identifier for this error instance example: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: type: string description: A human-readable error message example: This is an example description. subCategory: type: string description: A more specific error category example: standard errors: type: array description: Detailed error information items: $ref: '#/components/schemas/ErrorDetail' example: - message: This is an example description. code: example-value in: example-value subCategory: standard context: key: value context: type: object description: Additional context about the error additionalProperties: type: array items: type: string example: key: value links: type: object description: Related links additionalProperties: type: string example: key: value FieldOption: type: object description: An option for an enumeration field required: - label - value properties: label: type: string description: Display label for the option example: Example Record value: type: string description: The value of the option example: example-value displayOrder: type: integer description: Order in which to display the option example: 100 InputField: type: object description: An input field for the action required: - typeDefinition - supportedValueTypes properties: typeDefinition: $ref: '#/components/schemas/FieldTypeDefinition' supportedValueTypes: type: array description: The types of values that can be provided for this field items: type: string enum: - STATIC_VALUE - OBJECT_PROPERTY - OUTPUT_FROM_PREVIOUS_ACTION example: - STATIC_VALUE isRequired: type: boolean description: Whether this field is required example: true parameters: AppIdPath: name: appId in: path required: true description: The unique identifier of the HubSpot application schema: type: integer format: int32 example: 12345 DefinitionIdPath: name: definitionId in: path required: true description: The unique identifier of the action definition schema: type: string example: action-def-001 AfterQuery: name: after in: query description: Pagination cursor for the next page of results schema: type: string example: NTI1Cg%3D%3D LimitQuery: name: limit in: query description: Maximum number of results to return per page schema: type: integer default: 100 maximum: 500 example: 100 ArchivedQuery: name: archived in: query description: Whether to include archived action definitions schema: type: boolean default: false example: false examples: ActionDefinitionSuccessExample: summary: Example action definition value: id: action-def-001 revisionId: rev-001 actionUrl: https://api.example.com/workflow-actions/execute labels: actionName: Send Custom Notification actionDescription: Sends a custom notification to the specified channel appDisplayName: Custom Notifications App actionCardContent: Send notification to {{channel}} inputFields: - typeDefinition: name: channel type: ENUMERATION fieldType: SELECT label: Notification Channel description: Select the channel to send the notification to options: - label: Email value: email displayOrder: 1 - label: SMS value: sms displayOrder: 2 - label: Slack value: slack displayOrder: 3 supportedValueTypes: - STATIC_VALUE isRequired: true - typeDefinition: name: message type: STRING fieldType: TEXTAREA label: Message description: The notification message to send supportedValueTypes: - STATIC_VALUE - OBJECT_PROPERTY isRequired: true outputFields: - typeDefinition: name: notificationId type: STRING label: Notification ID objectTypes: - CONTACT - COMPANY - DEAL objectRequestOptions: properties: - email - firstname - lastname published: true functions: - functionType: PRE_ACTION_EXECUTION id: func-xyz789 ActionDefinitionInputExample: summary: Example action definition input value: actionUrl: https://api.example.com/workflow-actions/execute labels: actionName: Send Custom Notification actionDescription: Sends a custom notification to the specified channel appDisplayName: Custom Notifications App inputFields: - typeDefinition: name: channel type: ENUMERATION fieldType: SELECT label: Notification Channel options: - label: Email value: email - label: SMS value: sms supportedValueTypes: - STATIC_VALUE isRequired: true objectTypes: - CONTACT - COMPANY published: false ActionDefinitionCollectionSuccessExample: summary: Example collection of action definitions value: results: - id: action-def-001 revisionId: rev-001 actionUrl: https://api.example.com/workflow-actions/execute labels: actionName: Send Custom Notification appDisplayName: Custom Notifications App objectTypes: - CONTACT - COMPANY published: true - id: action-def-002 revisionId: rev-003 actionUrl: https://api.example.com/workflow-actions/sync labels: actionName: Sync to External System appDisplayName: Data Sync App objectTypes: - DEAL published: true paging: next: after: NTI1Cg%3D%3D ActionDefinitionPatchExample: summary: Example action definition patch value: labels: actionName: Send Custom Notification V2 actionDescription: Updated description for the notification action published: true securitySchemes: OAuth2: type: oauth2 flows: authorizationCode: authorizationUrl: https://app.hubspot.com/oauth/authorize tokenUrl: https://api.hubapi.com/oauth/v1/token scopes: analytics.read: Read analytics data