GXS Internal
Identity serverAPI reference

Organization

/organization/create

POST
/organization/create

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Request Body

application/json
  1. body
name*string

The name of the organization

Length1 <= length
slug*string

The slug of the organization

Length1 <= length
userId?string

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?|

The logo of the organization

metadata?

The metadata of the organization

keepCurrentActiveOrganization?boolean

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

updatedAt?string|null
isArchived?boolean|null
archivedAt?string|null

Response Body

Success

application/json
  1. response

The organization that was created

id*string
name*string
slug*string
logo?string
createdAt*string
Formatdate-time
metadata?string
updatedAt?string
Formatdate-time
isArchived?boolean
archivedAt?string
Formatdate-time
curl -X POST 'https://dev.auth.graphxserver.io/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",  "updatedAt": "2019-08-24T14:15:22Z",  "isArchived": true,  "archivedAt": "2019-08-24T14:15:22Z"}

/organization/update

POST
/organization/update

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Request Body

application/json
  1. body
data*
organizationId?string

The organization ID. Eg: "org-id"

Response Body

Success

application/json
  1. response

The updated organization

id*string
name*string
slug*string
logo?string
createdAt*string
Formatdate-time
metadata?string
updatedAt?string
Formatdate-time
isArchived?boolean
archivedAt?string
Formatdate-time
curl -X POST 'https://dev.auth.graphxserver.io/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",  "updatedAt": "2019-08-24T14:15:22Z",  "isArchived": true,  "archivedAt": "2019-08-24T14:15:22Z"}

/organization/delete

POST
/organization/delete

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Request Body

application/json
  1. body
organizationId*string

The organization id to delete

Response Body

Success

response?stringapplication/json

The organization id that was deleted

curl -X POST 'https://dev.auth.graphxserver.io/api/auth/organization/delete' \  -H 'Content-Type: application/json' \  -d '{  "organizationId": "string"}'
"string"

Set Active Organization

POST
/organization/set-active

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Request Body

application/json
  1. body
organizationId?|

The organization id to set as active. It can be null to unset the active organization. Eg: "org-id"

organizationSlug?string

The organization slug to set as active. It can be null to unset the active organization if organizationId is not provided. Eg: "org-slug"

Response Body

Success

application/json
  1. response

The organization

id*string
name*string
slug*string
logo?string
createdAt*string
Formatdate-time
metadata?string
updatedAt?string
Formatdate-time
isArchived?boolean
archivedAt?string
Formatdate-time
curl -X POST 'https://dev.auth.graphxserver.io/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",  "updatedAt": "2019-08-24T14:15:22Z",  "isArchived": true,  "archivedAt": "2019-08-24T14:15:22Z"}

Get Organization

GET
/organization/get-organization

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Response Body

Success

application/json
  1. response

The organization

id*string
name*string
slug*string
logo?string
createdAt*string
Formatdate-time
metadata?string
updatedAt?string
Formatdate-time
isArchived?boolean
archivedAt?string
Formatdate-time
curl -X GET 'https://dev.auth.graphxserver.io/api/auth/organization/get-organization'
{  "id": "string",  "name": "string",  "slug": "string",  "logo": "string",  "createdAt": "2019-08-24T14:15:22Z",  "metadata": "string",  "updatedAt": "2019-08-24T14:15:22Z",  "isArchived": true,  "archivedAt": "2019-08-24T14:15:22Z"}

Get Full Organization

GET
/organization/get-full-organization

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Response Body

Success

application/json
  1. response

The organization

id*string
name*string
slug*string
logo?string
createdAt*string
Formatdate-time
metadata?string
updatedAt?string
Formatdate-time
isArchived?boolean
archivedAt?string
Formatdate-time
curl -X GET 'https://dev.auth.graphxserver.io/api/auth/organization/get-full-organization'
{  "id": "string",  "name": "string",  "slug": "string",  "logo": "string",  "createdAt": "2019-08-24T14:15:22Z",  "metadata": "string",  "updatedAt": "2019-08-24T14:15:22Z",  "isArchived": true,  "archivedAt": "2019-08-24T14:15:22Z"}

/organization/list

GET
/organization/list

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Response Body

Success

application/json
  1. response
[index: integer]?
curl -X GET 'https://dev.auth.graphxserver.io/api/auth/organization/list'
[  {    "id": "string",    "name": "string",    "slug": "string",    "logo": "string",    "createdAt": "2019-08-24T14:15:22Z",    "metadata": "string",    "updatedAt": "2019-08-24T14:15:22Z",    "isArchived": true,    "archivedAt": "2019-08-24T14:15:22Z"  }]
POST
/organization/invite-member

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Request Body

