---
title: Tray.ai API Integration on Truto
slug: trayai
category: iPaaS
canonical: "https://truto.one/integrations/detail/trayai/"
---

# Tray.ai API Integration on Truto



**Category:** iPaaS  
**Status:** Beta

## MCP-ready AI tools

Truto exposes 19 tools for Tray.ai that AI agents can call directly.

- **list_all_tray_ai_authentications** — List Tray Embedded authentications available to the viewer, with connector details. Returns edges whose node includes id, name, customFields, and service (id, name, icon, title, version). Paginated by cursor.
- **create_a_tray_ai_authentication** — Create a Tray Embedded user authentication for a service connector. Returns: id. Required: name, service_id, service_environment_id, authentication_data. hidden defaults to true.
- **delete_a_tray_ai_authentication_by_id** — Delete a Tray Embedded authentication by id. Returns: data. Required: id. Any workflow currently using the authentication will break, so recreate it in the target organization or workspace instead of moving it when possible.
- **list_all_tray_ai_solutions** — List the Tray Embedded solutions available to your End Users. Returns data.viewer.solutions with edges of solution nodes (id, title, description, tags, customFields, configSlots, authSlots) and pageInfo cursors. Supports cursor-based pagination; no required parameters.
- **list_all_tray_ai_users** — List Tray embedded end users in your org. Returns: id, name, externalUserId, isTestUser, authType, authId. Cursor-paginated.
- **update_a_tray_ai_user_by_id** — Update a Tray embedded end user by id, e.g. rename the user or toggle their test-user status. Returns: id, name, externalUserId, isTestUser, authType, authId. Required: id.
- **tray_ai_users_create_user_token** — Create a user access token for a Tray embedded end user. Returns: accessToken, authType, authId. Required: user_id.
- **delete_a_tray_ai_user_by_id** — Delete a Tray embedded end user by id. The user can no longer edit or access their instances or trigger new ones, though running executions are completed. Returns: clientMutationId, authType, authId. Required: id.
- **tray_ai_users_generate_authorization_code** — Generate a one-time-use authorization code for a Tray embedded end user, for use in the Auth dialog or Config Wizard url. Returns: authorizationCode, authType, authId. Required: user_id.
- **get_single_tray_ai_user_by_id** — Get a Tray Embedded end user by id. Returns: id, name, authType, authId. Required: id.
- **create_a_tray_ai_user** — Create a Tray Embedded end user. Returns: userId, authType, authId. Required: name, external_user_id.
- **list_all_tray_ai_solution_instances** — List solution instances in Tray.io. Returns the solutionInstances connection under data.viewer.solutionInstances: each edge node carries id, name, enabled, owner, created, solutionVersionFlags, workflows, authValues, and configValues, with pageInfo cursors.
- **create_a_tray_ai_solution_instance** — Create a solution instance for an end user from a Tray.io solution. Returns the created instance's id, name, enabled, created, and workflows under data.createSolutionInstance.solutionInstance. Required: solution_id, name.
- **update_a_tray_ai_solution_instance_by_id** — Update a Tray.io solution instance by id — rename it and/or enable or disable it. Returns the updated instance's id, name, enabled, and created under data.updateSolutionInstance.solutionInstance. Required: id, name, enabled.
- **delete_a_tray_ai_solution_instance_by_id** — Delete a Tray.io solution instance by id; its underlying workflows stop after completing their currently executing steps. Returns the removeSolutionInstance confirmation payload with clientMutationId. Required: id.
- **tray_ai_solution_instances_upgrade** — Upgrade a Tray solution instance to a newer version of its solution, applying new config and auth slot values. Returns the upgraded instance: id, enabled, created, config_values, auth_values. Required: solution_instance_id.
- **tray_ai_projects_export** — Export a Tray project as a JSON payload for backup or promotion to another workspace or environment. Returns: exportedProjectJson. Required: project_id.
- **tray_ai_projects_import** — Import an exported Tray project into a target project from its exported project JSON. Returns: clientMutationId. Required: exported_project_json, target_project_id.
- **tray_ai_projects_export_config** — Export the configuration of a Tray project as a JSON payload. Returns: exportProjectConfigJson. Required: project_id.

