Rotate a webhook endpoint's secret
POST
/v1/webhook_endpoints/{id}/rotate_secret
const url = 'https://api.learningaide.ai/v1/webhook_endpoints/example/rotate_secret';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{}'};
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.learningaide.ai/v1/webhook_endpoints/example/rotate_secret \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{}'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Request Body
Section titled “Request Body”Media typeapplication/json
object
Example generated
{}Responses
Section titled “Responses”The request succeeded.
Media typeapplication/json
object
Example
{ "object": "webhook_endpoint", "events": [ "*" ], "status": "enabled"}Headers
Section titled “Headers”X-Request-Id
required
string
This request’s ID. Quote it when you contact support.
RateLimit-Limit
integer
Requests allowed per window.
RateLimit-Remaining
integer
Requests left in the current window.
RateLimit-Reset
integer
Seconds until the window resets.
default
Section titled “default”An error (client docs, “Errors”).
Media typeapplication/json
Headers
Section titled “Headers”X-Request-Id
required
string
This request’s ID. Quote it when you contact support.
RateLimit-Limit
integer
Requests allowed per window.
RateLimit-Remaining
integer
Requests left in the current window.
RateLimit-Reset
integer
Seconds until the window resets.
Retry-After
integer
Seconds to wait before asking again.