Organizations
Tenants, members, invitations and roles.
Accept an invitation to an organization
Authorization
bearerAuth Session token from the set-auth-token response header (bearer plugin)
In: header
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
application/json
curl -X POST "https://example.com/api/auth/organization/accept-invitation" \ -H "Content-Type: application/json" \ -d '{ "invitationId": "string" }'{ "invitation": {}, "member": {}}Authorization
bearerAuth Session token from the set-auth-token response header (bearer plugin)
In: header
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/api/auth/organization/cancel-invitation" \ -H "Content-Type: application/json" \ -d '{ "invitationId": "string" }'{ "message": "string"}Authorization
bearerAuth Session token from the set-auth-token response header (bearer plugin)
In: header
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/api/auth/organization/check-slug" \ -H "Content-Type: application/json" \ -d '{ "slug": "string" }'{ "message": "string"}Create an organization
Authorization
bearerAuth Session token from the set-auth-token response header (bearer plugin)
In: header
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
application/json
curl -X POST "https://example.com/api/auth/organization/create" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "slug": "string" }'{ "id": "string", "name": "string", "slug": "string", "logo": "string", "createdAt": "2019-08-24T14:15:22Z", "metadata": "string"}Delete an organization
Authorization
bearerAuth Session token from the set-auth-token response header (bearer plugin)
In: header
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
application/json
curl -X POST "https://example.com/api/auth/organization/delete" \ -H "Content-Type: application/json" \ -d '{ "organizationId": "string" }'"string"Get the member details of the active organization
Authorization
bearerAuth Session token from the set-auth-token response header (bearer plugin)
In: header
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/auth/organization/get-active-member"{ "id": "string", "userId": "string", "organizationId": "string", "role": "string"}Authorization
bearerAuth Session token from the set-auth-token response header (bearer plugin)
In: header
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/auth/organization/get-active-member-role"{ "message": "string"}Get the full organization
Authorization
bearerAuth Session token from the set-auth-token response header (bearer plugin)
In: header
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/auth/organization/get-full-organization"{ "id": "string", "name": "string", "slug": "string", "logo": "string", "createdAt": "2019-08-24T14:15:22Z", "metadata": "string"}Get an invitation by ID
Authorization
bearerAuth Session token from the set-auth-token response header (bearer plugin)
In: header
Query Parameters
The ID of the invitation to get
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/auth/organization/get-invitation"{ "id": "string", "email": "string", "role": "string", "organizationId": "string", "inviterId": "string", "status": "string", "expiresAt": "string", "organizationName": "string", "organizationSlug": "string", "inviterEmail": "string"}Get the organization metadata
Authorization
bearerAuth Session token from the set-auth-token response header (bearer plugin)
In: header
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/auth/organization/get-organization"{ "id": "string", "name": "string", "slug": "string", "logo": "string", "createdAt": "2019-08-24T14:15:22Z", "metadata": "string"}Check if the user has permission
Authorization
bearerAuth Session token from the set-auth-token response header (bearer plugin)
In: header
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
application/json
curl -X POST "https://example.com/api/auth/organization/has-permission" \ -H "Content-Type: application/json" \ -d '{ "permissions": {} }'{ "error": "string", "success": true}Create an invitation to an organization
Authorization
bearerAuth Session token from the set-auth-token response header (bearer plugin)
In: header
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
application/json
curl -X POST "https://example.com/api/auth/organization/invite-member" \ -H "Content-Type: application/json" \ -d '{ "email": "string", "role": "string" }'{ "id": "string", "email": "string", "role": "string", "organizationId": "string", "inviterId": "string", "status": "string", "expiresAt": "string", "createdAt": "string"}Authorization
bearerAuth Session token from the set-auth-token response header (bearer plugin)
In: header
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/api/auth/organization/leave" \ -H "Content-Type: application/json" \ -d '{ "organizationId": "string" }'{ "message": "string"}List all organizations
Authorization
bearerAuth Session token from the set-auth-token response header (bearer plugin)
In: header
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/auth/organization/list"[ { "id": "string", "name": "string", "slug": "string", "logo": "string", "createdAt": "2019-08-24T14:15:22Z", "metadata": "string" }]Authorization
bearerAuth Session token from the set-auth-token response header (bearer plugin)
In: header
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/auth/organization/list-invitations"{ "message": "string"}Authorization
bearerAuth Session token from the set-auth-token response header (bearer plugin)
In: header
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/auth/organization/list-members"{ "message": "string"}List all invitations a user has received
Authorization
bearerAuth Session token from the set-auth-token response header (bearer plugin)
In: header
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/auth/organization/list-user-invitations"[ { "id": "string", "email": "string", "role": "string", "organizationId": "string", "organizationName": "string", "inviterId": "string", "teamId": "string", "status": "string", "expiresAt": "string", "createdAt": "string" }]Reject an invitation to an organization
Authorization
bearerAuth Session token from the set-auth-token response header (bearer plugin)
In: header
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
application/json
curl -X POST "https://example.com/api/auth/organization/reject-invitation" \ -H "Content-Type: application/json" \ -d '{ "invitationId": "string" }'{ "invitation": {}, "member": {}}Remove a member from an organization
Authorization
bearerAuth Session token from the set-auth-token response header (bearer plugin)
In: header
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
application/json
curl -X POST "https://example.com/api/auth/organization/remove-member" \ -H "Content-Type: application/json" \ -d '{ "memberIdOrEmail": "string" }'{ "member": { "id": "string", "userId": "string", "organizationId": "string", "role": "string" }}Set the active organization
Authorization
bearerAuth Session token from the set-auth-token response header (bearer plugin)
In: header
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
application/json
curl -X POST "https://example.com/api/auth/organization/set-active" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "name": "string", "slug": "string", "logo": "string", "createdAt": "2019-08-24T14:15:22Z", "metadata": "string"}Update an organization
Authorization
bearerAuth Session token from the set-auth-token response header (bearer plugin)
In: header
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
application/json
curl -X POST "https://example.com/api/auth/organization/update" \ -H "Content-Type: application/json" \ -d '{ "data": {} }'{ "id": "string", "name": "string", "slug": "string", "logo": "string", "createdAt": "2019-08-24T14:15:22Z", "metadata": "string"}Update the role of a member in an organization
Authorization
bearerAuth Session token from the set-auth-token response header (bearer plugin)
In: header
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
application/json
curl -X POST "https://example.com/api/auth/organization/update-member-role" \ -H "Content-Type: application/json" \ -d '{ "role": "string", "memberId": "string" }'{ "member": { "id": "string", "userId": "string", "organizationId": "string", "role": "string" }}