Skip to main content
POST
/
v1
/
accounts
/
{accountId}
/
templates
cURL
curl -X POST \
  https://api.sakari.io/v1/accounts/{{ACCOUNT_ID}}/templates \
  -H 'Authorization: Bearer {{TOKEN}}' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Test Template",
  "template": "Hi {{ firstName }}, Welcome to Sakari!",
  "type": "SMS"
}'
{
  "success": true,
  "pagination": {
    "limit": 123,
    "offset": 123,
    "hasNext": true
  },
  "data": [
    {
      "id": "<string>",
      "name": "<string>",
      "type": "SMS",
      "template": "Hi {{{firstName}}}. Grab 20% off today only at ABC Shoes",
      "media": [
        {
          "url": "<string>",
          "type": "<string>",
          "name": "<string>",
          "filename": "<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>"
        }
      },
      "updated": {
        "at": "2023-11-07T05:31:56Z",
        "by": {
          "id": "<string>",
          "name": "Joe Bloggs",
          "firstName": "Joe",
          "lastName": "Bloggs",
          "email": "joe@bloggs.com",
          "source": "<string>",
          "subSource": "<string>"
        }
      }
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://developer.sakari.io/llms.txt

Use this file to discover all available pages before exploring further.

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
name
string
type
enum<string>
Available options:
SMS,
Web
Example:

"SMS"

template
string
Example:

"Hi {{{firstName}}}. Grab 20% off today only at ABC Shoes"

media
object[]

List of media objects attached to message

Response

successful operation

success
boolean
required
pagination
object
required
data
object[]
required