Skip to main content
POST
/
v1
/
raffles
/
{id}
/
upsells
curl -u "pb_xxx:sk_xxx" -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "type": "redirect",
    "title": "Oferta relâmpago",
    "redirect": { "to": "https://upsell.cliente.digital", "timeout": 2000 }
  }' \
  "https://api.sortify.com.br/v1/raffles/{id}/upsells"
{
  "success": true,
  "message": "Upsell criado com sucesso",
  "data": {
    "id": "7c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f",
    "type": "redirect",
    "title": "Oferta relâmpago",
    "description": null,
    "display_order": 0,
    "redirect": { "to": "https://upsell.cliente.digital", "timeout": 2000 },
    "is_active": true,
    "created_at": "2026-07-06T12:00:00.000Z",
    "updated_at": "2026-07-06T12:00:00.000Z"
  }
}
Cria um upsell na ação. O campo type define o comportamento na tela de obrigado e qual configuração adicional é obrigatória. Máximo de 10 upsells por ação.

Path params

id
string
required
ID da ação (UUID).

Body — campos comuns

type
string
default:"simple"
simple, redirect, custom ou iframe. Omitido = simple.
title
string
required
Título (1–255 caracteres).
description
string | null
Descrição (máx. 1000).
display_order
number
default:"0"
Posição no funil (menor = exibido primeiro).
is_active
boolean
default:"true"
Se o upsell entra no funil.

Body — por tipo

simple

simple
object
required

redirect

redirect
object
required

custom

custom
object
required

iframe

iframe
object
required

Erros

HTTPCódigoQuando ocorre
404RAFFLE_NOT_FOUNDAção inexistente ou de outra conta
400UPSELL_LIMIT_REACHEDJá existem 10 upsells na ação
400UPSELL_SIMPLE_FIELDS_REQUIREDtipo simple sem o objeto simple completo
400UPSELL_REDIRECT_CONFIG_REQUIREDredirect sem o objeto redirect
400UPSELL_CUSTOM_CONFIG_REQUIREDcustom sem o objeto custom
400UPSELL_IFRAME_CONFIG_REQUIREDiframe sem o objeto iframe
400UPSELL_CONFIG_TYPE_MISMATCHObjeto de configuração não corresponde ao type
400UPSELL_CUSTOM_CONTENT_EMPTYHTML vazio após sanitização
400UPSELL_PLACEHOLDER_NOT_FOUNDPlaceholder não aparece no content
422VALIDATIONFormato inválido (URL, timeout fora de 0–30000, placeholder fora de {{NOME}} etc.)
curl -u "pb_xxx:sk_xxx" -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "type": "redirect",
    "title": "Oferta relâmpago",
    "redirect": { "to": "https://upsell.cliente.digital", "timeout": 2000 }
  }' \
  "https://api.sortify.com.br/v1/raffles/{id}/upsells"
{
  "success": true,
  "message": "Upsell criado com sucesso",
  "data": {
    "id": "7c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f",
    "type": "redirect",
    "title": "Oferta relâmpago",
    "description": null,
    "display_order": 0,
    "redirect": { "to": "https://upsell.cliente.digital", "timeout": 2000 },
    "is_active": true,
    "created_at": "2026-07-06T12:00:00.000Z",
    "updated_at": "2026-07-06T12:00:00.000Z"
  }
}