---
title: "Create a Prompt Payload"
method: POST
path: "/v1/prompts/{id}/payloads"
tags: ["Prompt Payloads"]
---

# Create a Prompt Payload

`POST /v1/prompts/{id}/payloads`

Creates a new sample payload for the specified prompt. Only editors of the team can create.

## Path parameters

- `id` string, uuid, required

## Request body

- CreatePromptPayloadRequest
  - `variables` object, required — JSON object containing variable names and sample values.

## Response `201`

Prompt payload created successfully

- object
  - `payload` PromptPayload, required
    - `id` string, uuid, required — Unique payload identifier.
    - `prompt_id` string, uuid, required — Reference to parent Prompt ID.
    - `name` string, nullable — Optional name for this sample payload.
    - `variables` object, required — Standard JSON object containing variable names and sample values.
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required

## Other responses

- `400` — Invalid request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Prompt not found

---

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