Uploads a file to the forum to use in topics.

Note! By default this method is not available for a trial period!

Resource urls

Upload files (all types, include image) to use as an attachments.
https://Your project.userecho.com/api/v2/forums/[forum_id]/upload/file.json

Upload images only to use as a embedded image in the topic's context.
https://Your project.userecho.com/api/v2/forums/[forum_id]/upload/image.json

Parameters

Parameter Value Required? Default Options Description
content file yes - - See examples

Request example #1

curl https://myproject.userecho.com/api/v2/forums/1/upload/file.json?access_token=your_api_token -X POST -F "content=@your_file_name.txt"

Request example #2

curl https://myproject.userecho.com/api/v2/forums/1/upload/image.json?access_token=your_api_token -X POST -F "content=@your_file_name.png"

Response example

{
    "status": "success",
    "data": {
        "forum": {
            "id": 1,
            "name": "General"
        },
        "created": "2016-05-06T01:57:20.167Z",
        "url": "/s/attachments/1/1/1/07632e5091e6953e9b7e6031f0475006.jpg",
        "user": {
            "id": 1
        },
        "original_filename": "ue_invoice_logo.jpg",
        "type": "image",
        "id": 35
    }
}