Tray.ai Workspaces API

Manage workspaces and workspace users. Workspaces divide your organization into sub-categories such as departments or dev/prod environments.

Operations 11

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /workspaces List workspaces (unversioned) · Tray.ai List Workspaces #
Ask an LLM
“Which workspaces, like departments or dev and prod environments, does my organization have?”
“Can I list workspaces on the unversioned /workspaces endpoint?”
Tell an agent
List the workspaces in my organization from the unversioned endpoint.
Show my dev and prod workspaces.
GET /workspaces/{workspaceId} Get a workspace by id (unversioned) · Tray.ai Get Workspace #
Ask an LLM
“What details does the unversioned workspace endpoint return for one id?”
“Can I look up a single workspace on /workspaces by its id?”
Tell an agent
Get workspace {workspace} from the unversioned endpoint.
Show unversioned details for workspace id {workspace}.
GET /workspaces/{workspaceId}/users List a workspace's users (unversioned) · Tray.ai List Workspace Users #
Ask an LLM
“Who belongs to a given workspace, per the unversioned endpoint?”
“Can I list workspace members without paging, on the unversioned endpoint?”
Tell an agent
List users of workspace {workspace} from the unversioned endpoint.
Show everyone who belongs to workspace {workspace}, unversioned.
GET /core/v1/workspaces List workspaces my token can access · List Workspaces #
Ask an LLM
“Does an org-scoped token list every workspace while a workspace token lists only one?”
“Can I filter workspaces by type in core v1?”
Tell an agent
List core v1 workspaces of type {type}.
Show every workspace this token can reach, {count} at a time.
GET /core/v1/workspaces/{workspaceId} Get a workspace with core v1 · Get Workspace #
Ask an LLM
“What does core v1 return for a workspace id?”
“How do I read a single workspace through the core v1 API?”
Tell an agent
Get core v1 workspace {workspace}.
Fetch workspace {workspace} through core v1.
GET /core/v1/workspaces/{workspaceId}/users List a workspace's users with core v1 · List Users from a Workspace #
Ask an LLM
“Can I page through a workspace's members with a cursor in core v1?”
“Which users have access to a workspace, according to core v1?”
Tell an agent
List core v1 users in workspace {workspace}.
Show workspace {workspace} members after cursor {cursor}.
POST /core/v1/workspaces/{workspaceId}/users Add a user to a workspace · Add User to Workspace #
Ask an LLM
“How do I give an existing organization user access to a workspace?”
“Which role must I choose when adding someone to a workspace?”
Tell an agent
Add user {user} to workspace {workspace} with role {role}.
Grant {user} role {role} in workspace {workspace}.
GET /core/v1/workspaces/{workspaceId}/users/{userId} Get one user's workspace membership · Get Workspace User by id #
Ask an LLM
“What role does a specific user have in a workspace?”
“Is a given user a member of this workspace?”
Tell an agent
Get user {user} in workspace {workspace}.
Show {user}'s membership and role in workspace {workspace}.
PUT /core/v1/workspaces/{workspaceId}/users/{userId} Change a user's role in a workspace · Update User's Workspace Role #
Ask an LLM
“Can I change someone's role in one workspace only?”
“How do I give an existing workspace member a different workspace role?”
Tell an agent
Change user {user}'s role in workspace {workspace} to {role}.
Set workspace {workspace} role {role} for member {user}.
DELETE /core/v1/workspaces/{workspaceId}/users/{userId} Remove a user from a workspace · Remove User from Workspace #
Ask an LLM
“Can I take someone out of a workspace without deleting them from the organization?”
“Which call revokes a user's workspace access?”
Tell an agent destructive · confirm first
Remove user {user} from workspace {workspace}.
Revoke {user}'s access to workspace {workspace}.
GET /core/v1/workspaces/{workspaceId}/roles List roles available in a workspace · List Workspace Roles #
Ask an LLM
“Which roles can I assign inside a particular workspace?”
“Where do I find the role id for a workspace member?”
Tell an agent
List the roles for workspace {workspace}.
Show the first {count} workspace roles in {workspace}.

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/tray-ai:tray-ai-workspaces-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

tray-ai-workspaces-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Tray Ai Workspaces API
  version: 1.0.0
  x-refined-note:
  - x-logo differs across the merged source definitions and was not carried
  description: 'Operations tagged Workspaces across 2 of this provider''s published API definitions: tray-ai-platform-api-openapi.yml, tray-ai-platform-api-published-openapi.yaml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.tray.io/core/v1
  description: US Region (Default)
- url: https://api.eu1.tray.io/core/v1
  description: EU Region
- url: https://api.ap1.tray.io/core/v1
  description: APAC Region
- url: https://api.tray.io
  description: US
