Tray.ai Call Connector API

Call any Tray connector operation to pull data from a particular service and display it in your application.

Operations 2

POST /graphql#callConnector Tray.ai Call Connector #
POST / Call a Tray connector #

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-call-connector-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-call-connector-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Tray Ai Call Connector API
  version: 1.0.0
  x-refined-note:
  - x-logo differs across the merged source definitions and was not carried
  description: 'Operations tagged Call Connector 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: 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'
    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:
      - Call Connector
      summary: Call a Tray connector
      description:
        $ref: descriptions/embedded/endpoints/call-connector.md
      operationId: call-connector
      x-codeSamples:
      - lang: cURL
        label: curl
        source:
          $ref: code_samples/call-connector.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:
              list-all-leads-in-Salesforce:
                summary: List all leads in Salesforce
                value:
                  query: "mutation listLeads(\n  $connector: String!, \n  $version: String!, \n  $operation: String!, \n  $authId: String, \n){ listAllLeads: callConnector(input: {\n    connector: $connector,\n    version: $version,\n    operation: $operation,\n    authId: $authId,\n    input: \"{\\\"limit\\\":10,\\\"conditions_type\\\":\\\"Match all conditions\\\",\\\"fields\\\":[\\\"Id\\\",\\\"Name\\\"],\\\"object\\\":\\\"Lead\\\"}\"\n  }) {\n    output\n  }\n}"
                  variables:
                    connector: salesforce
                    version: '8.7'
                    operation: find_records
                    authId: 062af7e2-b5xxx-xxx-xxx-xxx-xxxxx46d912
              find-warm-leads-in-Salesforce:
                summary: List warm leads in Salesforce
                value:
                  query: "mutation listLeads(\n  $connector: String!, \n  $version: String!, \n  $operation: String!, \n  $authId: String, \n){ \n  listWarmLeads: callConnector(input: {\n    connector: $connector,\n    version: $version,\n    operation: $operation,\n    authId: $authId,\n    input: \"{\\\"conditions_type\\\":\\\"Match all conditions\\\",\\\"fields\\\":[\\\"Id\\\",\\\"Name\\\"],\\\"conditions\\\":[{\\\"field\\\":\\\"Rating\\\",\\\"operator\\\":\\\"Equal to\\\",\\\"value\\\":\\\"Warm\\\"}],\\\"object\\\":\\\"Lead\\\"}\"\n  }) {\n    output\n  }\n}"
                  variables:
                    connector: salesforce
                    version: '8.7'
                    operation: find_records
                    authId: 062af7e2-b5xxx-xxx-xxx-xxx-xxxxx46d912
        required: true
      responses:
        '200':
          description: OK - Response of the connector operation is returned
          content:
            application/json:
              examples:
                list-all-leads-in-Salesforce:
                  summary: List all leads from Salesforce
                  value:
                    $ref: examples/listAllLeads.json
                list-warm-leads-in-Salesforce:
                  summary: List warm leads from Salesforce
                  value:
                    $ref: examples/listWarmLeads.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