Skip to main content
POST
/
app
/
v1
/
organizations
/
{organizationId}
/
projects
/
{projectId}
/
components
/
{componentId}
/
assets
Upload Component Asset
curl --request POST \
  --url https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/components/{componentId}/assets \
  --header 'Content-Type: application/json' \
  --data '
{
  "metadata": "<string>",
  "tags": [
    "<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

Request

Content-Type: multipart/form-data
file
file
required
Asset file to upload
metadata
string
JSON string with asset metadata
tags
string[]
Array of tags for categorization

Response

Returns the created Asset object.
{
  "id": "asset123",
  "name": "logo-2x.png",
  "type": "image/png",
  "url": "https://cdn.metabind.ai/org123/proj456/components/c123/latest/assets/asset123/logo-2x.png",
  "size": 24576,
  "status": "active",
  "metadata": {
    "width": 200,
    "height": 100,
    "format": "png"
  },
  "tags": ["logo", "brand"],
  "createdAt": "2024-03-20T10:00:00Z",
  "updatedAt": "2024-03-20T10:00:00Z"
}

Error Responses

File Too Large

{
  "error": {
    "code": "FILE_TOO_LARGE",
    "message": "File exceeds maximum size limit",
    "details": {
      "maxSize": "10MB",
      "providedSize": "15MB"
    }
  }
}

Unsupported File Type

{
  "error": {
    "code": "UNSUPPORTED_FILE_TYPE",
    "message": "File type not supported",
    "details": {
      "type": "application/exe",
      "supportedTypes": ["image/*", "font/*", "application/json"]
    }
  }
}

Code Examples

curl -X POST "https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/components/c123/assets" \
  -H "Authorization: Bearer YOUR_JWT" \
  -F "file=@logo-2x.png" \
  -F "tags=[\"logo\", \"brand\"]"