PT EN

Programadores: Programadores

URL base: $BUSINESS_API

Obter o resumo para programadores

Registos

GET /developer/overview

Requests, error rate, latency and webhook success over a window

Summarizes the tenant's API traffic and webhook deliveries over a window given by from and to (RFC 3339), which defaults to the last 24 hours and may span at most 90 days. Request statistics are bucketed hourly, or daily when the window exceeds 48 hours; the response also counts active API keys, enabled webhooks and request logs dropped under load. Requires developer:read; a malformed timestamp or an invalid window returns 400.

Parâmetros

fromstring · consulta · opcional

RFC 3339 start; defaults to 24 hours before to

tostring · consulta · opcional

RFC 3339 end; defaults to now

Devolve

200 Overview

Mostrar atributos
fromstring (date-time) · opcional
tostring (date-time) · opcional
bucket_secondsinteger · opcional
active_api_keysinteger · opcional
enabled_webhooksinteger · opcional
requestsobject · opcional
Mostrar atributos filhos
totalinteger · opcional
client_errorsinteger · opcional
server_errorsinteger · opcional
error_ratenumber · opcional
p50_msinteger · opcional
p95_msinteger · opcional
seriesarray of object · opcional
Mostrar atributos filhos
startstring (date-time) · opcional
requestsinteger · opcional
errorsinteger · opcional
webhooksobject · opcional
Mostrar atributos filhos
totalinteger · opcional
succeededinteger · opcional
failedinteger · opcional
pendinginteger · opcional
success_ratenumber · opcional

Erros 400 · 401 · 403

Permissões developer:read · Funções: admin, owner

curl -X GET "$BUSINESS_API/developer/overview" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "from": "2026-11-19T09:30:00Z",
  "to": "2026-11-19T09:30:00Z",
  "bucket_seconds": 1,
  "active_api_keys": 1,
  "enabled_webhooks": 1,
  "requests": {
    "total": 125000,
    "client_errors": 1,
    "server_errors": 1,
    "error_rate": 1,
    "p50_ms": 1,
    "p95_ms": 1,
    "series": [
      {
        "start": "2026-11-19T09:30:00Z",
        "requests": 1,
        "errors": 1
      }
    ]
  },
  "webhooks": {
    "total": 125000,
    "succeeded": 1,
    "failed": 1,
    "pending": 1,
    "success_rate": 1
  }
}

Listar âmbitos disponíveis para chaves

Registos

GET /developer/scopes

Returns the scopes the caller can put on a restricted API key in the current context: the catalog of grantable scopes narrowed to those the caller holds. A secret key created now would carry this same list. Requires developer:read.

Devolve

200 Grantable scopes

Mostrar atributos
dataarray of string · opcional

Erros 400 · 401 · 403

Permissões developer:read · Funções: admin, owner

curl -X GET "$BUSINESS_API/developer/scopes" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "data": [
    "data"
  ]
}

Listar tipos de evento

Registos

GET /developer/event-types

Returns the catalog of event types a webhook endpoint can subscribe to, each with its type name, category and description. Use these names (or * for every event) in a webhook's events list. Requires developer:read.

Devolve

200 Event types

Mostrar atributos
dataarray of object · opcional
Mostrar atributos filhos
typestring · opcional
categorystring · opcional
descriptionstring · opcional

Erros 400 · 401 · 403

Permissões developer:read · Funções: admin, owner

curl -X GET "$BUSINESS_API/developer/event-types" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "data": [
    {
      "type": "active",
      "category": "category",
      "description": "Leitura confirmada no local."
    }
  ]
}

Obter uma entrega

Registos

GET /developer/deliveries/{id}

Returns one webhook delivery with its status, the event payload it carries and the history of every attempt (response status, error, response body and duration), oldest first. Requires developer:read; an unknown delivery returns 404. The same operation is also served at /developer/webhooks/deliveries/{id}.

Parâmetros

idstring · caminho · obrigatório

Identifier of the webhook delivery in the authenticated tenant.

Devolve

200 Delivery

Mostrar atributos
idstring · opcional
webhook_idstring · opcional
urlstring · opcional
event_idstring · opcional
event_typestring · opcional
statusstring · opcional

um de pending, delivering, succeeded, failed, cancelled, paused

attemptsinteger · opcional
max_attemptsinteger · opcional
next_attempt_atstring (date-time) · opcional
response_statusinteger · opcional
last_errorstring · opcional
duration_msinteger · opcional
created_atstring (date-time) · opcional
completed_atstring (date-time) · opcional
payloadstring · opcional

JSON event body; on the detail read

historyarray of object · opcional
Mostrar atributos filhos
attemptinteger · opcional
response_statusinteger · opcional
errorstring · opcional
response_bodystring · opcional
duration_msinteger · opcional
occurred_atstring (date-time) · opcional

