openapi: 3.1.0 info: title: Tray.ai Embedded Authentication Workflows API description: 'The Tray.ai Embedded API is a GraphQL-based API that allows partners and customers to present in-app embedded integration experiences using Tray''s UI components. It provides programmatic access to manage users, solutions, solution instances, authentications, workflows, and connector operations. All API calls are made via HTTP POST to the GraphQL endpoint with Bearer token authentication. The API supports two token types: master tokens (for admin operations like managing users) and user tokens (for user-scoped operations like managing solution instances). This is a backend-only API; client-side JavaScript calls are blocked by CORS.' version: 1.0.0 contact: name: Tray.ai Support url: https://tray.ai termsOfService: https://tray.ai/terms license: name: Proprietary url: https://tray.ai/terms servers: - url: https://tray.io description: US Region (Default) - url: https://eu1.tray.io description: EU Region - url: https://ap1.tray.io description: APAC Region security: - bearerAuth: [] tags: - name: Workflows description: Import and export Tray workflows between embedded accounts, useful for promoting workflows from staging to production. paths: /graphql#exportWorkflows: post: operationId: exportWorkflows summary: Tray.ai Export Workflows description: Exports workflows from your embedded account. Useful for promoting workflows from staging to production environments. Requires a master token. tags: - Workflows requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/GraphQLRequest' example: query: "mutation {\n exportWorkflows(input: {\n workflowIds: [\"workflow-uuid-1\", \"workflow-uuid-2\"]\n }) {\n exportedData\n }\n}" responses: '200': description: Workflows exported successfully content: application/json: schema: type: object properties: data: type: object properties: exportWorkflows: type: object properties: exportedData: type: string description: Serialized workflow data for import '401': $ref: '#/components/responses/Unauthorized' /graphql#importWorkflows: post: operationId: importWorkflows summary: Tray.ai Import Workflows description: Imports workflows into your embedded account from exported data. Useful for promoting workflows from staging to production environments. Requires a master token. tags: - Workflows requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/GraphQLRequest' example: query: "mutation {\n importWorkflows(input: {\n exportedData: \"serialized-workflow-data\"\n }) {\n clientMutationId\n }\n}" responses: '200': description: Workflows imported successfully content: application/json: schema: type: object properties: data: type: object properties: importWorkflows: type: object properties: clientMutationId: type: string '401': $ref: '#/components/responses/Unauthorized' components: schemas: GraphQLRequest: type: object required: - query properties: query: type: string description: The GraphQL query or mutation string variables: type: object description: Variables to pass to the GraphQL query or mutation operationName: type: string description: The name of the operation to execute if the query contains multiple operations GraphQLError: type: object properties: errors: type: array items: type: object properties: message: type: string description: Error message locations: type: array items: type: object properties: line: type: integer column: type: integer path: type: array items: type: string 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/GraphQLError' securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT description: Use either a master token (obtained from Tray Embedded UI settings) or a user token (obtained via the authorize mutation). Master tokens are required for admin operations like managing users. User tokens are required for user-scoped operations like managing solution instances.