## How it works

1. **Link your customer's Tray.ai account.** Use Truto's frontend SDK; we handle every OAuth and API key flow so you don't need to create the OAuth app.
2. **Authentication is automatic.** Truto refreshes tokens, stores credentials securely, and injects them into every API request.
3. **Call Truto's API to reach Tray.ai.** The Proxy API is a 1-to-1 mapping of the Tray.ai API.
4. **Get a unified response format.** Every response uses a single shape, with cursor-based pagination and data in the `result` field.

## Use cases

- **Offer a white-labeled integration marketplace** — B2B SaaS companies can embed Tray.ai as the backend engine for their native integration catalog, shipping dozens of third-party connectors without building each one from scratch. Truto handles the API plumbing so your team ships the marketplace in days.
- **Provision integration tenants automatically** — Spin up a Tray.ai user for every new customer in your product the moment they sign up, so their integration workspace is ready before they ever click 'Connect'. This keeps your onboarding flow frictionless and multi-tenant isolation airtight.
- **Ship fleet-wide integration upgrades** — When an upstream API changes or you fix a bug in a shared workflow, push the updated solution to every customer instance via a single backend job. No support tickets, no customer-side migrations, no downtime.
- **Build a fully headless, branded integration UX** — Use your own React frontend to collect auth and config inputs, then pass them to Tray.ai through Truto so the orchestration runs invisibly in the background. Keeps full UI/UX control for compliance-sensitive products like FinTech or Healthtech.
- **Automate staging-to-production integration promotion** — Wire Tray.ai project export and import into your CI/CD pipeline so integration changes flow from staging to production like any other code deploy. Enables proper version control and review for your integration team.

## What you can build

- **One-click connector activation** — Generate a Tray.ai authorization code on demand and launch a connect flow that creates the user, captures third-party auth, and deploys the solution instance in a single click.
- **Native in-app integration settings page** — Query available solutions and render your own configuration form, then write user selections back as config values on the solution instance for a fully branded experience.
- **Over-the-air upgrade controller** — Build an internal dashboard that lists customers running outdated solution versions and triggers bulk upgrades across your entire install base with one action.
- **Tenant lifecycle sync** — Mirror your product's user lifecycle into Tray.ai by creating, updating, and deleting Tray users whenever customers are provisioned, renamed, or churned.
- **Auth health monitor** — List and inspect each customer's authentications to detect broken or revoked third-party credentials, then surface a 'reconnect' prompt inside your app before workflows fail.
- **CI/CD integration pipeline** — Use project export and import endpoints to version integration projects in Git and promote them between staging and production environments automatically.

## FAQs

### How does authentication to Tray.ai work through Truto?

Truto handles the Tray Embedded master token on your behalf, and exposes endpoints to generate per-user tokens and authorization codes so your end users can securely authenticate with third-party services via Tray's auth dialog or your own headless flow.

### How do I associate a Tray.ai user with a customer in my product?

When creating a Tray.ai user through Truto, pass your internal tenant or customer ID as the external_user_id. That identifier becomes the stable key you use to look up, update, or delete that customer's Tray resources later.

### Can I deploy integrations without using Tray's embedded UI?

Yes. You can list solutions to fetch their config and auth slot requirements, collect inputs in your own UI, and then create or update solution instances programmatically with the config values and auth IDs you've gathered.

### How do I push an updated workflow to all existing customer instances?

Publish the new version of the master solution in Tray, then iterate your customer solution instances and call the upgrade endpoint for each one. This updates every tenant without requiring customer action.

### Can I move integration projects between environments?

Yes. Truto exposes Tray's project export, export config, and import endpoints, which you can wire into a CI/CD pipeline to promote integration projects from staging to production in a controlled way.

### How do I verify a customer has successfully connected a third-party app?

Use the list authentications endpoint, filtered by the Tray user tied to that customer, to confirm an authentication record exists for the target service before enabling or activating the related solution instance.