Erros 400 · 401 · 403

Permissões developer:read · Funções: admin, owner

curl -X GET "$BUSINESS_API/developer/deliveries/{id}" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "id": "dev_2xrGunF2qj9uI97qEnJQArJ0Qd5",
  "webhook_id": "whk_2Fhestrmgp5E6phyoldkw1BQmj3",
  "url": "https://example.org/",
  "event_id": "eve_2yU5ru85900HFyKpvIKdHuq7NSO",
  "event_type": "event type",
  "status": "pending",
  "attempts": 1,
  "max_attempts": 1,
  "next_attempt_at": "2026-11-19T09:30:00Z",
  "response_status": 1,
  "last_error": "last error",
  "duration_ms": 1,
  "created_at": "2026-11-19T09:30:00Z",
  "completed_at": "2026-11-19T09:30:00Z",
  "payload": "payload",
  "history": [
    {
      "attempt": 1,
      "response_status": 1,
      "error": "error",
      "response_body": "response body",
      "duration_ms": 1,
      "occurred_at": "2026-11-19T09:30:00Z"
    }
  ]
}

Repetir uma entrega

Registos

POST /developer/deliveries/{id}/retry

Resets a delivery to pending, makes it due now with a fresh attempt budget and wakes the delivery worker; the response is 202 with the updated delivery. Ordering per resource still applies, so it can wait behind an earlier undelivered event about the same resource. Requires developer:write; 409 is returned when the delivery is being attempted right now or its webhook no longer exists, and 404 when the delivery is unknown.

Parâmetros

idstring · caminho · obrigatório

Identifier of the webhook delivery to retry.

Devolve

202 Delivery

Mostrar atributos
idstring · opcional
webhook_idstring · opcional
urlstring · opcional
event_idstring · opcional
event_typestring · opcional
statusstring · opcional

um de pending, delivering, succeeded, failed, cancelled, paused

attemptsinteger · opcional
max_attemptsinteger · opcional
next_attempt_atstring (date-time) · opcional
response_statusinteger · opcional
last_errorstring · opcional
duration_msinteger · opcional
created_atstring (date-time) · opcional
completed_atstring (date-time) · opcional
payloadstring · opcional

JSON event body; on the detail read

historyarray of object · opcional
Mostrar atributos filhos
attemptinteger · opcional
response_statusinteger · opcional
errorstring · opcional
response_bodystring · opcional
duration_msinteger · opcional
occurred_atstring (date-time) · opcional

Erros 400 · 401 · 403

Permissões developer:write · Funções: admin, owner

curl -X POST "$BUSINESS_API/developer/deliveries/{id}/retry" \
  -H "Authorization: Bearer sk_test_..."
Resposta 202
{
  "id": "dev_2xrGunF2qj9uI97qEnJQArJ0Qd5",
  "webhook_id": "whk_2Fhestrmgp5E6phyoldkw1BQmj3",
  "url": "https://example.org/",
  "event_id": "eve_2yU5ru85900HFyKpvIKdHuq7NSO",
  "event_type": "event type",
  "status": "pending",
  "attempts": 1,
  "max_attempts": 1,
  "next_attempt_at": "2026-11-19T09:30:00Z",
  "response_status": 1,
  "last_error": "last error",
  "duration_ms": 1,
  "created_at": "2026-11-19T09:30:00Z",
  "completed_at": "2026-11-19T09:30:00Z",
  "payload": "payload",
  "history": [
    {
      "attempt": 1,
      "response_status": 1,
      "error": "error",
      "response_body": "response body",
      "duration_ms": 1,
      "occurred_at": "2026-11-19T09:30:00Z"
    }
  ]
}

Listar registos de pedidos

Registos

GET /developer/logs

Returns logged business API requests for the tenant, one cursor page at a time, without request or response bodies. By default only requests made with API keys are listed; pass principal_type, or include_sessions=true, to see other traffic. Filters: status is a class such as 4xx, method matches case-insensitively, path is a prefix, key matches an API key ID or prefix, request_id matches exactly, and from and to are RFC 3339 timestamps. Requires developer:read; an invalid status class or timestamp returns 400.

Parâmetros

statusstring · consulta · opcional

Status class: 2xx, 4xx, 5xx ...

methodstring · consulta · opcional

HTTP method

pathstring · consulta · opcional

Path prefix

keystring · consulta · opcional

API key id or prefix

request_idstring · consulta · opcional

Exact request id, as returned in X-Request-Id and in error responses

fromstring · consulta · opcional

RFC 3339 start

tostring · consulta · opcional

RFC 3339 end

limitinteger · consulta · opcional

Maximum resources to return (default 20, maximum 100).

afterstring · consulta · opcional

Opaque cursor returned by the previous page.

