curl --request POST \
--url https://api.example.com/v1/organizations/{organizationId}/projects/{projectId}/components/{componentId}/assets \
--header 'Content-Type: application/json' \
--data '
{
"metadata": "<string>",
"tags": [
"<string>"
]
}
'Upload an asset to a component
curl --request POST \
--url https://api.example.com/v1/organizations/{organizationId}/projects/{projectId}/components/{componentId}/assets \
--header 'Content-Type: application/json' \
--data '
{
"metadata": "<string>",
"tags": [
"<string>"
]
}
'multipart/form-data
{
"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": {
"code": "FILE_TOO_LARGE",
"message": "File exceeds maximum size limit",
"details": {
"maxSize": "10MB",
"providedSize": "15MB"
}
}
}
{
"error": {
"code": "UNSUPPORTED_FILE_TYPE",
"message": "File type not supported",
"details": {
"type": "application/exe",
"supportedTypes": ["image/*", "font/*", "application/json"]
}
}
}
curl -X POST "https://api.metabind.ai/v1/organizations/org123/projects/proj456/components/c123/assets" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "[email protected]" \
-F "tags=[\"logo\", \"brand\"]"