curl --request POST \
--url https://api.ctrl-hub.com/v3/orgs/{org_id}/media/images \
--header 'Content-Type: application/vnd.api+json' \
--header 'X-Session-Token: <api-key>' \
--data '
{
"data": {
"type": "<string>",
"attributes": {
"content": "<string>"
}
}
}
'{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"attributes": {
"content": "<string>",
"mime_type": "<string>",
"extension": "<string>",
"width": 2,
"height": 2,
"bytes": 1
},
"meta": {
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"relationships": {
"organisation": {
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>"
}
},
"author": {
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>"
}
}
}
},
"jsonapi": {
"version": "<string>"
}
}Uploads a new image and returns the ID. Images are processed in the background, so after uploading, you can poll the image resource URL to get additional information post processing
curl --request POST \
--url https://api.ctrl-hub.com/v3/orgs/{org_id}/media/images \
--header 'Content-Type: application/vnd.api+json' \
--header 'X-Session-Token: <api-key>' \
--data '
{
"data": {
"type": "<string>",
"attributes": {
"content": "<string>"
}
}
}
'{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"attributes": {
"content": "<string>",
"mime_type": "<string>",
"extension": "<string>",
"width": 2,
"height": 2,
"bytes": 1
},
"meta": {
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"relationships": {
"organisation": {
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>"
}
},
"author": {
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>"
}
}
}
},
"jsonapi": {
"version": "<string>"
}
}Session token for authentication.
The unique identifier for the organisation.
The image to create.
Show child attributes