Upload an attachment

This API helps you to upload a single file attachment. It gives you the response as a new id, which can be used to send with create, reply, and note APIs.

HTTP Request
/wp-json/supportcandy/v2/attachments
Available body parameters
Parameter Type Description
file file File to be uploaded in the request body.
Example

curl --location --request POST 'http://localhost/wp-json/supportcandy/v2/attachments' \ --header 'Authorization: Basic YWRtaW46bjVJWSBYc3pUIGlxN3MgSHhKWCA3YVdBIDlOblI=' \ --form 'file=@"/Users/johndoe/Desktop/logo.png"'

Get single attachment

This API helps you to list a single attachment.

HTTP Request
/wp-json/supportcandy/v2/attachments/<id>
Example

curl --location --request GET 'http://localhost/wp-json/supportcandy/v2/attachments/23' \ --header 'Authorization: Basic YWRtaW46bjVJWSBYc3pUIGlxN3MgSHhKWCA3YVdBIDlOblI='

What are your feelings