Sign in

Template v2: Create

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

Creates a new Communication Hub template. The body shape mirrors Models\\Template::$visibleFields. On save, the ApplyOnSave service can flip review state back to pending when relevant fields change.

Try-it values populated from environment ACME (Demo)


Authentication

Token

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

Headers

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.

Request body

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
}

Responses

Copied to clipboard