Skip to navigation
ActivitiesSMS

Update an SMS activity

View as Markdown

This can be used to modify a draft or send it once the draft is complete.

To send an SMS immediately, you can update its status to outbox. To send it at a later time, change the status to scheduled and provide the desired date & time in the date_scheduled field.

A switch of caller_id_mode to auto requires a plan that includes Local Presence. On a plan without it, a draft can use auto only if the draft already uses auto. It can also switch to auto if the sender’s Membership has default_caller_id_mode set to auto. The sender is the user in user_id. If the request has no user_id, the sender is the user of the draft, else the authenticated user. On a plan without Local Presence, Close sends an auto SMS from the default_caller_id of the sender’s Membership. If default_caller_id is unset or cannot send the SMS, Close uses the oldest number that the sender can send from.

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.

Path parameters

idstringRequired

Request

This endpoint expects an object.
activity_atdatetime or nullOptional
attachmentslist of objects or nullOptional
caller_id_modeenumOptional
Allowed values:
contact_idstring or nullOptional
date_scheduleddatetimeOptional

When to send the message. Required when status is scheduled, and ignored otherwise.

lead_idstring or nullOptional
local_phonestring or nullOptional
Phone number in E.164 format
remote_phonestring or nullOptional
Phone number in E.164 format
send_inintegerOptional0-60

Seconds to delay sending, to allow undo. Only used when status is outbox.

statusenumOptional
template_idstring or nullOptional
textstring or nullOptional
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.

caller_id_modeenum or null

How a caller’s outbound number is chosen. Fixed uses a single configured number; Auto lets Close select the best number per call/SMS (Managed by Close Caller ID).

Allowed values:
caller_id_reasonenum or null

Why a number was chosen in Auto mode: reused from a prior communication (context), picked for geographic proximity (local_presence), the default/oldest fallback (fallback), or the same fallback because the plan does not include Local Presence (plan_fallback).

Allowed values:
contact_idstring or null

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

coststring or null
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_scheduleddatetime or null
date_sentdatetime or null
date_updateddatetime
When the activity was last updated.
directionenum
Direction of a phone activity, such as a call or an SMS message.
Allowed values:
error_messagestring or null
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.

local_country_isostring or null
local_phonestring or null
local_phone_formattedstring or null
organization_idstring
ID of the organization the activity belongs to.
remote_country_isostring or null
remote_phonestring or null
remote_phone_formattedstring 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
Status of a message, such as Email or SMS.
template_idstring or null
textstring or null
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.
agent_action_reasonstring or nullOptional

Why an agent created the activity, e.g. send_scheduling_link, or null if no agent created it.

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.

sequence_idstring or nullOptional

ID of the Workflow that created the activity, or null.

sequence_namestring or nullOptional

Name of the Workflow in sequence_id.

sequence_subscription_idstring or nullOptional

ID of the Workflow subscription, i.e. the Contact’s enrollment in the Workflow, that created the activity, 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.

agent_config_idstring or nullOptionalDeprecated

Deprecated. Use created_by_agent_id instead.

Errors

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