Skip to main content
POST
/
platforms
/
whatsapp
/
templates
/
validate
Validate a message template
curl --request POST \
  --url https://api.social-api.ai/v1/platforms/whatsapp/templates/validate \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "category": "UTILITY",
  "components": [
    {
      "buttons": [
        {
          "example": {},
          "phone_number": "+15551234567",
          "text": "Visit",
          "type": "URL",
          "url": "https://example.com/{{1}}"
        }
      ],
      "example": {},
      "format": "TEXT",
      "text": "Hello {{1}}, your order {{2}} is confirmed.",
      "type": "BODY"
    }
  ],
  "language": "en_US",
  "name": "order_confirmation"
}
'
{
  "errors": [
    {
      "component_index": 0,
      "field": "name",
      "message": "name must contain only lowercase letters, digits, and underscores (no spaces or capitals)"
    }
  ],
  "valid": true,
  "warnings": [
    {
      "component_index": 0,
      "field": "name",
      "message": "name must contain only lowercase letters, digits, and underscores (no spaces or capitals)"
    }
  ]
}

Authorizations

Authorization
string
header
required

Prefix your API key with "Bearer ". Example: Authorization: Bearer sapi_key_...

Body

application/json

Template definition to validate

category
enum<string>

Category is the message category. Marketing intent in a UTILITY template triggers automatic rejection.

Available options:
MARKETING,
UTILITY,
AUTHENTICATION
Example:

"UTILITY"

components
object[]

Components define the template body, optional header, optional footer, and optional buttons. At minimum one BODY component is required.

language
string

Language is the BCP-47 language code (e.g. en_US, fr_FR, pt_BR).

Example:

"en_US"

name
string

Name is the template identifier. Lowercase letters, digits, underscores only; no spaces.

Example:

"order_confirmation"

Response

Validation result

errors
object[]

Errors are hard violations WhatsApp would reject at submission.

valid
boolean

Valid is true when there are no errors (warnings do not affect validity).

warnings
object[]

Warnings are best-practice issues or items that cannot be fully verified offline.