latestOpenAPI 3.1.02026-08-233001841.3 MB

0dcf3303e9d7

activities.sms

Create an SMS activity

status must be one of the following:

  • inbox to log an already received SMS.
  • draft to create a draft SMS.
  • scheduled to send an SMS at a scheduled date and time, which must be specified in the date_scheduled field.
  • outbox to actually send an SMS. To delay SMS sending by a few seconds (to allow undo), specify send_in in seconds (must be less than 60).
  • sent to log an already sent SMS.

Only drafts can be modified, and their status can be changed to scheduled (to send later) or outbox (to send immediately). Scheduled SMS, or SMS in outbox that weren't sent yet can be canceled by setting the status back to draft.

You have to provide a local_phone that will be used to send the SMS. The number you choose has to be associated with a Phone Number of type internal. See the Phone Numbers paragraph for more details.

A template_id referencing an SMS Template may be provided instead of text to automatically render that template and use the content as text.

When direction is not provided, but status="inbox", direction will default to "inbound". Otherwise, direction defaults to "outbound".

When creating a new SMS with the status set to inbox, you can pass the query parameter send_to_inbox with the value of true to create a corresponding Inbox Notification for the SMS.

post/activity/sms/

Query parameters

send_to_inboxboolean

Request body

activity_atstring date-time nullable
contact_idstring nullable
created_bystring nullable
date_createdstring date-time nullable
direction'inbound' | 'outbound' | 'null' nullable
lead_idstring nullable
local_phonestring nullable

Phone number in E.164 format

organization_idstring nullable
remote_phonestring nullable

Phone number in E.164 format

source'Close.io' | 'External' | 'null' nullable
status'inbox' | 'draft' | 'scheduled' | 'outbox' | 'sent' | 'error' required
template_idstring nullable
textstring nullable
user_idstring nullable

Response

Successful response

_typestring required
activity_atstring date-time nullable required
agent_action_reasonstring nullable
agent_config_idstring nullable
contact_idstring nullable required
coststring nullable required
created_bystring nullable required
created_by_namestring nullable
date_createdstring date-time required
date_scheduledstring date-time nullable required
date_sentstring date-time nullable required
date_updatedstring date-time required
direction'inbound' | 'outbound' required

Direction of a phone activity, such as a call or an SMS message.

error_messagestring nullable required
idstring required
lead_idstring nullable required
local_country_isostring nullable required
local_phonestring nullable required
local_phone_formattedstring nullable required
organization_idstring required
remote_country_isostring nullable required
remote_phonestring nullable required
remote_phone_formattedstring nullable required
sequence_idstring nullable
sequence_namestring nullable
sequence_subscription_idstring nullable
source'Close.io' | 'External' required

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.

status'inbox' | 'draft' | 'scheduled' | 'outbox' | 'sent' | 'error' required

Status of a message, such as Email or SMS.

template_idstring nullable required
textstring nullable required
updated_bystring nullable required
updated_by_namestring nullable
user_idstring nullable required
user_namestring nullable
usersstring[] required