# How to upload images to articles via API?

Articles can include images hosted by Help.Center. Upload the file first, then
reference the returned URL in your article HTML.


UPLOAD AN IMAGE

POST /v0/centers/:centerId/articles/images
POST /v0/centers/:centerId/articles/:articleId/images

Both endpoints behave the same — the article-specific variant is optional.
Requires the content.write scope.

Send the file as multipart/form-data with the field name image:

curl -s -X POST \
  -H "Authorization: Bearer $HC_API_KEY" \
  -F "image=@/path/to/screenshot.png" \
  "https://api.help.center/v0/centers/$HC_CENTER_ID/articles/images"


CONSTRAINTS

 * Maximum file size: 10 MB
 * Supported formats: JPEG, PNG, GIF, WebP, SVG
 * The multipart field name must be image


RESPONSE

{
  "success": true,
  "data": {
    "url": "https://cdn.help.center/images/...",
    "filename": "screenshot.png",
    "size": 1024576
  }
}


USE THE IMAGE IN AN ARTICLE

Reference the returned url in your draft HTML, then update the draft:

<img src="https://cdn.help.center/images/..." alt="The settings page with the API tab open">

Tip

> Always set a descriptive alt attribute. It improves accessibility and gives
> the AI more context when it reads your articles to answer customers.


NEXT STEPS

 * How to create and publish help articles via API?
   [https://developers.help.center/article/1013-how-to-create-and-publish-help-articles-via-api]