Replace a vault item’s content tags
Replaces (not merges) the content tags on a vault item. Send the full list every time.
/api/external/vault/{id}/tagsReplaces (not merges) the content tags on a vault item. Send the full list every time.
Tags are trimmed, de-duplicated, silently truncated to 64 characters each, and capped at 50 tags — the response echoes what was actually stored, so compare it to what you sent.
The body field is contentTags, not tags.
Authentication
Send the creator's API key as a bearer token: Authorization: Bearer dpfn_…. See Authentication & API keys.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | The vault item id. |
Request body
Content type: application/json
| Name | Type | Required | Description |
|---|---|---|---|
contentTags | string[] | Required | The complete new tag list (≤50 kept). Max items: 50 |
{
"contentTags": [
"beach",
"bikini"
]
}Responses
| Name | Type | Description |
|---|---|---|
success | boolean | Always true. |
contentTags | string[] | The tags after trimming, de-duplication and capping. |
{
"success": true,
"contentTags": [
"beach",
"bikini"
]
}Errors
| Status | Body | When |
|---|---|---|
| 400 | {"error":"Invalid JSON body"} | The body is not valid JSON. |
| 400 | {"error":"contentTags must be an array of strings"} | Missing, not an array, or contains non-strings. |
| 401 | {"error":"Unauthorized","code":"unauthorized"} | Missing or invalid API key. |
| 404 | {"error":"Vault item not found"} | No such item on this account. |
Rate limiting
Every response carries the X-RateLimit-Tier header and, on limited tiers, the per-minute and per-day trios — read X-RateLimit-Remaining and X-RateLimit-Reset instead of hardcoding limits. Details in Rate limits.
Code samples
curl -X PATCH "https://www.dropfans.io/api/external/vault/$VAULT_ITEM_ID/tags" \
-H "Authorization: Bearer $DROPFANS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contentTags": [
"beach",
"bikini"
]
}'const vaultItemId = '…'; // from an earlier response
const res = await fetch(`https://www.dropfans.io/api/external/vault/${vaultItemId}/tags`, {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.DROPFANS_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"contentTags": [
"beach",
"bikini"
]
}),
});
console.log(await res.json());import os
import requests
vault_item_id = "…" # from an earlier response
res = requests.patch(
f"https://www.dropfans.io/api/external/vault/{vault_item_id}/tags",
headers={"Authorization": f"Bearer {os.environ['DROPFANS_API_KEY']}"},
json={
"contentTags": [
"beach",
"bikini",
],
},
)
print(res.json())Questions? [email protected]
