---
title: "Create prompt"
method: POST
path: "/api/users/prompts"
tags: ["users/prompts"]
---

# Create prompt

`POST /api/users/prompts`

## Request

- Base URL: `https://localhost:8080`
- URL: `https://localhost:8080/api/users/prompts`
- Auth: `bearer` (a scheme the document does not define)

Create a new prompt template

## Request body

- CreatePromptDto
  - `title` string, required: Prompt title
  - `description` string: Optional description
  - `template` string, required: Prompt template with {{variables}}

## Response `201`

- PromptResponseDto
  - `id` string, required
  - `userId` string, required
  - `title` string, required
  - `description` object
  - `template` string, required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required

## Other responses

- `400`: Validation error
- `401`: Unauthorized

---

[API](https://skmtc.dev/opencase/apis/opencase-backend-api.md) · [All operations](https://skmtc.dev/opencase/apis/opencase-backend-api/llms.txt) · [OpenAPI document](https://skmtc.dev/opencase/apis/opencase-backend-api/revisions/c66ef2d8dc00?raw)