application/json
  1. body
email*string

The email address of the user to invite

role*|array<>

The role(s) to assign to the user. It can be admin, member, owner. Eg: "member"

organizationId?string

The organization ID to invite the user to

resend?boolean

Resend the invitation email, if the user is already invited. Eg: true

teamId?|array<string>
updatedAt?string|null
status*string
source?string|null
oauthScopes?array<string>|null
oauthRedirectUri?string|null

Response Body

Success

application/json
  1. response
id*string
email*string
role*string
organizationId*string
inviterId*string
status*string
expiresAt*string
createdAt*string
curl -X POST 'https://dev.auth.graphxserver.io/api/auth/organization/invite-member' \  -H 'Content-Type: application/json' \  -d '{  "email": "string",  "role": "string",  "status": "string"}'
{  "id": "string",  "email": "string",  "role": "string",  "organizationId": "string",  "inviterId": "string",  "status": "string",  "expiresAt": "string",  "createdAt": "string"}
POST
/organization/cancel-invitation

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Request Body

application/json
  1. body
invitationId*string

The ID of the invitation to cancel

Response Body

Bad Request. Usually due to missing parameters, or invalid parameters.

application/json
  1. response
message*string
curl -X POST 'https://dev.auth.graphxserver.io/api/auth/organization/cancel-invitation' \  -H 'Content-Type: application/json' \  -d '{  "invitationId": "string"}'
{  "message": "string"}
POST
/organization/accept-invitation

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Request Body

application/json
  1. body
invitationId*string

The ID of the invitation to accept

Response Body

Success

application/json
  1. response
invitation?
member?
curl -X POST 'https://dev.auth.graphxserver.io/api/auth/organization/accept-invitation' \  -H 'Content-Type: application/json' \  -d '{  "invitationId": "string"}'
{  "invitation": {},  "member": {}}
GET
/organization/get-invitation

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Query Parameters

id?string

The ID of the invitation to get

Response Body

Success

application/json
  1. response
id*string
email*string
role*string
organizationId*string
inviterId*string
status*string
expiresAt*string
organizationName*string
organizationSlug*string
inviterEmail*string
curl -X GET 'https://dev.auth.graphxserver.io/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"}
POST
/organization/reject-invitation

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Request Body

application/json
  1. body
invitationId*string

The ID of the invitation to reject

Response Body

Success

application/json
  1. response
invitation?
member?
curl -X POST 'https://dev.auth.graphxserver.io/api/auth/organization/reject-invitation' \  -H 'Content-Type: application/json' \  -d '{  "invitationId": "string"}'
{  "invitation": {},  "member": {}}
GET
/organization/list-invitations

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Response Body

Bad Request. Usually due to missing parameters, or invalid parameters.

application/json
  1. response
message*string
curl -X GET 'https://dev.auth.graphxserver.io/api/auth/organization/list-invitations'
{  "message": "string"}
GET
/organization/get-active-member

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Response Body

Success

application/json
  1. response
id*string
userId*string
organizationId*string
role*string
curl -X GET 'https://dev.auth.graphxserver.io/api/auth/organization/get-active-member'
{  "id": "string",  "userId": "string",  "organizationId": "string",  "role": "string"}

/organization/check-slug

POST
/organization/check-slug

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Request Body

application/json
  1. body
slug*string

The organization slug to check. Eg: "my-org"

Response Body

Bad Request. Usually due to missing parameters, or invalid parameters.

application/json
  1. response
message*string
curl -X POST 'https://dev.auth.graphxserver.io/api/auth/organization/check-slug' \  -H 'Content-Type: application/json' \  -d '{  "slug": "string"}'
{  "message": "string"}
POST
/organization/remove-member

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Request Body

application/json
  1. body
memberIdOrEmail*string

The ID or email of the member to remove

organizationId?string

The ID of the organization to remove the member from. If not provided, the active organization will be used. Eg: "org-id"

Response Body

Success

application/json
  1. response
member*
curl -X POST 'https://dev.auth.graphxserver.io/api/auth/organization/remove-member' \  -H 'Content-Type: application/json' \  -d '{  "memberIdOrEmail": "string"}'
{  "member": {    "id": "string",    "userId": "string",    "organizationId": "string",    "role": "string"  }}
POST
/organization/update-member-role

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Request Body