Devolve

200 Request logs

Mostrar atributos
dataarray of DeveloperRequestLog · opcional
Mostrar atributos filhos
idstring · opcional
methodstring · opcional
pathstring · opcional
statusinteger · opcional
duration_msinteger · opcional
principal_idstring · opcional
principal_typestring · opcional
api_key_idstring · opcional
api_key_prefixstring · opcional
request_idstring · opcional
ipstring · opcional
occurred_atstring (date-time) · opcional
request_bodystring · opcional

Redacted; on the detail read

response_bodystring · opcional

Redacted; on the detail read

has_moreboolean · opcional
next_cursorstring · opcional

Erros 400 · 401 · 403

Permissões developer:read · Funções: admin, owner

curl -X GET "$BUSINESS_API/developer/logs" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "data": [
    {
      "id": "dev_2rbgcbZyMXBUw5hMYBJwGtD6GRB",
      "method": "method",
      "path": "path",
      "status": 1,
      "duration_ms": 1,
      "principal_id": "pri_2E8NTQWZ96sxLuEdX2GL5mAJjEY",
      "principal_type": "principal type",
      "api_key_id": "api_28mJj6K75G8Pzm21FocD12wvnI0",
      "api_key_prefix": "api key prefix",
      "request_id": "req_2JrY4JziCp1C0bFCSLb4M37qGNH",
      "ip": "ip",
      "occurred_at": "2026-11-19T09:30:00Z",
      "request_body": "request body",
      "response_body": "response body"
    }
  ],
  "has_more": true,
  "next_cursor": "next cursor"
}

Obter um registo de pedido

Registos

GET /developer/logs/{id}

Returns one logged request with its method, path, status, duration, caller and API key, and request and response bodies with sensitive fields redacted. Requires developer:read; an unknown log returns 404.

Parâmetros

idstring · caminho · obrigatório

Identifier of the request log entry in the authenticated tenant.

Devolve

200 Request log

Mostrar atributos
idstring · opcional
methodstring · opcional
pathstring · opcional
statusinteger · opcional
duration_msinteger · opcional
principal_idstring · opcional
principal_typestring · opcional
api_key_idstring · opcional
api_key_prefixstring · opcional
request_idstring · opcional
ipstring · opcional
occurred_atstring (date-time) · opcional
request_bodystring · opcional

Redacted; on the detail read

response_bodystring · opcional

Redacted; on the detail read

Erros 400 · 401 · 403

Permissões developer:read · Funções: admin, owner

curl -X GET "$BUSINESS_API/developer/logs/{id}" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "id": "dev_2rbgcbZyMXBUw5hMYBJwGtD6GRB",
  "method": "method",
  "path": "path",
  "status": 1,
  "duration_ms": 1,
  "principal_id": "pri_2E8NTQWZ96sxLuEdX2GL5mAJjEY",
  "principal_type": "principal type",
  "api_key_id": "api_28mJj6K75G8Pzm21FocD12wvnI0",
  "api_key_prefix": "api key prefix",
  "request_id": "req_2JrY4JziCp1C0bFCSLb4M37qGNH",
  "ip": "ip",
  "occurred_at": "2026-11-19T09:30:00Z",
  "request_body": "request body",
  "response_body": "response body"
}

Listar eventos

Registos

GET /developer/events

Returns the domain events published for the tenant, one cursor page at a time, without their payloads; fetch one event to see its payload. Filters: type, resource_type and resource_id match exactly, and from and to are RFC 3339 timestamps bounding the creation time. Each event states when it stops being available for replay. Requires developer:read; a malformed timestamp returns 400.

Parâmetros

typestring · consulta · opcional

Event type

resource_typestring · consulta · opcional

Resource type

resource_idstring · consulta · opcional

Resource id

fromstring · consulta · opcional

RFC 3339 start

tostring · consulta · opcional

RFC 3339 end

limitinteger · consulta · opcional

Maximum resources to return (default 20, maximum 100).

afterstring · consulta · opcional

Opaque cursor returned by the previous page.

Devolve

200 Events

Mostrar atributos
dataarray of DeveloperEvent · opcional
Mostrar atributos filhos
idstring · opcional
tenant_idstring · opcional
typestring · opcional
resource_typestring · opcional
resource_idstring · opcional
payloadstring · opcional

Signed JSON body; on the detail read

created_atstring (date-time) · opcional
deliveriesarray of DeveloperDelivery · opcional
Mostrar atributos filhos
idstring · opcional
webhook_idstring · opcional
urlstring · opcional
event_idstring · opcional
event_typestring · opcional
statusstring · opcional

um de pending, delivering, succeeded, failed, cancelled, paused

