Pular para o conteúdo
Won.dev
DocumentaçãoReferência da API
API de cold mail

Alterar um remetente

Declara a base legal para mais regiões depois de cadastrar um remetente, ou muda o metadata dele. Grátis.

Declara a base legal para escrever para pessoas em mais regiões com regras mais rígidas, ou informa de novo a base de uma região, e substitui o metadata do remetente. Só mudam os campos enviados. Uma região declarada continua declarada: as pessoas de lá que entraram em campanhas entraram por essa declaração. Cada declaração é registrada com o horário e a chave que a fez, e vale a partir do próximo destinatário adicionado. O nome da empresa, o endereço e o site são o que cada e-mail diz sobre quem o envia, então não mudam: para outra empresa, cadastre um novo remetente. Grátis.

  • Cobrança: Grátis.

Uma chave de teste (won_test_...) roda isto no sandbox: nada é enviado e nada é cobrado.

PATCH
/email/senders/{id}

Autenticação

apiKey
headerAuthorizationBearer <chave de API>

Authorization: Bearer won_live_..., a key from the console.

Parâmetros de caminho

id*string

Sender ID, such as snd_4k2m9x7p1q8w3e5r.

Tamanholength <= 40

Parâmetros de cabeçalho

Idempotency-Key?string

Any unique string. A retry with the same key and the same body returns the first response and is not charged again.

Tamanholength <= 255

Corpo da requisição

application/json
  1. body
regions?array<>

Regions to declare a lawful basis for: each one is added, or replaces the basis given for it before. The others stay as they are.

Itens1 <= items <= 3
metadata?

Your own keys and values, such as {"customer_id": "c_812"}: up to 20 keys of at most 40 characters, each value a string of at most 500. It replaces the metadata there is; {} removes it. Events that already happened keep what they carried.

Corpo da resposta

The result.

application/json
  1. response
data*
notice*|

A plain sentence when there is something to know about this answer. Null otherwise.

usage*

Nothing is charged here. The balance, for reference.

Requisição de exemplo
curl -X PATCH 'https://api.won.dev/v1/email/senders/snd_4k2m9x7p1q8w3e5r' \  -H 'Content-Type: application/json' \  -d '{  "id": "snd_4k2m9x7p1q8w3e5r",  "regions": [    {      "region": "uk",      "basis": "Legitimate interest: B2B contacts at companies that import office furniture, in their work role."    }  ]}'
Resposta de exemplo
{  "data": {    "id": "snd_4k2m9x7p1q8w3e5r",    "company_name": "Northwind Seating Ltd",    "address": "18 Harbour Road, Leeds LS1 4AP, United Kingdom",    "website": "https://northwind-seating.example",    "purpose": "We make office chairs and write to furniture importers and distributors about our new catalogue.",    "status": "active",    "review_note": null,    "throttled": false,    "regions": [      {        "region": "uk",        "basis": "Legitimate interest: B2B contacts at companies that import office furniture, in their work role.",        "declared_at": "2026-11-21T09:30:00.000Z"      }    ],    "metadata": {      "customer_id": "c_812"    },    "test": false,    "created_at": "2026-11-17T09:12:44.000Z"  },  "notice": null,  "usage": {    "cost": 0,    "balance": 48.08,    "replayed": false  }}

Última atualização em