API Triggers let you trigger your Agent programmatically with direct HTTP requests to the Relevance AI API. Use them to integrate from custom backends, automation scripts, or any environment that can make HTTP calls.Documentation Index
Fetch the complete documentation index at: https://relevanceai.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
For a higher-level interface in JavaScript or TypeScript, use the Relevance AI SDK — it wraps this endpoint with type-safe primitives, automatic event handling, and runtime support across Node.js, Deno, Bun, Cloudflare Workers, and the browser.
Setting up an API trigger
- Navigate to the Agents page and select the agent you want to configure
- In the sidebar on the left, go to Triggers and click the Add trigger button
- Under the Build your own triggers section, click the API trigger
agent_id. Code examples in cURL, JavaScript, and Python are also provided.
API reference
Endpoint:The endpoint URL differs based on your organization’s region. The example above shows the AU region endpoint. When you set up your API trigger in the UI, the correct endpoint for your region will be displayed in the configuration popup.
The response isn’t returned directly. The agent’s result must be sent to a destination you configure, such as Google Sheets, a webhook, or another integration.
Code examples
cURLBest practices
- Error handling: implement error handling in your integration code
- Rate limiting: be mindful of API rate limits and throttle accordingly
- Security: store API keys in environment variables rather than hardcoding them
- Monitoring: set up monitoring for your trigger usage to detect issues early
- Testing: test your implementation in a development environment before deploying to production
Frequently asked questions (FAQs)
What programming languages can I use?
What programming languages can I use?
The API trigger works with any language capable of making HTTP requests. For JavaScript and TypeScript, the Relevance AI SDK provides a higher-level interface with built-in authentication and event handling.
Are there rate limits?
Are there rate limits?
Yes, usage is subject to rate limits based on your subscription plan. Refer to your plan details for specific limitations.
Can I use this with serverless functions?
Can I use this with serverless functions?
Yes — the API works with serverless architectures like AWS Lambda, Google Cloud Functions, and Azure Functions.
How secure is the API trigger?
How secure is the API trigger?
All requests must be authenticated with your API key, and all data is transmitted over HTTPS.

