---
title: "Create a response format preset"
method: POST
path: "/api/response-format-presets/"
tags: ["Prompts"]
---

# Create a response format preset

`POST /api/response-format-presets/`

## Request

- Base URL: `https://api.respan.ai`
- URL: `https://api.respan.ai/api/response-format-presets/`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Stores JSON-schema text in the caller's project as a JSON string, validated without reformatting. The server sets the project and creator.

## Request body

- object
  - `name` string, required
  - `response_format_content` string, required: JSON text preserved verbatim. It must decode to an object with a non-empty `name` and an object-valued `schema`.
  - `is_enforcing_response_format` boolean

## Response `201`

Preset created.

- object
  - `id` string, required
  - `name` string, required
  - `project` string, required: Server-stamped project UUID.
  - `created_by` integer, nullable, required: Server-stamped creator user ID.
  - `response_format_content` string, required: JSON text preserved verbatim. It must decode to an object with a non-empty `name` and an object-valued `schema`.
  - `is_enforcing_response_format` boolean, required

## Other responses

- `400`: Invalid preset content.
- `403`: The API key is missing, invalid or expired.

## Changes

- **2026-10-21** `c30bcb383ee8`: 2 breaking, 4 info
  - request body became required
  - the response property `created_by` became nullable for the status `201`
  - api operation id `prompts_api_response_format_presets_create` removed and replaced with `api_response_format_presets_create`
  - the endpoint scheme security `DashboardJwt` was added to the API
  - …2 more
- **2026-10-02** `b830b79cfd52`: 2 info
  - added the non-success response with the status `403`
  - removed the non-success response with the status `401`
- **2026-09-17** `6fa8242da8c2`: 1 warning, 1 info
  - deleted the `header` request parameter `Authorization`
  - the endpoint scheme security `RespanApiKey` was added to the API
- **2026-09-12** `22b868ef3f22`: 1 info
  - api operation id `api-response-format-presets-create` removed and replaced with `prompts_api_response_format_presets_create`
- **2026-08-22** `b18c72975097`: 1 breaking
  - the `name` request property's minLength was increased from `0` to `1`

[Operation history](https://skmtc.dev/keywordsai/apis/respan-api/changes/api/response-format-presets/post.md)

---

[API](https://skmtc.dev/keywordsai/apis/respan-api.md) - [All operations](https://skmtc.dev/keywordsai/apis/respan-api/llms.txt) - [OpenAPI document](https://skmtc.dev/keywordsai/apis/respan-api/revisions/900841387635?raw)
