Skip to main content
DELETE
/
v1
/
content
/
{id}
curl -X DELETE https://api.raily.ai/v1/content/cnt_abc123xyz \
  -H "Authorization: Bearer raily_sk_xxxxx"
{
  "id": "cnt_abc123xyz",
  "object": "content",
  "deleted": true
}

Path Parameters

id
string
required
The content ID (e.g., cnt_abc123) or external ID

Response

Returns a confirmation object.
id
string
The deleted content ID
object
string
Always content
deleted
boolean
Always true
This action is irreversible. All associated data including access logs and analytics will be permanently deleted. Consider archiving content instead if you want to preserve historical data.
curl -X DELETE https://api.raily.ai/v1/content/cnt_abc123xyz \
  -H "Authorization: Bearer raily_sk_xxxxx"
{
  "id": "cnt_abc123xyz",
  "object": "content",
  "deleted": true
}

Alternative: Archive Instead of Delete

If you want to disable access but preserve data:
// Archive - preserves data, disables access
await raily.content.update('cnt_abc123xyz', {
  status: 'archived'
});

// Later, restore if needed
await raily.content.update('cnt_abc123xyz', {
  status: 'active'
});

Bulk Delete

To delete multiple content items:
const ids = ['cnt_abc123', 'cnt_def456', 'cnt_ghi789'];

const results = await raily.content.bulkDelete({ ids });

console.log(`Deleted: ${results.deleted}`);
console.log(`Failed: ${results.failed}`);