Entrar

Template v2: Criar

POST https://{organization}.myguper.com/api/sender/template-v2

Cria um novo template no Communication Hub. O formato do body espelha Models\Template::$visibleFields. Ao salvar, o serviço ApplyOnSave pode voltar o review state pra pending quando campos relevantes mudam.

Try-it values populated from environment ACME (Demo)


Autenticação

Token

Send your user token in the x-guper-authorization header.

Cabeçalhos

Name Type Description
x-guper-authorization * string User token issued by Guper.
Content-Type * string Always `application/json` for endpoints that accept a JSON body.

Corpo da requisição

Content-Type: application/json

{
    "provider": 5,
    "name": "Order confirmed — pt-BR",
    "key": "order-confirmed-ptbr",                              // optional
    "subject": "<subject>",                                     // optional
    "body": "<body>",
    "text": "<text>",                                           // optional
    "extend": "<extend>",                                       // optional
    "trigger_slug": "order.confirmed",
    "language": "pt-BR",                                        // optional
    "variables": "<variables>",                                 // optional
    "meta": "<meta>",                                           // optional
    "badges": "<badges>",                                       // optional
    "tier": 0,                                                  // optional
    "is_active": true                                           // optional
}

Respostas

Copied to clipboard