Create a session
POST /v1/embed/sessions. Server to server, with your secret key.
POST https://api.getwirebird.com/v1/embed/sessions
Authorization: Bearer wb_live_…
Content-Type: application/jsonFinds or creates the business and business user by your IDs, then returns a session token scoped to exactly them, valid for one hour. Call it from your server only; it doesn't accept browser requests.
Request body
{
"business": {
"externalId": "company_8812",
"name": "Harbor Tile & Floor",
"timezone": "America/Chicago"
},
"businessUser": {
"externalId": "user_51",
"name": "Sam Ortiz",
"email": "sam@harbortile.example",
"role": "owner"
},
"components": ["setup", "inbox"]
}business
| Field | Type | Required | Description |
|---|---|---|---|
externalId | string, 1–200 chars | Yes | Your id for the business. Keep it stable. |
name | string, 1–200 chars | Yes | Used when the business is created. |
timezone | IANA time zone | No | Used when the business is created. Default America/New_York. |
profile | object | No | Pre-fill for the setup form. |
businessUser
| Field | Type | Required | Description |
|---|---|---|---|
externalId | string, 1–200 chars | Yes | Your id for the user. |
role | string, 1–100 chars | Yes | Their role in your product, as you name it (owner, staff…). |
name | string | No | Shown on texts they send and calls they make. |
email | No |
The user's name, email and role are updated on every call.
components
Optional. A non-empty list of the parts of Wirebird this session may use: setup, inbox,
conversation, call_bar, call_settings, call_log, unread_badge. Leave it out to allow all of them.
Unknown fields are ignored.
Response
201 Created
{
"data": {
"token": "wbes_…",
"expiresAt": "2026-12-03T18:04:11.000Z"
}
}Return data to your browser code as-is: it's what fetchToken resolves to. The token is shown only
once; Wirebird stores just a hash of it.
Errors
Every error uses the same envelope:
{ "data": null, "error": { "code": "invalid_input", "message": "The request is invalid." } }| Status | code | When |
|---|---|---|
400 | invalid_input | The body is missing a required field or a value is malformed. May include issues with the field. |
401 | unauthenticated | Missing, malformed or revoked API key, or a test key against production (or the reverse). |
404 | not_found | The business or user was closed in Wirebird. |
413 | The body is over 64 KB. | |
503 | retryable | A temporary problem. Safe to retry with backoff. |
500 | unexpected | Something went wrong on our side. Safe to retry. |
Pre-filling business details
If your product already knows a business's legal details, send them as business.profile and the
setup form starts filled in. Every field is optional. Pre-fill only fills empty fields: anything the
business already entered is kept.
{
"business": {
"externalId": "company_8812",
"name": "Harbor Tile & Floor",
"profile": {
"legalName": "Harbor Tile & Floor LLC",
"entityType": "PRIVATE_PROFIT",
"ein": "12-3456789",
"street": "120 Market St",
"city": "Austin",
"state": "TX",
"postalCode": "78701",
"phoneE164": "+15125550100",
"website": "https://harbortile.example",
"contactFirstName": "Sam",
"contactLastName": "Ortiz",
"contactEmail": "sam@harbortile.example"
}
},
"businessUser": { "externalId": "user_51", "role": "owner" }
}| Field | Notes |
|---|---|
legalName, dbaName | Legal name and "doing business as" name. |
entityType | PRIVATE_PROFIT, PUBLIC_PROFIT, NON_PROFIT or GOVERNMENT. |
ein | 12-3456789. Write-only: it's never returned, and the setup form shows only the last four digits. |
street, street2, city, state, postalCode | state is the two-letter code. |
phoneE164, website | Business phone with country code; website starting with https://. |
contactFirstName, contactLastName, contactEmail, contactPhoneE164 | The person carriers may contact about registration. |
stockSymbol, stockExchange | Public companies only. |
verificationEmail | Where the brand verification email goes, if a carrier sends one. Defaults to contactEmail. |
vertical | The business's industry, from the list the setup form offers. |
about, servicesPhrase, helpEmail, helpPhoneE164 | Shown on the business's public texting page. |
Only send the EIN from your server; it's one more reason this endpoint never runs in a browser.