Files

Get a File

GET
/files/{file_id}

Returns one bounded chunk of an immutable file: at most 24 KiB, as UTF-8 text or, for binary bytes, base64. When next_cursor is not null, repeat the request with cursor and concatenate the chunks in order. A file ID always returns the same bytes.

AuthorizationBearer <token>

Organization API key from the console (ak_...), or an OAuth access token with user:org:read, the organization selected during consent, and the capability required by the operation.

In: header

Path Parameters

file_id*string

Unique identifier for one immutable file snapshot. An ID always returns the same bytes: a Spec Revision, a Generation, and each Draft side name their own file IDs, and a new Draft commit gets new IDs.

Match^file_[a-z0-9]{16}$

Query Parameters

cursor?string

next_cursor from the preceding chunk of this file.

Match^[A-Za-z0-9_-]+$
Length1 <= length <= 2048

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/files/file_4k8m2v7q1p9d5h6c"
{  "id": "file_4k8m2v7q1p9d5h6c",  "object": "file",  "path": "src/index.ts",  "size_bytes": 94,  "sha256": "5f1d7c0a4b8e2f6a9c3d7e1b5a9f2c6d0e4b8a3f7c1d5e9b2a6f0c4d8e2b6a1f",  "encoding": "utf8",  "mode": "100644",  "created_at": "2026-09-23T08:40:00Z",  "content": "export { ParcelClient } from \"./client.js\";\nexport type { Shipment, Label } from \"./types.js\";\n",  "offset": 0,  "next_cursor": null,  "request_id": "req_3k8m1v6q9p2d7h4c"}

Retry publishing a Release POST

Queues every failed or queued Publication of the release and starts its repository publishing workflow again. Publishing uses that release's version and accepted commit, even if a newer Draft or release exists. Completed Publications are not repeated. Returns `202` with the Release. Get the Release until each Publication reaches `completed` or `failed`. A `409 publication_not_retryable` means no Publication is queued or failed. A `502 repository_unavailable` means the repository publishing workflow could not be dispatched, and nothing was changed.

Generate a package POST

Returns one generated package without creating a Project. Supports [idempotent retries](https://typeship.dev/docs/typeship-api/idempotency); keyed responses include generated files in the replay cache. Use `download.url` to save the complete ZIP, verify `download.sha256`, and extract it into an empty directory. The link expires at `download.expires_at` and grants access to anyone who has it. CLI, MCP, and SDK calls supply an idempotency key automatically. Agents should request `fields=["download","coverage","warnings","claim"]` to keep the MCP result compact; files can exceed the response limit. Download the ZIP instead of repeating generation to retrieve omitted files. Anonymous and Free requests include the first 25 operations. Paid plans include all operations. Anonymous requests are rate limited by IP address. Check `coverage` for omitted operations; an invalid API key returns `401`. An anonymous URL request without source headers may return `claim.url`. Sign in through that link within seven days to save the recipe as a Project.