Users

This includes the users who have UI access to the Tray platform as well as the API users that you can create by issuing tokens.

Invite User to Organization Workspace

post/core/v1/invites

Invites a user to the organization.

This will send an email to the user with a link to create an account.

If your organization has SSO configured and you do not wish an invitation to be sent, make use of the Create User endpoint.

This endpoint is rate limited to 100 user invites per day per organization.

SecuritybearerAuth
Request
Request Body schema: application/json
required
email
required
string^[a-zA-Z0-9\.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9...
organizationRoleId
required
string <uuid>
Responses
200

Indicates invite has been sent successfully

Response Schema: application/json
inviteId
required
string <uuid>
expires
required
string <date-time>
400

Invalid Input

401

Unauthorized

403

Forbidden

404

Not Found

429

Limit exceeded

500

Internal Error

Request samples
application/json
{
  • "email": "string",
  • "organizationRoleId": "3ed06bb5-3877-4ce1-8371-c21273b858f1"
}
Response samples
application/json
{
  • "inviteId": "14ca54c2-5d85-4c93-81b5-495a2e7e0ca4",
  • "expires": "2019-08-24T14:15:22Z"
}

List Organization Roles

get/core/v1/roles

List all roles in the organization.
When managing APIs you would want to take full control of how your endpoints are accessed.
Role-based policies allow you to build clear and consistent access control.
Read this page for details on creating roles and issuing tokens.

SecuritybearerAuth
Request
query Parameters
cursor
string

The cursor token for page starting point

first
integer <int32> > 0

The page size, in a forwards direction, with a maximum of 1000. Default direction if last not defined

last
integer <int32> > 0
header Parameters
Authorization
required
string

The authorization token. You must use either an org admin/owner or a master token

Example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
Responses
200
Response Schema: application/json
Array of objects (WorkspaceExternalApiModel)
required
object (ExternalApiPageInfoModel)
400

Invalid Input

401

Unauthorized

403

Forbidden

404

Not Found

429

Limit exceeded

500

Internal Error

Request samples
Response samples
application/json
{
  • "elements": [
    • {
      • "id": "string",
      • "name": "string",
      • "type": { },
      • "description": "string",
      • "monthlyTaskLimit": 0
      }
    ],
  • "pageInfo": {
    • "startCursor": "string",
    • "endCursor": "string",
    • "hasNextPage": true,
    • "hasPreviousPage": true
    }
}

List Users

get/core/v1/users

List all users in the organization

SecuritybearerAuth
Request
query Parameters
cursor
string

The cursor token for page starting point

first
integer <int32> > 0

The page size, in a forwards direction, with a maximum of 1000. Default direction if last not defined

last
integer <int32> > 0
email
string^[a-zA-Z0-9\.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9...

Filter by email address

header Parameters
Authorization
required
string

The authorization token. You must use either an org admin token OR a master token

Example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
Responses
200
Response Schema: application/json
Array of objects (WorkspaceExternalApiModel)
required
object (ExternalApiPageInfoModel)
400

Invalid Input

401

Unauthorized

403

Forbidden

404

Not Found

429

Limit exceeded

500

Internal Error

Request samples
Response samples
application/json
{
  • "elements": [
    • {
      • "id": "string",
      • "name": "string",
      • "type": { },
      • "description": "string",
      • "monthlyTaskLimit": 0
      }
    ],
  • "pageInfo": {
    • "startCursor": "string",
    • "endCursor": "string",
    • "hasNextPage": true,
    • "hasPreviousPage": true
    }
}

Create User

post/core/v1/users

Creates a user in the organization.

This endpoint should be used when you have SSO configured as it will not send an invitation to set up an account.

If an invitation is required, make use of the Invite user to organization workspace endpoint.

SecuritybearerAuth
Request
Request Body schema: application/json
required
name
required
string
email
required
string^[a-zA-Z0-9\.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9...
organizationRoleId
required
string <uuid>
Responses
200
Response Schema: application/json
id
required
string
email
required
string
name
required
string
required
API (object) or External (object) or Integration (object) or Partner (object) or Regular (object) or System (object) (AccountType)
required
object (RoleExternalApiModel)
400

Invalid Input

401

Unauthorized

403

Forbidden

404

Not Found

429

Limit exceeded

500

Internal Error

Request samples
application/json
{
  • "name": "string",
  • "email": "string",
  • "organizationRoleId": "3ed06bb5-3877-4ce1-8371-c21273b858f1"
}
Response samples
application/json
{
  • "id": "string",
  • "email": "string",
  • "name": "string",
  • "accountType": { },
  • "role": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "name": "string"
    }
}

Get User

get/core/v1/users/{userId}

Get user by id

SecuritybearerAuth
Request
path Parameters
userId
required
string^[a-zA-Z0-9-]+$

The id of an user

header Parameters
Authorization
required
string

The authorization token. You must use either an org level token (viewer or higher) OR a master token

Example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
Responses
200
Response Schema: application/json
id
required
string
email
required
string
name
required
string
required
API (object) or External (object) or Integration (object) or Partner (object) or Regular (object) or System (object) (AccountType)
required
object (RoleExternalApiModel)
400

Invalid Input

401

Unauthorized

403

Forbidden

404

Not Found

429

Limit exceeded

500

Internal Error

Request samples
Response samples
application/json
{
  • "id": "string",
  • "email": "string",
  • "name": "string",
  • "accountType": { },
  • "role": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "name": "string"
    }
}

Delete User

delete/core/v1/users/{userId}

Delete user by id

SecuritybearerAuth
Request
path Parameters
userId
required
string^[a-zA-Z0-9-]+$

The id of an user

header Parameters
Authorization
required
string

The authorization token. You must use either an org admin token OR a master token

Example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
Responses
204
400

Invalid Input

401

Unauthorized

403

Forbidden

404

Not Found

429

Limit exceeded

500

Internal Error

Request samples
Response samples
application/json
{ }

Update User Role

put/core/v1/users/{userId}/roles

Updates the role of a user in the organization

SecuritybearerAuth
Request
path Parameters
userId
required
string^[a-zA-Z0-9-]+$

The id of a user to update the role for

header Parameters
Authorization
required
string

The authorization token. You must use either an org admin token OR a master token

Example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
Request Body schema: application/json
required
roleId
required
string <uuid>
Responses
200
Response Schema: application/json
object
400

Invalid Input

401

Unauthorized

403

Forbidden

404

Not Found

429

Limit exceeded

500

Internal Error

Request samples
application/json
{
  • "roleId": "7382d58e-652a-4905-b7c9-bcca1e0e5391"
}
Response samples
application/json
{ }