---
title: "Create a new preset"
method: POST
path: "/api/library/presets"
tags: ["v2", "presets"]
---

# Create a new preset

`POST /api/library/presets`

Create a new preset for the current user.

## Request body

- union
  - LibraryAgentPresetCreatable — Request model used when creating a new preset for a library agent. A preset's webhook is never caller-specified here; webhook-triggered presets are created through ``POST /presets/setup-trigger``, which provisions a webhook owned by the caller server-side.
    - `graph_id` string, required
    - `graph_version` integer, required
    - `inputs` object, required
    - `credentials` object, required
    - `name` string, required
    - `description` string, required
    - `is_active` boolean
  - LibraryAgentPresetCreatableFromGraphExecution — Request model used when creating a new preset for a library agent.
    - `graph_execution_id` string, required
    - `name` string, required
    - `description` string, required
    - `is_active` boolean

## 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 `anyOf[subschema #1: LibraryAgentPresetCreatable]/credentials/additionalProperties/type`
- **2026-08-06** `3dfd3128358f` — 1 info
  - added the optional property `expert_id` to the response with the `200` status
- **2026-07-16** `b95c050c202d` — 1 warning
  - removed the request property `anyOf[subschema #1: LibraryAgentPresetCreatable]/webhook_id`
- **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
- …earlier changes not shown

[Full history](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server/changes/api/library/presets/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)
