Extract the text of one version, exactly as Read File Text extracts the current content. Unsupported types return 400, compiling documents return 409, and oversized versions return 413.
OAuth scope: api:read.
/api/v2/files/{fileId}/versions/{version}/textYour Sim API key, personal or workspace-scoped. Generate one under Settings, then API Keys. Operations that reject workspace keys say so in their own description.
In: header
Path Parameters
File identifier.
^[A-Za-z0-9_-]+$1 <= length <= 128Version number.
0 < value <= 2147483647Query Parameters
Workspace that owns the file.
1 <= length <= 128Optional ceiling on the source bytes fed to the parser, lowering but never raising the server limit.
1 <= value <= 26214400First line to return, 1-based. Absent starts at the first line.
1 <= value <= 9007199254740991How many lines to return from offset. Absent reads to the end.
1 <= value <= 9007199254740991Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://www.sim.ai/api/v2/files/string/versions/1/text?workspaceId=string" \ -H "X-API-Key: YOUR_API_KEY"{
"data": {
"fileId": "string",
"name": "string",
"type": "string",
"text": "string",
"truncated": true,
"degraded": true,
"degradedReason": "string",
"charCount": 0,
"byteCount": 0,
"lineRange": {
"offset": 1,
"lineCount": 0,
"totalLines": 0,
"totalLinesExact": true
},
"version": 1
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "Invalid request"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Insufficient workspace permissions",
"details": {
"code": "INSUFFICIENT_WORKSPACE_ROLE"
}
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Not found"
}
}{
"error": {
"code": "CONFLICT",
"message": "The request conflicts with the current resource state"
}
}{
"error": {
"code": "PAYLOAD_TOO_LARGE",
"message": "Request body is too large"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "API rate limit exceeded",
"details": {
"retryAfter": "2026-01-01T00:00:30.000Z"
}
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error"
}
}{
"error": {
"code": "SERVICE_UNAVAILABLE",
"message": "Service temporarily unavailable"
}
}