POST
/hyax-api/v1/media/upload-from-urlUpload image from URL
Fetches an image from a URL (http/https or a `data:image/*;base64,…` string) and stores it in the team's CDN. Returns the public CDN URL and file metadata. Storage plan limits apply. Use the returned `url` in `posts_update.imageUrl`, `PATCH /posts/:id/featured-image`, or any other field that accepts an image URL.
Base URL: https://platform.hyax.com · Replace YOUR_API_KEY with your team API key.
Request body
| Field | Required | Description |
|---|---|---|
url | Required | Image URL to fetch, http/https or `data:image/*;base64,…` |
type | No | `Image` (default) | `Post` | `Product` | `Tmp`, storage classification |
Request
curl -X POST 'https://platform.hyax.com/hyax-api/v1/media/upload-from-url' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://example.com/photo.jpg",
"type": "Image"
}'Response
{
"success": true,
"data": {
"id": "clx…",
"url": "https://cdn.hyax.com/team_id/images/photo.jpg",
"mimeType": "image/jpeg",
"size": 204800,
"type": "Image"
}
}