API keys
An API key lets another system of yours, such as a shop or an order system, start conversations from a brand’s inboxes. The mail leaves like any other mail from Inboxen, and the customer’s reply lands in the same conversation, where your team answers it. Settings › API keys is for owners and admins of a brand. Starter, Team and Business include the API. On Free no key works, and the screen says so.
Make a key
Section titled “Make a key”- Click New API key.
- Enter a Name, up to 80 characters, such as Order system. Your team sees this name on the mail the key sends.
- Under Inboxes it may send from, choose Every inbox of this brand, or Only the inboxes I choose and tick them.
- Click Make key.
- Copy the key and store it in your system’s secret store. Inboxen shows it only this once and keeps only a hash, so a lost key can’t be shown again: make a new one.
Make one key for each system that sends, so you can revoke one without stopping the others. The list shows each key’s start (ibx_ and six characters), its inboxes, who made it and when it was last used.
Revoke a key
Section titled “Revoke a key”Click Revoke beside the key, then Revoke key. Its next request is refused. Conversations it already started stay, and so do the replies to them. You can’t undo this: if the system needs access again, make a new key.
Making and revoking keys is recorded in the audit log.
Use the API
Section titled “Use the API”Send the key in every request as Authorization: Bearer ibx_…. Using the API, at the bottom of the screen, has an example request with one of your inboxes filled in.
| Request | What it does |
|---|---|
GET /api/v1/senders |
Lists the inboxes the key may send from, with canStart and, when it is false, the reason |
GET /api/v1/senders/{inboxId}/agents |
Lists the teammates a conversation can be signed as |
POST /api/v1/conversations |
Starts a conversation |
GET /api/v1/conversations/{id} |
Says how the conversation is going: its status, whether the customer replied, and whether the first message went out |
A new conversation needs inboxId, to (an email, and a name if you have one), subject, and bodyText, bodyHtml or both. You can also send:
cc: addresses to copy in.assigneeEmail: a teammate’s sign-in email. They get the conversation and the reminder, and the mail is signed as them. Without it the conversation is unassigned.senderId: an agent from the agents list, to sign the mail as someone other than the assignee.remindIfNoReplyAtandreminderNote: remind the team at that moment if the customer hasn’t replied by then. A reply cancels the reminder. The note is up to 500 characters.
Plain text alone goes out in the inbox’s email template with its line breaks kept. bodyHtml is a fragment with inline styles, not a whole page: Inboxen removes scripts, style blocks and forms.
Send an Idempotency-Key header, such as your order number, so a retry never mails the customer twice: a repeated key answers with the conversation the first call started.
What to expect
Section titled “What to expect”- The mail waits the usual undo time before it leaves, so your team can still take it back in Inboxen.
- It counts towards the daily sending limit like mail your team sends.
- A key may send up to 120 requests a minute. Past that, Inboxen answers
429withretryAfterSeconds. - An inbox can start conversations only while it can send.
canStartis false, with arefusalCode, while its sending isn’t verified or is paused, or while the account is read-only. Archived inboxes aren’t listed.
Refusals answer with a code and a message, such as api_key_invalid (401) for a wrong or revoked key, or api_access_not_enabled (403) when the plan doesn’t include the API.