Skip to main content
POST
/
app
/
v1
/
organizations
/
{organizationId}
/
projects
/
{projectId}
/
components
/
{componentId}
/
assets
/
{assetId}
/
status
Update Asset Status
curl --request POST \
  --url https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/components/{componentId}/assets/{assetId}/status \
  --header 'Content-Type: application/json' \
  --data '
{
  "status": "<string>"
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.metabind.ai/llms.txt

Use this file to discover all available pages before exploring further.

Path Parameters

organizationId
string
required
Organization ID
projectId
string
required
Project ID
componentId
string
required
Component ID
assetId
string
required
Asset ID

Request Body

status
string
required
New status: active or deleted

Example Request

{
  "status": "deleted"
}

Response

Returns the Component Asset object with updated status.
{
  "id": "asset123",
  "componentId": "c123",
  "name": "logo-2x.png",
  "type": "image/png",
  "url": "https://cdn.metabind.ai/.../logo-2x.png",
  "size": 24576,
  "status": "deleted",
  "metadata": {},
  "tags": ["logo"],
  "createdAt": "2024-03-20T10:00:00Z",
  "updatedAt": "2024-03-22T10:00:00Z"
}

Status Values

StatusDescription
uploadingFile is being uploaded
processingFile is being processed (optimization, metadata extraction)
activeAsset is available for use
deletedAsset is soft-deleted
errorProcessing failed
You can only transition between active and deleted statuses. Other statuses are managed by the system.

Error Responses

Invalid Status Transition

{
  "error": {
    "code": "INVALID_STATUS_TRANSITION",
    "message": "Cannot transition from 'processing' to 'deleted'"
  }
}

Asset In Use

{
  "error": {
    "code": "ASSET_IN_USE",
    "message": "Asset is referenced in published packages and cannot be deleted",
    "details": {
      "packages": ["1.0.0", "1.1.0"]
    }
  }
}

Code Examples

curl -X POST "https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/components/c123/assets/asset123/status" \
  -H "Authorization: Bearer YOUR_JWT" \
  -H "Content-Type: application/json" \
  -d '{"status": "deleted"}'