Modelos

URL base da API
https://crm.vdgestaobranding.com/api/v1

A documentação fica em developers.vdgestaobranding.com, mas todas as chamadas vão para crm.vdgestaobranding.com/api/v1.

GET/templates
templates:read

Listar modelos

  • waba_id — WABA.
  • status — APPROVED, PENDING, REJECTED…
  • category — MARKETING, UTILITY, AUTHENTICATION.
  • language — pt_BR…
  • name — Nome exato.
  • limit — 1–200.
  • cursor — Cursor.
curl -X GET "https://crm.vdgestaobranding.com/api/v1/templates" \
  -H "Authorization: Bearer $VDCRM_API_KEY"
Resposta 200
{
  "data": [
    {
      "id": "t1…",
      "name": "pedido_enviado",
      "language": "pt_BR",
      "category": "UTILITY",
      "status": "APPROVED"
    }
  ],
  "next_cursor": null
}
GET/templates/{id}
templates:read

Obter modelo e status

curl -X GET "https://crm.vdgestaobranding.com/api/v1/templates/{id}" \
  -H "Authorization: Bearer $VDCRM_API_KEY"
POST/templates
templates:write
Idempotency-Key

Criar modelo

template segue o mesmo formato do editor do CRM: kind (standard | carousel | lto | auth), category, languages, headerType, body, examples, footer, buttons, cards, lto, auth. Mídia de exemplo por header_media_url / header_media_id e card_media.

curl -X POST "https://crm.vdgestaobranding.com/api/v1/templates" \
  -H "Authorization: Bearer $VDCRM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "waba_id": "1095419929937194",
  "header_media_url": "https://exemplo.com/banner.jpg",
  "template": {
    "name": "promo_novembro",
    "category": "MARKETING",
    "languages": [
      "pt_BR"
    ],
    "kind": "standard",
    "headerType": "IMAGE",
    "body": "Olá {{1}}, aproveite {{2}}% de desconto!",
    "examples": {
      "1": "Maria",
      "2": "20"
    },
    "footer": "VD CRM",
    "buttons": [
      {
        "id": "b1",
        "type": "URL",
        "text": "Ver ofertas",
        "url": "https://loja.com/{{1}}",
        "urlExample": "https://loja.com/promo"
      }
    ]
  }
}'
Resposta 201
{
  "results": [
    {
      "language": "pt_BR",
      "ok": true,
      "status": "PENDING",
      "meta_template_id": "1234567890"
    }
  ]
}
DELETE/templates/{id}
templates:write

Excluir modelo

curl -X DELETE "https://crm.vdgestaobranding.com/api/v1/templates/{id}" \
  -H "Authorization: Bearer $VDCRM_API_KEY"
Resposta 200
{
  "deleted": true
}