Getting started
Essentials
Calls
Contact Custom Fields
Contacts
Conversations
Phone Numbers
Messages
Send a text message
Send a text message from your OpenPhone number to a recipient.
POST
/
v1
/
messages
Copy
Ask AI
curl --request POST \
--url https://api.openphone.com/v1/messages \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"content": "<string>",
"phoneNumberId": "OP1232abc",
"from": "<string>",
"to": [
"+15555555555"
],
"userId": "US123abc",
"setInboxStatus": "done"
}'
Copy
Ask AI
{
"data": {
"id": "AC123abc",
"to": [
"+15555555555"
],
"from": "+15555555555",
"text": "Hello, world!",
"phoneNumberId": "PN123abc",
"direction": "incoming",
"userId": "US123abc",
"status": "sent",
"createdAt": "2022-01-01T00:00:00Z",
"updatedAt": "2022-01-01T00:00:00Z"
}
}
Authorizations
Body
application/json
Response
202
application/json
Success
The response is of type object
.
Was this page helpful?
Copy
Ask AI
curl --request POST \
--url https://api.openphone.com/v1/messages \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"content": "<string>",
"phoneNumberId": "OP1232abc",
"from": "<string>",
"to": [
"+15555555555"
],
"userId": "US123abc",
"setInboxStatus": "done"
}'
Copy
Ask AI
{
"data": {
"id": "AC123abc",
"to": [
"+15555555555"
],
"from": "+15555555555",
"text": "Hello, world!",
"phoneNumberId": "PN123abc",
"direction": "incoming",
"userId": "US123abc",
"status": "sent",
"createdAt": "2022-01-01T00:00:00Z",
"updatedAt": "2022-01-01T00:00:00Z"
}
}
Assistant
Responses are generated using AI and may contain mistakes.