- url: https://api.eu1.tray.io
  description: EU
- url: https://api.ap1.tray.io
  description: APAC
security:
- bearerAuth: []
tags:
- name: Workspaces
  description: Manage workspaces and workspace users. Workspaces divide your organization into sub-categories such as departments or dev/prod environments.
paths:
  /workspaces:
    get:
      operationId: listWorkspaces
      summary: Tray.ai List Workspaces
      description: Retrieves a list of workspaces in the organization. Workspaces divide the organization into sub-categories such as departments or dev/prod environments for environment promotion.
      tags:
      - Workspaces
      responses:
        '200':
          description: Workspaces returned successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  elements:
                    type: array
                    items:
                      $ref: '#/components/schemas/Workspace'
        '401':
          $ref: '#/components/responses/Unauthorized'
    servers:
    - url: https://api.tray.io/core/v1
      description: US Region (Default)
    - url: https://api.eu1.tray.io/core/v1
      description: EU Region
    - url: https://api.ap1.tray.io/core/v1
      description: APAC Region
  /workspaces/{workspaceId}:
    get:
      operationId: getWorkspace
      summary: Tray.ai Get Workspace
      description: Retrieves details for a specific workspace by its ID.
      tags:
      - Workspaces
      parameters:
      - name: workspaceId
        in: path
        required: true
        schema:
          type: string
        description: The unique identifier for the workspace
      responses:
        '200':
          description: Workspace returned successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Workspace'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Workspace not found
    servers:
    - url: https://api.tray.io/core/v1
      description: US Region (Default)
    - url: https://api.eu1.tray.io/core/v1
      description: EU Region
    - url: https://api.ap1.tray.io/core/v1
      description: APAC Region
  /workspaces/{workspaceId}/users:
    get:
      operationId: listWorkspaceUsers
      summary: Tray.ai List Workspace Users
      description: Retrieves a list of users belonging to a specific workspace.
      tags:
      - Workspaces
      parameters:
      - name: workspaceId
        in: path
        required: true
        schema:
          type: string
        description: The unique identifier for the workspace
      responses:
        '200':
          description: Workspace users returned successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  elements:
                    type: array
                    items:
                      $ref: '#/components/schemas/PlatformUser'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Workspace not found
    servers:
    - url: https://api.tray.io/core/v1
      description: US Region (Default)
    - url: https://api.eu1.tray.io/core/v1
      description: EU Region
    - url: https://api.ap1.tray.io/core/v1
      description: APAC Region
  /core/v1/workspaces:
    get:
      operationId: get-workspaces
      summary: List Workspaces
      description: Lists all workspaces the token has access to i.e. will return all workspaces from the Tray Organization if the Org scope token is used, a single workspace for the workspace scoped token.
      tags:
      - Workspaces
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
        description: The authorization token.
        example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
      - name: cursor
        in: query
        description: The cursor token for page starting point
        required: false
        schema:
          type: string
      - name: first
        in: query
        description: The page size, in a forwards direction, with a maximum of 100. Default direction if last not defined
        required: false
        schema:
          type: integer
          format: int32
          exclusiveMinimum: 0
      - name: last
        in: query
        description: ''
        required: false
        schema:
          type: integer
          format: int32
          exclusiveMinimum: 0
      - name: type
        in: query
        description: Filter by workspace type
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/WorkspaceType'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalApiDataPage_ENT'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
    servers:
    - url: https://api.tray.io
      description: US
    - url: https://api.eu1.tray.io
      description: EU
    - url: https://api.ap1.tray.io
      description: APAC
  /core/v1/workspaces/{workspaceId}:
    get:
      operationId: get-workspace-by-id
      summary: Get Workspace
      description: Gets a workspace by Id.
      tags:
      - Workspaces
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
        description: The authorization token. You must use either an org scoped token or a token that has viewer or higher permission in the workspace you are trying to access.
        example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
      - name: workspaceId
        in: path
        description: The id of a workspace
        required: true
        schema:
          type: string
          pattern: ^[a-zA-Z0-9-]+$
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceExternalApiModel'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
    servers:
    - url: https://api.tray.io
      description: US
    - url: https://api.eu1.tray.io
      description: EU
    - url: https://api.ap1.tray.io
      description: APAC
  /core/v1/workspaces/{workspaceId}/users:
    get:
      operationId: list-users-in-workspace
      summary: List Users from a Workspace
      description: List all users in the workspace
      tags:
      - Workspaces
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
        description: The authorization token. You must use either an org scoped token or a token that has viewer or higher permission in the given workspace.
        example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
      - name: cursor
        in: query
        description: The cursor token for page starting point
        required: false
        schema:
          type: string
      - name: first
        in: query
        description: The page size, in a forwards direction, with a maximum of 100. Default direction if last not defined
        required: false
        schema:
          type: integer
          format: int32
          exclusiveMinimum: 0
      - name: last
        in: query
        description: ''
        required: false
        schema:
          type: integer
          format: int32
          exclusiveMinimum: 0
      - name: workspaceId
        in: path
        description: The id of a workspace to list users
        required: true
        schema:
          type: string
          pattern: ^[a-zA-Z0-9-]+$
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalApiDataPage_ENT'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
    post:
      operationId: add-user-to-workspace
      summary: Add User to Workspace
      description: Adds a user to a workspace
      tags:
      - Workspaces
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
        description: The authorization token. You must use either an org admin/owner token or a token that has Admin or higher permission in the workspace you are trying to access.
        example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
      - name: workspaceId
        in: path
        description: The id of a workspace to add a user to
        required: true
        schema:
          type: string
          pattern: ^[a-zA-Z0-9-]+$
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddUserToWorkspaceExternalApiBody'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
    servers:
    - url: https://api.tray.io
      description: US
    - url: https://api.eu1.tray.io
      description: EU
    - url: https://api.ap1.tray.io
      description: APAC
  /core/v1/workspaces/{workspaceId}/users/{userId}:
    get:
      operationId: get-workspace-user-by-id
      summary: Get Workspace User by id
      description: Get workspace user by id
      tags:
      - Workspaces
      parameters:
      - name: workspaceId
        in: path
        description: The id of a workspace
        required: true
        schema:
          type: string
          pattern: ^[a-zA-Z0-9-]+$
      - name: userId
        in: path
        description: The id of the user
        required: true
        schema:
          type: string
          pattern: ^[a-zA-Z0-9-]+$
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceUserExternalApiModel'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
    put:
      operationId: update-user-workspace-role
      summary: Update User's Workspace Role
      description: Updates the role of a user in a workspace
      tags:
      - Workspaces
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
        description: The authorization token. You must use either an org admin/owner token or a token that has admin or higher permission in the given workspace.
        example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
      - name: workspaceId
        in: path
        description: The id of the workspace to update the users role
        required: true
        schema:
          type: string
          pattern: ^[a-zA-Z0-9-]+$
      - name: userId
        in: path
        description: The id of a user to update the role for
        required: true
        schema:
          type: string
          pattern: ^[a-zA-Z0-9-]+$
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserWorkspaceRoleExternalEndpointBody'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
    delete:
      operationId: remove-user-from-a-Workspace
      summary: Remove User from Workspace
      description: Removes a user from a workspace
      tags:
      - Workspaces
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
        description: The authorization token. You must use either an org admin/owner token or a token that has admin or higher permission in the given workspace.
        example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
      - name: workspaceId
        in: path
        description: The id of a workspace to add a user to
        required: true
        schema:
          type: string
          pattern: ^[a-zA-Z0-9-]+$
      - name: userId
        in: path
        description: The id of a user to remove from a workspace
        required: true
        schema:
          type: string
          pattern: ^[a-zA-Z0-9-]+$
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
    servers:
    - url: https://api.tray.io
      description: US
    - url: https://api.eu1.tray.io
      description: EU
    - url: https://api.ap1.tray.io
      description: APAC
  /core/v1/workspaces/{workspaceId}/roles:
    get:
      operationId: get-workspace-roles
      summary: List Workspace Roles
      description: Get Workspace Roles
      tags:
      - Workspaces
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
        description: The authorization token. You must use either an org admin/owner token or a token that has admin or higher permission in the given workspace.
        example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
      - name: cursor
        in: query
        description: The cursor token for page starting point
        required: false
        schema:
          type: string
      - name: first
        in: query
        description: The page size, in a forwards direction, with a maximum of 100. Default direction if last not defined
        required: false
        schema:
          type: integer
          format: int32
          exclusiveMinimum: 0
      - name: last
        in: query
        description: ''
        required: false
        schema:
          type: integer
          format: int32
          exclusiveMinimum: 0
      - name: workspaceId
        in: path
        description: The id of a workspace to list roles for
        required: true
        schema:
          type: string
          pattern: ^[a-zA-Z0-9-]+$
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalApiDataPage_ENT'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
    servers:
    - url: https://api.tray.io
      description: US
    - url: https://api.eu1.tray.io
      description: EU
    - url: https://api.ap1.tray.io
      description: APAC
