Skip to main content
POST
/
media
/
image
Upload an image
curl --request POST \
  --url https://app.myhero.so/media/image \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "documentId": "<string>",
  "workspaceId": "<string>",
  "image": {
    "type": "Buffer",
    "data": [
      127
    ]
  }
}
'
{
  "data": {
    "url": "<string>",
    "_id": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://developers.myhero.so/llms.txt

Use this file to discover all available pages before exploring further.

Uploads an image asset and stores its metadata. The image bytes are accepted as { type: "Buffer", data: number[] } (RTK-Query encoded buffer) and uploaded to private object storage (Supabase). Returns the image record including its _id and a signed URL valid for 6 hours.

Authorizations

Authorization
string
header
required

HERO personal access token

Body

application/json
documentId
string
required
Minimum string length: 1
workspaceId
string
required
Minimum string length: 1
image
object
required

Response

200 response

data
object
required