Support Hub Help Desk

Adding images to articles via the API

Last updated on Nov 30, 2026

If you manage your knowledge base through the API, for example to sync documentation from a Git repository, you can upload images and use them in article bodies.

Uploading images needs a token of an admin, or of an agent with the Manage Articles permission.

1. Upload the image

Send the image as multipart/form-data in a field named file:

curl https://yoursubdomain.support-hub.io/api/images \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -F "file=@screenshot.png"

The response contains the image's public URL:

{
  "data": {
    "url": "https://…/images/3fGk2….png",
    "path": "assets/…/images/3fGk2….png"
  }
}
  • Accepted formats: JPG, PNG, GIF, BMP and WebP, up to 10 MB.
  • Images wider than 1920px are scaled down. Send q=medium to scale them to 1080px instead.
  • GIFs are stored as they are, so animations keep working.
  • You can upload up to 60 images per minute.

2. Use the URL in the article

Put the URL in an <img> tag in the article's body when you create or update the article:

curl -X PATCH https://yoursubdomain.support-hub.io/api/articles/42 \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"body": "<p>Click Save:</p><p><img src=\"https://…/images/3fGk2….png\" alt=\"The Save button\"></p>"}'

See the API reference for all article fields.

Was this article helpful?Sign in to rate this article
© Support Hub Help Desk