---
title: "Replace a Temp with a new multipart Version"
method: PUT
path: "/temps/{tempId}"
tags: ["Publish"]
---

# Replace a Temp with a new multipart Version

`PUT /temps/{tempId}`

## Request

- Base URL: `https://api.temp.md`
- URL: `https://api.temp.md/temps/{tempId}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/temp-md/apis/temp-md-public-api/docs/temps/:tempId/put.ts> (a function with typed inputs; its response is checked against the schema)

The previous Version stays live unless the complete new Version succeeds.

## Path parameters

- `tempId` string, required

## Headers

- `X-Tempmd-Client` string

## Request body `multipart/form-data`

- object
  - `file` string, binary, required
  - `title` string
  - `spaMode` boolean

## Response `200`

Updated

- UpdateTempResult
  - `tempId` string, required
  - `versionId` string, required
  - `canonicalUrl` string, uri, required
  - `expiresAt` string, date-time, required
  - `spaMode` boolean, required

## Other responses

- `401`: Authentication required or invalid
- `403`: Credential lacks access
- `404`: Resource not found
- `410`: Resource expired or recovery window closed

---

[API](https://skmtc.dev/temp-md/apis/temp-md-public-api.md) - [All operations](https://skmtc.dev/temp-md/apis/temp-md-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/temp-md/apis/temp-md-public-api/revisions/4753682e1e3a?raw)
