POST
/media-assets
media:write
Header'lar
Authorization
*string
API key. Format: Bearer xpl_live_...
Idempotency-Key
*string
Unique value of 1-255 characters to safely retry the same write request.
Content-Type
string
Use application/json when sending JSON body.
Body
accountId
*string
The XPlanner account id to which the media will be linked.
bucketId
*string
bucketId in the upload URL response.
objectPath
*string
objectPath in the upload URL response.
mediaType
*string
image veya gif.
altText
string
Alt text. En fazla 1000 karakter.
Cevaplar
201
Media presence noted.
cURL
curl -X POST https://api.xplanner.co/v1/media-assets \ -H "Authorization: Bearer $XPLANNER_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: media-register-001" \ -d '{ "accountId": "acc_123", "bucketId": "media", "objectPath": "wrk_123/acc_123/api/launch.png", "mediaType": "image", "mimeType": "image/png", "sizeBytes": 245000, "altText": "Ürün ekran görüntüsü" }'Cevap
{ "data": { "id": "media_123", "workspaceId": "wrk_123", "accountId": "acc_123", "bucketId": "media", "objectPath": "wrk_123/acc_123/api/launch.png", "mediaType": "image", "mimeType": "image/png", "sizeBytes": 245000, "altText": "Ürün ekran görüntüsü", "createdAt": "2026-05-15T09:00:00.000Z", "updatedAt": "2026-05-15T09:00:00.000Z" }, "requestId": "req_123"}