components:
  responses:
    Unauthorized:
      description: Authentication failed. The bearer token is missing, invalid, or does not have sufficient permissions for the requested operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Workspace:
      type: object
      properties:
        id:
          type: string
          description: Unique workspace identifier
        name:
          type: string
          description: Display name of the workspace
        description:
          type: string
          description: Description of the workspace
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the workspace was created
    PlatformUser:
      type: object
      properties:
        id:
          type: string
          description: Unique user identifier
        name:
          type: string
          description: Display name of the user
        email:
          type: string
          format: email
          description: Email address of the user
        role:
          type: string
          description: Role of the user in the organization
        status:
          type: string
          description: Account status (active, invited, etc.)
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error type
        message:
          type: string
          description: Human-readable error message
        statusCode:
          type: integer
          description: HTTP status code
    AccountType:
      title: AccountType
      oneOf:
      - $ref: '#/components/schemas/API'
      - $ref: '#/components/schemas/External'
      - $ref: '#/components/schemas/Integration'
      - $ref: '#/components/schemas/Partner'
      - $ref: '#/components/schemas/Regular'
      - $ref: '#/components/schemas/System'
    Shared:
      title: Shared
      type: object
    WorkspaceExternalApiModel:
      title: WorkspaceExternalApiModel
      type: object
      required:
      - id
      - name
      - type
      properties:
        id:
          type: string
        name:
          type: string
        type:
          $ref: '#/components/schemas/WorkspaceType'
        description:
          type: string
        monthlyTaskLimit:
          type: integer
          format: int64
    InternalError:
      title: InternalError
      type: object
      required:
      - message
      properties:
        message:
          type: string
        code:
          type: string
    UpdateUserWorkspaceRoleExternalEndpointBody:
      title: UpdateUserWorkspaceRoleExternalEndpointBody
      type: object
      required:
      - roleId
      properties:
        roleId:
          type: string
          format: uuid
    Personal:
      title: Personal
      type: object
    Unauthorized:
      title: Unauthorized
      type: object
      required:
      - message
      properties:
        message:
          type: string
        code:
          type: string
    Embedded:
      title: Embedded
      type: object
    ExternalApiPageInfoModel:
      title: ExternalApiPageInfoModel
      type: object
      required:
      - hasNextPage
      - hasPreviousPage
      properties:
        startCursor:
          type: string
        endCursor:
          type: string
        hasNextPage:
          type: boolean
        hasPreviousPage:
          type: boolean
    WorkspaceUserExternalApiModel:
      title: WorkspaceUserExternalApiModel
      type: object
      required:
      - workspaceId
      - id
      - accountType
      - role
      properties:
        workspaceId:
          type: string
        id:
          type: string
        email:
          type: string
        accountType:
          $ref: '#/components/schemas/AccountType'
        role:
          $ref: '#/components/schemas/RoleExternalApiModel'
    Organization:
      title: Organization
      type: object
    PersonalExternal:
      title: PersonalExternal
      type: object
    System:
      title: System
      type: object
    AddUserToWorkspaceExternalApiBody:
      title: AddUserToWorkspaceExternalApiBody
      type: object
      required:
      - userId
      - roleId
      properties:
        userId:
          type: string
          pattern: ^[a-zA-Z0-9-]+$
        roleId:
          type: string
          format: uuid
    Integration:
      title: Integration
      type: object
    Partner:
      title: Partner
      type: object
    WorkspaceType:
      title: WorkspaceType
      oneOf:
      - $ref: '#/components/schemas/Embedded'
      - $ref: '#/components/schemas/Organization'
      - $ref: '#/components/schemas/Personal'
      - $ref: '#/components/schemas/PersonalExternal'
      - $ref: '#/components/schemas/Shared'
    ExternalApiDataPage_ENT:
      title: ExternalApiDataPage_ENT
      type: object
      required:
      - pageInfo
      properties:
        elements:
          type: array
          items:
            $ref: '#/components/schemas/WorkspaceExternalApiModel'
        pageInfo:
          $ref: '#/components/schemas/ExternalApiPageInfoModel'
    ResourceNotFound:
      title: ResourceNotFound
      type: object
      required:
      - message
      properties:
        message:
          type: string
        code:
          type: string
    API:
      title: API
      type: object
    RoleExternalApiModel:
      title: RoleExternalApiModel
      type: object
      required:
      - id
      - name
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
    TooManyRequestsError:
      title: TooManyRequestsError
      type: object
      required:
      - message
      properties:
        message:
          type: string
    InvalidInput:
      title: InvalidInput
      type: object
      required:
      - message
      properties:
        message:
          type: string
        code:
          type: string
    Regular:
      title: Regular
      type: object
    Forbidden:
      title: Forbidden
      type: object
      required:
      - message
      properties:
        message:
          type: string
        code:
          type: string
    External:
      title: External
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Bearer token authentication. Use a master token for admin operations or a user token for user-scoped operations. Tokens are obtained from the Tray platform settings or via the Embedded API authorize mutation.
x-refined-from:
- tray-ai-platform-api-openapi.yml
- tray-ai-platform-api-published-openapi.yaml