Upload an attachment
curl --request POST \
--url https://back.leap.onclarity.com/api/attachment/upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@example-fileimport requests
url = "https://back.leap.onclarity.com/api/attachment/upload"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://back.leap.onclarity.com/api/attachment/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"original_filename": "<string>",
"stored_filename": "<string>",
"mime_type": "<string>",
"file_size": 123,
"file_path": "<string>",
"download_url": "<string>"
}{
"code": "<string>",
"status": "error",
"message": "<string>",
"extra": {}
}{
"code": "<string>",
"status": "error",
"message": "<string>",
"extra": {}
}Messages
Upload an attachment
POST
/
api
/
attachment
/
upload
Upload an attachment
curl --request POST \
--url https://back.leap.onclarity.com/api/attachment/upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@example-fileimport requests
url = "https://back.leap.onclarity.com/api/attachment/upload"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://back.leap.onclarity.com/api/attachment/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"original_filename": "<string>",
"stored_filename": "<string>",
"mime_type": "<string>",
"file_size": 123,
"file_path": "<string>",
"download_url": "<string>"
}{
"code": "<string>",
"status": "error",
"message": "<string>",
"extra": {}
}{
"code": "<string>",
"status": "error",
"message": "<string>",
"extra": {}
}Authorizations
Your organization API key (it starts with anek_org_). The same key works on the Voice API and the Support API. See Authentication.
Body
multipart/form-data