application/json
  1. body
role*|array<string>

The new role to be applied. This can be a string or array of strings representing the roles. Eg: ["admin", "sale"]

memberId*string

The member id to apply the role update to. Eg: "member-id"

organizationId?string

An optional organization ID which the member is a part of to apply the role update. If not provided, you must provide session headers to get the active organization. Eg: "organization-id"

Response Body

Success

application/json
  1. response
member*
curl -X POST 'https://dev.auth.graphxserver.io/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"  }}

/organization/leave

POST
/organization/leave

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Request Body

application/json
  1. body
organizationId*string

The organization Id for the member to leave. Eg: "organization-id"

Response Body

Bad Request. Usually due to missing parameters, or invalid parameters.

application/json
  1. response
message*string
curl -X POST 'https://dev.auth.graphxserver.io/api/auth/organization/leave' \  -H 'Content-Type: application/json' \  -d '{  "organizationId": "string"}'
{  "message": "string"}
GET
/organization/list-user-invitations

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Response Body

Success

application/json
  1. response
[index: integer]?
curl -X GET 'https://dev.auth.graphxserver.io/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"  }]
GET
/organization/get-active-member-role

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Response Body

Bad Request. Usually due to missing parameters, or invalid parameters.

application/json
  1. response
message*string
curl -X GET 'https://dev.auth.graphxserver.io/api/auth/organization/get-active-member-role'
{  "message": "string"}
POST
/organization/create-team

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Request Body

application/json
  1. body
name*string

The name of the team. Eg: "my-team"

organizationId?string

The organization ID which the team will be created in. Defaults to the active organization. Eg: "organization-id"

status*string

Response Body

Team created successfully

application/json
  1. response
id*string

Unique identifier of the created team

name*string

Name of the team

organizationId*string

ID of the organization the team belongs to

createdAt*string

Timestamp when the team was created

Formatdate-time
updatedAt*string

Timestamp when the team was last updated

