Upload Article

  • REST Method: POST
  • URL: https://docsapi.helpscout.net/v1/articles/upload
  • Content-Type: multipart/form-data

Use this endpoint to create a new article from an uploaded file. HTML, plain text and Markdown files are accepted.

Example Curl Request

curl -v -XPOST --user API_KEY:X \
  https://docsapi.helpscout.net/v1/articles/upload?reload=true \
  -H 'content-type: multipart/form-data' \
  -F collectionId=COLLECTION_ID \
  -F key=API_KEY \
  -F file=@FILE.EXTENSION

Request

Name Type Required Default Notes
key String Y   An API key used to authenticate this request.
collectionId String Y   The id of the collection the article will be associated with.
name String N File name The name of the article. If no name is specified, the name of the uploaded file will be used.
slug String N   SEO-friendly identifier for the article that can be used in a URL. If this is not specified, one will be auto-generated from the name of the article. Note that a slug cannot be used to GET an article.
categoryId String N   The id of the category that the article is associated with. If no category id is specified, the article will be Uncategorized.
type String N  
  • html
  • text
  • markdown
The API will attempt to automatically detect Markdown (based on file extension) and convert it to HTML. To override this and force the text to be converted, set this value to markdown..
file File Y   The file that contains the article text.
reload boolean N false Set this request parameter to true to return the created article in the response.

Response

Response Name Type Notes
Header Status Integer 201
Status: 201 Created
Location: https://docsapi.helpscout.net/v1/articles/{id}