Upload template body image
curl --request POST \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/contract_templates/{contract_template_id}/images \
--header 'Content-Type: multipart/form-data' \
--header 'api_access_token: <api-key>' \
--form file=@example-fileconst form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {api_access_token: '<api-key>'}};
options.body = form;
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/contract_templates/{contract_template_id}/images', 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}/contract_templates/{contract_template_id}/images"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"api_access_token": "<api-key>"}
response = requests.post(url, files=files, headers=headers)
print(response.text){
"src": "<string>",
"alt": "<string>",
"signedId": "<string>"
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{}{}Contract Templates
Upload template body image
Upload an image (png, jpeg, webp or gif) used in the editable body of a template.
POST
/
api
/
v1
/
accounts
/
{account_id}
/
contract_templates
/
{contract_template_id}
/
images
Upload template body image
curl --request POST \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/contract_templates/{contract_template_id}/images \
--header 'Content-Type: multipart/form-data' \
--header 'api_access_token: <api-key>' \
--form file=@example-fileconst form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {api_access_token: '<api-key>'}};
options.body = form;
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/contract_templates/{contract_template_id}/images', 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}/contract_templates/{contract_template_id}/images"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"api_access_token": "<api-key>"}
response = requests.post(url, files=files, headers=headers)
print(response.text){
"src": "<string>",
"alt": "<string>",
"signedId": "<string>"
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{}{}Was this page helpful?