Update Avatar
curl --request POST \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/companies/{id}/avatar \
--header 'Content-Type: multipart/form-data' \
--header 'api_access_token: <api-key>' \
--form avatar='@example-file'const form = new FormData();
form.append('avatar', '<string>');
const options = {method: 'POST', headers: {api_access_token: '<api-key>'}};
options.body = form;
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/companies/{id}/avatar', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v1/accounts/{account_id}/companies/{id}/avatar"
files = { "avatar": ("example-file", open("example-file", "rb")) }
headers = {"api_access_token": "<api-key>"}
response = requests.post(url, files=files, headers=headers)
print(response.text){
"id": 123,
"name": "<string>",
"contacts_count": 123,
"domain": "<string>",
"description": "<string>",
"avatar_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"contacts": [
{
"id": 123,
"name": "<string>",
"email": "<string>",
"thumbnail": "<string>"
}
]
}Companies
Update Avatar
Update or remove company avatar
POST
/
api
/
v1
/
accounts
/
{account_id}
/
companies
/
{id}
/
avatar
Update Avatar
curl --request POST \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/companies/{id}/avatar \
--header 'Content-Type: multipart/form-data' \
--header 'api_access_token: <api-key>' \
--form avatar='@example-file'const form = new FormData();
form.append('avatar', '<string>');
const options = {method: 'POST', headers: {api_access_token: '<api-key>'}};
options.body = form;
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/companies/{id}/avatar', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v1/accounts/{account_id}/companies/{id}/avatar"
files = { "avatar": ("example-file", open("example-file", "rb")) }
headers = {"api_access_token": "<api-key>"}
response = requests.post(url, files=files, headers=headers)
print(response.text){
"id": 123,
"name": "<string>",
"contacts_count": 123,
"domain": "<string>",
"description": "<string>",
"avatar_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"contacts": [
{
"id": 123,
"name": "<string>",
"email": "<string>",
"thumbnail": "<string>"
}
]
}Authorizations
Body
multipart/form-data