{ "openapi" : "3.0.1", "info" : { "title" : "Timeline", "description" : "Basepom for all HubSpot Projects", "version" : "v3", "x-hubspot-product-tier-requirements" : { "marketing" : "FREE", "sales" : "FREE", "service" : "FREE", "cms" : "FREE", "commerce" : "FREE", "crmHub" : "FREE", "dataHub" : "FREE" }, "x-hubspot-api-use-case" : "After setting up a new set of sign-up flows on your website, update contact timelines to indicate which flow they completed. In each event, you could also include a link to open an iframe that displays additional external data about the event.", "x-hubspot-related-documentation" : [ { "name" : "Timeline Events Guide", "url" : "https://developers.hubspot.com/docs/guides/api/crm/extensions/timeline" } ], "x-hubspot-introduction" : "Use the timeline events API to add custom event information to CRM record timelines. You'll first need to create a public app, then an event template to display event data. " }, "servers" : [ { "url" : "https://api.hubapi.com" } ], "tags" : [ { "name" : "Advanced" }, { "name" : "Basic" }, { "name" : "Batch" } ], "paths" : { "/integrators/timeline/v3/events" : { "post" : { "tags" : [ "Advanced" ], "summary" : "Send event data (single)", "description" : "Send a single instance of event data to a specified event type.", "operationId" : "post-/integrators/timeline/v3/events_create", "parameters" : [ ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TimelineEvent" }, "example" : null } }, "required" : true }, "responses" : { "201" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TimelineEventResponse" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "deprecated" : true, "security" : [ { "oauth2" : [ "crm.objects.contacts.highly_sensitive.write.v2" ] }, { "oauth2" : [ "crm.objects.contacts.write" ] }, { "oauth2" : [ "crm.objects.contacts.sensitive.write.v2" ] }, { "oauth2" : [ "crm.schemas.contacts.write" ] }, { "oauth2" : [ "crm.objects.companies.write" ] }, { "oauth2" : [ "crm.objects.companies.sensitive.write.v2" ] }, { "oauth2" : [ "crm.objects.companies.highly_sensitive.write.v2" ] }, { "oauth2" : [ "crm.schemas.companies.write" ] }, { "oauth2" : [ "crm.schemas.deals.write" ] }, { "oauth2" : [ "crm.objects.deals.write" ] }, { "oauth2" : [ "crm.objects.deals.sensitive.write.v2" ] }, { "oauth2" : [ "crm.objects.deals.highly_sensitive.write.v2" ] }, { "oauth2" : [ "tickets" ] }, { "oauth2" : [ "tickets.sensitive.v2" ] }, { "oauth2" : [ "tickets.highly_sensitive.v2" ] }, { "oauth2" : [ "timeline" ] } ] } }, "/integrators/timeline/v3/events/batch/create" : { "post" : { "tags" : [ "Batch" ], "summary" : "Create multiple events", "description" : "Batch create multiple instances of timeline events based on an event template. Once created, these event are immutable on the object timeline and cannot be modified. If the event template was configured to update object properties via `objectPropertyName`, this call will also attempt to updates those properties, or add them if they don't exist.", "operationId" : "post-/integrators/timeline/v3/events/batch/create_createBatch", "parameters" : [ ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchInputTimelineEvent" }, "example" : null } }, "required" : true }, "responses" : { "201" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchResponseTimelineEventResponse" }, "example" : null } } }, "207" : { "description" : "multiple statuses", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchResponseTimelineEventResponseWithErrors" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "deprecated" : true, "security" : [ { "oauth2" : [ "crm.objects.contacts.highly_sensitive.write.v2" ] }, { "oauth2" : [ "crm.objects.contacts.write" ] }, { "oauth2" : [ "crm.objects.contacts.sensitive.write.v2" ] }, { "oauth2" : [ "crm.schemas.contacts.write" ] }, { "oauth2" : [ "crm.objects.companies.write" ] }, { "oauth2" : [ "crm.objects.companies.sensitive.write.v2" ] }, { "oauth2" : [ "crm.objects.companies.highly_sensitive.write.v2" ] }, { "oauth2" : [ "crm.schemas.companies.write" ] }, { "oauth2" : [ "crm.schemas.deals.write" ] }, { "oauth2" : [ "crm.objects.deals.write" ] }, { "oauth2" : [ "crm.objects.deals.sensitive.write.v2" ] }, { "oauth2" : [ "crm.objects.deals.highly_sensitive.write.v2" ] }, { "oauth2" : [ "tickets" ] }, { "oauth2" : [ "tickets.sensitive.v2" ] }, { "oauth2" : [ "tickets.highly_sensitive.v2" ] }, { "oauth2" : [ "timeline" ] } ] } }, "/integrators/timeline/v3/events/{eventTemplateId}/{eventId}" : { "get" : { "tags" : [ "Basic" ], "summary" : "Get an event instance", "description" : "Retrieve an event instance, specified by template ID and event ID.", "operationId" : "get-/integrators/timeline/v3/events/{eventTemplateId}/{eventId}_getById", "parameters" : [ { "name" : "eventId", "in" : "path", "description" : "", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "eventTemplateId", "in" : "path", "description" : "", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TimelineEventResponse" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "deprecated" : true, "security" : [ { "oauth2" : [ "crm.objects.contacts.highly_sensitive.read.v2" ] }, { "oauth2" : [ "crm.objects.contacts.sensitive.read.v2" ] }, { "oauth2" : [ "crm.schemas.contacts.read" ] }, { "oauth2" : [ "crm.objects.contacts.read" ] }, { "oauth2" : [ "crm.objects.companies.highly_sensitive.read.v2" ] }, { "oauth2" : [ "crm.objects.companies.read" ] }, { "oauth2" : [ "crm.schemas.companies.read" ] }, { "oauth2" : [ "crm.objects.companies.sensitive.read.v2" ] }, { "oauth2" : [ "crm.objects.deals.highly_sensitive.read.v2" ] }, { "oauth2" : [ "crm.objects.deals.read" ] }, { "oauth2" : [ "crm.schemas.deals.read" ] }, { "oauth2" : [ "crm.objects.deals.sensitive.read.v2" ] }, { "oauth2" : [ "tickets" ] }, { "oauth2" : [ "tickets.sensitive.v2" ] }, { "oauth2" : [ "tickets.highly_sensitive.v2" ] }, { "oauth2" : [ "timeline" ] } ] } }, "/integrators/timeline/v3/{appId}/event-templates" : { "get" : { "tags" : [ "Basic" ], "summary" : "Get all event templates", "description" : "Retrieve all templates defined for an app.", "operationId" : "get-/integrators/timeline/v3/{appId}/event-templates_getAll", "parameters" : [ { "name" : "appId", "in" : "path", "description" : "", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "integer", "format" : "int32", "example" : null } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CollectionResponseTimelineEventTemplateNoPaging" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "deprecated" : true, "security" : [ { "oauth2" : [ "developers-read" ] } ] }, "post" : { "tags" : [ "Basic" ], "summary" : "Create an event template", "description" : "Event templates define the general structure for a custom timeline event, and enable you to send event data to HubSpot. A template includes formatted copy for its heading and details, as well as any custom property definitions. A single app can include up to 750 event templates.
the `v1` and `v3` timeline events APIs are only available for app partners with existing `v1`/`v3` timeline events defined in their public app. If you're not an app partner, you can send custom event data to HubSpot using the [custom events API](/api-reference/events-manage-event-definitions-v3/guide).", "operationId" : "post-/integrators/timeline/v3/{appId}/event-templates_create", "parameters" : [ { "name" : "appId", "in" : "path", "description" : "", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "integer", "format" : "int32", "example" : null } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TimelineEventTemplateCreateRequest" }, "example" : null } }, "required" : true }, "responses" : { "201" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TimelineEventTemplate" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "deprecated" : true, "security" : [ { "oauth2" : [ "developers-write" ] } ] } }, "/integrators/timeline/v3/{appId}/event-templates/{eventTemplateId}" : { "get" : { "tags" : [ "Basic" ], "summary" : "Get an event template", "description" : "Retrieve an event type template by ID.", "operationId" : "get-/integrators/timeline/v3/{appId}/event-templates/{eventTemplateId}_getById", "parameters" : [ { "name" : "appId", "in" : "path", "description" : "", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "integer", "format" : "int32", "example" : null } }, { "name" : "eventTemplateId", "in" : "path", "description" : "", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TimelineEventTemplate" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "deprecated" : true, "security" : [ { "oauth2" : [ "developers-read" ] } ] }, "put" : { "tags" : [ "Basic" ], "summary" : "Update an event template", "description" : "Update an existing event template, specified by ID.", "operationId" : "put-/integrators/timeline/v3/{appId}/event-templates/{eventTemplateId}_update", "parameters" : [ { "name" : "appId", "in" : "path", "description" : "", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "integer", "format" : "int32", "example" : null } }, { "name" : "eventTemplateId", "in" : "path", "description" : "", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TimelineEventTemplateUpdateRequest" }, "example" : null } }, "required" : true }, "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TimelineEventTemplate" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "deprecated" : true, "security" : [ { "oauth2" : [ "developers-write" ] } ] }, "delete" : { "tags" : [ "Basic" ], "summary" : "Delete an event template", "description" : "Delete an event type template by ID.", "operationId" : "delete-/integrators/timeline/v3/{appId}/event-templates/{eventTemplateId}_archive", "parameters" : [ { "name" : "appId", "in" : "path", "description" : "", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "integer", "format" : "int32", "example" : null } }, { "name" : "eventTemplateId", "in" : "path", "description" : "", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "204" : { "description" : "No content", "content" : { } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "deprecated" : true, "security" : [ { "oauth2" : [ "developers-write" ] } ] } }, "/integrators/timeline/v3/{appId}/event-templates/{eventTemplateId}/tokens" : { "post" : { "tags" : [ "Advanced" ], "summary" : "Add tokens to an existing template", "description" : "Update an existing event type template with new tokens.", "operationId" : "post-/integrators/timeline/v3/{appId}/event-templates/{eventTemplateId}/tokens_create", "parameters" : [ { "name" : "appId", "in" : "path", "description" : "", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "integer", "format" : "int32", "example" : null } }, { "name" : "eventTemplateId", "in" : "path", "description" : "", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TimelineEventTemplateToken" }, "example" : null } }, "required" : true }, "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TimelineEventTemplateToken" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "deprecated" : true, "security" : [ { "oauth2" : [ "developers-write" ] } ] } }, "/integrators/timeline/v3/{appId}/event-templates/{eventTemplateId}/tokens/{tokenName}" : { "put" : { "tags" : [ "Basic" ], "summary" : "Update a template token", "description" : "Update an event type template token, specified by token name.", "operationId" : "put-/integrators/timeline/v3/{appId}/event-templates/{eventTemplateId}/tokens/{tokenName}_update", "parameters" : [ { "name" : "appId", "in" : "path", "description" : "", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "integer", "format" : "int32", "example" : null } }, { "name" : "eventTemplateId", "in" : "path", "description" : "", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "tokenName", "in" : "path", "description" : "", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TimelineEventTemplateTokenUpdateRequest" }, "example" : null } }, "required" : true }, "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/TimelineEventTemplateToken" }, "example" : null } } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "deprecated" : true, "security" : [ { "oauth2" : [ "developers-write" ] } ] }, "delete" : { "tags" : [ "Basic" ], "summary" : "Delete a template token", "description" : "Delete an existing token from a specific event type template.", "operationId" : "delete-/integrators/timeline/v3/{appId}/event-templates/{eventTemplateId}/tokens/{tokenName}_archive", "parameters" : [ { "name" : "appId", "in" : "path", "description" : "", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "integer", "format" : "int32", "example" : null } }, { "name" : "eventTemplateId", "in" : "path", "description" : "", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "tokenName", "in" : "path", "description" : "", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "204" : { "description" : "No content", "content" : { } }, "default" : { "description" : "", "$ref" : "#/components/responses/Error" } }, "deprecated" : true, "security" : [ { "oauth2" : [ "developers-write" ] } ] } } }, "components" : { "schemas" : { "BatchInputTimelineEvent" : { "required" : [ "inputs" ], "type" : "object", "properties" : { "inputs" : { "type" : "array", "description" : "A collection of timeline events we want to create.", "example" : null, "items" : { "$ref" : "#/components/schemas/TimelineEvent" } } }, "example" : null }, "BatchResponseTimelineEventResponse" : { "required" : [ "completedAt", "results", "startedAt", "status" ], "type" : "object", "properties" : { "completedAt" : { "type" : "string", "description" : "The time the request was completed.", "format" : "date-time", "example" : null }, "links" : { "type" : "object", "additionalProperties" : { "type" : "string", "example" : null }, "description" : "Any links to documentation.", "example" : null }, "requestedAt" : { "type" : "string", "description" : "The time the request occurred.", "format" : "date-time", "example" : null }, "results" : { "type" : "array", "description" : "Successfully created events.", "example" : null, "items" : { "$ref" : "#/components/schemas/TimelineEventResponse" } }, "startedAt" : { "type" : "string", "description" : "The time the request began processing.", "format" : "date-time", "example" : null }, "status" : { "type" : "string", "description" : "The status of the batch response. Should always be COMPLETED if processed.", "example" : null, "enum" : [ "CANCELED", "COMPLETE", "PENDING", "PROCESSING" ] } }, "example" : null }, "BatchResponseTimelineEventResponseWithErrors" : { "required" : [ "completedAt", "results", "startedAt", "status" ], "type" : "object", "properties" : { "completedAt" : { "type" : "string", "description" : "When the request completed.", "format" : "date-time", "example" : null }, "errors" : { "type" : "array", "example" : null, "items" : { "$ref" : "#/components/schemas/StandardError" } }, "links" : { "type" : "object", "additionalProperties" : { "type" : "string", "example" : null }, "description" : "Links to any helpful documentation.", "example" : null }, "numErrors" : { "type" : "integer", "description" : "The number of errors encountered, if any.", "format" : "int32", "example" : null }, "requestedAt" : { "type" : "string", "description" : "When the request originated, if any.", "format" : "date-time", "example" : null }, "results" : { "type" : "array", "example" : null, "items" : { "$ref" : "#/components/schemas/TimelineEventResponse" } }, "startedAt" : { "type" : "string", "description" : "When the request began.", "format" : "date-time", "example" : null }, "status" : { "type" : "string", "description" : "The resulting status of the batch operation.", "example" : null, "enum" : [ "CANCELED", "COMPLETE", "PENDING", "PROCESSING" ] } }, "example" : null }, "CollectionResponseTimelineEventTemplateNoPaging" : { "required" : [ "results" ], "type" : "object", "properties" : { "results" : { "type" : "array", "example" : null, "items" : { "$ref" : "#/components/schemas/TimelineEventTemplate" } } }, "example" : null }, "Error" : { "required" : [ "category", "correlationId", "message" ], "type" : "object", "properties" : { "category" : { "type" : "string", "description" : "The error category", "example" : null }, "context" : { "type" : "object", "additionalProperties" : { "type" : "array", "example" : null, "items" : { "type" : "string", "example" : null } }, "description" : "Context about the error condition", "example" : "{invalidPropertyName=[propertyValue], missingScopes=[scope1, scope2]}" }, "correlationId" : { "type" : "string", "description" : "A unique identifier for the request. Include this value with any error reports or support tickets", "format" : "uuid", "example" : "aeb5f871-7f07-4993-9211-075dc63e7cbf" }, "errors" : { "type" : "array", "description" : "further information about the error", "example" : null, "items" : { "$ref" : "#/components/schemas/ErrorDetail" } }, "links" : { "type" : "object", "additionalProperties" : { "type" : "string", "example" : null }, "description" : "A map of link names to associated URIs containing documentation about the error or recommended remediation steps", "example" : null }, "message" : { "type" : "string", "description" : "A human readable message describing the error along with remediation steps where appropriate", "example" : "An error occurred" }, "subCategory" : { "type" : "string", "description" : "A specific category that contains more specific detail about the error", "example" : null } }, "example" : { "message" : "Invalid input (details will vary based on the error)", "correlationId" : "aeb5f871-7f07-4993-9211-075dc63e7cbf", "category" : "VALIDATION_ERROR", "links" : { "knowledge-base" : "https://www.hubspot.com/products/service/knowledge-base" } } }, "ErrorDetail" : { "required" : [ "message" ], "type" : "object", "properties" : { "code" : { "type" : "string", "description" : "The status code associated with the error detail", "example" : null }, "context" : { "type" : "object", "additionalProperties" : { "type" : "array", "example" : null, "items" : { "type" : "string", "example" : null } }, "description" : "Context about the error condition", "example" : "{missingScopes=[scope1, scope2]}" }, "in" : { "type" : "string", "description" : "The name of the field or parameter in which the error was found.", "example" : null }, "message" : { "type" : "string", "description" : "A human readable message describing the error along with remediation steps where appropriate", "example" : null }, "subCategory" : { "type" : "string", "description" : "A specific category that contains more specific detail about the error", "example" : null } }, "example" : null }, "StandardError" : { "required" : [ "category", "context", "errors", "links", "message", "status" ], "type" : "object", "properties" : { "category" : { "type" : "string", "description" : "The category of the error.", "example" : null }, "context" : { "type" : "object", "additionalProperties" : { "type" : "array", "example" : null, "items" : { "type" : "string", "example" : null } }, "description" : "The context of the error, potentially including occurrence information.", "example" : null }, "errors" : { "type" : "array", "description" : "The detailed error objects.", "example" : null, "items" : { "$ref" : "#/components/schemas/ErrorDetail" } }, "id" : { "type" : "string", "description" : "The error ID, if any.", "example" : null }, "links" : { "type" : "object", "additionalProperties" : { "type" : "string", "example" : null }, "description" : "Links to any helpful documentation.", "example" : null }, "message" : { "type" : "string", "description" : "The error message, if any.", "example" : null }, "status" : { "type" : "string", "description" : "The resulting status of the batch operation.", "example" : null }, "subCategory" : { "type" : "object", "properties" : { }, "description" : "Sub category of the error, if any.", "example" : null } }, "description" : "Represents a standard error response in the HubSpot API, providing detailed information about an error that occurred during an API request.", "example" : null }, "TimelineEvent" : { "required" : [ "eventTemplateId", "id", "tokens" ], "type" : "object", "properties" : { "customObjectTypeId" : { "type" : "string", "example" : null }, "domain" : { "type" : "string", "description" : "The event domain (often paired with utk).", "example" : null }, "email" : { "type" : "string", "description" : "The email address used for contact-specific events. This can be used to identify existing contacts, create new ones, or change the email for an existing contact (if paired with the `objectId`).", "example" : null }, "eventTemplateId" : { "type" : "string", "description" : "The event template ID.", "example" : null }, "extraData" : { "type" : "object", "properties" : { }, "description" : "Additional event-specific data that can be interpreted by the template's markdown.", "example" : null }, "id" : { "type" : "string", "description" : "Identifier for the event. This is optional, and we recommend you do not pass this in. We will create one for you if you omit this. You can also use `{{uuid}}` anywhere in the ID to generate a unique string, guaranteeing uniqueness.", "example" : null }, "objectId" : { "type" : "string", "description" : "The CRM object identifier. This is required for every event other than contacts (where utk or email can be used).", "example" : null }, "timelineIFrame" : { "$ref" : "#/components/schemas/TimelineEventIFrame" }, "timestamp" : { "type" : "string", "description" : "The time the event occurred. If not passed in, the curren time will be assumed. This is used to determine where an event is shown on a CRM object's timeline.", "format" : "date-time", "example" : null }, "tokens" : { "type" : "object", "additionalProperties" : { "type" : "string", "example" : null }, "description" : "A collection of token keys and values associated with the template tokens.", "example" : null }, "utk" : { "type" : "string", "description" : "Use the `utk` parameter to associate an event with a contact by `usertoken`. This is recommended if you don't know a user's email, but have an identifying user token in your cookie.", "example" : null } }, "example" : null }, "TimelineEventIFrame" : { "required" : [ "headerLabel", "height", "linkLabel", "url", "width" ], "type" : "object", "properties" : { "headerLabel" : { "type" : "string", "description" : "The label of the modal window that displays the iframe contents.", "example" : null }, "height" : { "type" : "integer", "description" : "The height of the modal window in pixels.", "format" : "int32", "example" : null }, "linkLabel" : { "type" : "string", "description" : "The text displaying the link that will display the iframe.", "example" : null }, "url" : { "type" : "string", "description" : "The URI of the iframe contents.", "example" : null }, "width" : { "type" : "integer", "description" : "The width of the modal window in pixels.", "format" : "int32", "example" : null } }, "example" : null }, "TimelineEventResponse" : { "required" : [ "eventTemplateId", "id", "objectType", "tokens" ], "type" : "object", "properties" : { "createdAt" : { "type" : "string", "description" : "Unused.", "format" : "date-time", "example" : null }, "customObjectTypeId" : { "type" : "string", "example" : null }, "domain" : { "type" : "string", "description" : "The event domain (often paired with utk).", "example" : null }, "email" : { "type" : "string", "description" : "The email address used for contact-specific events. This can be used to identify existing contacts, create new ones, or change the email for an existing contact (if paired with the `objectId`).", "example" : null }, "eventTemplateId" : { "type" : "string", "description" : "The event template ID.", "example" : null }, "extraData" : { "type" : "object", "properties" : { }, "description" : "Additional event-specific data that can be interpreted by the template's markdown.", "example" : null }, "id" : { "type" : "string", "description" : "Identifier for the event. This should be unique to the app and event template. If you use the same ID for different CRM objects, the last to be processed will win and the first will not have a record. You can also use `{{uuid}}` anywhere in the ID to generate a unique string, guaranteeing uniqueness.", "example" : null }, "objectId" : { "type" : "string", "description" : "The CRM object identifier. This is required for every event other than contacts (where utk or email can be used).", "example" : null }, "objectType" : { "type" : "string", "description" : "The ObjectType associated with the EventTemplate.", "example" : null }, "timelineIFrame" : { "$ref" : "#/components/schemas/TimelineEventIFrame" }, "timestamp" : { "type" : "string", "description" : "The time the event occurred. If not passed in, the curren time will be assumed. This is used to determine where an event is shown on a CRM object's timeline.", "format" : "date-time", "example" : null }, "tokens" : { "type" : "object", "additionalProperties" : { "type" : "string", "example" : null }, "description" : "A collection of token keys and values associated with the template tokens.", "example" : null }, "utk" : { "type" : "string", "description" : "Use the `utk` parameter to associate an event with a contact by `usertoken`. This is recommended if you don't know a user's email, but have an identifying user token in your cookie.", "example" : null } }, "example" : null }, "TimelineEventTemplate" : { "required" : [ "id", "name", "objectType", "tokens" ], "type" : "object", "properties" : { "createdAt" : { "type" : "string", "description" : "The date and time that the Event Template was created, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020.", "format" : "date-time", "example" : null }, "detailTemplate" : { "type" : "string", "description" : "This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline when you expand the details.", "example" : null }, "headerTemplate" : { "type" : "string", "description" : "This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header.", "example" : null }, "id" : { "type" : "string", "description" : "The template ID.", "example" : null }, "name" : { "type" : "string", "description" : "The template name.", "example" : null }, "objectType" : { "type" : "string", "description" : "The type of CRM object this template is for. [Contacts, companies, tickets, and deals] are supported.", "example" : null }, "tokens" : { "type" : "array", "description" : "A collection of tokens that can be used as custom properties on the event and to create fully fledged CRM objects.", "example" : null, "items" : { "$ref" : "#/components/schemas/TimelineEventTemplateToken" } }, "updatedAt" : { "type" : "string", "description" : "The date and time that the Event Template was last updated, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020.", "format" : "date-time", "example" : null } }, "example" : null }, "TimelineEventTemplateCreateRequest" : { "required" : [ "name", "objectType", "tokens" ], "type" : "object", "properties" : { "detailTemplate" : { "type" : "string", "description" : "This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline when you expand the details.", "example" : null }, "headerTemplate" : { "type" : "string", "description" : "This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header.", "example" : null }, "name" : { "type" : "string", "description" : "The template name.", "example" : null }, "objectType" : { "type" : "string", "description" : "The type of CRM object this template is for. [Contacts, companies, tickets, and deals] are supported.", "example" : null }, "tokens" : { "type" : "array", "description" : "A collection of tokens that can be used as custom properties on the event and to create fully fledged CRM objects.", "example" : null, "items" : { "$ref" : "#/components/schemas/TimelineEventTemplateToken" } } }, "example" : null }, "TimelineEventTemplateToken" : { "required" : [ "label", "name", "options", "type" ], "type" : "object", "properties" : { "createdAt" : { "type" : "string", "description" : "The date and time that the Event Template Token was created, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020.", "format" : "date-time", "example" : null }, "label" : { "type" : "string", "description" : "Used for list segmentation and reporting.", "example" : null }, "name" : { "type" : "string", "description" : "The name of the token referenced in the templates. This must be unique for the specific template. It may only contain alphanumeric characters, periods, dashes, or underscores (. - _).", "example" : null }, "objectPropertyName" : { "type" : "string", "description" : "The name of the CRM object property. This will populate the CRM object property associated with the event. With enough of these, you can fully build CRM objects via the Timeline API.", "example" : null }, "options" : { "type" : "array", "description" : "If type is `enumeration`, we should have a list of options to choose from.", "example" : null, "items" : { "$ref" : "#/components/schemas/TimelineEventTemplateTokenOption" } }, "type" : { "type" : "string", "description" : "The data type of the token. You can currently choose from [string, number, date, enumeration].", "example" : null, "enum" : [ "date", "enumeration", "number", "string" ] }, "updatedAt" : { "type" : "string", "description" : "The date and time that the Event Template Token was last updated, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020.", "format" : "date-time", "example" : null } }, "example" : null }, "TimelineEventTemplateTokenOption" : { "required" : [ "label", "value" ], "type" : "object", "properties" : { "label" : { "type" : "string", "description" : "The label of the option that is displayed in the front end.", "example" : null }, "value" : { "type" : "string", "description" : "The value of the option that is provided on the occurrence.", "example" : null } }, "example" : null }, "TimelineEventTemplateTokenUpdateRequest" : { "required" : [ "label", "options" ], "type" : "object", "properties" : { "label" : { "type" : "string", "description" : "Used for list segmentation and reporting.", "example" : null }, "objectPropertyName" : { "type" : "string", "description" : "The name of the CRM object property. This will populate the CRM object property associated with the event. With enough of these, you can fully build CRM objects via the Timeline API.", "example" : null }, "options" : { "type" : "array", "description" : "If type is `enumeration`, we should have a list of options to choose from.", "example" : null, "items" : { "$ref" : "#/components/schemas/TimelineEventTemplateTokenOption" } } }, "example" : null }, "TimelineEventTemplateUpdateRequest" : { "required" : [ "id", "name", "tokens" ], "type" : "object", "properties" : { "detailTemplate" : { "type" : "string", "description" : "This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline when you expand the details.", "example" : null }, "headerTemplate" : { "type" : "string", "description" : "This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header.", "example" : null }, "id" : { "type" : "string", "description" : "The template ID.", "example" : null }, "name" : { "type" : "string", "description" : "The template name.", "example" : null }, "tokens" : { "type" : "array", "description" : "A collection of tokens that can be used as custom properties on the event and to create fully fledged CRM objects.", "example" : null, "items" : { "$ref" : "#/components/schemas/TimelineEventTemplateToken" } } }, "example" : null } }, "responses" : { "Error" : { "description" : "An error occurred.", "content" : { "*/*" : { "schema" : { "$ref" : "#/components/schemas/Error" }, "example" : null } } } }, "securitySchemes" : { "developer_hapikey" : { "type" : "apiKey", "name" : "hapikey", "in" : "query" }, "oauth2" : { "type" : "oauth2", "flows" : { "authorizationCode" : { "authorizationUrl" : "https://app.hubspot.com/oauth/authorize", "tokenUrl" : "https://api.hubapi.com/oauth/v1/token", "scopes" : { "crm.objects.companies.highly_sensitive.read.v2" : "", "crm.objects.companies.highly_sensitive.write.v2" : "", "crm.objects.companies.read" : "", "crm.objects.companies.sensitive.read.v2" : "", "crm.objects.companies.sensitive.write.v2" : "", "crm.objects.companies.write" : "", "crm.objects.contacts.highly_sensitive.read.v2" : "", "crm.objects.contacts.highly_sensitive.write.v2" : "", "crm.objects.contacts.read" : "", "crm.objects.contacts.sensitive.read.v2" : "", "crm.objects.contacts.sensitive.write.v2" : "", "crm.objects.contacts.write" : "", "crm.objects.deals.highly_sensitive.read.v2" : "", "crm.objects.deals.highly_sensitive.write.v2" : "", "crm.objects.deals.read" : "", "crm.objects.deals.sensitive.read.v2" : "", "crm.objects.deals.sensitive.write.v2" : "", "crm.objects.deals.write" : "", "crm.schemas.companies.read" : "", "crm.schemas.companies.write" : "", "crm.schemas.contacts.read" : "", "crm.schemas.contacts.write" : "", "crm.schemas.deals.read" : "", "crm.schemas.deals.write" : "", "developers-read" : "", "developers-write" : "", "tickets" : "", "tickets.highly_sensitive.v2" : "", "tickets.sensitive.v2" : "", "timeline" : "" } } } }, "private_apps" : { "type" : "apiKey", "name" : "private-app", "in" : "header" }, "private_apps_legacy" : { "type" : "apiKey", "name" : "private-app-legacy", "in" : "header" } } }, "x-hubspot-available-client-libraries" : [ "Node", "Python", "Ruby", "PHP" ], "x-hubspot-product-tier-requirements" : { "marketing" : "FREE", "sales" : "FREE", "service" : "FREE", "cms" : "FREE", "commerce" : "FREE", "crmHub" : "FREE", "dataHub" : "FREE" } }