openapi: 3.1.0 info: title: Tray.ai Embedded Authentication Call Connector 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: Call Connector description: Call any Tray connector operation to pull data from a particular service and display it in your application. paths: /graphql#callConnector: post: operationId: callConnector summary: Tray.ai Call Connector description: Calls any Tray connector operation to pull data from a particular third-party service. Used in combination with a user token and authentication ID to interact with service connector operations (e.g., list Salesforce objects, get Slack channels). Returns a promise that resolves to the output of the connector call. Requires a user token. tags: - Call Connector requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/GraphQLRequest' example: query: "mutation {\n callConnector(input: {\n connector: \"slack\",\n version: \"4.0\",\n operation: \"list_channels\",\n authId: \"auth-uuid-here\",\n input: {}\n }) {\n output\n }\n}" responses: '200': description: Connector operation executed successfully content: application/json: schema: type: object properties: data: type: object properties: callConnector: type: object properties: output: type: object description: The output from the connector operation, structure varies by connector and operation '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.