businesses

Onboard a customer

Create a business for one of your customers, and optionally mint a credential scoped to it in the same call.

The whole onboarding is now machine-driven: create the business, mint its key, send it a connect link, and wait for channel.connected. No step needs a human in our dashboard.

create_key accepts true to copy this key's own scopes, or an object to name the key and narrow its scopes. Minting it here rather than in a second call means a failure cannot strand a business you have no credential for.

api_key.key is returned ONCE and is never retrievable. Store it before you respond to your own caller.

The minted key is always pinned to that one business, never carries businesses:write, and can only hold scopes your key holds. Its environment is inherited from yours: a blu_test_ key mints only blu_test_ keys.

The key doing the creating must be organization-wide. A key already restricted to a business cannot create more, or a per-customer credential would become a master one.

Slugs are derived from the name and de-duplicated automatically, so two customers may share a name without colliding.

post/api/v1/businesses

Request

  • Base URL: https://app.blueticked.com
  • URL: https://app.blueticked.com/api/v1/businesses
  • Auth: HTTP bearer

Request body

namestring required

Example request

{
  "name": "Acme Dental",
  "create_key": {
    "name": "Acme Dental (production)",
    "scopes": [
      "messages:send"
    ]
  }
}

Response

Success

idstring uuid required
organization_idstring uuid required
namestring required
slugstring required
timezonestring nullable required
is_defaultboolean required
request_idstring required

Example response

{
  "id": "22222222-2222-4222-9222-222222222222",
  "name": "Acme Dental",
  "slug": "acme-dental",
  "timezone": "Africa/Johannesburg",
  "api_key": {
    "id": "33333333-3333-4333-9333-333333333333",
    "prefix": "blu_live_a1b",
    "scopes": [
      "contacts:write"
    ],
    "key": "blu_live_a1b2c3d4e5f6g7h8i9j0k"
  },
  "request_id": "req_b2e3d610e10f1b07468721ee98f0e1d2"
}

Changes

No recorded changes to this operation across all 1 revision of this API.