> ## Documentation Index
> Fetch the complete documentation index at: https://docs.metabind.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List Content Versions

> Retrieve the version history for a content item

## Path Parameters

<ParamField path="organizationId" type="string" required>
  Organization ID
</ParamField>

<ParamField path="projectId" type="string" required>
  Project ID
</ParamField>

<ParamField path="id" type="string" required>
  Content ID
</ParamField>

## Query Parameters

<ParamField query="limit" type="number" default="20">
  Items per page
</ParamField>

<ParamField query="lastKey" type="string">
  Cursor for pagination (from previous response)
</ParamField>

## Response

<ResponseField name="data" type="object[]">
  Array of version records

  <Expandable title="properties">
    <ResponseField name="version" type="number">Version number</ResponseField>
    <ResponseField name="typeVersion" type="number">ContentType version used</ResponseField>
    <ResponseField name="status" type="string">Status at this version</ResponseField>
    <ResponseField name="content" type="object">Content data at this version</ResponseField>
    <ResponseField name="createdAt" type="string">When this version was created</ResponseField>
    <ResponseField name="createdBy" type="string">Who created this version</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="pagination" type="object">
  Pagination information
</ResponseField>

### Example Response

```json theme={null}
{
  "data": [
    {
      "version": 3,
      "typeVersion": 2,
      "status": "published",
      "content": {
        "title": "Getting Started Guide v3",
        "components": [...]
      },
      "createdAt": "2024-03-22T10:00:00Z",
      "createdBy": "user123"
    },
    {
      "version": 2,
      "typeVersion": 2,
      "status": "published",
      "content": {
        "title": "Getting Started Guide v2",
        "components": [...]
      },
      "createdAt": "2024-03-21T10:00:00Z",
      "createdBy": "user456"
    },
    {
      "version": 1,
      "typeVersion": 1,
      "status": "published",
      "content": {
        "title": "Getting Started Guide",
        "components": [...]
      },
      "createdAt": "2024-03-20T10:00:00Z",
      "createdBy": "user123"
    }
  ],
  "pagination": {
    "lastKey": "eyJwayI6Ik9SR..."
  }
}
```

<Note>
  Versions are returned in reverse chronological order (newest first).
</Note>

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/content/cont123/versions" \
    -H "Authorization: Bearer YOUR_JWT"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/content/cont123/versions',
    {
      headers: {
        'Authorization': 'Bearer YOUR_JWT'
      }
    }
  );

  const { data: versions } = await response.json();
  console.log(`Content has ${versions.length} versions`);

  // Compare versions
  const latest = versions[0];
  const previous = versions[1];
  console.log(`Title changed from "${previous.content.title}" to "${latest.content.title}"`);
  ```
</CodeGroup>
