UNITHdocs
Sign inarrow_forward

A SUPER_ADMIN, is required to perform the following create organisation steps.

Step 1

Curl

curl
curl -X 'POST' \
  'https://platform-api.unith.ai/organisation/create' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer test123123123' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "digitalhumans",
  "alias": "digitalhumans",
  "subscriptionType": "PREMIUM",
  "isAssignHeadVisual": false
}'
javascript
{
  "id": "a2f6d046-547f-4947-a519-d3366753801f",
  "createdAt": "2024-04-07T13:19:07.643Z",
  "updatedAt": "2024-04-07T13:19:07.643Z",
  "apiKey": "d2703f832b154fbda383f5b613e56b16",
  "name": "digitalhumans",
  "publicId": "digitalhumans-29",
  "alias": "digitalhumans",
  "subscriptionType": "FREE"
}

Step 2

Due to a known issue, you need to update the subscriptionType to be PREMIUM

curl
curl -X 'PUT' \
  'https://platform-api.unith.ai/organisation/subscription-type' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InJha2FuQHVuaXRoLmFpIiwicm9sZSI6IlNVUEVSX0FETUlOIiwiaWQiOiI0OTM3OWE5NS0zMmUyLTQ4ODQtYjdkZC0xODk0MjdmNmIwMzgiLCJpYXQiOjE3MTIzMDQ5NTgsImV4cCI6MTcxMjkwOTc1OH0.a4tCdtr1nDhWKM6KuoBJfbGU5VslJu0MgAUKjBZmxbs' \
  -H 'Content-Type: application/json' \
  -d '{
  "id": "a2f6d046-547f-4947-a519-d3366753801f",
  "type": "PREMIUM"
}'
javascript
201

Step 3

Validate the orgnansiation was created correctly

curl
curl -X 'GET' \
  'https://platform-api.unith.ai/organisation/a2f6d046-547f-4947-a519-d3366753801f' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InJha2FuQHVuaXRoLmFpIiwicm9sZSI6IlNVUEVSX0FETUlOIiwiaWQiOiI0OTM3OWE5NS0zMmUyLTQ4ODQtYjdkZC0xODk0MjdmNmIwMzgiLCJpYXQiOjE3MTIzMDQ5NTgsImV4cCI6MTcxMjkwOTc1OH0.a4tCdtr1nDhWKM6KuoBJfbGU5VslJu0MgAUKjBZmxbs'
javascript
{
  "id": "a2f6d046-547f-4947-a519-d3366753801f",
  "createdAt": "2024-04-07T13:19:07.643Z",
  "updatedAt": "2024-04-07T13:24:48.823Z",
  "apiKey": "d2703f832b154fbda383f5b613e56b16",
  "name": "digitalhumans",
  "publicId": "digitalhumans-29",
  "alias": "digitalhumans",
  "headVisual": [],
  "subscriptionType": "PREMIUM"
}

Step 4

Create user by using the invite endpoint

curl
curl -X 'POST' \
  'https://platform-api.unith.ai/user/invite' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InJha2FuQHVuaXRoLmFpIiwicm9sZSI6IlNVUEVSX0FETUlOIiwiaWQiOiI0OTM3OWE5NS0zMmUyLTQ4ODQtYjdkZC0xODk0MjdmNmIwMzgiLCJpYXQiOjE3MTIzMDQ5NTgsImV4cCI6MTcxMjkwOTc1OH0.a4tCdtr1nDhWKM6KuoBJfbGU5VslJu0MgAUKjBZmxbs' \
  -H 'Content-Type: application/json' \
  -d '{
  "firstName": "Rakan",
  "lastName": "Solomon",
  "role": "ADMIN",
  "orgId": "a2f6d046-547f-4947-a519-d3366753801f",
  "email": "rakan.sleiman@gmail.com"
}'
javascript
{
  "email": "rakan.sleiman@gmail.com",
  "role": "ADMIN",
  "token": "a71b0883-b5c2-496a-8907-a186b58e4998"
}

At this point the user will be able to get swagger auth jwt token through /auth/enter in API) as detailed in User page.

The token will not expire, and will be used to authenticate indefinitely as described in User.

scheduleLast updated Nov 11, 2024
Organisation and User Create · UNITH Docs