Skip to navigation
ActivitiesCalls

Log an external Call activity

View as Markdown

Use this endpoint to log calls made outside of the Close built-in VoIP system.

status: defaults to completed

direction (optional): outbound or inbound

recording_url: you can post a URL pointing to the MP3 recording of your call. For security reasons, we require the URL to be secure (i.e. starting with https://)

voicemail_url: you can post a secure URL (starting with https://) that points to the voicemail that the caller left. The call must have direction set to inbound.

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.
activity_atdatetime or nullOptional
contact_idstring or nullOptional
conversation_type_idstring or nullOptional
created_bystring or nullOptional
date_createddatetime or nullOptional
directionenum or nullOptional
Direction of a phone activity, such as a call or an SMS message.
Allowed values:
durationinteger or nullOptional<=604800
lead_idstring or nullOptional
notestring or nullOptional
note_htmlstring or nullOptional
organization_idstring or nullOptional
outcome_idstring or nullOptional
phonestring or nullOptional
Phone number in E.164 format
playbook_idstring or nullOptional
recording_urlstring or nullOptionalformat: "uri"

HTTPS URL of the recording of a call that you log through the API. For a call made through Close, only null can change this field, and it deletes the recording.

sourceenum or nullOptional

Source of a phone activity. Describes whether the phone activity (such as a call or an SMS) was handled by Close’s telephony provider or handled externally by a 3rd party and is merely logged in Close.

Allowed values:
statusenum or nullOptional
Current status of the call.
user_idstring or nullOptional
voicemail_urlstring or nullOptionalformat: "uri"

HTTPS URL of the voicemail that the caller left, for a call that you log through the API. The call must be inbound and completed, with a duration of 0. For a call made through Close, only null can change this field, and it deletes the voicemail.

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.

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

ID of the activity, e.g. acti_abc123.

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.

organization_idstring
ID of the organization the activity belongs to.
outcome_idstring or null
sourceenum

Source of a phone activity. Describes whether the phone activity (such as a call or an SMS) was handled by Close’s telephony provider or handled externally by a 3rd party and is merely logged in Close.

Allowed values:
statusenum
Current status of the call.
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.
created_by_namestring or nullOptional

Name of the user in created_by.

recording_urlstring or nullOptional

URL of the call recording, or null if the call has no recording or the recording expired. A GET request to this URL needs the same authentication as other API requests. The response is a redirect to the audio file. For a call that you logged through the API, the redirect goes to the recording URL that you sent.

sequence_idstring or nullOptional

ID of the Workflow that created the activity, e.g. seq_abc123, or null.

sequence_namestring or nullOptional

Name of the Workflow in sequence_id.

sequence_subscription_idstring or nullOptional

ID of the Workflow Run, i.e. the Contact’s enrollment in the Workflow, that created the activity, e.g. sub_abc123, or null.

updated_by_namestring or nullOptional

Name of the user in updated_by.

user_namestring or nullOptional

Name of the user in user_id.

voicemail_urlstring or nullOptional

URL of the voicemail that the caller left on an inbound call, or null if the call has no voicemail. A GET request to this URL needs the same authentication as other API requests. The response is a redirect to the audio file. For a call that you logged through the API, the redirect goes to the voicemail URL that you sent.

Errors

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