---
title: "Update a file's settings"
description: "Changes a file's title, password or expiry."
canonical_url: https://docs.markdrop.in/api/files/update-a-file-s-settings
last_updated: 2026-10-30
site: "Markdrop Docs"
index: https://docs.markdrop.in/llms.txt
---

# Update a file's settings

`PATCH https://api.markdrop.in/api/v1/artifacts/{slug}`

Changes a file's title, password or expiry. Every field is optional. The owner may change all of them; editors may change the title.

- **Authentication:** API token required: `Authorization: Bearer mdk_…`.
- **Rate limit:** 30 per minute per IP address.

## Path parameters

- `slug` (string, required): The document's address: the part after `markdrop.in/`.

## Request body

`application/json`, required.

- `title` (string): Shown on the page and in link previews. Up to 200 characters.
- `read_password` (string): Readers must enter this password before they see the content. Up to 100 characters.
- `remove_password` (boolean): `true` removes the password. Default `false`.
- `expires_in` ("never" | "1h" | "1d" | "7d" | "30d" | "custom"): When the document is deleted. `custom` needs `custom_expires_at`.
- `custom_expires_at` (string (date-time)): The deletion time, when `expires_in` is `custom`. Must be in the future. ISO 8601, for example `2026-11-30T12:00:00Z`.

## Responses

- `200`: OK.
  - `slug` (string)
  - `url` (string)
  - `title` (string | null): Shown on the page and in link previews.
  - `kind` (string): Default `"artifact"`.
  - `mime` (string)
  - `renderer` (string)
  - `type_label` (string)
  - `size_bytes` (integer)
  - `original_filename` (string | null)
  - `artifact_url` (string)
  - `workspace_url` (string | null)
  - `download_url` (string)
  - `poster_url` (string | null)
  - `media` (object | null)
  - `created_at` (string (date-time)): ISO 8601, for example `2026-11-30T12:00:00Z`.
  - `updated_at` (string (date-time)): ISO 8601, for example `2026-11-30T12:00:00Z`.
  - `expires_at` (string (date-time) | null): ISO 8601, for example `2026-11-30T12:00:00Z`.
  - `views` (integer): Default `0`.
  - `is_password_protected` (boolean): Default `false`.
  - `is_owner` (boolean): Default `false`.
- `401`: No token, or the token is revoked or mistyped.
- `422`: The request didn't validate. `detail` lists each problem, with where it is (`loc`) and why (`msg`).
- `429`: Too many requests from your IP address. Wait the seconds in `Retry-After`.

## Examples

**curl**

```bash
curl -X PATCH https://api.markdrop.in/api/v1/artifacts/k3x9q2m \
  -H "Authorization: Bearer $MARKDROP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"title":"Q3 deck (final)"}'
```

**JavaScript**

```javascript
const res = await fetch("https://api.markdrop.in/api/v1/artifacts/k3x9q2m", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.MARKDROP_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "title": "Q3 deck (final)"
  }),
});
const data = await res.json();
```

**Python**

```python
import os

import requests

r = requests.patch(
    "https://api.markdrop.in/api/v1/artifacts/k3x9q2m",
    headers={"Authorization": f"Bearer {os.environ['MARKDROP_TOKEN']}"},
    json={"title": "Q3 deck (final)"},
)
r.raise_for_status()
print(r.json())
```
