Initially, the design had separate API endpoints for prompt-level CRUD and prompt-version CRUD:
/prompts
for prompt-level operations/prompts/{prompt_id}/versions
for version-level operationsHowever, to simplify the API and reduce complexity for clients, we have consolidated these operations into a single unified resource path under
/prompt
.This unified design allows:
- Creating a new prompt and its first version in POST /prompts
- Updating prompt metadata, creating new versions, and switching active versions in PATCH /prompts/{prompt_id}
- Retrieving both active and historical versions via query parameters (e.g.,
include_versions=true
)This approach streamlines client integration and avoids redundant endpoint definitions while still supporting all required operations.
[POST]
Create Prompt[POST]
Create Prompt Version[GET]
Listing All Prompt[GET]
Listing Specific Prompt[Patch]
Update a prompt[DELETE]
Delete Prompt[DELETE]
Delete Prompt Version