openapi: 3.1.0 info: title: Tray.io Platform API description: >- The Tray.io Platform API (also known as the Connectivity API) provides direct programmatic REST access to Tray's connectors, authentication management, trigger subscriptions, user and workspace administration, and project/solution lifecycle operations. Enables developers to integrate Tray's 700+ pre-built service connectors into their own applications without using the Builder UI. All endpoints require Bearer token authentication. version: 1.0.0 contact: name: Tray.io Support url: https://tray.ai termsOfService: https://tray.ai/terms license: name: Proprietary url: https://tray.ai/terms servers: - url: https://api.tray.io/core/v1 description: US Region (Default) - url: https://api.eu1.tray.io/core/v1 description: EU Region security: - bearerAuth: [] tags: - name: Authentications description: >- Create, retrieve, and delete third-party service authentications required by connectors to access external services. - name: Connectors description: >- List available connectors and their operations, and call connector operations to interact with third-party services programmatically. - name: Projects description: >- Manage projects and solutions for environment promotion, including creating, exporting, and importing project versions. - name: Triggers description: >- List available triggers and manage trigger subscriptions to receive real-time data from third-party services. - name: Users description: >- Manage users and roles within your Tray.io organization. - name: Workspaces description: >- Manage workspaces and workspace users. Workspaces divide an organization into sub-categories such as departments or dev/prod environments. paths: /connectors: get: operationId: listConnectors summary: List Connectors description: >- Returns a list of all available connectors from Tray's connector library. Each connector exposes the API operations of a third-party service and can have multiple versions. tags: - Connectors responses: '200': description: List of connectors returned successfully content: application/json: schema: type: object properties: elements: type: array items: $ref: '#/components/schemas/Connector' '401': $ref: '#/components/responses/Unauthorized' /connectors/{connectorName}/versions/{connectorVersion}: get: operationId: getConnectorVersion summary: Get Connector Version description: >- Retrieves details of a specific connector version, including its available operations, input schemas, and output schemas. tags: - Connectors parameters: - name: connectorName in: path required: true schema: type: string description: The name of the connector (e.g., salesforce, slack) - name: connectorVersion in: path required: true schema: type: string description: The version of the connector (e.g., 2.1) responses: '200': description: Connector version details returned successfully content: application/json: schema: $ref: '#/components/schemas/ConnectorVersion' '401': $ref: '#/components/responses/Unauthorized' '404': description: Connector or version not found /connectors/{connectorName}/versions/{connectorVersion}/call: post: operationId: callConnector summary: Call Connector description: >- Executes an operation of a connector and returns the result. Billable endpoint. The input must conform to the input schema of the specified operation. Requires an authId for most operations. tags: - Connectors parameters: - name: connectorName in: path required: true schema: type: string description: The name of the connector - name: connectorVersion in: path required: true schema: type: string description: The version of the connector requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CallConnectorRequest' responses: '200': description: Connector operation executed successfully content: application/json: schema: type: object description: Output from the connector operation. Structure varies by connector. '401': $ref: '#/components/responses/Unauthorized' /authentications: get: operationId: listAuthentications summary: List Authentications description: >- Retrieves a list of authentications associated with the authenticated user or organization. tags: - Authentications responses: '200': description: Authentications returned successfully content: application/json: schema: type: object properties: elements: type: array items: $ref: '#/components/schemas/Authentication' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createAuthentication summary: Create Authentication description: >- Creates a new user authentication for a third-party service in Tray.io. Returns an authentication ID usable with the Call Connector endpoint. tags: - Authentications requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateAuthenticationRequest' responses: '200': description: Authentication created successfully content: application/json: schema: $ref: '#/components/schemas/Authentication' '401': $ref: '#/components/responses/Unauthorized' /authentications/{authenticationId}: get: operationId: getAuthentication summary: Get Authentication description: Retrieves metadata associated with a user authentication by its ID. tags: - Authentications parameters: - name: authenticationId in: path required: true schema: type: string description: The unique identifier for the authentication responses: '200': description: Authentication details returned successfully content: application/json: schema: $ref: '#/components/schemas/Authentication' '401': $ref: '#/components/responses/Unauthorized' '404': description: Authentication not found delete: operationId: deleteAuthentication summary: Delete Authentication description: Deletes a user authentication using the authentication ID. tags: - Authentications parameters: - name: authenticationId in: path required: true schema: type: string description: The unique identifier for the authentication responses: '204': description: Authentication deleted successfully '401': $ref: '#/components/responses/Unauthorized' '404': description: Authentication not found /triggers: get: operationId: listTriggers summary: List Triggers description: >- Returns a list of all available triggers from Tray's trigger library. Triggers allow receiving real-time data from third-party services. tags: - Triggers responses: '200': description: List of triggers returned successfully content: application/json: schema: type: object properties: elements: type: array items: $ref: '#/components/schemas/Trigger' '401': $ref: '#/components/responses/Unauthorized' /subscriptions: post: operationId: createSubscription summary: Create Subscription description: >- Creates a new trigger subscription using a trigger operation. The input must conform to the input schema of the trigger operation. tags: - Triggers requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateSubscriptionRequest' responses: '200': description: Subscription created successfully content: application/json: schema: $ref: '#/components/schemas/Subscription' '401': $ref: '#/components/responses/Unauthorized' /subscriptions/{subscriptionId}: delete: operationId: deleteSubscription summary: Delete Subscription description: Deletes a trigger subscription by its ID. tags: - Triggers parameters: - name: subscriptionId in: path required: true schema: type: string description: The unique identifier for the subscription responses: '204': description: Subscription deleted successfully '401': $ref: '#/components/responses/Unauthorized' '404': description: Subscription not found /users: get: operationId: listUsers summary: List Users description: Retrieves a list of users within the Tray.io organization. tags: - Users responses: '200': description: Users returned successfully content: application/json: schema: type: object properties: elements: type: array items: $ref: '#/components/schemas/User' '401': $ref: '#/components/responses/Unauthorized' /users/invite: post: operationId: inviteUser summary: Invite User description: Invites a user to the organization by email address. tags: - Users requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/InviteUserRequest' responses: '200': description: User invited successfully content: application/json: schema: $ref: '#/components/schemas/User' '401': $ref: '#/components/responses/Unauthorized' /workspaces: get: operationId: listWorkspaces summary: List Workspaces description: >- Retrieves a list of workspaces in the Tray.io organization. Workspaces separate environments such as dev and production. 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' /workspaces/{workspaceId}: get: operationId: getWorkspace summary: Get Workspace description: Retrieves details for a specific workspace by its ID. tags: - Workspaces parameters: - name: workspaceId in: path required: true schema: type: string responses: '200': description: Workspace returned successfully content: application/json: schema: $ref: '#/components/schemas/Workspace' '401': $ref: '#/components/responses/Unauthorized' '404': description: Workspace not found /projects/{projectId}/export: post: operationId: exportProject summary: Export Project description: Exports a project version for environment promotion. tags: - Projects parameters: - name: projectId in: path required: true schema: type: string responses: '200': description: Project exported successfully content: application/json: schema: type: object properties: exportedData: type: string '401': $ref: '#/components/responses/Unauthorized' /projects/import: post: operationId: importProject summary: Import Project description: Imports a project version from exported data into a target workspace. tags: - Projects requestBody: required: true content: application/json: schema: type: object required: - exportedData properties: exportedData: type: string workspaceId: type: string responses: '200': description: Project imported successfully content: application/json: schema: type: object properties: projectId: type: string '401': $ref: '#/components/responses/Unauthorized' components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT schemas: Connector: type: object properties: name: type: string title: type: string description: type: string icon: type: string format: uri versions: type: array items: type: object properties: version: type: string isLatest: type: boolean ConnectorVersion: type: object properties: name: type: string version: type: string title: type: string operations: type: array items: $ref: '#/components/schemas/Operation' Operation: type: object properties: name: type: string title: type: string description: type: string inputSchema: type: object outputSchema: type: object CallConnectorRequest: type: object required: - operation properties: operation: type: string authId: type: string input: type: object Authentication: type: object properties: id: type: string name: type: string serviceEnvironmentId: type: string scopes: type: array items: type: string createdAt: type: string format: date-time CreateAuthenticationRequest: type: object required: - name - serviceEnvironmentId properties: name: type: string serviceEnvironmentId: type: string userData: type: object credentials: type: object Trigger: type: object properties: name: type: string title: type: string description: type: string connectorName: type: string inputSchema: type: object CreateSubscriptionRequest: type: object required: - triggerName - connectorName - connectorVersion - authId - input properties: triggerName: type: string connectorName: type: string connectorVersion: type: string authId: type: string input: type: object Subscription: type: object properties: id: type: string triggerName: type: string connectorName: type: string status: type: string createdAt: type: string format: date-time User: type: object properties: id: type: string name: type: string email: type: string format: email role: type: string status: type: string InviteUserRequest: type: object required: - email properties: email: type: string format: email role: type: string workspaceId: type: string Workspace: type: object properties: id: type: string name: type: string description: type: string createdAt: type: string format: date-time responses: Unauthorized: description: Authentication failed. Bearer token missing or invalid. content: application/json: schema: type: object properties: error: type: string message: type: string