Prepare an invoice upload slot (API key)
curl --request POST \
--url https://api.trysnapit.com/api/v1/invoices/upload/init \
--header 'Authorization: <api-key>'const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://api.trysnapit.com/api/v1/invoices/upload/init', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trysnapit.com/api/v1/invoices/upload/init"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text){
"invoiceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"processingStatus": "queued"
}{
"statusCode": 401,
"message": "Invalid or missing API key",
"error": "Unauthorized"
}Programmatic API
Prepare an invoice upload slot (API key)
Creates a pending invoice and returns invoiceId. Attach the file with POST /api/v1/invoices/upload/:invoiceId/file. Credits are not deducted until the file is attached.
POST
/
api
/
v1
/
invoices
/
upload
/
init
Prepare an invoice upload slot (API key)
curl --request POST \
--url https://api.trysnapit.com/api/v1/invoices/upload/init \
--header 'Authorization: <api-key>'const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://api.trysnapit.com/api/v1/invoices/upload/init', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trysnapit.com/api/v1/invoices/upload/init"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text){
"invoiceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"processingStatus": "queued"
}{
"statusCode": 401,
"message": "Invalid or missing API key",
"error": "Unauthorized"
}Authorizations
Bearer sk_live_… (include the Bearer prefix)

