Create Organization

Description

Creates a new organization with a (not neccessarily unique) name, and gives it a randomly generated unique ID. The user making the create call will also be added as user of the organization. The Name field is required. datResidency can be GLOBAL or EU. EU restricts all data within this organization to EU-only servers.

Request

POST /v1/organizations
{
  organizationName: string,
  dataResidency?: string,
  tags?: {
    [key: string]: string
  }
}

Response

Successful response contains the following JSON formated body:

{
  organizationId: string,
  organizationName: string,
  isEnterprise: boolean,
  ownerId: string,
  dataResidency?: string,
  created: string,
  tags: {
    [key: string]: string
  },
  users: string[]
}

Response Status codes:

  • 200 on success

Request headers

This request must have the following headers:

  • Authorization: bearer <ApiKey>
  • Content-Type: application/json

Example

Request

curl -XPOST "https://api.cloud.nabto.com/v1/organizations" \
  -H "Authorization: Bearer <ApiKey>" \
  -H "Content-Type: application/json" \
  -d '{ organizationName: "friendly name", dataResidency: "<dataResidency>", tags: {"foo": "bar" }}'

Response

{
   organizationId: "or-lmnopqrs",
  organizationName: "friendly name",
  isEnterprise: true,
  ownerId: "us-abcdefgh",
  dataResidency: "<dataResidency>",
  created: "2022-10-18T10:17:24.299Z",
  tags: {
    "foo": "bar" 
  },
  users:[ "us-abcdefgh",
  ...]
}