Prompt History

Retrieve the edit history for a prompt, including who made changes, when, and how they were deployed.

Request

GET /api/v1/prompts/:prompt_id/history

Path parameters

Parameter Type Description
prompt_id String The prompt's public ID (e.g. pmt_abc123...)

Query parameters

Parameter Type Default Description
page Integer 1 Page number
limit Integer 25 Results per page (max 100)

Response

{
  "data": [
    {
      "id": 42,
      "action": "deployed",
      "user": {
        "name": "Jane Smith",
        "email": "jane@example.com"
      },
      "commit_sha": "abc123def456...",
      "pr_number": null,
      "pr_url": null,
      "branch_name": "main",
      "created_at": "2026-02-19T14:30:00Z"
    },
    {
      "id": 41,
      "action": "pr_opened",
      "user": {
        "name": "Tom Editor",
        "email": "tom@example.com"
      },
      "commit_sha": "def456abc789...",
      "pr_number": 47,
      "pr_url": "https://github.com/acme/app/pull/47",
      "branch_name": "promptdeploy/system-prompt-1708345200",
      "created_at": "2026-02-18T10:15:00Z"
    }
  ],
  "pagination": {
    "current_page": 1,
    "total_pages": 3,
    "total_count": 62,
    "per_page": 25
  }
}

Action types

Action Description
deployed Change committed directly to the default branch
pr_opened Pull request created for the change
pr_merged Pull request was merged
pr_closed Pull request was closed without merging

Pagination

The response includes a pagination object. Use page and limit query parameters to navigate through results.

Example

curl -H "Authorization: Bearer pd_live_abc123..." \
  "https://promptdeploy.com/api/v1/prompts/pmt_abc123/history?page=1&limit=10"

Errors

Status Code Description
401 unauthorized Invalid or missing API key
404 not_found Prompt not found in your organisation