Regenerate instance API key
curl --request PUT \
--url https://api.wsapi.chat/account/instances/{id}/apikey \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.wsapi.chat/account/instances/{id}/apikey"
headers = {"X-Api-Key": "<api-key>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.wsapi.chat/account/instances/{id}/apikey', 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}/apikey");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Api-Key", "<api-key>");
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
"<string>"{
"status": 400,
"detail": "invalid request body"
}{
"status": 401,
"detail": "unauthorized"
}{
"status": 404,
"detail": "not found"
}Account
Regenerate instance API key
Generates a new API key for the instance. Previous key is immediately invalidated.
PUT
/
account
/
instances
/
{id}
/
apikey
Regenerate instance API key
curl --request PUT \
--url https://api.wsapi.chat/account/instances/{id}/apikey \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.wsapi.chat/account/instances/{id}/apikey"
headers = {"X-Api-Key": "<api-key>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.wsapi.chat/account/instances/{id}/apikey', 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}/apikey");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Api-Key", "<api-key>");
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
"<string>"{
"status": 400,
"detail": "invalid request body"
}{
"status": 401,
"detail": "unauthorized"
}{
"status": 404,
"detail": "not found"
}⌘I