Skip to content
AI Inbx
Esc
↑↓navigate↵open⌘Jpreview

mailbox.connected

A customer finished authorizing a Gmail or Outlook mailbox.

POSTmailbox.connectedWebhook
Header parameters
AIInbx-Signaturestringrequired

t=<unix seconds>,v1=<hmac>: an HMAC-SHA256 of the timestamp and the raw body, with one v1 per secret while a rotation's grace period runs.

AIInbx-Event-IDstringrequired

The event id, id in the body.

Request body
requiredapplication/json
idstringrequired

The event, evt_…. Stable across retries and replays: deduplicate on it.

matches ^[a-z]+_[0-9a-f]{32}$
typestringrequired
created_atstring<date-time>required

When the event happened.

matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
space_idstring | nullrequired

Which space a resource is in. Null is the workspace itself — what every resource of a workspace that has no spaces says.

Show properties
Any of:
string
string
null
null
dataobjectrequired
Show properties
mailbox_idstringrequired

The mailbox, mbx_….

matches ^[a-z]+_[0-9a-f]{32}$
addressstring<email>required

The mailbox address.

matches ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
providerstringrequired

Which provider hosts the mailbox.

Allowed:googlemicrosoft
refstring | nullrequired

The mailbox's ref: what you put on the connect link or passed to mailboxes.connect. How you match the mailbox to your user.

Show properties
Any of:
string
string
null
null
metadataobjectrequired

Your own key-value pairs, stored and given back as they are. Up to 50 keys; a key is 1–40 characters, a value up to 500. Written whole: what you send replaces what was there.

app_idstring | nullrequired

The OAuth app of yours the mailbox was connected through.

Show properties
Any of:
string
string
null
null
reconnectedbooleanrequired

True when this replaced an existing authorization rather than adding a new mailbox.

Responses
2XX

Acknowledges the delivery. Anything else, or no answer within 10 seconds, is retried; a Retry-After header is honoured over the standard backoff.

Payload
{
  "id": "string",
  "type": "mailbox.connected",
  "created_at": "2019-08-24T14:15:22Z",
  "space_id": "string",
  "data": {
    "mailbox_id": "string",
    "address": "user@example.com",
    "provider": "google",
    "ref": "string",
    "metadata": {
      "property1": "string",
      "property2": "string"
    },
    "app_id": "string",
    "reconnected": true
  }
}
Response
Acknowledges the delivery. Anything else, or no answer within 10 seconds, is retried; a `Retry-After` header is honoured over the standard backoff.