TEASEDocs
ProductsClubHow-to

Check where a file is used before deleting or replacing it

See which saved scripts reference a vault media item so a swap doesn't silently break a script.

Who this is for: chatters and workspace owners about to swap or remove a vault file (the organize grant).

Before replacing or deleting a piece of content, check whether a saved script depends on it — this is a reverse lookup, not a delete-protection: it never blocks the delete itself, it just tells you what to check first.

curl "https://app.tease.link/api/admin/vault/{media_id}/scripts" \
  -H "Authorization: Bearer $TEASE_API_KEY"

Response shape

{
  "scripts": [
    { "script_id": 42, "title": "New fan welcome", "folder": "Onboarding", "price_cents": 1500 }
  ],
  "unavailable": false
}

This can honestly say 'unavailable'

Reverse lookup depends on a column (scripts.media_ids_json) that's part of a separate, staged rollout. If it isn't deployed yet on your workspace, this returns {"scripts": [], "unavailable": true} — an honest "we can't tell you yet", never a fabricated empty "nothing uses this file" and never a 500 that would take down the whole file card over one missing feature.

What's next

Once you've confirmed a file is safe to touch, remove it from a folder via Manage OnlyFans vault folders, or leave it in place and just block it from being sent again.

On this page