Typeship Files API
Immutable file snapshots from Spec Revisions, Generations, and Drafts, read in bounded chunks.
Immutable file snapshots from Spec Revisions, Generations, and Drafts, read in bounded chunks.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/typeship-dev:typeship-dev-files-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Typeship Files API
version: 1.0.0
description: 'Resolve an OpenAPI or GraphQL Spec, diagnose it, and keep every
selected CLI, MCP, and SDK Target current.
Every operation but one requires a bearer credential: an organization
API key from the console, or an OAuth access token carrying the operation''s
read, generate, or write capability and the organization selected during
consent. OAuth grants cannot switch organizations after consent. A browser
session is not a credential for this API. The exception is POST /generate,
which works anonymously with the free plan''s limits.
Examples use Parcel, a fictional delivery service. Replace its domains,
repository names, and resource identifiers with your own. The hosted
petstore Spec is a runnable sample.'
servers:
- url: https://typeship.dev/api/v1
tags:
- name: Files
description: Immutable file snapshots from Spec Revisions, Generations, and Drafts, read in bounded chunks.
paths:
/files/{file_id}:
get:
operationId: getFile
tags:
- Files
summary: Get a File
description: '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.'
security:
- apiKey: []
x-typeship-agent:
readOnlyHint: true
destructiveHint: false
idempotentHint: true
openWorldHint: false
parameters:
- name: file_id
in: path
required: true
schema:
$ref: '#/components/schemas/FileId'
- name: cursor
in: query
description: next_cursor from the preceding chunk of this file.
schema:
type: string
minLength: 1
maxLength: 2048
pattern: ^[A-Za-z0-9_-]+$
responses:
'200':
headers:
Request-Id:
$ref: '#/components/headers/RequestId'
RateLimit-Limit:
$ref: '#/components/headers/RateLimitLimit'
RateLimit-Remaining:
$ref: '#/components/headers/RateLimitRemaining'
RateLimit-Reset:
$ref: '#/components/headers/RateLimitReset'
description: One chunk of the file.
content:
application/json:
schema:
$ref: '#/components/schemas/FileResponse'
examples:
File:
$ref: '#/components/examples/File'
'400':
headers:
Request-Id:
$ref: '#/components/headers/RequestId'
RateLimit-Limit:
$ref: '#/components/headers/RateLimitLimit'
RateLimit-Remaining:
$ref: '#/components/headers/RateLimitRemaining'
RateLimit-Reset:
$ref: '#/components/headers/RateLimitReset'
description: A query parameter is unknown, repeated, empty, or invalid, or the cursor belongs to a different file or collection.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/RateLimited'
'500':
$ref: '#/components/responses/ServerError'
components:
schemas:
GitFileMode:
type: string
enum:
- '100644'
- '100755'
- '120000'
description: Git file mode. 100755 is executable; 120000 is a symbolic link whose content is its target.
ErrorCode:
type: string
enum:
- input_invalid
- input_missing
- input_type_invalid
- input_format_invalid
- input_too_long
- input_too_short
- input_duplicate
- input_unknown
- query_param_invalid
- cursor_invalid
- method_not_allowed
- resource_not_found
- idempotency_key_invalid
- idempotency_key_reused
- idempotency_key_in_use
- auth_required
- api_key_invalid
- token_invalid
- organization_required
- insufficient_scope
- role_insufficient
- rate_limit_exceeded
- feature_not_available
- quota_exceeded
- spec_invalid
- spec_too_large
- spec_unreachable
- repository_provider_unsupported
- repository_disconnected
- repository_unavailable
- target_busy
- targets_inactive
- no_draft
- draft_merged
- resource_changed
- precondition_failed
- version_invalid
- version_occupied
- version_too_low
- target_already_released
- adoption_unverified
- publication_disabled
- publication_not_retryable
- publication_recovery_unavailable
- publication_failed
- delivery_conflict
- delivery_exists
- resource_has_dependencies
- customization_conflict
- checks_failed
- draft_title_invalid
- history_recovery_required
- checks_unavailable
- regeneration_failed
- follow_up_failed
- api_error
description: Stable programmatic identifier. Do not branch on message.
TargetId:
type: string
pattern: ^tgt_[a-z0-9]{16}$
examples:
- tgt_5m8q2v7k1p9d4h6c
description: Stable identifier for one configured generated product.
File:
type: object
required:
- id
- object
- path
- size_bytes
- sha256
- encoding
- mode
- created_at
properties:
id:
$ref: '#/components/schemas/FileId'
object:
type: string
const: file
path:
type: string
description: Path within the Spec Revision, Generation package, or Target package.
size_bytes:
type: integer
minimum: 0
sha256:
type: string
pattern: ^[a-f0-9]{64}$
description: Digest of the complete file.
encoding:
type: string
enum:
- utf8
- base64
description: 'utf8: content is text. base64: content is base64-encoded binary bytes.'
mode:
oneOf:
- $ref: '#/components/schemas/GitFileMode'
- type: 'null'
description: Git file mode for package files; null for Spec source files.
created_at:
type: string
format: date-time
description: When Typeship first issued this file ID.
FailurePhase:
type: string
enum:
- spec
- generation
- delivery
- publication
description: The stage that failed. A delivery failure does not change a completed Generation's status.
ResponseMetadata:
type: object
required:
- request_id
properties:
request_id:
$ref: '#/components/schemas/RequestId'
description: Request-level metadata present at the top level of every JSON response.
FileId:
type: string
pattern: ^file_[a-z0-9]{16}$
examples:
- file_4k8m2v7q1p9d5h6c
description: '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.'
ErrorDetail:
type: object
required:
- type
- code
- message
- retryable
- suggested_action
- docs_url
properties:
type:
$ref: '#/components/schemas/ErrorType'
code:
$ref: '#/components/schemas/ErrorCode'
phase:
$ref: '#/components/schemas/FailurePhase'
target_id:
$ref: '#/components/schemas/TargetId'
description: The affected Target when an operation reports failures for multiple Targets.
field:
type: string
description: JSON Pointer to the invalid field within the request part named by in. When in is omitted, the pointer refers to the request body. Header pointers use lowercase header names, such as /idempotency-key.
in:
type: string
enum:
- body
- query
- header
description: Request part containing field. Query-parameter errors use query; header errors use header. Body errors use body or omit in.
message:
type: string
description: Human-readable explanation. Its wording may change.
retryable:
type: boolean
description: Whether another attempt can succeed without correcting the inputs. For a recorded failure, start generation or publishing again; retrieving the resource or replaying an idempotency key does not start another attempt.
suggested_action:
type: string
description: Stable, concise recovery instruction suitable for a person or agent.
docs_url:
type: string
format: uri
description: Documentation for this class of error.
RequestId:
type: string
pattern: ^req_[a-z0-9]{16}$
examples:
- req_3k8m1v6q9p2d7h4c
description: Server-generated identifier used to correlate this response with Typeship logs.
FileResponse:
allOf:
- $ref: '#/components/schemas/File'
- type: object
required:
- content
- offset
- next_cursor
properties:
content:
type: string
description: At most 24 KiB of the file starting at offset, encoded as encoding says. Text chunks never split a character; concatenate chunks in order.
offset:
type: integer
minimum: 0
description: Byte offset of this chunk in the file.
next_cursor:
type:
- string
- 'null'
description: Pass as cursor to read the next chunk; null at the end of the file.
- $ref: '#/components/schemas/ResponseMetadata'
Error:
type: object
required:
- errors
- request_id
properties:
errors:
type: array
minItems: 1
items:
$ref: '#/components/schemas/ErrorDetail'
request_id:
$ref: '#/components/schemas/RequestId'
ErrorType:
type: string
enum:
- request
- auth
- idempotency
- rate_limit
- organization
- source
- api
description: 'Who can resolve the error. request: change the request. auth: fix the credential or its grant. idempotency: change or wait on the Idempotency-Key. rate_limit: wait before retrying. organization: the organization''s plan must change. source: a system you own failed, such as the Spec URL, repository, or package registry. api: Typeship failed.'
responses:
RateLimited:
description: Too many requests, or an identical write is still in progress. Wait for Retry-After before retrying.
headers:
Request-Id:
$ref: '#/components/headers/RequestId'
RateLimit-Limit:
$ref: '#/components/headers/RateLimitLimit'
RateLimit-Remaining:
$ref: '#/components/headers/RateLimitRemaining'
RateLimit-Reset:
$ref: '#/components/headers/RateLimitReset'
Idempotency-Replayed:
$ref: '#/components/headers/IdempotencyReplayed'
Retry-After:
$ref: '#/components/headers/RetryAfter'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
RateLimitError:
$ref: '#/components/examples/RateLimitError'
Unauthorized:
headers:
Request-Id:
$ref: '#/components/headers/RequestId'
RateLimit-Limit:
$ref: '#/components/headers/RateLimitLimit'
RateLimit-Remaining:
$ref: '#/components/headers/RateLimitRemaining'
RateLimit-Reset:
$ref: '#/components/headers/RateLimitReset'
description: Missing, invalid, expired, or revoked credentials.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
NotFound:
description: No such resource in this organization.
headers:
Request-Id:
$ref: '#/components/headers/RequestId'
RateLimit-Limit:
$ref: '#/components/headers/RateLimitLimit'
RateLimit-Remaining:
$ref: '#/components/headers/RateLimitRemaining'
RateLimit-Reset:
$ref: '#/components/headers/RateLimitReset'
Idempotency-Replayed:
$ref: '#/components/headers/IdempotencyReplayed'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
ServerError:
headers:
Request-Id:
$ref: '#/components/headers/RequestId'
RateLimit-Limit:
$ref: '#/components/headers/RateLimitLimit'
RateLimit-Remaining:
$ref: '#/components/headers/RateLimitRemaining'
RateLimit-Reset:
$ref: '#/components/headers/RateLimitReset'
description: An unexpected error prevented the request from completing.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Forbidden:
headers:
Request-Id:
$ref: '#/components/headers/RequestId'
RateLimit-Limit:
$ref: '#/components/headers/RateLimitLimit'
RateLimit-Remaining:
$ref: '#/components/headers/RateLimitRemaining'
RateLimit-Reset:
$ref: '#/components/headers/RateLimitReset'
description: The credentials are valid but cannot act on the requested organization.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
headers:
IdempotencyReplayed:
description: Whether this is a replay of the original response for the supplied Idempotency-Key.
schema:
type: boolean
RateLimitLimit:
description: Maximum requests in the evaluated rate-limit window. Omitted when no budget was evaluated, including idempotency replays.
schema:
type: integer
minimum: 1
RateLimitReset:
description: Seconds until the evaluated rate-limit window resets, measured when the response is sent. Zero means that window has ended. Omitted when no budget was evaluated.
schema:
type: integer
minimum: 0
RequestId:
description: Server-generated identifier used to correlate this response with Typeship logs.
schema:
$ref: '#/components/schemas/RequestId'
RateLimitRemaining:
description: Requests remaining immediately after this request evaluated its budget. Concurrent requests can consume this allowance. Omitted when no budget was evaluated.
schema:
type: integer
minimum: 0
RetryAfter:
description: Seconds to wait before retrying the request.
schema:
type: integer
minimum: 1
examples:
RateLimitError:
summary: Too many requests.
value:
errors:
- type: rate_limit
code: rate_limit_exceeded
message: Too many requests.
retryable: true
suggested_action: Wait for the Retry-After interval before retrying.
docs_url: https://typeship.dev/docs/typeship-api/errors#rate_limit_exceeded
request_id: req_3k8m1v6q9p2d7h4c
File:
summary: The generated side of a conflicted file
value:
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";
export type { Shipment, Label } from "./types.js";
'
offset: 0
next_cursor: null
request_id: req_3k8m1v6q9p2d7h4c
securitySchemes:
apiKey:
type: http
scheme: bearer
description: 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.