Skip to content

Create an organization

Method

POST https://papi.afi.ai/api/v1/orgs

Description

Creates a new child organization.

Query params
parent_org_id string

ID of the existing parent organization.

external_id string

External ID for the new organization to be created. Used for idempotency to protect from creating the same organization and to map the organization to the matching one in an external system that integrates with Afi.

name string

Name of the new organization to be created.

admin_email string

Email address of the administrator account. An email with an invitation link will be sent to this address.

curl -X POST \
    -H 'Authorization: {api-key}' \
    https://papi.afi.ai/api/v1/orgs

Successful response (200) schema
object

CreateOrgResult is the result of an organization creation request.

org object

The newly created organization.

object

Org describes organization object.

id string

Unique ID of the organization.

external_id string

Unique external ID of the organization.

name string

Organization name.

invitation_url string

Invitation URL for the user to log in to accept the invitation and become the organization’s administrator.

Response example
{
  "org": {
    "id": "string",
    "external_id": "string",
    "name": "string"
  },
  "invitation_url": "string"
}