Dexby

Run a tool

Call one tool with a user's connected account, or send a raw request to an app's API.

No model needed. Your code picks the tool and its input, and Dexby runs it with the user's account.

execute.ts
import { Dexby } from '@dexby.ai/sdk'

const dexby = new Dexby()

const result = await dexby.execute({
	toolId: 'slack_post_message',
	userId: 'user_123',
	input: { channel: 'general', text: 'Deploy finished' }
})
if (result.isErr()) throw new Error(`${result.error.code}: ${result.error.message}`)

console.log(result.value)
terminal
curl -X POST "https://api.dexby.ai/v1/tools/execute" \
  -H "Authorization: Bearer $DEXBY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "toolId": "slack_post_message", "userId": "user_123",
        "input": { "channel": "general", "text": "Deploy finished" } }'
FieldDefaultMeaning
toolIdrequiredThe tool, such as slack_post_message. Find ids in Build → Catalog or with dexby.searchTools('slack').
input{}Must match the tool's input schema. Build → Playground shows it and builds the input for you.
userIddefaultYour id for the user. default is a project-level user for accounts not tied to one of your users.
connectionIdthe defaultRun with a specific account when the user has several. See Concepts.

If the user has not connected the app, the call fails with MISSING_CONNECTION. Send them a connect link. Every other code is in Errors.

Try any tool without code in Build → Playground in the dashboard.

Proxy a raw request

When no tool covers an endpoint, send the request yourself. Dexby adds the user's credential and sends it to the app's API.

terminal
curl -X POST "https://api.dexby.ai/v1/tools/proxy" \
  -H "Authorization: Bearer $DEXBY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "connectorId": "slack", "userId": "user_123", "endpoint": "/users.list", "method": "GET" }'
FieldDefaultMeaning
connectorIdrequiredThe app, such as slack.
userIdrequiredYour id for the user.
endpointrequiredPath on the app's API, relative to its base URL.
methodGETGET, POST, PUT, PATCH or DELETE.
querynoneQuery string values.
bodynoneJSON body.
headersnoneExtra headers. The credential is added for you.
connectionIddefaultA specific account.

Each connector's page in Build → Catalog shows its base URL and a ready proxy example. An agent can proxy too, through a session with policy.allowProxy.

On this page