Create an SMS activity
status must be one of the following:
inboxto log an already received SMS.draftto create a draft SMS.scheduledto send an SMS at a scheduled date and time, which must be specified in thedate_scheduledfield.outboxto actually send an SMS. To delay SMS sending by a few seconds (to allow undo), specifysend_inin seconds (must be less than 60).sentto 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.
Set caller_id_mode to auto to let Close pick local_phone for the SMS. auto requires a plan that includes Local Presence. On a plan without it, Close accepts auto only if the sender’s Membership has default_caller_id_mode set to auto. The sender is the user in user_id, or the authenticated user if user_id is absent. Close then sends the SMS from the default_caller_id of that Membership. If default_caller_id is unset or cannot send the SMS, Close uses the oldest number that the sender can send from.
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.
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
Query parameters
Request
Response
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).
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).
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.
Deprecated. Use created_by_agent_id instead.