Send one of an agent's published SMS templates

Project-scoped, unlike the organization-scoped POST /v1/messages: the agent's own project is the send's project. A foreign workspace's agent, another project, an unpublished agent and an unknown template are the same 404. The text is rendered from the published template with the variables and slots given, within 6 SMS segments, and authorized as POST /v1/messages is.

post/v1/agents/{agent_id}/messages

Request

  • Base URL: https://api.skysay.ai
  • URL: https://api.skysay.ai/v1/agents/{agent_id}/messages
  • Auth: none declared

Path parameters

agent_idstring required

Request body

bulkunknown
categoriesunknown
countryunknown
from_number_idunknown
from_phone_number_idunknown
idempotency_keystring
languagestring

The language to send in. Text is chosen from the call or request language, then its base language (et-EE -> et), then the agent's primary language, then, as a last resort, the template's texts in language-code order.

message_classunknown
metadataobject
number_idunknown
project_idstring

Optional. The agent's own project; any other answers 404 exactly as a foreign agent does.

purposestring

The message's purpose, authorized as on POST /v1/messages.

recipient_typeunknown
relationshipunknown
slotsobject

Values for the template's model slots, each within its max_length.

template_idstring required
tostring

The recipient, E.164. to_phone_number is accepted as its alias.

to_phone_numberunknown
user_authorizationunknown
user_requestedunknown
variablesobject

Values for the agent's declared variables the template references. A referenced required variable must be present; protected variables are refused (there is no confirmation to lean on).

Response

The message, as POST /v1/messages returns it. Body, provider metadata, error detail and idempotency key require sms:read, including on idempotent replays.

Changes

No recorded changes to this operation across all 1 revision of this API.