Create an integration hook
curl --request POST \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/integrations/hooks \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"app_id": 1,
"inbox_id": 1,
"status": 1,
"settings": {}
}
'const options = {
method: 'POST',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({app_id: 1, inbox_id: 1, status: 1, settings: {}})
};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/integrations/hooks', 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}/integrations/hooks"
payload = {
"app_id": 1,
"inbox_id": 1,
"status": 1,
"settings": {}
}
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"app_id": "<string>",
"inbox_id": "<string>",
"account_id": "<string>",
"status": true,
"hook_type": true,
"settings": {}
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Integrations
Create an integration hook
Create an integration hook
POST
/
api
/
v1
/
accounts
/
{account_id}
/
integrations
/
hooks
Create an integration hook
curl --request POST \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/integrations/hooks \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"app_id": 1,
"inbox_id": 1,
"status": 1,
"settings": {}
}
'const options = {
method: 'POST',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({app_id: 1, inbox_id: 1, status: 1, settings: {}})
};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/integrations/hooks', 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}/integrations/hooks"
payload = {
"app_id": 1,
"inbox_id": 1,
"status": 1,
"settings": {}
}
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"app_id": "<string>",
"inbox_id": "<string>",
"account_id": "<string>",
"status": true,
"hook_type": true,
"settings": {}
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Authorizations
Token de usuario. Envía el valor en el header api_access_token. Lo obtienes en el perfil (GET /api/v1/profile) o al regenerarlo.
Path Parameters
The numeric ID of the account
Body
application/json
Response
Success
The ID of the integration hook
The ID of the integration app
Inbox ID if its an Inbox integration
Account ID of the integration
Whether the integration hook is enabled for the account
Whether its an account or inbox integration hook
The associated settings for the integration