Rotate the signing secret
POST
/v1/webhooks/{id}/rotate-secret
const url = 'https://api.orvoca.com/v1/webhooks/example/rotate-secret';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.orvoca.com/v1/webhooks/example/rotate-secret \ --header 'Authorization: Bearer <token>'The old secret stops working at once. The new one is shown only now.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Responses
Section titled “Responses”New secret
Media typeapplication/json
object
id
required
string
url
required
string
events
required
Array<string>
status
required
string
created_at
required
string
secret
required
Shown only now. Verify Orvoca-Signature with it.
string
Example
{ "events": [ "call.started" ], "status": "active"}Invalid request
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string
request_id
required
string
Example generated
{ "error": { "code": "example", "message": "example", "param": "example", "request_id": "example" }}Not signed in or bad API key
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string
request_id
required
string
Example generated
{ "error": { "code": "example", "message": "example", "param": "example", "request_id": "example" }}Not allowed
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string
request_id
required
string
Example generated
{ "error": { "code": "example", "message": "example", "param": "example", "request_id": "example" }}Not found
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string
request_id
required
string
Example generated
{ "error": { "code": "example", "message": "example", "param": "example", "request_id": "example" }}