Skip to main content
POST
/
v1
/
accounts
/
{accountId}
/
messages
cURL
curl -X POST \
  https://api.sakari.io/v1/accounts/{{ACCOUNT_ID}}/messages \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {{TOKEN}}' \
  -H 'Content-Type: application/json' \
  -d '{
  "contacts": [{
    "mobile": {
      "number": "+1234567890",
      "country": "US"
    }
  }],
  "template": "Congratulations! You just sent your first message"
} '
{
  "success": true,
  "data": {
    "messages": [
      {
        "id": "<string>",
        "status": "<string>",
        "created": {
          "at": "2023-11-07T05:31:56Z",
          "by": {
            "id": "<string>",
            "name": "Joe Bloggs",
            "firstName": "Joe",
            "lastName": "Bloggs",
            "email": "joe@bloggs.com",
            "source": "<string>",
            "subSource": "<string>"
          }
        },
        "type": "<string>",
        "message": "<string>",
        "template": "<string>",
        "outgoing": true,
        "phoneNumber": "+1234567890",
        "price": 123,
        "segments": 123,
        "read": true,
        "media": [
          {
            "url": "<string>",
            "type": "<string>",
            "name": "<string>",
            "filename": "<string>"
          }
        ],
        "sendAt": "2023-11-07T05:31:56Z"
      }
    ],
    "jobId": "<string>",
    "requested": 123,
    "valid": 123,
    "invalid": [
      {
        "id": "<string>",
        "email": "chris@sakari.io",
        "firstName": "Chris",
        "lastName": "Bloggs",
        "lists": [
          {
            "id": "<string>",
            "name": "<string>",
            "keyword": "<string>",
            "doubleOptIn": {
              "enabled": true,
              "prompt": "<string>"
            },
            "filter": {
              "q": "<string>",
              "attributes": [
                {
                  "attribute": "<string>",
                  "comparator": "<string>",
                  "value": [
                    "<string>"
                  ]
                }
              ],
              "list": "<string>",
              "valid": true,
              "invalid": true,
              "blocked": true,
              "unblocked": true,
              "optIn": true
            },
            "optInConfirmation": "<string>",
            "optIn": "2023-11-07T05:31:56Z",
            "optOut": "2023-11-07T05:31:56Z"
          }
        ],
        "attributes": {},
        "optIn": "2023-11-07T05:31:56Z",
        "blocked": "2023-11-07T05:31:56Z",
        "activecampaign": {
          "id": 123
        },
        "hubspot": {
          "id": 123
        },
        "pipedrive": {
          "id": 123
        },
        "valid": true
      }
    ],
    "estimatedPrice": 123
  }
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

accountId
string
required

Account to apply operations to

Body

application/json
conversations
string[]

List of conversation ids to send messages to

contacts
object[]
filters
object
phoneNumberFilter
object
template
string
type
enum<string>
Available options:
SMS,
MMS
media
object[]

List of media objects to attach to message

Response

successful operation

success
boolean
required
data
object
required