Skip to main content
POST
/
v1
/
raffles
/
{id}
/
insells
curl -u "pb_xxx:sk_xxx" -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "type": "custom",
    "title": "Enquanto o PIX não cai",
    "custom": {
      "type": "card",
      "content": "<h1>Oferta exclusiva!</h1><a href=\"{{INSELL_URL}}\">Aproveitar</a>",
      "url": { "placeholder": "{{INSELL_URL}}", "value": "https://insell.cliente.digital/" }
    }
  }' \
  "https://api.sortify.com.br/v1/raffles/{id}/insells"
{
  "success": true,
  "message": "Insell criado com sucesso",
  "data": {
    "id": "4b3a2c1d-0e9f-8a7b-6c5d-e4f3a2b1c0d9",
    "type": "iframe",
    "title": "Oferta parceira",
    "description": null,
    "display_order": 0,
    "iframe": { "type": "card", "url": "https://insell.cliente.digital/" },
    "is_active": true,
    "created_at": "2026-07-06T12:00:00.000Z",
    "updated_at": "2026-07-06T12:00:00.000Z"
  }
}
Cria um insell na ação — uma promoção exibida na tela do PIX, no momento em que a chave aparece para copiar (pedido fechado, pagamento pendente). Máximo de 10 insells por ação.
Insell não suporta o tipo redirect. Redirecionar o comprador na hora de pagar abortaria o pagamento. Tipos válidos: simple, custom e iframe — com o mesmo contrato dos upsells e presells.

Path params

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

Body — campos comuns

type
string
default:"simple"
simple, 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"
Ordem de exibição (menor = primeiro).
is_active
boolean
default:"true"
Se o insell é exibido.

Body — por tipo

simple

simple
object
required

custom

custom
object
required

iframe

iframe
object
required

Erros

HTTPCódigoQuando ocorre
404RAFFLE_NOT_FOUNDAção inexistente ou de outra conta
400INSELL_LIMIT_REACHEDJá existem 10 insells na ação
400INSELL_SIMPLE_FIELDS_REQUIREDtipo simple sem o objeto simple completo
400INSELL_CUSTOM_CONFIG_REQUIREDcustom sem o objeto custom
400INSELL_IFRAME_CONFIG_REQUIREDiframe sem o objeto iframe
400INSELL_CONFIG_TYPE_MISMATCHObjeto de configuração não corresponde ao type
400INSELL_CUSTOM_CONTENT_EMPTYHTML vazio após sanitização
400INSELL_PLACEHOLDER_NOT_FOUNDPlaceholder não aparece no content
422VALIDATIONFormato inválido — inclusive type: "redirect", que não existe em insells
curl -u "pb_xxx:sk_xxx" -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "type": "custom",
    "title": "Enquanto o PIX não cai",
    "custom": {
      "type": "card",
      "content": "<h1>Oferta exclusiva!</h1><a href=\"{{INSELL_URL}}\">Aproveitar</a>",
      "url": { "placeholder": "{{INSELL_URL}}", "value": "https://insell.cliente.digital/" }
    }
  }' \
  "https://api.sortify.com.br/v1/raffles/{id}/insells"
{
  "success": true,
  "message": "Insell criado com sucesso",
  "data": {
    "id": "4b3a2c1d-0e9f-8a7b-6c5d-e4f3a2b1c0d9",
    "type": "iframe",
    "title": "Oferta parceira",
    "description": null,
    "display_order": 0,
    "iframe": { "type": "card", "url": "https://insell.cliente.digital/" },
    "is_active": true,
    "created_at": "2026-07-06T12:00:00.000Z",
    "updated_at": "2026-07-06T12:00:00.000Z"
  }
}