PT EN

Caixa de entrada

URL base: $BUSINESS_API

O objecto

idstring · obrigatório
tenant_idstring · obrigatório
intent_idstring · obrigatório
event_typestring · obrigatório
template_keystring · opcional
titlestring · obrigatório
bodystring · obrigatório
resource_typestring · opcional
resource_idstring · opcional
created_atstring (date-time) · obrigatório
read_atstring (date-time) · opcional
archived_atstring (date-time) · opcional
O objecto
{
  "id": "not_2WyblSmD5mK7ZwWz32AntEotfiw",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "intent_id": "int_22Gr1MqNzCoLNQG9VCg3dYIRdQg",
  "event_type": "event type",
  "template_key": "template key",
  "title": "Fuga na Rua 3",
  "body": "Leitura confirmada no local.",
  "resource_type": "resource type",
  "resource_id": "res_2iAXhMsJzmqPnY6X5cMTJ6OBTSG",
  "created_at": "2026-11-19T09:30:00Z",
  "read_at": "2026-11-19T09:30:00Z",
  "archived_at": "2026-11-19T09:30:00Z"
}

Listar a caixa de entrada

Registos

GET /inbox

List notification messages addressed to the authenticated utility staff member

Results are scoped to both the active utility tenant and the authenticated identity.

Parâmetros

limitinteger · consulta · opcional

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

afterstring · consulta · opcional

Opaque cursor returned by the previous page.

unread_onlyboolean · consulta · opcional · predefinição false

When true, return only messages that have not been marked read; accepts Go boolean strings (true, false, 1, 0, t, f) and returns 400 for anything else.

include_archivedboolean · consulta · opcional · predefinição false

When true, also return archived messages, which are hidden by default; accepts Go boolean strings and returns 400 for anything else.

Devolve

200 Utility-scoped staff inbox messages

Mostrar atributos
dataarray of NotificationInboxItem · obrigatório
Mostrar atributos filhos
idstring · obrigatório
tenant_idstring · obrigatório
intent_idstring · obrigatório
event_typestring · obrigatório
template_keystring · opcional
titlestring · obrigatório
bodystring · obrigatório
resource_typestring · opcional
resource_idstring · opcional
created_atstring (date-time) · obrigatório
read_atstring (date-time) · opcional
archived_atstring (date-time) · opcional
has_moreboolean · obrigatório
next_cursorstring · opcional

Erros 403

Permissões business:notification-intents:read · Funções: admin, customer_service, owner

curl -X GET "$BUSINESS_API/inbox" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "data": [
    {
      "id": "not_2WyblSmD5mK7ZwWz32AntEotfiw",
      "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
      "intent_id": "int_22Gr1MqNzCoLNQG9VCg3dYIRdQg",
      "event_type": "event type",
      "template_key": "template key",
      "title": "Fuga na Rua 3",
      "body": "Leitura confirmada no local.",
      "resource_type": "resource type",
      "resource_id": "res_2iAXhMsJzmqPnY6X5cMTJ6OBTSG",
      "created_at": "2026-11-19T09:30:00Z",
      "read_at": "2026-11-19T09:30:00Z",
      "archived_at": "2026-11-19T09:30:00Z"
    }
  ],
  "has_more": true,
  "next_cursor": "next cursor"
}

Marcar uma mensagem como lida

Registos

POST /inbox/{id}/read

Sets the read time on a message in the caller's own staff inbox and returns the updated message. The call is idempotent: a message already read keeps its original read time. Returns 404 when the message does not belong to the caller in this tenant.

Parâmetros

idstring · caminho · obrigatório

Identifier of a message in the authenticated staff member's inbox.

Devolve

200 Updated inbox item

Mostrar atributos
idstring · obrigatório
tenant_idstring · obrigatório
intent_idstring · obrigatório
event_typestring · obrigatório
template_keystring · opcional
titlestring · obrigatório
bodystring · obrigatório
resource_typestring · opcional
resource_idstring · opcional
created_atstring (date-time) · obrigatório
read_atstring (date-time) · opcional
archived_atstring (date-time) · opcional

Erros 403 · 404

Permissões business:notification-intents:read · Funções: admin, customer_service, owner

curl -X POST "$BUSINESS_API/inbox/{id}/read" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "id": "not_2WyblSmD5mK7ZwWz32AntEotfiw",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "intent_id": "int_22Gr1MqNzCoLNQG9VCg3dYIRdQg",
  "event_type": "event type",
  "template_key": "template key",
  "title": "Fuga na Rua 3",
  "body": "Leitura confirmada no local.",
  "resource_type": "resource type",
  "resource_id": "res_2iAXhMsJzmqPnY6X5cMTJ6OBTSG",
  "created_at": "2026-11-19T09:30:00Z",
  "read_at": "2026-11-19T09:30:00Z",
  "archived_at": "2026-11-19T09:30:00Z"
}

Arquivar uma mensagem

Registos

POST /inbox/{id}/archive

Sets the archive time on a message in the caller's own staff inbox and returns the updated message; archived messages are hidden from the inbox list unless include_archived is set. Archiving does not mark the message read, and repeating the call keeps the original archive time. Returns 404 when the message does not belong to the caller in this tenant.

Parâmetros

idstring · caminho · obrigatório

Identifier of a message in the authenticated staff member's inbox.

Devolve

200 Updated inbox item

Mostrar atributos
idstring · obrigatório
tenant_idstring · obrigatório
intent_idstring · obrigatório
event_typestring · obrigatório
template_keystring · opcional
titlestring · obrigatório
bodystring · obrigatório
resource_typestring · opcional
resource_idstring · opcional
created_atstring (date-time) · obrigatório
read_atstring (date-time) · opcional
archived_atstring (date-time) · opcional

Erros 403 · 404

Permissões business:notification-intents:read · Funções: admin, customer_service, owner

curl -X POST "$BUSINESS_API/inbox/{id}/archive" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "id": "not_2WyblSmD5mK7ZwWz32AntEotfiw",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "intent_id": "int_22Gr1MqNzCoLNQG9VCg3dYIRdQg",
  "event_type": "event type",
  "template_key": "template key",
  "title": "Fuga na Rua 3",
  "body": "Leitura confirmada no local.",
  "resource_type": "resource type",
  "resource_id": "res_2iAXhMsJzmqPnY6X5cMTJ6OBTSG",
  "created_at": "2026-11-19T09:30:00Z",
  "read_at": "2026-11-19T09:30:00Z",
  "archived_at": "2026-11-19T09:30:00Z"
}