Before you start
Usevault:read to browse media. Uploading and changing Vault lists require vault:write. Complete authorization and select a linked account. Install the TypeScript SDK version 4. Create a client on your server:
Browse Vault media
{ items, page }. Read the results from items. If page.hasMore is true, send page.nextCursor as the next request’s cursor. Keep the same filters.
Vault query parameters
Read one item with
GET /v3/access/vault/media/789. Media includes its numeric ID and type. Check the response fields for the request you use: list responses use fields such as ready, error, and urls, while some responses to create or update requests use isReady, hasError, and files. These field names are not the same for every request.
Organize Vault lists
Create a list with
{ "name": "Campaign assets" }. Add media with POST /v3/access/vault/lists/101/media and { "mediaIds": [789, 790] }. You can add 1 to 100 IDs. Each ID must be a positive whole number. To remove media from the list, send DELETE to the same route with a mediaIds body. This removes the media from the folder. To delete retained copies, use Vault+ deletion.
The list response uses items and page. You can request up to 40 lists per page. Media in a list uses the same filters as Vault media. To group fans for messages, use user lists.
Upload new files
Follow Upload media to calculate the file hash, upload each part, and mark the upload complete. Use Media references to attach the result to content. Save a numeric Vault media ID if you want to use the file again. A temporaryupload: reference works for one successful post, message, or story.