Skip to main content
POST
/
auth
/
organization
/
create
Create Organization
curl --request POST \
  --url https://cloud.kaneo.app/api/auth/organization/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "slug": "<string>",
  "userId": "<string>",
  "logo": "<string>",
  "metadata": "<string>",
  "keepCurrentActiveOrganization": true,
  "description": "<string>"
}
'
{
  "name": "<string>",
  "slug": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "id": "<string>",
  "logo": "<string>",
  "metadata": "<string>",
  "description": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer token authentication

Body

application/json
name
string
required

The name of the organization

slug
string
required

The slug of the organization

userId
string | null

The user id of the organization creator. If not provided, the current user will be used. Should only be used by admins or when called by the server. server-only. Eg: "user-id"

logo
string | null

The logo of the organization

metadata
string | null

The metadata of the organization

keepCurrentActiveOrganization
boolean | null

Whether to keep the current active organization active after creating a new one. Eg: true

description
string | null

Response

Success

The organization that was created

name
string
required
slug
string
required
createdAt
string<date-time>
required
id
string | null
logo
string | null
metadata
string | null
description
string | null