Upload an authenticated workspace file
Uploads the multipart file and returns its final public URL/key. Active HTML, JavaScript, XML and SVG content/extensions are rejected. HEIC/HEIF images are converted to JPEG, so use the returned key and filename. Storage or receipt failures return500; invalid files, MIME/key mismatches or conversion failures return422. Accepts approved generated basename keys and shared trip/sticker namespaces, current-workspace newsletter keys, validated account-logo/program-placeholder/email-template image keys, and current-workspace donation attachment keys. Donation attachments permit PDF, office documents, text/CSV and common images up to10MiB. This endpoint stores bytes; callers attach the returned key through the owning feature API. Requires permission: one of admins, manage_programs, donors_manage, manage_settings, access_account_settings, access_payment_gateways, imports_manage.
Authorizations
Passport bearer token authentication for legacy admin sessions.
Body
Validated request fields for this operation.
Multipart file. Deployed PHP upload/post limits apply; direct images are additionally limited to50MiB and donation attachments to10MiB.
Permitted storage object key. URL-decoded and trimmed; empty, control characters, backslashes and dot/path-traversal segments are rejected.
1024"550e8400-e29b-41d4-a716-446655440000.jpg"
Optional declared MIME type; must match detected content except validated CSV/plain-text and HEIC compatibility cases.
191"image/jpeg"
Response
Operation result.
HTTP contracts traced from the deployed controller and delegated validation/serialization.
"success"
Final stored key; HEIC conversion can change the extension.
"550e8400-e29b-41d4-a716-446655440000.jpeg"
Stored MIME type.
"image/jpeg"
Original filename, adjusted when converted.
"photo.jpeg"
Whether the original HEIC/HEIF was converted to JPEG.
false
Public file URL.
"https://cdn.example.org/photo.jpeg"
Recipient-session attachment receipt UUID when eligible. Expires after60minutes and is bound to that session, record and key.