Mojo UpDocs
API reference

Cloud organisations

Create a team

POST/cloud/v1/organisations

Mojo Up AI Cloud only. Creates a team organisation with you as its owner.

Authorization

cloudSession
AuthorizationBearer <token>

Mojo Up AI Cloud: a person's access token from /auth/v1/token. Name the organisation with the X-Aioe-Organisation header where a request acts for one.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/cloud/v1/organisations" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "id": "string",  "name": "string",  "kind": "personal",  "plan": "free",  "role": "owner"}

Rename a team

PATCH/cloud/v1/organisations/{id}

Mojo Up AI Cloud only. Owners and admins.

Authorization

cloudSession
AuthorizationBearer <token>

Mojo Up AI Cloud: a person's access token from /auth/v1/token. Name the organisation with the X-Aioe-Organisation header where a request acts for one.

In: header

Path Parameters

id*string

The organisation id.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/cloud/v1/organisations/string" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "ok": true}

List members

GET/cloud/v1/organisations/{id}/members

Mojo Up AI Cloud only. Any member can see who else is in the organisation.

Authorization

cloudSession
AuthorizationBearer <token>

Mojo Up AI Cloud: a person's access token from /auth/v1/token. Name the organisation with the X-Aioe-Organisation header where a request acts for one.

In: header

Path Parameters

id*string

The organisation id.

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/cloud/v1/organisations/string/members"
{  "members": [    {      "userId": "string",      "name": "string",      "email": "string",      "role": "owner",      "joinedAt": "string"    }  ]}

Change a member's role

PATCH/cloud/v1/organisations/{id}/members/{userId}

Mojo Up AI Cloud only. Owners and admins; only an owner can make or unmake an owner, and a team always keeps at least one owner.

Authorization

cloudSession
AuthorizationBearer <token>

Mojo Up AI Cloud: a person's access token from /auth/v1/token. Name the organisation with the X-Aioe-Organisation header where a request acts for one.

In: header

Path Parameters

id*string

The organisation id.

userId*string

The member's person id.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/cloud/v1/organisations/string/members/string" \  -H "Content-Type: application/json" \  -d '{    "role": "owner"  }'
{  "ok": true}
DELETE/cloud/v1/organisations/{id}/members/{userId}

Mojo Up AI Cloud only. Owners and admins remove others; anyone can remove themselves (leave). Only an owner can remove an owner. The person's devices lose access to the organisation.

Authorization

cloudSession
AuthorizationBearer <token>

Mojo Up AI Cloud: a person's access token from /auth/v1/token. Name the organisation with the X-Aioe-Organisation header where a request acts for one.

In: header

Path Parameters

id*string

The organisation id.

userId*string

The member's person id; your own to leave.

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/cloud/v1/organisations/string/members/string"
Empty

List open invitations

GET/cloud/v1/organisations/{id}/invitations

Mojo Up AI Cloud only. Owners and admins.

Authorization

cloudSession
AuthorizationBearer <token>

Mojo Up AI Cloud: a person's access token from /auth/v1/token. Name the organisation with the X-Aioe-Organisation header where a request acts for one.

In: header

Path Parameters

id*string

The organisation id.

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/cloud/v1/organisations/string/invitations"
{  "invitations": [    {      "id": "string",      "email": "string",      "role": "owner",      "invitedBy": "string",      "invitedByName": "string",      "createdAt": "string",      "expiresAt": "string"    }  ]}

Invite someone

POST/cloud/v1/organisations/{id}/invitations

Mojo Up AI Cloud only. Owners and admins. Emails a link that works once, for seven days by default. The answer carries the link too; it is shown only here.

Authorization

cloudSession
AuthorizationBearer <token>

Mojo Up AI Cloud: a person's access token from /auth/v1/token. Name the organisation with the X-Aioe-Organisation header where a request acts for one.

In: header

Path Parameters

id*string

The organisation id.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/cloud/v1/organisations/string/invitations" \  -H "Content-Type: application/json" \  -d '{    "email": "user@example.com"  }'
{  "id": "string",  "email": "string",  "role": "owner",  "invitedBy": "string",  "invitedByName": "string",  "createdAt": "string",  "expiresAt": "string",  "link": "string"}

Withdraw an invitation

DELETE/cloud/v1/organisations/{id}/invitations/{invitationId}

Mojo Up AI Cloud only. Owners and admins.

Authorization

cloudSession
AuthorizationBearer <token>

Mojo Up AI Cloud: a person's access token from /auth/v1/token. Name the organisation with the X-Aioe-Organisation header where a request acts for one.

In: header

Path Parameters

id*string

The organisation id.

invitationId*string

The invitation id.

Response Body

application/json

application/json

application/json

curl -X DELETE "https://example.com/cloud/v1/organisations/string/invitations/string"
Empty

See an invitation

GET/cloud/v1/invitations/{token}

Mojo Up AI Cloud only. Public: what someone opening an invitation link sees before they sign in.

Path Parameters

token*string

The token from the invitation link.

Response Body

application/json

application/json

curl -X GET "https://example.com/cloud/v1/invitations/string"
{  "organisation": "string",  "invitedBy": "string",  "email": "string",  "role": "owner",  "expiresAt": "string"}

Accept an invitation

POST/cloud/v1/invitations/{token}/accept

Mojo Up AI Cloud only. Needs a sign-in method whose verified email address is the one the invitation was sent to.

Authorization

cloudSession
AuthorizationBearer <token>

Mojo Up AI Cloud: a person's access token from /auth/v1/token. Name the organisation with the X-Aioe-Organisation header where a request acts for one.

In: header

Path Parameters

token*string

The token from the invitation link.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/cloud/v1/invitations/string/accept"
{  "id": "string",  "name": "string",  "kind": "personal",  "plan": "free",  "role": "owner"}