Skip to content
Navigation

Create the caller's organization

Creates the organization for a signed-in user who has none, sets its external id to the derived tenant slug, adds the caller as an active admin, and provisions the tenant. Idempotent: a caller who already belongs to an organization gets it back with created: false rather than a second one. A caller who has been invited to an organization is refused instead, so they can accept that invitation rather than being given a second organization of their own. Give slug to choose the tenant slug. A taken slug answers 409 slug_taken and is never changed. Without slug, the slug comes from the name, with a short suffix when it is taken. A caller who already has an organization gets it back, and slug is ignored. Give workspace: personal with no name and no slug to create a personal workspace. Its name and slug come from the caller's profile: the first and last name, else the email address. A taken slug gets a short suffix. The session must be re-issued afterwards: token claims are set at authentication, so the current token still carries no tenant.

POST
https://api.cloudraker.com/onboarding/organization
Try it
Request body
Live API request

This request can change data or incur charges for the selected organization.

Authorization

  • bearerAuth
    HTTP
    required

Request body JSON required

  • name
    optional
    string

    The organization name. Required when workspace is organization or absent. Not allowed when workspace is personal.

    maxLength: 120 · minLength: 1
  • workspace
    optional
    personal
    or
    organization

    What to create. Absent means organization. personal: a workspace for the caller alone. The name comes from the caller's first and last name, else from the email address (for example Jane Doe's workspace). The slug comes from the same text, with a short suffix when it is taken. Send no name and no slug. organization: an organization with the given name. The slug is slug when given, else it comes from the name.

  • ignorePendingInvitation
    optional
    boolean
  • slug
    optional
    string
    maxLength: 64
  • product
    optional
    sign
    or
    paperwork
    or
    run

Returns

200

The caller's organization and tenant slug.

JSON
  • organizationId
    string
    required
  • tenantSlug
    string
    required
  • created
    boolean
    required

400

Validation Error
JSON
  • success
    false
    required
  • error
    array of
    unknown
    required
  • data
    unknown
    required

403

The caller is not a person. Organization API keys and embed tokens authenticate, but cannot hold a membership.

409

The caller has been invited to an organization and has not accepted yet. Accept the invitation, or resend with ignorePendingInvitation to create an organization anyway. slug_taken (body {error, code}): another organization uses the chosen slug. Choose a different one.
JSON
  • error
    string
    required
  • organizationId
    string
    required
  • organizationName
    string
    required

422

disposable_email: the caller signed up with a disposable mailbox. Sign up with a work or personal email address. invalid_slug (body {error, code}): the chosen slug must start with a letter, hold 2 to 40 lowercase letters, digits or hyphens, and contain no -- and no trailing hyphen. Reserved names (for example www, api, app, admin, run, sign) are refused. A caller who already has an organization never gets this error.

429

rate_limited: too many organizations were requested from this network. Wait one minute, then try again.

Type to search…

↑↓ navigate↵ selectEsc close