Tray.ai Workflows API

Import and export Tray workflows between embedded accounts, useful for promoting workflows from staging to production.

Operations 4

POST /graphql#exportWorkflows Tray.ai Export Workflows #
POST /graphql#importWorkflows Tray.ai Import Workflows #
POST / Import Workflows (master token) #
POST / Export Workflows (master token) #

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-workflows-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-workflows-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Tray Ai Workflows API
  version: 1.0.0
  x-refined-note:
  - x-logo differs across the merged source definitions and was not carried
  description: 'Operations tagged Workflows across 2 of this provider''s published API definitions: tray-ai-embedded-api-openapi.yml, tray-ai-embedded-api-published-openapi.yaml. Each path carries the servers of the definition it was published in.'
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
- url: https://tray.io/graphql
  description: US
- url: https://eu1.tray.io/graphql
  description: EU
- url: https://ap1.tray.io/graphql
  description: APAC
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'
    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
  /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'
    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
  '/                  ':
    post:
      tags:
      - Workflows
      summary: Import Workflows (master token)
      description:
        $ref: descriptions/embedded/endpoints/workflows/importWorkflows.md
      operationId: import-workflows
      x-codeSamples:
      - lang: cURL
        label: curl
        source:
          $ref: code_samples/workflows/importWorkflows.curl
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
        example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
        description: Pass your <a target="_blank" href="https://tray.ai/documentation/tray-uac/embedded-integrations/setup-notes/">master token</a> here
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: string
                variables:
                  type: object
            examples:
              import-workflows:
                summary: Import Workflows
                value:
                  query: "mutation ($exportedProjectJson: String!, $targetProjectId: ID!) {\n  importProject (input: {\n    exportedProjectJson: $exportedProjectJson,\n    targetProjectId: $targetProjectId\n  }) {\n    clientMutationId\n  }\n}"
                  variables:
                    exportedProjectJson: '{}'
                    targetProjectId: 944dxxx-xxx-xxx-xxx-xxx222eb99
              import-workflows-with-clientMutationId:
                summary: Import Workflowswith clientMutationId
                value:
                  query: "mutation ($exportedProjectJson: String!, $targetProjectId: ID!, $clientMutationId: String) {\n  importProject (input: {\n    exportedProjectJson: $exportedProjectJson\n    targetProjectId: $targetProjectId,\n    clientMutationId: $clientMutationId\n  }) {\n    clientMutationId\n  }\n}"
                  variables:
                    exportedProjectJson: '{}'
                    targetProjectId: 944dxxx-xxx-xxx-xxx-xxx222eb99
                    clientMutationId: some-mutation-id
        required: true
      responses:
        '200':
          description: OK - Workflows are imported to the embedded org
          content:
            application/json:
              examples:
                import-workflows:
                  summary: Import Workflows
                  value:
                    $ref: examples/workflows/importWorkflows.json
                import-workflows-with-clientMutationId:
                  summary: Import Workflows with clientMutationId
                  value:
                    $ref: examples/workflows/importWorkflowsWithClientMutationId.json
        '401':
          description: Unauthorized
          content:
            application/json:
              example:
                $ref: examples/401.json
        '403':
          description: Forbidden
          content:
            application/json:
              example:
                $ref: examples/403.json
        '500':
          description: Internal Error
          content:
            application/json:
              example:
                $ref: examples/500.json
    servers:
    - url: https://tray.io/graphql
      description: US
    - url: https://eu1.tray.io/graphql
      description: EU
    - url: https://ap1.tray.io/graphql
      description: APAC
  '/                   ':
    post:
      tags:
      - Workflows
      summary: Export Workflows (master token)
      description:
        $ref: descriptions/embedded/endpoints/workflows/exportWorkflows.md
      operationId: export-workflows
      x-codeSamples:
      - lang: cURL
        label: curl
        source:
          $ref: code_samples/workflows/exportWorkflows.curl
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
        example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
        description: Pass your <a target="_blank" href="https://tray.ai/documentation/tray-uac/embedded-integrations/setup-notes/">master token</a> here
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: string
                variables:
                  type: object
            examples:
              export-workflows:
                summary: Export Workflows
                value:
                  query: "mutation ($projectId: ID!) {\n  exportProject (input: {\n    projectId: $projectId,\n    exportSolution: true\n  }) {\n    exportedProjectJson\n  }\n}"
                  variables:
                    projectId: 944dxxx-xxx-xxx-xxx-xxx222eb99
        required: true
      responses:
        '200':
          description: OK - JSON string of the exported workflows is returned
          content:
            application/json:
              examples:
                export-workflows:
                  summary: Export Workflows
                  value:
                    $ref: examples/workflows/exportWorkflows.json
        '401':
          description: Unauthorized
          content:
            application/json:
              example:
                $ref: examples/401.json
        '403':
          description: Forbidden
          content:
            application/json:
              example:
                $ref: examples/403.json
        '500':
          description: Internal Error
          content:
            application/json:
              example:
                $ref: examples/500.json
    servers:
    - url: https://tray.io/graphql
      description: US
    - url: https://eu1.tray.io/graphql
      description: EU
    - url: https://ap1.tray.io/graphql
      description: APAC
components:
  schemas:
    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
    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
  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.
x-refined-from:
- tray-ai-embedded-api-openapi.yml
- tray-ai-embedded-api-published-openapi.yaml