Update instance settings
curl --request PUT \
--url https://api.wsapi.chat/account/instances/{id}/settings \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"useCustomDefaults": true,
"pullMode": true,
"webhookUrl": "<string>",
"eventSigningSecret": "<string>",
"historySync": true,
"eventFilters": [
"<string>"
]
}
'import requests
url = "https://api.wsapi.chat/account/instances/{id}/settings"
payload = {
"useCustomDefaults": True,
"pullMode": True,
"webhookUrl": "<string>",
"eventSigningSecret": "<string>",
"historySync": True,
"eventFilters": ["<string>"]
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
useCustomDefaults: true,
pullMode: true,
webhookUrl: '<string>',
eventSigningSecret: '<string>',
historySync: true,
eventFilters: ['<string>']
})
};
fetch('https://api.wsapi.chat/account/instances/{id}/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));using RestSharp;
var options = new RestClientOptions("https://api.wsapi.chat/account/instances/{id}/settings");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Api-Key", "<api-key>");
request.AddJsonBody("{\n \"useCustomDefaults\": true,\n \"pullMode\": true,\n \"webhookUrl\": \"<string>\",\n \"eventSigningSecret\": \"<string>\",\n \"historySync\": true,\n \"eventFilters\": [\n \"<string>\"\n ]\n}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);{
"status": 400,
"detail": "invalid request body"
}{
"status": 401,
"detail": "unauthorized"
}{
"status": 404,
"detail": "not found"
}Account
Update instance settings
PUT
/
account
/
instances
/
{id}
/
settings
Update instance settings
curl --request PUT \
--url https://api.wsapi.chat/account/instances/{id}/settings \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"useCustomDefaults": true,
"pullMode": true,
"webhookUrl": "<string>",
"eventSigningSecret": "<string>",
"historySync": true,
"eventFilters": [
"<string>"
]
}
'import requests
url = "https://api.wsapi.chat/account/instances/{id}/settings"
payload = {
"useCustomDefaults": True,
"pullMode": True,
"webhookUrl": "<string>",
"eventSigningSecret": "<string>",
"historySync": True,
"eventFilters": ["<string>"]
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
useCustomDefaults: true,
pullMode: true,
webhookUrl: '<string>',
eventSigningSecret: '<string>',
historySync: true,
eventFilters: ['<string>']
})
};
fetch('https://api.wsapi.chat/account/instances/{id}/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));using RestSharp;
var options = new RestClientOptions("https://api.wsapi.chat/account/instances/{id}/settings");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Api-Key", "<api-key>");
request.AddJsonBody("{\n \"useCustomDefaults\": true,\n \"pullMode\": true,\n \"webhookUrl\": \"<string>\",\n \"eventSigningSecret\": \"<string>\",\n \"historySync\": true,\n \"eventFilters\": [\n \"<string>\"\n ]\n}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);{
"status": 400,
"detail": "invalid request body"
}{
"status": 401,
"detail": "unauthorized"
}{
"status": 404,
"detail": "not found"
}Authorizations
Customer API key. Only the customer-level key is accepted for /account/* endpoints. No X-Instance-Id header is required.
Path Parameters
Body
application/json
Response
Settings updated
⌘I