Download Code Artifact Content changedapi/compliance/apps/code/artifacts/download
Nearest release: v2.1.306, published 2 hours after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+33added
Lines−20removed
From line
7
where the diff opens
First seen
15 Oct 2026
this site's first read of the page
Recorded edits2to this page, all time
The whole hunk
from line 7, old and new numbered
/
from line 7
77
88**GET** `/v1/compliance/apps/code/artifacts/{artifact_id}/content`
99
10Streams an Artifact's current content as the response body. For a
11Claude Doc, that is the Doc's text as a ZIP archive of Word files, one per
12text tab, and the request must set `multi_file_format=zip`. For any other
13Artifact, it is the latest version, as
14`GET /v1/compliance/apps/code/artifacts/{artifact_id}/versions/{version_id}`
15returns it.
10Streams an Artifact's current content as the response body, in chunks with no `Content-Length`.
1611
17Returns 404 for Artifacts that don't exist or that the API key cannot read.
18Returns 400 with `error.details.error_code` `cmek_key_disabled` when the
19organization's customer-managed encryption key can't be used, for example
20because it is disabled or revoked. Returns 503 when the content can't be
21produced right now; wait the number of seconds in the `Retry-After`
22header, or retry with backoff when it is absent. For a Claude Doc, a 422's
23`error.details.error_code` is `multi_file_unavailable` when the request
24does not set `multi_file_format=zip`, `document_unavailable` when the Doc
25has no text to export (for example, it has no text tab or is in the trash),
26`document_too_large` when the export is over 16 MiB, or
27`cmek_org_unsupported` when the organization uses customer-managed
28encryption keys and the export can't be served for it right now. For any
29other Artifact, the 422s are the version download's.
12For a Claude Doc (an Artifact whose `artifact_type` is `claude_docs`), the request must set `multi_file_format=zip`, and the content is the Doc's text as a ZIP archive of Word files. That ZIP has no `files.json`. It holds one Word file per text tab, in tab order, named `NN-<tab id>.docx`, where `NN` counts from `01`. A Doc with one text tab gets one file, `01-document.docx`.
3013
14For any other Artifact, the content is the latest version. With `multi_file_format=zip`, when the latest version has more than one file, it comes back as a ZIP archive of its files.
15
16Headers: `Content-Type` (`application/zip` for a ZIP archive, otherwise the stored MIME type), `Content-Disposition: attachment; filename*=utf-8''<name>` (RFC 5987), `Cache-Control: no-store, private` and, when available, `Content-MD5` (base64). `<name>` is `{artifact_id}.zip` for a ZIP archive, otherwise `{artifact_id}.txt`, whatever the content is. `Content-MD5` is always on a Claude Doc's ZIP, only on a single file stored uncompressed, and never on a ZIP archive of a version's files. Check the body against it when present.
17
18Errors specific to this download:
19
20- `404`: the Artifact doesn't exist, or the API key cannot read it.
21- `400` with `error.details.error_code` `cmek_key_disabled`: the organization's customer-managed encryption key can't be used, for example because it is disabled or revoked. Retry once the key can be used again.
22- `503`: the content can't be produced right now. Wait the number of seconds in the `Retry-After` header, or retry with backoff when it is absent.
23- `422` with `multi_file_unavailable`: the request does not set `multi_file_format=zip`, and the Artifact is a Claude Doc or its latest version has more than one file. Add the parameter.
24- `422` with `file_set_unavailable`: the request sets `multi_file_format=zip`, the Artifact is not a Claude Doc, and one of the latest version's files has a path the API cannot export. Do not retry.
25- `422` with `document_unavailable`: Claude Docs has no document it can export for the Doc, for example because it has no text tab or is in the trash. Retrying will not help unless that changes.
26- `422` with `document_too_large`: the Doc's export is over 16 MiB. Do not retry.
27- `422` with `cmek_org_unsupported`: the organization uses customer-managed encryption keys and the export can't be served for it right now. Try again later, and contact Anthropic support if this continues.
28
29An error after the download has started stops the body early, with the `200` status already sent. For example, this happens to content stored compressed when it is over 16 MiB once decompressed. For a single file with no `Content-MD5`, the only sign is a transfer that aborts before its last chunk, so treat a download that aborts this way as failed.
30
31A ZIP archive of a version's files holds one top-level folder, named for the Artifact. That folder holds a `files/` folder and an index, `files.json`. The index is written last, so treat an archive as incomplete if it cannot be opened or has no `files.json` in its top-level folder.
32
33`files.json` has these fields:
34
35- `artifact_id`: the Artifact ID, as in the request.
36- `version_id`: null.
37- `title`: the title of the version in the archive, or that version's ID when no title is kept.
38- `created_at`: when the version was published (RFC 3339, UTC), or null when that is not known.
39- `files`: one entry for each file under `files/`, with `original_path` (the file's path in the version), `exported_as` (its path in the archive), `sha256` (lowercase hex), `size_bytes` (before compression) and `mime_type`. `exported_as` is the top-level folder, then `files/`, then `original_path`. A name that could not be saved or opened safely on every operating system is changed. Use `exported_as`, not `original_path`, to find a file in the archive.
40- `omitted_files`: the files left out of the archive, each with `original_path`, `sha256`, `size_bytes` and `mime_type`. They include files the version uses from another Artifact. They also include files copied from the Artifact type the Artifact was made from, such as the app that displays it, when another organization owns that type.
41
42`files` and `omitted_files` together list at most 4,096 files, their `size_bytes` add up to at most 1 GiB, and no file is over 20 MiB.
43
3144## Path parameters
3245
3346- `artifact_id: string`
from line 51
3851
3952- `multi_file_format: optional string`
4053
41 Set to `zip`, its only value. A Claude Doc downloads only this way, as a ZIP archive of Word files, one per text tab. For any other Artifact it works as on the version download: when the latest version has more than one file, it comes back as a ZIP archive of its files with an index, `files.json`.
54 Set to `zip`, its only value. A Claude Doc downloads only this way, as a ZIP archive of Word files, one per text tab. For any other Artifact, when the latest version has more than one file, it comes back as a ZIP archive of its files with an index, `files.json`.
4255
4356## Headers
4457
No line in this hunk matches that.