curl --request POST \
--url https://api.agentline.cloud/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_id": "<string>",
"to_number": "<string>",
"body": "<string>",
"media_url": "<string>",
"from_number_id": "<string>"
}
'import requests
url = "https://api.agentline.cloud/v1/messages"
payload = {
"agent_id": "<string>",
"to_number": "<string>",
"body": "<string>",
"media_url": "<string>",
"from_number_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: '<string>',
to_number: '<string>',
body: JSON.stringify('<string>'),
media_url: '<string>',
from_number_id: '<string>'
})
};
fetch('https://api.agentline.cloud/v1/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Outbound SMS is not enabled
Outbound SMS is not enabled for agents.
This operation is not exposed on the MCP server. send_sms and send_message are not MCP tools. Do not send SMS or MMS.
Inbound SMS is listed with GET /v1/messages (list_messages) and delivered as sms.received events.
curl --request POST \
--url https://api.agentline.cloud/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_id": "<string>",
"to_number": "<string>",
"body": "<string>",
"media_url": "<string>",
"from_number_id": "<string>"
}
'import requests
url = "https://api.agentline.cloud/v1/messages"
payload = {
"agent_id": "<string>",
"to_number": "<string>",
"body": "<string>",
"media_url": "<string>",
"from_number_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: '<string>',
to_number: '<string>',
body: JSON.stringify('<string>'),
media_url: '<string>',
from_number_id: '<string>'
})
};
fetch('https://api.agentline.cloud/v1/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
AgentLine API key. Get one via the email OTP flow (POST /v1/auth/otp then POST /v1/auth/verify). Pass as: Authorization: Bearer al_live_... (legacy sk_live_... still works).
Body
Request body for POST /v1/messages. Outbound SMS is not enabled for agents and is not exposed on MCP.
Agent id. Outbound SMS is not enabled for agents.
E.164 destination. Outbound SMS is not enabled for agents.
Message text. Outbound SMS is not enabled for agents.
Media URL. Outbound MMS is not enabled for agents.
Phone number id. Outbound SMS is not enabled for agents.
Response
Successful Response