---
title: "Update an attachment"
method: PUT
path: "/attachment/{token}"
tags: ["Attachments"]
---

# Update an attachment

`PUT /attachment/{token}`

Updates the attachment identified by the specified token.

## Headers

- `Accept` 'application/vnd.Creative Force.v2.3+json' | 'application/vnd.Creative Force.v2.3+xml', required
- `x-api-language` string[]

## Request body

- object
  - `attachment_fields` object — Values for the form fields captured against this attachment, keyed by field slug. Each value must conform to the type of the corresponding field on the parent attachments tab; for example, a text field accepts a string, a choice field accepts the slug of one of its options, and a number field accepts a numeric value. Field slugs that do not exist on the parent tab are rejected.
  - `order` integer — Position of the attachment within its tab. Lower values sort earlier.
  - `tab` string — Slug of the tab to move the attachment to. Must reference a tab whose type is `Attachments`; tabs of other types are rejected.

## Response `200`

Attachment updated.

- Attachment — File attached to an entry through an attachments-typed form tab. Carries the file itself together with the form-field metadata captured against it, the entry it belongs to, and the tab through which it was added.
  - `entry` object — Entry the attachment belongs to.
    - `slug` string — Short URL-safe identifier for the entry.
    - `link` string, uri — Canonical URL for the entry resource.
    - `title` string — Title of the entry as submitted by the entrant.
  - `attachment_fields` object[] — Form fields captured against this attachment. One item per field defined on the parent attachments tab, in form order. The exact set of keys varies by field type.
    - `slug` string — Short URL-safe identifier for the field.
    - `link` string, uri — Canonical URL for the field resource.
    - `label` object — Display label shown to the entrant alongside the field. May contain HTML and may be empty. Map keyed by locale code (for example `en_GB`, `fr_FR`). Keys are drawn from the languages enabled on the account. Values are the translated string.
    - `title` object — Short title used to refer to the field in administrative contexts. Map keyed by locale code (for example `en_GB`, `fr_FR`). Keys are drawn from the languages enabled on the account. Values are the translated string.
    - `value` string — Raw stored value for the field, as submitted by the entrant.
    - `translated` object — Human-readable rendering of `value` resolved against the field definition (for example, choice slugs expanded to labels). Map keyed by locale code (for example `en_GB`, `fr_FR`). Keys are drawn from the languages enabled on the account. Values are the translated string.
    - `download` string, uri — Time-limited download URL. Present only for file-typed attachment fields with an underlying file.
  - `created` string, date-time — Time the attachment was created.
  - `file` object — File backing the attachment.
    - `token` string — Token identifying the file.
    - `link` string, uri — Canonical URL for the file resource.
    - `download` string, uri, nullable — Time-limited download URL for the underlying file. `null` when no signed URL can be resolved for the file (for example, in environments without a configured CDN).
    - `filename` string — Original filename as uploaded.
  - `order` integer — Position of the attachment within its tab.
  - `tab` object — Attachments tab the attachment belongs to.
    - `slug` string — Short URL-safe identifier for the tab.
    - `link` string, uri — Canonical URL for the tab resource.
    - `name` object — Map keyed by locale code (for example `en_GB`, `fr_FR`). Keys are drawn from the languages enabled on the account. Values are the translated string.
  - `token` string — Token identifying the attachment file. Same value as `file.token`.
  - `updated` string, date-time — Time the attachment was last updated.

## Other responses

- `400` — Request was rejected before the endpoint could process it. Common causes: invalid `Accept` header, unsupported `x-api-language` code, empty request body on `POST` / `PUT`, invalid JSON in the request body, or an invalid slug format in a path parameter.
- `401` — Missing `x-api-key` header.
- `403` — Authenticated request denied. Common causes: invalid or unknown API key, suspended account, or `api` feature not enabled for the account.
- `404` — Resource identified by the path slug does not exist. Returned when the slug is well-formed but no record matches it.
- `422` — Request was syntactically valid but could not be processed. Returned in two scenarios: - **Field-level validation failure** — one or more request fields violated the endpoint's validation rules. The body includes an `errors` map keyed by field name with one or more validation messages each. - **Resource-state precondition failure** — the request fields were all valid, but the target resource was in a state that does not permit the requested operation. The body carries only `message` and `status_code`; no `errors` map.
- `429` — Rate limit of 60 requests per minute exceeded.
- `503` — Service is temporarily unavailable due to regional maintenance.

## Changes

- **2026-07-07** (v2) `9b9103538ceb` — 2 info
  - api tag `Attachments` added
  - api tag `Attachment` removed
- **2026-07-01** (v2) `e96a96d4507e` — 8 info
  - added the media type `application/xml` for the response with the status `200`
  - added the media type `application/xml` for the response with the status `400`
  - added the media type `application/xml` for the response with the status `401`
  - added the media type `application/xml` for the response with the status `403`
  - …4 more

[Change history](https://skmtc.dev/tectonic/apis/award-force-api/changes/attachment/:token/put.md)

---

[API](https://skmtc.dev/tectonic/apis/award-force-api.md) · [All operations](https://skmtc.dev/tectonic/apis/award-force-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/tectonic/award-force-api/revisions/e2511e46f9f2/schema)
