staqlydocs
REST APIAPI referenceMedia

Move several files to Deleted, or delete them for good with permanent

Move several files to Deleted, or delete them for good with permanent (posts:delete)

Every request sends Authorization: Bearer ...: the access token in local mode, an API key stk_... in cloud mode. Use Send to try it against your cloud instance with your API key.

POST
/v1/media/delete

Moving to Deleted is refused (409) when a scheduled post uses one of the files; nothing moves then. With permanent, posts referencing the files lose them.

Authorization

headerAuthorizationBearer <token>

API key (stk_...), or in the Community Edition the access token (stk_local_...)

Request Body

application/json
  1. body
ids*array<string>
Items1 <= items <= 200
permanent?boolean

Delete for good now instead of moving to Deleted

Defaultfalse

Response Body

What was deleted and which ids were not found

application/json
  1. response
deleted*array<string>
missing*array<string>
curl -X POST 'https://staqly.example.com/v1/media/delete' \  -H 'Content-Type: application/json' \  -d '{  "ids": [    "string"  ]}'
{  "deleted": [    "string"  ],  "missing": [    "string"  ]}