Upload a content image
/org-content/imagesMultipart upload of a content image in the image field. It must be a JPEG, PNG, GIF or WebP image of at most 10 MiB, else 422. Returns a file_key for the item's image_file_key, and a Location that resolves it, only for the organisation that uploaded it. The acting user needs permission to manage the organisation's content, else 403. dry_run validates the file and stores nothing. Emits no webhook, email or notification. The upload cannot be undone through the API.
Query parameters
Validate and run the call without committing it, returning what the real call would return with
meta.dry_runset.
Headers
Makes a retry safe. Send a new UUID for each new request and reuse it only to retry that request; the first response is replayed for 24 hours.
Request body
multipart/form-data, required
The image file: JPEG, PNG, GIF or WebP, up to 10 MiB.
Responses
{
"data": {
"file_key": "oc_7c1e2f3a-4b5c-4d6e-8f90-1a2b3c4d5e6f",
"url": "https://example.test/oc_7c1e2f3a.png"
}
}Authorization failed. error.code is one of org_disabled,
ip_blocked, missing_scope, scope_disabled, user_disabled.
The request can't be processed (HTTP 422): validation_failed with one ErrorDetail per
problem, or a code documented on the operation.
Examples
curl -X POST https://your-org-domain/kong/core/api/v2/org-content/images\
-H "Authorization: Bearer $HELM_API_KEY"\
-H "Content-Type: application/json"