API Reference
Integrate PromptCask into your workflows with our REST API. All endpoints require authentication via an API key.
Base URL: https://api.promptcask.com
All requests must include your API key in the x-api-key header. You can generate API keys from your workspace settings.
Prompts
Create and manage prompt templates with versioning and variable support.
/api/v1/promptsRetrieve a paginated list of prompts in the current workspace. Supports filtering by tag, status, and full-text search.
Authentication
Pass your API key in the x-api-key header.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
workspace_id | string | required | Workspace UUID |
page | number | optional | Page number (default: 1) |
limit | number | optional | Items per page (default: 20, max: 100) |
tag | string | optional | Filter by tag slug |
status | string | optional | Filter by status: draft, active, archived |
q | string | optional | Search query string |
Example Request
curl -X GET "https://api.promptcask.com/api/v1/prompts?workspace_id=ws_abc123&limit=10" \
-H "x-api-key: pk_live_xxxxx"Example Response
{
"data": [
{
"id": "prompt_01h",
"name": "Email Writer",
"slug": "email-writer",
"status": "active",
"version": 3,
"tags": [
"marketing",
"email"
],
"created_at": "2026-02-10T08:00:00Z",
"updated_at": "2026-03-01T14:30:00Z"
}
],
"meta": {
"page": 1,
"limit": 10,
"total": 42
}
}/api/v1/promptsCreate a new prompt template. The prompt will be created as a draft by default. Variables use the {{variable}} syntax in the template body.
Authentication
Pass your API key in the x-api-key header.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
workspace_id | string | required | Workspace UUID |
name | string | required | Display name for the prompt |
system_prompt | string | optional | System prompt text |
user_prompt_template | string | required | User prompt template with {{variable}} placeholders |
tags | string[] | optional | Array of tag slugs |
model | string | optional | Default model identifier (e.g., gpt-4o) |
Example Request
curl -X POST "https://api.promptcask.com/api/v1/prompts" \
-H "x-api-key: pk_live_xxxxx" \
-H "Content-Type: application/json" \
-d '{
"workspace_id": "ws_abc123",
"name": "Bug Report Summarizer",
"system_prompt": "You summarize bug reports into structured tickets.",
"user_prompt_template": "Summarize this bug report: {{report}}",
"tags": ["engineering", "bugs"]
}'Example Response
{
"id": "prompt_02x",
"name": "Bug Report Summarizer",
"slug": "bug-report-summarizer",
"status": "draft",
"version": 1,
"created_at": "2026-03-15T10:00:00Z"
}Skills
Manage skill files that define agent capabilities and tool integrations.
/api/v1/skill-filesList all skill files for a workspace. Skill files define agent behaviors, tool schemas, and execution rules.
Authentication
Pass your API key in the x-api-key header.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
workspace_id | string | required | Workspace UUID |
page | number | optional | Page number (default: 1) |
limit | number | optional | Items per page (default: 20) |
Example Request
curl -X GET "https://api.promptcask.com/api/v1/skill-files?workspace_id=ws_abc123" \
-H "x-api-key: pk_live_xxxxx"Example Response
{
"data": [
{
"id": "skill_01a",
"name": "code-review.skill.md",
"description": "Reviews pull requests and suggests improvements",
"version": 2,
"created_at": "2026-01-15T09:00:00Z"
}
],
"meta": {
"page": 1,
"limit": 20,
"total": 8
}
}/api/v1/skill-filesCreate a new skill file. The content should be a valid skill definition in markdown format following the Agent Skills Standard.
Authentication
Pass your API key in the x-api-key header.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
workspace_id | string | required | Workspace UUID |
name | string | required | Skill file name (e.g., my-skill.skill.md) |
content | string | required | Skill file content in markdown format |
description | string | optional | Human-readable description |
Example Request
curl -X POST "https://api.promptcask.com/api/v1/skill-files" \
-H "x-api-key: pk_live_xxxxx" \
-H "Content-Type: application/json" \
-d '{
"workspace_id": "ws_abc123",
"name": "deploy-checker.skill.md",
"content": "# Deploy Checker\n\nChecks deployment readiness...",
"description": "Validates deployment prerequisites"
}'Example Response
{
"id": "skill_02b",
"name": "deploy-checker.skill.md",
"version": 1,
"created_at": "2026-03-15T10:00:00Z"
}Plugins
Manage plugin configurations that extend PromptCask functionality.
/api/v1/pluginsList all plugins installed in a workspace, including their configuration status and version information.
Authentication
Pass your API key in the x-api-key header.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
workspace_id | string | required | Workspace UUID |
status | string | optional | Filter by status: active, inactive, error |
Example Request
curl -X GET "https://api.promptcask.com/api/v1/plugins?workspace_id=ws_abc123&status=active" \
-H "x-api-key: pk_live_xxxxx"Example Response
{
"data": [
{
"id": "plugin_01",
"name": "Slack Notifier",
"type": "integration",
"status": "active",
"version": "1.2.0",
"config": {
"channel": "#prompts"
}
}
],
"meta": {
"page": 1,
"limit": 20,
"total": 3
}
}/api/v1/pluginsInstall and configure a new plugin in the workspace.
Authentication
Pass your API key in the x-api-key header.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
workspace_id | string | required | Workspace UUID |
plugin_id | string | required | Plugin registry identifier |
config | object | optional | Plugin-specific configuration object |
Example Request
curl -X POST "https://api.promptcask.com/api/v1/plugins" \
-H "x-api-key: pk_live_xxxxx" \
-H "Content-Type: application/json" \
-d '{
"workspace_id": "ws_abc123",
"plugin_id": "slack-notifier",
"config": { "channel": "#prompts", "notify_on": ["publish", "approve"] }
}'Example Response
{
"id": "plugin_02",
"name": "Slack Notifier",
"status": "active",
"installed_at": "2026-03-15T10:00:00Z"
}Snippets
Manage reusable text snippets that can be inserted into prompts.
/api/v1/snippetsList all snippets in a workspace. Snippets are reusable text blocks that can be referenced in prompt templates.
Authentication
Pass your API key in the x-api-key header.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
workspace_id | string | required | Workspace UUID |
page | number | optional | Page number (default: 1) |
limit | number | optional | Items per page (default: 20) |
q | string | optional | Search by name or content |
Example Request
curl -X GET "https://api.promptcask.com/api/v1/snippets?workspace_id=ws_abc123" \
-H "x-api-key: pk_live_xxxxx"Example Response
{
"data": [
{
"id": "snip_01",
"name": "Brand Voice Guidelines",
"slug": "brand-voice",
"content": "Always maintain a professional yet approachable tone...",
"usage_count": 47,
"created_at": "2026-01-20T12:00:00Z"
}
],
"meta": {
"page": 1,
"limit": 20,
"total": 15
}
}/api/v1/snippetsCreate a new reusable snippet. Snippets can be referenced in prompts using the @snippet-slug syntax.
Authentication
Pass your API key in the x-api-key header.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
workspace_id | string | required | Workspace UUID |
name | string | required | Display name for the snippet |
content | string | required | Snippet text content |
tags | string[] | optional | Array of tag slugs |
Example Request
curl -X POST "https://api.promptcask.com/api/v1/snippets" \
-H "x-api-key: pk_live_xxxxx" \
-H "Content-Type: application/json" \
-d '{
"workspace_id": "ws_abc123",
"name": "Safety Disclaimer",
"content": "This AI-generated content should be reviewed by a human before use.",
"tags": ["compliance"]
}'Example Response
{
"id": "snip_02",
"name": "Safety Disclaimer",
"slug": "safety-disclaimer",
"created_at": "2026-03-15T10:00:00Z"
}Execution
Track and query prompt execution logs with detailed performance metrics.
/api/v1/logsRetrieve execution logs for prompt runs. Includes token usage, latency, model info, and user feedback.
Authentication
Pass your API key in the x-api-key header.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
workspace_id | string | required | Workspace UUID |
prompt_id | string | optional | Filter by prompt ID |
model | string | optional | Filter by model identifier |
from | string | optional | Start date (ISO 8601) |
to | string | optional | End date (ISO 8601) |
page | number | optional | Page number (default: 1) |
limit | number | optional | Items per page (default: 20) |
Example Request
curl -X GET "https://api.promptcask.com/api/v1/logs?workspace_id=ws_abc123&prompt_id=prompt_01h&limit=5" \
-H "x-api-key: pk_live_xxxxx"Example Response
{
"data": [
{
"id": "log_01",
"prompt_id": "prompt_01h",
"model": "gpt-4o",
"input_tokens": 245,
"output_tokens": 512,
"latency_ms": 1830,
"status": "success",
"created_at": "2026-03-14T16:45:00Z"
}
],
"meta": {
"page": 1,
"limit": 5,
"total": 128
}
}/api/v1/logsRecord a new execution log entry. Use this when running prompts through external systems to track performance in PromptCask.
Authentication
Pass your API key in the x-api-key header.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
workspace_id | string | required | Workspace UUID |
prompt_id | string | required | Prompt ID that was executed |
model | string | required | Model identifier used |
input_tokens | number | optional | Number of input tokens |
output_tokens | number | optional | Number of output tokens |
latency_ms | number | optional | Execution latency in milliseconds |
status | string | required | Execution status: success, error, timeout |
response | string | optional | Model response text |
Example Request
curl -X POST "https://api.promptcask.com/api/v1/logs" \
-H "x-api-key: pk_live_xxxxx" \
-H "Content-Type: application/json" \
-d '{
"workspace_id": "ws_abc123",
"prompt_id": "prompt_01h",
"model": "gpt-4o",
"input_tokens": 200,
"output_tokens": 450,
"latency_ms": 1500,
"status": "success"
}'Example Response
{
"id": "log_02",
"created_at": "2026-03-15T10:00:00Z"
}Search
Semantic search across all workspace content including prompts, skills, and snippets.
/api/v1/searchPerform a semantic search across workspace content. Uses vector embeddings to find relevant prompts, skill files, snippets, and plugins based on meaning, not just keyword matching.
Authentication
Pass your API key in the x-api-key header.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
workspace_id | string | required | Workspace UUID |
query | string | required | Natural language search query |
types | string[] | optional | Filter by content type: prompt, skill, snippet, plugin |
limit | number | optional | Max results (default: 10, max: 50) |
threshold | number | optional | Similarity threshold 0-1 (default: 0.7) |
Example Request
curl -X POST "https://api.promptcask.com/api/v1/search" \
-H "x-api-key: pk_live_xxxxx" \
-H "Content-Type: application/json" \
-d '{
"workspace_id": "ws_abc123",
"query": "how to write professional emails",
"types": ["prompt", "snippet"],
"limit": 5
}'Example Response
{
"results": [
{
"type": "prompt",
"id": "prompt_01h",
"name": "Email Writer",
"excerpt": "You are a professional email writer...",
"similarity": 0.92
},
{
"type": "snippet",
"id": "snip_03",
"name": "Email Tone Guidelines",
"excerpt": "When writing professional emails, always...",
"similarity": 0.85
}
]
}Outcomes
Track and measure prompt outcomes for evaluation and optimization.
/api/v1/outcomesList recorded outcomes for prompt executions. Outcomes capture whether the prompt output met the desired criteria.
Authentication
Pass your API key in the x-api-key header.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
workspace_id | string | required | Workspace UUID |
prompt_id | string | optional | Filter by prompt ID |
result | string | optional | Filter by result: pass, fail, partial |
page | number | optional | Page number (default: 1) |
limit | number | optional | Items per page (default: 20) |
Example Request
curl -X GET "https://api.promptcask.com/api/v1/outcomes?workspace_id=ws_abc123&prompt_id=prompt_01h" \
-H "x-api-key: pk_live_xxxxx"Example Response
{
"data": [
{
"id": "outcome_01",
"log_id": "log_01",
"prompt_id": "prompt_01h",
"result": "pass",
"score": 0.95,
"criteria": "Follows brand voice guidelines",
"created_at": "2026-03-14T17:00:00Z"
}
],
"meta": {
"page": 1,
"limit": 20,
"total": 64
}
}/api/v1/outcomesRecord an outcome for a prompt execution. Outcomes can be recorded manually or by automated evaluation pipelines.
Authentication
Pass your API key in the x-api-key header.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
workspace_id | string | required | Workspace UUID |
log_id | string | required | Execution log ID to attach outcome to |
result | string | required | Outcome result: pass, fail, partial |
score | number | optional | Numeric score 0-1 |
criteria | string | optional | Evaluation criteria description |
notes | string | optional | Additional evaluator notes |
Example Request
curl -X POST "https://api.promptcask.com/api/v1/outcomes" \
-H "x-api-key: pk_live_xxxxx" \
-H "Content-Type: application/json" \
-d '{
"workspace_id": "ws_abc123",
"log_id": "log_01",
"result": "pass",
"score": 0.95,
"criteria": "Output follows brand guidelines and is factually accurate"
}'Example Response
{
"id": "outcome_02",
"created_at": "2026-03-15T10:00:00Z"
}Feedback
Collect user feedback on prompt outputs for continuous improvement.
/api/v1/feedbackSubmit user feedback for a prompt execution. Feedback is used to track quality trends and prioritize prompt improvements.
Authentication
Pass your API key in the x-api-key header.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
workspace_id | string | required | Workspace UUID |
log_id | string | required | Execution log ID |
rating | number | required | Rating from 1 (poor) to 5 (excellent) |
comment | string | optional | Optional text feedback |
tags | string[] | optional | Feedback category tags: accurate, helpful, too_verbose, off_topic, etc. |
Example Request
curl -X POST "https://api.promptcask.com/api/v1/feedback" \
-H "x-api-key: pk_live_xxxxx" \
-H "Content-Type: application/json" \
-d '{
"workspace_id": "ws_abc123",
"log_id": "log_01",
"rating": 4,
"comment": "Good output but slightly too formal for our brand voice",
"tags": ["accurate", "too_formal"]
}'Example Response
{
"id": "fb_01",
"created_at": "2026-03-15T10:00:00Z"
}