Update company
Service to update your company data: name, logo, visual customization (white label) and webhooks. All fields are optional; only the ones you send are modified.
PUT /v1.5/ext/company HTTP/1.1
HOST: {{api_auco}}
Authorization: {{private_key}}
Authentication
Include your private key in the Authorization header.
Authorization: prk_xxx...
Update parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | String | Optional | Company name. |
image | String | Optional | URL of the company logo. |
uxOptions | Object | Optional | Visual customization options (white label). Only the sent keys are updated (see merge note). |
uxOptions.primaryColor | String | Conditional | Brand primary color in hexadecimal format (#RGB or #RRGGBB). Cannot be white (#fff / #ffffff). |
uxOptions.alternateColor | String | Conditional | Brand secondary color in hexadecimal format (#RGB or #RRGGBB). |
webhooks | Array | Optional | Complete list of webhooks. Replaces the existing configuration (minimum 1, must include the default). See Webhooks. |
uxOptions is updated per fieldWhen you send uxOptions, only the keys included in the request are modified; the rest of the saved customization is preserved. For example, sending only primaryColor does not erase the already configured alternateColor.
webhooks replaces the complete listUnlike uxOptions, the webhooks array fully replaces the saved list. To keep existing webhooks you must include them in the request, and the list must always contain the webhook with id: "default". See the Webhooks section for the detail of each field.
🧪 Usage examples
Update name, logo and colors
- Curl
- Python
- Node.js
curl -X PUT 'https://dev.auco.ai/v1.5/ext/company' \
-H 'Authorization: prk_private_key_company' \
-H 'Content-Type: application/json' \
-d '{
"name": "Mi Empresa",
"image": "https://miempresa.com/logo.png",
"uxOptions": {
"primaryColor": "#021C30",
"alternateColor": "#A557F2"
}
}'
import requests
import json
url = "https://dev.auco.ai/v1.5/ext/company"
payload = json.dumps({
"name": "Mi Empresa",
"image": "https://miempresa.com/logo.png",
"uxOptions": {
"primaryColor": "#021C30",
"alternateColor": "#A557F2"
}
})
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');
const data = JSON.stringify({
name: 'Mi Empresa',
image: 'https://miempresa.com/logo.png',
uxOptions: {
primaryColor: '#021C30',
alternateColor: '#A557F2'
}
});
const 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
};
axios
.request(config)
.then((response) => console.log(JSON.stringify(response.data)))
.catch((error) => console.log(error));
Configure webhooks
Remember to send the complete list of webhooks, always including the default. For the detail of each field see the Webhooks section.
- Curl
- Python
- Node.js
curl -X PUT 'https://dev.auco.ai/v1.5/ext/company' \
-H 'Authorization: prk_private_key_company' \
-H 'Content-Type: application/json' \
-d '{
"webhooks": [
{
"id": "default",
"description": "Webhook principal",
"url": "https://miempresa.com/webhooks/auco",
"header": { "key": "Authorization", "value": "Bearer ..." }
},
{
"id": "billing",
"description": "Webhook de facturación",
"url": "https://miempresa.com/webhooks/billing"
}
]
}'
import requests
import json
url = "https://dev.auco.ai/v1.5/ext/company"
payload = json.dumps({
"webhooks": [
{
"id": "default",
"description": "Webhook principal",
"url": "https://miempresa.com/webhooks/auco",
"header": { "key": "Authorization", "value": "Bearer ..." }
},
{
"id": "billing",
"description": "Webhook de facturación",
"url": "https://miempresa.com/webhooks/billing"
}
]
})
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');
const data = JSON.stringify({
webhooks: [
{
id: 'default',
description: 'Webhook principal',
url: 'https://miempresa.com/webhooks/auco',
header: { key: 'Authorization', value: 'Bearer ...' }
},
{
id: 'billing',
description: 'Webhook de facturación',
url: 'https://miempresa.com/webhooks/billing'
}
]
});
const 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
};
axios
.request(config)
.then((response) => console.log(JSON.stringify(response.data)))
.catch((error) => console.log(error));
📥 Response example
{
"response": "OK"
}
⚠️ Error Responses
| Code | Description |
|---|---|
| 400 | Invalid data: color outside hexadecimal format, primaryColor set to white, or missing default webhook. |
| 401 | Invalid or missing authentication. |