Formatdate-time
curl -X POST 'https://dev.auth.graphxserver.io/api/auth/organization/create-team' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "status": "string"}'
{  "id": "string",  "name": "string",  "organizationId": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
POST
/organization/remove-team

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Request Body

application/json
  1. body
teamId*string

The team ID of the team to remove. Eg: "team-id"

organizationId?string

The organization ID which the team falls under. If not provided, it will default to the user's active organization. Eg: "organization-id"

Response Body

Team removed successfully

application/json
  1. response
message*"Team removed successfully."

Confirmation message indicating successful removal

Value in"Team removed successfully."
curl -X POST 'https://dev.auth.graphxserver.io/api/auth/organization/remove-team' \  -H 'Content-Type: application/json' \  -d '{  "teamId": "string"}'
{  "message": "Team removed successfully."}
POST
/organization/update-team

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Request Body

application/json
  1. body
teamId*string

The ID of the team to be updated. Eg: "team-id"

data*

Response Body

Team updated successfully

application/json
  1. response
id*string

Unique identifier of the updated team

name*string

Updated name of the team

organizationId*string

ID of the organization the team belongs to

createdAt*string

Timestamp when the team was created

Formatdate-time
updatedAt*string

Timestamp when the team was last updated

Formatdate-time
curl -X POST 'https://dev.auth.graphxserver.io/api/auth/organization/update-team' \  -H 'Content-Type: application/json' \  -d '{  "teamId": "string",  "data": {}}'
{  "id": "string",  "name": "string",  "organizationId": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
POST
/organization/set-active-team

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Request Body

application/json
  1. body
teamId?|

The team id to set as active. It can be null to unset the active team

Response Body

Success

application/json
  1. response

The team

id*string
name*string
memberCount?number
Default0
organizationId*string
createdAt*string
Formatdate-time
updatedAt?string
Formatdate-time
status*string
curl -X POST 'https://dev.auth.graphxserver.io/api/auth/organization/set-active-team' \  -H 'Content-Type: application/json' \  -d '{}'
{  "id": "string",  "name": "string",  "memberCount": 0,  "organizationId": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "status": "string"}
GET
/organization/list-user-teams

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Response Body

Teams retrieved successfully

application/json
  1. response

Array of team objects within the organization

[index: integer]?

The team

curl -X GET 'https://dev.auth.graphxserver.io/api/auth/organization/list-user-teams'
[  {    "id": "string",    "name": "string",    "memberCount": 0,    "organizationId": "string",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "status": "string"  }]
GET
/organization/list-team-members

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Response Body

Teams retrieved successfully

application/json
  1. response

Array of team member objects within the team

[index: integer]?

The team member

curl -X GET 'https://dev.auth.graphxserver.io/api/auth/organization/list-team-members'
[  {    "id": "string",    "userId": "string",    "teamId": "string",    "createdAt": "2019-08-24T14:15:22Z"  }]
POST
/organization/add-team-member

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Request Body

application/json
  1. body
teamId*string

The team the user should be a member of.

userId*string

The user Id which represents the user to be added as a member.

organizationId?string

The organization ID which the team falls under. If not provided, it will default to the user's active organization.

Response Body

Team member created successfully

application/json
  1. response

The team member

id*string

Unique identifier of the team member

userId*string

The user ID of the team member

teamId*string

The team ID of the team the team member is in

createdAt*string

Timestamp when the team member was created

Formatdate-time
curl -X POST 'https://dev.auth.graphxserver.io/api/auth/organization/add-team-member' \  -H 'Content-Type: application/json' \  -d '{  "teamId": "string",  "userId": "string"}'
{  "id": "string",  "userId": "string",  "teamId": "string",  "createdAt": "2019-08-24T14:15:22Z"}
POST
/organization/remove-team-member

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Request Body

application/json
  1. body
teamId*string

The team the user should be removed from.

userId*string

The user which should be removed from the team.

organizationId?string

The organization ID which the team falls under. If not provided, it will default to the user's active organization.

Response Body

Team member removed successfully

application/json
  1. response
message*"Team member removed successfully."

Confirmation message indicating successful removal

Value in"Team member removed successfully."
curl -X POST 'https://dev.auth.graphxserver.io/api/auth/organization/remove-team-member' \  -H 'Content-Type: application/json' \  -d '{  "teamId": "string",  "userId": "string"}'
{  "message": "Team member removed successfully."}
POST
/organization/create-role

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Request Body

application/json
  1. body
organizationId?string
role*string

The name of the role to create

permission*

The permission to assign to the role

additionalFields?

Response Body

Bad Request. Usually due to missing parameters, or invalid parameters.

application/json
  1. response
message*string
curl -X POST 'https://dev.auth.graphxserver.io/api/auth/organization/create-role' \  -H 'Content-Type: application/json' \  -d '{  "role": "string",  "permission": {    "property1": [      "string"    ],    "property2": [      "string"    ]  }}'
{  "message": "string"}
POST
/organization/delete-role

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Request Body

application/json
  1. body
roleName*string

The name of the role to delete

Length1 <= length
organizationId?string

Response Body

Bad Request. Usually due to missing parameters, or invalid parameters.

application/json
  1. response
message*string
curl -X POST 'https://dev.auth.graphxserver.io/api/auth/organization/delete-role' \  -H 'Content-Type: application/json' \  -d '{  "roleName": "string"}'
{  "message": "string"}

/organization/list-roles

GET
/organization/list-roles

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Response Body

Bad Request. Usually due to missing parameters, or invalid parameters.

application/json
  1. response
message*string
curl -X GET 'https://dev.auth.graphxserver.io/api/auth/organization/list-roles'
{  "message": "string"}

/organization/get-role

GET
/organization/get-role

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Response Body

Bad Request. Usually due to missing parameters, or invalid parameters.

application/json
  1. response
message*string
curl -X GET 'https://dev.auth.graphxserver.io/api/auth/organization/get-role'
{  "message": "string"}
POST
/organization/update-role

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Request Body

application/json
  1. body
roleName*string

The name of the role to update

Length1 <= length
organizationId?string
data*

Response Body

Bad Request. Usually due to missing parameters, or invalid parameters.

application/json
  1. response
message*string
curl -X POST 'https://dev.auth.graphxserver.io/api/auth/organization/update-role' \  -H 'Content-Type: application/json' \  -d '{  "data": {},  "roleName": "string"}'
{  "message": "string"}
POST
/organization/has-permission

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Request Body

application/json
  1. body
permission?Deprecated

The permission to check

permissions*

The permission to check

Response Body

Success

application/json
  1. response
error?string
success*boolean
curl -X POST 'https://dev.auth.graphxserver.io/api/auth/organization/has-permission' \  -H 'Content-Type: application/json' \  -d '{  "permissions": {}}'
{  "error": "string",  "success": true}