Getting Started
At Auco, to give you full control over the integration with each created process, we offer a webhook system that allows you to receive notifications at each stage of every workflow, from start to finish.
For configuring the webhook, there are two ways, via the API and the web platform:
Creating from app.auco.ai:
You must be an admin or have admin permissions to configure this. From the platform, you can only create one webhook, which will be the 'default' webhook.
- Log in with your email and password.
- Go to your profile at www.auco.ai/profile
- Enter the development options
- At the bottom, you will find options to modify your webhook and authentication headers if needed.
Creating via the Auco API
🆕 Yes! Through the API you can create multiple webhooks. Each webhook must have an id. Your first webhook must have the id 'default', which is where all notifications will be sent by default; subsequent webhooks can have any id you prefer.
To define which webhooks will receive notifications for the process states, you must save the list of webhook ids during document creation.
Authentication
Include your private key in the Authorization
header.
Authorization: prk_xxx...
Webhook Creation Parameters
Name | Type | Required | Description |
---|---|---|---|
id | String | Required | Identifier name of the webhook, the first webhook must be default . |
description | String | Required | Description of the webhook's purpose. |
header | Boolean | Optional | Parameter where the authentication header is registered. |
key | String | Conditional | When sending a header, the authentication key is required. |
value | String | Conditional | When sending a header, the authentication value is required. |
Usage Example:
Creating Multiple Webhooks
- Curl
- Python
- NodeJs
curl --location --request PUT 'https://dev.auco.ai/v1.5/ext/company' \
--header 'Authorization: prk_private_key_company' \
--header 'Content-Type: application/json' \
--data '{"webhooks":[
{
"id": "default",
"description": "It'\''s my first webhook",
"url": "https://...",
"header": {
"key": "Authorization",
"value": "{Bearer ...}"
}
},
{
"id": "Billing",
"description": "It'\''s billing webhook",
"url": "https://...",
"header": {
"key": "Authorization",
"value": "Bearer ..."
}
}
]}'
import requests
import json
url = "https://dev.auco.ai/v1.5/ext/company"
payload = json.dumps({
"webhooks": [
{
"id": "default",
"description": "It's my first webhook",
"url": "https://...",
"header": {
"key": "Authorization",
"value": "{Bearer ...}"
}
},
{
"id": "Billing",
"description": "It's billing webhook",
"url": "https://...",
"header": {
"key": "Authorization",
"value": "Bearer ..."
}
}
]
})
headers = {
'Authorization': 'prk_private_key_company',
'Content-Type': 'application/json'
}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
const axios = require('axios');
let data = JSON.stringify({
webhooks: [
{
id: 'default',
description: "It's my first webhook",
url: 'https://...',
header: {
key: 'Authorization',
value: '{Bearer ...}',
},
},
{
id: 'Billing',
description: "It's billing webhook",
url: 'https://...',
header: {
key: 'Authorization',
value: 'Bearer ...',
},
},
],
});
let config = {
method: 'put',
maxBodyLength: Infinity,
url: 'https://dev.auco.ai/v1.5/ext/company',
headers: {
Authorization: 'prk_private_key_company',
'Content-Type': 'application/json',
},
data: data,
};
axios
.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
⚠️ Error Responses
Code | Description |
---|---|
400 | Missing the 'default' webhook |
401 | Invalid or missing authentication |