Skip to main content
POST
Send Message

Authorizations

Authorization
string
header
required

AgentLine API key. Get one via the email OTP flow (POST /v1/auth/otp then POST /v1/auth/verify). Pass as: Authorization: Bearer sk_live_...

Body

application/json
agent_id
string
required

ID of the AI agent sending the SMS (e.g. 'agt_abc123')

to_number
string
required

Destination phone number in E.164 format (e.g. '+12125551234')

body
string
required

SMS message text content

media_url
string | null

URL of media to attach (MMS)

from_number_id
string | null

Specific phone number ID to send from; defaults to the agent's assigned number

Response

Successful Response