Skip to main content
PUT
/
platforms
/
whatsapp
/
templates
/
{id}
Edit a message template
curl --request PUT \
  --url https://api.social-api.ai/v1/platforms/whatsapp/templates/{id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "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"
    }
  ]
}
'
{
  "error": {
    "code": "resource.not_found",
    "message": "Account not found",
    "meta": {}
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

WhatsApp template platform ID

Body

application/json

Replacement components

components
object[]

Components replaces the template's components.

Response

Template updated