---
title: "CreatePrompt"
method: POST
path: "/v2/prompts"
tags: ["beta.prompts"]
---

# CreatePrompt

`POST /v2/prompts`

CreatePrompt

## Request body

- CreatePromptRequest
  - `name` string, required — Stable object name.
  - `definition` PromptDefinition, required — Versioned prompt content.
    - `content` string, required — Prompt template content.
    - `variables` PromptVariable[] — Variables used by the prompt.
      - `name` string — Stable object name.
  - `title` string, nullable — Display title.
  - `description` string, nullable — Display description.
  - `notes` string, nullable — Notes for this version.
  - `sharingScope` 'sharing_scope_unspecified' | 'private' | 'workspace'
  - `aliases` string[] — Aliases pointing to this version.
  - `workspaceRelation` 'share_relation_unspecified' | 'reader' | 'writer' — Relation a subject holds on a shared registry object.

## Response `200`

Success

- Prompt
  - `id` string
  - `name` string — Stable object name.
  - `definition` PromptDefinition — Versioned prompt content.
    - `content` string, required — Prompt template content.
    - `variables` PromptVariable[] — Variables used by the prompt.
      - `name` string — Stable object name.
  - `version` integer
  - `notes` string — Notes for this version.
  - `aliases` string[] — Aliases pointing to this version.
  - `sharingScope` 'sharing_scope_unspecified' | 'private' | 'workspace'
  - `createdAt` string, date-time — RFC 3339 timestamp.
  - `updatedAt` string, date-time — RFC 3339 timestamp.
  - `latestVersion` integer — Latest version number.
  - `title` string — Display title.
  - `description` string — Display description.
  - `createdBy` string
  - `versionCreatedAt` string, date-time — RFC 3339 timestamp.

## Changes

- **2026-09-23** `fa73befe1c61` — 3 info
  - added the new optional request property `workspaceRelation`
  - added the optional property `createdBy` to the response with the `200` status
  - added the optional property `versionCreatedAt` to the response with the `200` status

[Change history](https://skmtc.dev/mistral/apis/mistral-ai-api/changes/v2/prompts/post.md)

---

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