---
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

## Other responses

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

---

[API](https://skmtc.net/significant-gravitas/apis/autogpt-agent-server.md) · [All operations](https://skmtc.net/significant-gravitas/apis/autogpt-agent-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/significant-gravitas/autogpt-agent-server/versions/382041c7ecb2/schema)