attemptsinteger · opcional
max_attemptsinteger · opcional
next_attempt_atstring (date-time) · opcional
response_statusinteger · opcional
last_errorstring · opcional
duration_msinteger · opcional
created_atstring (date-time) · opcional
completed_atstring (date-time) · opcional
payloadstring · opcional

JSON event body; on the detail read

historyarray of object · opcional
Mostrar atributos filhos
attemptinteger · opcional
response_statusinteger · opcional
errorstring · opcional
response_bodystring · opcional
duration_msinteger · opcional
occurred_atstring (date-time) · opcional
has_moreboolean · opcional
next_cursorstring · opcional

Erros 400 · 401 · 403

Permissões developer:read · Funções: admin, owner

curl -X GET "$BUSINESS_API/developer/events" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "data": [
    {
      "id": "dev_2FbUujfGaXxeuNPyMN3CUhHI8zh",
      "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
      "type": "active",
      "resource_type": "resource type",
      "resource_id": "res_2iAXhMsJzmqPnY6X5cMTJ6OBTSG",
      "payload": "payload",
      "created_at": "2026-11-19T09:30:00Z",
      "deliveries": [
        {
          "id": "dev_2xrGunF2qj9uI97qEnJQArJ0Qd5",
          "webhook_id": "whk_2Fhestrmgp5E6phyoldkw1BQmj3",
          "url": "https://example.org/",
          "event_id": "eve_2yU5ru85900HFyKpvIKdHuq7NSO",
          "event_type": "event type",
          "status": "pending",
          "attempts": 1,
          "max_attempts": 1,
          "next_attempt_at": "2026-11-19T09:30:00Z",
          "response_status": 1,
          "last_error": "last error",
          "duration_ms": 1,
          "created_at": "2026-11-19T09:30:00Z",
          "completed_at": "2026-11-19T09:30:00Z",
          "payload": "payload",
          "history": [
            {}
          ]
        }
      ]
    }
  ],
  "has_more": true,
  "next_cursor": "next cursor"
}

Obter um evento

Registos

GET /developer/events/{id}

Returns one published event with its full payload and every webhook delivery created for it, plus when it stops being available for replay. Requires developer:read; an unknown event returns 404.

Parâmetros

idstring · caminho · obrigatório

Identifier of the published event in the authenticated tenant.

Devolve

200 Event

Mostrar atributos
idstring · opcional
tenant_idstring · opcional
typestring · opcional
resource_typestring · opcional
resource_idstring · opcional
payloadstring · opcional

Signed JSON body; on the detail read

created_atstring (date-time) · opcional
deliveriesarray of DeveloperDelivery · opcional
Mostrar atributos filhos
idstring · opcional
webhook_idstring · opcional
urlstring · opcional
event_idstring · opcional
event_typestring · opcional
statusstring · opcional

um de pending, delivering, succeeded, failed, cancelled, paused

attemptsinteger · opcional
max_attemptsinteger · opcional
next_attempt_atstring (date-time) · opcional
response_statusinteger · opcional
last_errorstring · opcional
duration_msinteger · opcional
created_atstring (date-time) · opcional
completed_atstring (date-time) · opcional
payloadstring · opcional

JSON event body; on the detail read

historyarray of object · opcional
Mostrar atributos filhos
attemptinteger · opcional
response_statusinteger · opcional
errorstring · opcional
response_bodystring · opcional
duration_msinteger · opcional
occurred_atstring (date-time) · opcional

Erros 400 · 401 · 403

Permissões developer:read · Funções: admin, owner

curl -X GET "$BUSINESS_API/developer/events/{id}" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "id": "dev_2FbUujfGaXxeuNPyMN3CUhHI8zh",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "type": "active",
  "resource_type": "resource type",
  "resource_id": "res_2iAXhMsJzmqPnY6X5cMTJ6OBTSG",
  "payload": "payload",
  "created_at": "2026-11-19T09:30:00Z",
  "deliveries": [
    {
      "id": "dev_2xrGunF2qj9uI97qEnJQArJ0Qd5",
      "webhook_id": "whk_2Fhestrmgp5E6phyoldkw1BQmj3",
      "url": "https://example.org/",
      "event_id": "eve_2yU5ru85900HFyKpvIKdHuq7NSO",
      "event_type": "event type",
      "status": "pending",
      "attempts": 1,
      "max_attempts": 1,
      "next_attempt_at": "2026-11-19T09:30:00Z",
      "response_status": 1,
      "last_error": "last error",
      "duration_ms": 1,
      "created_at": "2026-11-19T09:30:00Z",
      "completed_at": "2026-11-19T09:30:00Z",
      "payload": "payload",
      "history": [
        {
          "attempt": 1,
          "response_status": 1,
          "error": "error",
          "response_body": "response body",
          "duration_ms": 1,
          "occurred_at": "2026-11-19T09:30:00Z"
        }
      ]
    }
  ]
}