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

Alterar um e-mail

Altera um e-mail que aguarda aprovação, para a pessoa a quem ele foi escrito. Grátis.

Altera o assunto ou o texto de um e-mail que aguarda aprovação, ou que foi aprovado e ainda não saiu, para essa única pessoa. Ele é conferido como todo e-mail e volta a aguardar aprovação. Escreva por extenso: os campos já estão preenchidos. Um follow-up que responde ao e-mail anterior mantém o assunto dessa conversa. Uma mudança posterior nas etapas da campanha o deixa como ficou. Grátis.

  • Cobrança: Grátis.

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

PATCH
/email/messages/{id}

Autenticação

apiKey
headerAuthorizationBearer <chave de API>

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

Parâmetros de caminho

id*string

Email ID, such as msg_3e5r4k2m9x7p1q8w.

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
subject?string

The new subject line.

Tamanho1 <= length <= 300
text?string

The new text, as plain text. The footer and the unsubscribe link are added when it goes out.

Tamanho1 <= length <= 4000

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/messages/msg_3e5r4k2m9x7p1q8w' \  -H 'Content-Type: application/json' \  -d '{  "id": "msg_3e5r4k2m9x7p1q8w",  "text": "Hi Dana,\n\nI saw that Harborline Imports imports office seating, and that you opened a warehouse in Savannah. We make mesh task chairs in Leeds and ship to the US in four weeks.\n\nWould a price list be useful?\n\nAlex"}'
Resposta de exemplo
{  "data": {    "id": "msg_3e5r4k2m9x7p1q8w",    "conversation_id": "cnv_9x7p1q8w3e5r4k2m",    "campaign_id": "cmp_7p1q8w3e5r4k2m9x",    "recipient_id": "rcp_9x7p1q8w3e5r4k2m",    "from": "alex@northwindseating.example",    "to": "dana.whitfield@harborline-imports.example",    "kind": "step",    "step": 1,    "version": 1,    "status": "pending_approval",    "subject": "Office chairs for Harborline Imports",    "text": "Hi Dana,\n\nI saw that Harborline Imports imports office seating, and that you opened a warehouse in Savannah. We make mesh task chairs in Leeds and ship to the US in four weeks.\n\nWould a price list be useful?\n\nAlex",    "opens": 0,    "clicks": 0,    "bounce_type": null,    "attachments": [],    "sent_at": null  },  "notice": null,  "usage": {    "cost": 0,    "balance": 48.08,    "replayed": false  }}

Última atualização em