---
title: "Create a prompt"
method: POST
path: "/prompts/"
tags: ["Prompt"]
---

# Create a prompt

`POST /prompts/`

Create a saved prompt for the current user.

## Query parameters

- `cookie_name` string, nullable

## Request body

- PromptIn
  - `name` string, nullable — Name for the prompt to be created. Max 100 characters.
  - `prompt` string, required — The content of the prompt. This field is required.
  - `is_public` boolean, nullable — Whether the prompt is public or privtate, default is private (False)
  - `description` string, nullable — Description for the prompt.

## Response `201`

Successful Response

- Prompt
  - `id` integer, nullable — Primary key for the prompt.
  - `tenant_id` integer, required — ID of the tenant that owns the prompt.
  - `created_at` string, date-time — Timestamp when the prompt was created.
  - `creator_user_id` integer, required — ID of the user who created the prompt.
  - `name` string, nullable, required — Name of the prompt.
  - `prompt` string, required — Prompt text content.
  - `is_public` boolean — Whether the prompt is shared publicly within the tenant.
  - `description` string, nullable, required — Optional description of the prompt.

## Other responses

- `401` — Missing or invalid authentication.
- `403` — Only admins may create public prompts.
- `422` — Validation Error

---

[API](https://skmtc.net/neulandai/apis/neuland-ai-hub-api.md) · [All operations](https://skmtc.net/neulandai/apis/neuland-ai-hub-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/neulandai/neuland-ai-hub-api/versions/b53e89b98c2b/schema)
