# Versions (https://docs.capy.ai/api-reference/messages/versions)

`GET https://api.capy.ai/api/v1/threads/{threadId}/messages/{eventId}/versions`

## Authorization

Send an API key as a bearer token: `Authorization: Bearer $CAPY_API_KEY`. See https://docs.capy.ai/api-reference/authentication.md.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `threadId` | path | string | yes |  |
| `eventId` | path | string | yes |  |

## Responses

- `200` MessageVersions: `MessageVersionsEncoded`
- `401` capy/Unauthorized: `capy_UnauthorizedEncoded`
- `403` capy/Forbidden: `capy_ForbiddenEncoded \| capy_ForbiddenEncoded`
- `404` capy/ThreadNotFound: `capy_ThreadNotFoundEncoded`
- `429` capy/RateLimited: `capy_RateLimitedEncoded`

## Example

```bash
curl -X GET "https://api.capy.ai/api/v1/threads/{threadId}/messages/{eventId}/versions" \
  -H "Authorization: Bearer $CAPY_API_KEY"
```

## Referenced schemas

```json
{
  "MessageVersionsEncoded": {
    "type": "object",
    "properties": {
      "root": {
        "type": "string",
        "allOf": [
          {
            "minLength": 26
          },
          {
            "maxLength": 26
          }
        ]
      },
      "versions": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/MessageVersionEncoded"
        }
      }
    },
    "required": [
      "root",
      "versions"
    ],
    "additionalProperties": false
  },
  "MessageVersionEncoded": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "allOf": [
          {
            "minLength": 26
          },
          {
            "maxLength": 26
          }
        ]
      },
      "text": {
        "type": "string"
      },
      "createdAt": {
        "type": "string"
      },
      "live": {
        "type": "boolean"
      }
    },
    "required": [
      "id",
      "text",
      "createdAt",
      "live"
    ],
    "additionalProperties": false
  },
  "capy_UnauthorizedEncoded": {
    "type": "object",
    "properties": {
      "_tag": {
        "type": "string",
        "enum": [
          "capy/Unauthorized"
        ]
      }
    },
    "required": [
      "_tag"
    ],
    "additionalProperties": false
  },
  "capy_ForbiddenEncoded": {
    "type": "object",
    "properties": {
      "_tag": {
        "type": "string",
        "enum": [
          "capy/Forbidden"
        ]
      },
      "mfaRequiredOrgId": {
        "type": "string"
      },
      "ssoRequired": {
        "type": "boolean"
      },
      "passkeyRequired": {
        "type": "boolean"
      }
    },
    "required": [
      "_tag"
    ],
    "additionalProperties": false
  },
  "capy_ThreadNotFoundEncoded": {
    "type": "object",
    "properties": {
      "_tag": {
        "type": "string",
        "enum": [
          "capy/ThreadNotFound"
        ]
      },
      "threadId": {
        "type": "string"
      }
    },
    "required": [
      "_tag",
      "threadId"
    ],
    "additionalProperties": false
  },
  "capy_RateLimitedEncoded": {
    "type": "object",
    "properties": {
      "_tag": {
        "type": "string",
        "enum": [
          "capy/RateLimited"
        ]
      },
      "retryAfterSeconds": {
        "type": "integer"
      }
    },
    "required": [
      "_tag",
      "retryAfterSeconds"
    ],
    "additionalProperties": false
  }
}
```

Full document: https://docs.capy.ai/openapi.json