Pular para o conteúdo

Support

Frequently asked questions

1Key points

Get to know us better

2Mail characteristics

Details of our production

3Sending process

How orders are processed

4Minimum requirements and data usage

Compliant with the LGPD

5Adding credits to my account

Step-by-step guide to adding credits to your account

6Creating an account and placing new orders

Create an account and send letters

7Registered WhatsApp

Sending messages via official WhatsApp with legal validity

8Registered Email

Sending email with legal validity and an ICP-Brasil timestamp

Webhooks

Overview

How webhooks work and how to configure them in your account.

Webhooks let Escrybe notify your application in real time when events occur in your orders. Instead of polling our API periodically, you register a URL and we start sending a POST with JSON whenever a relevant event happens.

Configure your webhooks under Options → Webhooks. Each webhook can subscribe to one or more event types and, optionally, have a secret for signature validation.

Headers sent with every request

HeaderValue
Content-Typeapplication/json
User-AgentEscrybe-Webhooks/1.0
X-Webhook-EventEvent type (e.g. order.created)
X-Webhook-DeliveryUnique delivery ID
X-Webhook-TimestampSend time (server)
X-Webhook-Signaturesha256=<hmac> — only if a secret is configured

The signature is computed with HMAC-SHA256 over the full JSON body using the secret you defined when creating the webhook. Your application must respond with HTTP 2xx to confirm receipt — otherwise the delivery will be retried with exponential backoff (5, 10, 20 min) up to 3 attempts.

Available events

Fired when a new order is created. Available for letters and registered emails.
order.created

Letter

{
  "event": "order.created",
  "timestamp": "2026-03-31 12:00:00",
  "webhook_id": 42,
  "delivery_id": 99,
  "data": {
    "id": "XXXX",
    "type": "letter",
    "status": 0,
    "shipType": "...",
    "numPages": 1,
    "value": 12.50,
    "created_at": "2026-03-31 10:00:00",
    "paymentMethod": "...",
    "recipient": {
      "name": "...", "addr1": "...", "addr2": "...",
      "city": "...", "state": "...", "zip": "...", "country": "..."
    },
    "sender": {
      "name_sender": "...", "addr1_sender": "...", "addr2_sender": "...",
      "city_sender": "...", "state_sender": "...", "zip_sender": "...", "country_sender": "..."
    }
  }
}

Registered email

{
  "event": "order.created",
  "timestamp": "2026-03-31 12:00:00",
  "webhook_id": 42,
  "delivery_id": 99,
  "data": {
    "id": "EXXXX",
    "type": "email",
    "status": 0,
    "recipient": { "name": "...", "email": "..." },
    "sender": {
      "name_sender": "...",
      "email_sender": "[email protected]",
      "email_replyTo": "[email protected]"
    },
    "subject": "...",
    "value": 5.00,
    "created_at": "2026-03-31 10:00:00",
    "paymentMethod": "..."
  }
}

Fired when an order's status changes. Available for letters and registered emails.

Status codes for letters/telegrams
StatusMeaning
0Processing
1In production
2Insufficient credits
3Printed
4Sent
5Cancelled
Status codes for registered emails
StatusMeaning
0Processing
1Awaiting send
2Insufficient credits
3Sent
4Cancelled
5Failed
order.status_updated

Letter

{
  "event": "order.status_updated",
  "timestamp": "2026-03-31 12:00:00",
  "webhook_id": 42,
  "delivery_id": 99,
  "data": {
    "id": "XXXX",
    "type": "letter",
    "status": { "old": 0, "new": 1 },
    "updated_at": "2026-03-31 11:00:00",
    "tracking": "AA123456789BR"
  }
}

Registered email

{
  "event": "order.status_updated",
  "timestamp": "2026-03-31 12:00:00",
  "webhook_id": 42,
  "delivery_id": 99,
  "data": {
    "id": "EXXXX",
    "type": "email",
    "status": { "old": 0, "new": 1 },
    "updated_at": "2026-03-31 11:00:00",
    "opened": false,
    "date_opened": null
  }
}

Fired when there is a Correios tracking update. Available for letters only.

The event_detail_type field indicates what changed:

  • new_tracking_code — tracking code assigned
  • new_tracking_record — new tracking event
tracking.updated
{
  "event": "tracking.updated",
  "event_detail_type": "new_tracking_record",
  "timestamp": "2026-03-31 12:00:00",
  "webhook_id": 42,
  "delivery_id": 99,
  "data": {
    "id": "XXXX",
    "type": "letter",
    "tracking_code": "AA123456789BR",
    "tracking_records": [ { "...": "objeto de evento Correios" } ],
    "status_delivery": "...",
    "updated_at": "2026-03-31 11:30:00"
  }
}

Fired when a Return Receipt (AR/RR) is added to a letter. Available for letters only.

The rr_type field indicates the file source:

  • rr_electronic — obtained automatically via the Correios API
  • rr — scanned and inserted manually

The file.base64 field contains the file (PDF or image) encoded in Base64.

rr.created
{
  "event": "rr.created",
  "timestamp": "2026-03-31 12:00:00",
  "webhook_id": 42,
  "delivery_id": 99,
  "data": {
    "id": "XXXX",
    "type": "letter",
    "rr_type": "rr_electronic",
    "tracking_code": "AA123456789BR",
    "file": {
      "name": "XXXX_AR.pdf",
      "base64": "<base64>"
    }
  }
}

Contact

Questions, problems and suggestions

If you have a suggestion for a new feature, send us an email with your idea!

If you run into a problem using the platform that wasn't resolved on this support page, get in touch by email at [email protected] or on WhatsApp at (14) 3418-0638