Sign in

Opt-out: Register

POST https://{organization}.myguper.com/api/sender/opt-preference

Registers that a customer no longer wants to receive communication. Blocks every message except the login PIN.

Send all the identifiers you have — person, email and cellphone. One row is stored per identifier and delivery is blocked when any of them matches. That is what makes the opt-out survive a re-registration: if the customer signs up again and gets a new person id, the e-mail and phone still match. The reverse also holds — if they change e-mail inside the same record, the person target still matches.

The opt-out is scoped to the organization in the subdomain: the same e-mail can be blocked in one organization and keep receiving in another. It never applies across organizations.

Idempotent: registering the same identifier again updates the row instead of duplicating it, and appends an entry to the audit trail either way.

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

{
    "person": 184532,                                           // optional
    "email": "cliente@exemplo.com",                             // optional
    "cellphone": "5512345678",                                  // optional
    "countryCallingCode": "52",                                 // optional
    "provider": "<provider>",                                   // optional
    "scope": "<scope>",                                         // optional
    "source": "<source>",                                       // optional
    "actor": "maria@lojista.com",                               // optional
    "detail": "pediu por telefone no SAC"                       // optional
}

Responses

{
  "type": "optout",
  "provider": "all",
  "scope": "all",
  "targets": [
    { "target_type": "person", "target": "184532" },
    { "target_type": "email",  "target": "cliente@exemplo.com" },
    { "target_type": "phone",  "target": "525512345678" }
  ]
}
Copied to clipboard