---
title: "Setup Trigger"
method: POST
path: "/api/library/presets/setup-trigger"
tags: ["v2", "presets"]
---

# Setup Trigger

`POST /api/library/presets/setup-trigger`

Sets up a webhook-triggered `LibraryAgentPreset` for a `LibraryAgent`.
Returns the correspondingly created `LibraryAgentPreset` with `webhook_id` set.

## Request body

- TriggeredPresetSetupRequest
  - `name` string, required
  - `description` string
  - `graph_id` string, required
  - `graph_version` integer, required
  - `trigger_config` object, required
  - `agent_credentials` object

## Response `200`

Successful Response

- LibraryAgentPreset — Represents a preset configuration for a library agent.
  - `graph_id` string, required
  - `graph_version` integer, required
  - `inputs` object, required
  - `credentials` object, required
  - `name` string, required
  - `description` string, required
  - `is_active` boolean
  - `id` string, required
  - `user_id` string, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `organization_id` string, nullable
  - `team_id` string, nullable
  - `webhook_id` string, nullable
  - `webhook` Webhook, required
    - `id` string
    - `user_id` string, required
    - `provider` string, required — Provider name for integrations. Can be any string value, including custom provider names.
    - `credentials_id` string, required
    - `webhook_type` string, required
    - `resource` string, required
    - `events` string[], required
    - `config` object
    - `secret` string, required
    - `organization_id` string, nullable
    - `team_id` string, nullable
    - `provider_webhook_id` string, required
    - `url` string, required
  - `expert_id` string, nullable

## Other responses

- `401` — Authentication required
- `422` — Validation Error

## Changes

- **2026-08-20** `ae1be5efc67a` — 1 warning, 1 info
  - added the new `device_code` enum value to the `credentials/additionalProperties/type` response property for the response status `200`
  - added the new `device_code` enum value to the request property `agent_credentials/additionalProperties/type`
- **2026-08-06** `3dfd3128358f` — 1 info
  - added the optional property `expert_id` to the response with the `200` status
- **2026-07-09** `183f82172fec` — 4 info
  - added the optional property `organization_id` to the response with the `200` status
  - added the optional property `team_id` to the response with the `200` status
  - added the optional property `webhook/anyOf[subschema #1: Webhook]/organization_id` to the response with the `200` status
  - added the optional property `webhook/anyOf[subschema #1: Webhook]/team_id` to the response with the `200` status
- **2026-04-30** `8c84efcb3afb` — 4 warning
  - removed the optional property `organization_id` from the response with the `200` status
  - removed the optional property `team_id` from the response with the `200` status
  - removed the optional property `webhook/anyOf[subschema #1: Webhook]/organization_id` from the response with the `200` status
  - removed the optional property `webhook/anyOf[subschema #1: Webhook]/team_id` from the response with the `200` status

[Change history](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server/changes/api/library/presets/setup-trigger/post.md)

---

[API](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server.md) · [All operations](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/significant-gravitas/autogpt-agent-server/revisions/5dc375899754/schema)
