Skip to main content
GET
/
snippet
/
variation
/
history
Get variation version history
curl --request GET \
  --url https://www.getsnippets.ai/api/prompts/snippet/variation/history \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "data": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "changed_at": "2023-11-07T05:31:56Z",
      "content": {
        "type": "plaintext",
        "content": "Hello, world!"
      }
    }
  ],
  "usage": {
    "remainingRequests": 123,
    "usageDeducted": 123
  },
  "metadata": {
    "hasMore": true,
    "totalRecords": 123
  }
}

Authorizations

Authorization
string
header
required

API key authentication using Bearer token. Include your API key in the Authorization header.

Query Parameters

variationId
string<uuid>
required

The ID of the variation

limit
integer

Maximum number of versions to return (1-100)

Required range: 1 <= x <= 100
fromDate
string<date-time>

Start date for filtering (ISO 8601 format)

toDate
string<date-time>

End date for filtering (ISO 8601 format)

Response

Version history retrieved successfully

success
boolean
Example:

true

data
object[]
usage
object
metadata
object