Skip to main content
POST
/
api
/
v1
/
organizations
/
{organizationId}
/
projects
/
{projectId}
/
assets
/
{id}
/
status
curl -X POST "https://api.metabind.ai/api/v1/organizations/org123/projects/proj456/assets/asset789/status" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "deleted"
  }'
{
  "data": {
    "id": "asset789",
    "name": "hero-image.jpg",
    "type": "image/jpeg",
    "status": "deleted",
    "url": "https://cdn.metabind.ai/org123/proj456/assets/asset789/hero-image.jpg",
    "size": 2048576,
    "metadata": {
      "width": 1920,
      "height": 1080
    },
    "tags": ["hero"],
    "createdAt": "2024-03-20T10:00:00Z",
    "updatedAt": "2024-03-21T16:00:00Z"
  }
}
Update the status of an asset. This is useful for soft-deleting assets while preserving their history.
Soft-deleted assets (status: deleted) remain in the system and can be restored. Hard deletion is done via the Delete Asset endpoint.

Path Parameters

organizationId
string
required
The unique identifier of the organization
projectId
string
required
The unique identifier of the project
id
string
required
The unique identifier of the asset

Request Body

status
string
required
New status for the asset. Must be one of: active, deleted

Response

Returns the updated Asset object.
curl -X POST "https://api.metabind.ai/api/v1/organizations/org123/projects/proj456/assets/asset789/status" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "deleted"
  }'
{
  "data": {
    "id": "asset789",
    "name": "hero-image.jpg",
    "type": "image/jpeg",
    "status": "deleted",
    "url": "https://cdn.metabind.ai/org123/proj456/assets/asset789/hero-image.jpg",
    "size": 2048576,
    "metadata": {
      "width": 1920,
      "height": 1080
    },
    "tags": ["hero"],
    "createdAt": "2024-03-20T10:00:00Z",
    "updatedAt": "2024-03-21T16:00:00Z"
  }
}