---
title: "Trigger Agent"
method: POST
path: "/agent/{keyOrId}/trigger"
---

# Trigger Agent

`POST /agent/{keyOrId}/trigger`

Trigger an agent with an arbitrary JSON payload, which is passed to the agent as event context.

You can identify the agent by either its UUID or its macro (key). The API key can be supplied via the `Authorization: Bearer` header or the `apiKey` query parameter.

## Path parameters

- `keyOrId` string, required

## Query parameters

- `apiKey` string

## Request body

- object

## Response `200`

Agent triggered successfully

- object
  - `id` string, uuid, required — Unique identifier for the queued job
  - `task` string, required — The type of job that was queued
  - `status` string, required — Current status of the job
  - `priority` integer, required — Job priority
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required

## Other responses

- `404` — Agent not found (no agent with the given key or ID exists in your organization)

---

[API](https://skmtc.dev/tembo/apis/developer-api.md) · [All operations](https://skmtc.dev/tembo/apis/developer-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/tembo/developer-api/revisions/d3b5f4d6e911/schema)
