Organisation and User Create
A SUPER_ADMIN, is required to perform the following create organisation steps.
Step 1
Curl
code
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
}'code
{
"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
code
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"
}'code
201Step 3
Validate the orgnansiation was created correctly
code
curl -X 'GET' \
'https://platform-api.unith.ai/organisation/a2f6d046-547f-4947-a519-d3366753801f' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InJha2FuQHVuaXRoLmFpIiwicm9sZSI6IlNVUEVSX0FETUlOIiwiaWQiOiI0OTM3OWE5NS0zMmUyLTQ4ODQtYjdkZC0xODk0MjdmNmIwMzgiLCJpYXQiOjE3MTIzMDQ5NTgsImV4cCI6MTcxMjkwOTc1OH0.a4tCdtr1nDhWKM6KuoBJfbGU5VslJu0MgAUKjBZmxbs'code
{
"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
code
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"
}'code
{
"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.
Last updated Nov 11, 2024