Skip to navigation

Create a new Custom Activity instance

View as Markdown

Custom Activity instances will be created by default with the ‘published’ status. All required fields will be validated in this status. To create an activity without setting all required fields, you can use the “draft” status.

A Custom Activity can be pinned or unpinned by setting the pinned field to true or false when creating or updating a Custom Activity.

Custom Fields appear in the format: custom.{custom_field_id}. See Custom Fields.

Authentication

AuthorizationBasic
Use your API key as the username and leave the password empty.
OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
custom_activity_type_idstringRequired
lead_idstringRequired
activity_atdatetime or nullOptional
contact_idstring or nullOptional
created_bystring or nullOptional
date_createddatetime or nullOptional
organization_idstring or nullOptional
pinnedboolean or nullOptional
statusenumOptional

Status of a Custom Activity. draft activities don’t require their required fields to be filled in yet.

Allowed values:
user_idstring or nullOptional

Response

Successful response
_typestring

Type of the activity, e.g. Call, Email or Note.

activity_atdatetime or null

When the activity happened, e.g. when an Email or SMS was sent. Defaults to date_created.

contact_idstring or null

ID of the Contact the activity is with, or null if it isn’t with a particular Contact.

created_bystring or null

ID of the user who created the activity, or null if it wasn’t created by a user.

custom_activity_type_idstring
date_createddatetime
When the activity was created.
date_updateddatetime
When the activity was last updated.
idstring

ID of the activity, e.g. acti_abc123.

last_published_atdatetime or null
lead_idstring or null

ID of the Lead the activity is on. Can be null for Calls and SMS with phone numbers that don’t match any Contact.

mentionslist of strings
mentions_updated_atdatetime or null
organization_idstring
ID of the organization the activity belongs to.
pinnedboolean
pinned_atdatetime or null
sourceenum or null

How the object was created, e.g. ui in the Close app, api through the API, import by a bulk import, or by an integration.

statusenum

Status of a Custom Activity. draft activities don’t require their required fields to be filled in yet.

Allowed values:
updated_bystring or null

ID of the user who last updated the activity, or null if it wasn’t updated by a user.

user_idstring or null

ID of the user the activity belongs to, e.g. who made the Call or sent the Email. Can be null, e.g. for an incoming SMS to a group number.

userslist of strings
IDs of all users the activity is associated with, e.g. every Close user on an Email Thread or invited to a Meeting.
comment_summaryobject or nullOptional
created_by_agent_idstring or nullOptional

ID of the agent that created the activity, or null if no agent created it.

created_by_namestring or nullOptional

Name of the user in created_by.

updated_by_agent_idstring or nullOptional

ID of the agent that last updated the activity, or null if the last update wasn’t made by an agent.

updated_by_namestring or nullOptional

Name of the user in updated_by.

user_namestring or nullOptional

Name of the user in user_id.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
429
Too Many Requests Error