Webhooks
Rotate signing secret
The replacement secret is revealed only in the first successful response. Repeating the same request with its Idempotency-Key returns 409 idempotent_replay_secret_unavailable without rotating again.
POST
/
v1
/
webhooks
/
{webhookId}
/
rotate-secret
Rotate signing secret
curl --request POST \
--url https://api.getmillwork.dev/v1/webhooks/{webhookId}/rotate-secret \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getmillwork.dev/v1/webhooks/{webhookId}/rotate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"created_at": "2023-11-07T05:31:56Z",
"events": [
"execution.completed"
],
"secret_version": 123,
"signing_secret": "<string>",
"status": "active",
"updated_at": "2023-11-07T05:31:56Z",
"url": "<string>",
"webhook_id": "<string>"
}{
"instance": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": 123,
"title": "<string>",
"type": "<string>",
"current_offer": {
"content_markdown": "<string>",
"display_label": "<string>",
"document_id": "<string>",
"offer_id": "<string>",
"published_url": "<string>",
"source_sha256": "<string>",
"title": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"version_id": "<string>"
},
"current_organization": {
"legal_entity_name": "<string>",
"profile_revision": 2
},
"detail": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
],
"reason": "agreement_terminated",
"retry_after_s": 123
}{
"instance": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": 123,
"title": "<string>",
"type": "<string>",
"current_offer": {
"content_markdown": "<string>",
"display_label": "<string>",
"document_id": "<string>",
"offer_id": "<string>",
"published_url": "<string>",
"source_sha256": "<string>",
"title": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"version_id": "<string>"
},
"current_organization": {
"legal_entity_name": "<string>",
"profile_revision": 2
},
"detail": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
],
"reason": "agreement_terminated",
"retry_after_s": 123
}{
"instance": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": 123,
"title": "<string>",
"type": "<string>",
"current_offer": {
"content_markdown": "<string>",
"display_label": "<string>",
"document_id": "<string>",
"offer_id": "<string>",
"published_url": "<string>",
"source_sha256": "<string>",
"title": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"version_id": "<string>"
},
"current_organization": {
"legal_entity_name": "<string>",
"profile_revision": 2
},
"detail": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
],
"reason": "agreement_terminated",
"retry_after_s": 123
}Authorizations
bearerAuthsessionCookie
Organization API key for application requests.
Path Parameters
Response
Default Response
Available options:
execution.completed, execution.failed, execution.needs_review, proposal.created The raw signing secret. Revealed exactly once, at registration or rotation; store it now.
Available options:
active, disabled ⌘I
Rotate signing secret
curl --request POST \
--url https://api.getmillwork.dev/v1/webhooks/{webhookId}/rotate-secret \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getmillwork.dev/v1/webhooks/{webhookId}/rotate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"created_at": "2023-11-07T05:31:56Z",
"events": [
"execution.completed"
],
"secret_version": 123,
"signing_secret": "<string>",
"status": "active",
"updated_at": "2023-11-07T05:31:56Z",
"url": "<string>",
"webhook_id": "<string>"
}{
"instance": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": 123,
"title": "<string>",
"type": "<string>",
"current_offer": {
"content_markdown": "<string>",
"display_label": "<string>",
"document_id": "<string>",
"offer_id": "<string>",
"published_url": "<string>",
"source_sha256": "<string>",
"title": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"version_id": "<string>"
},
"current_organization": {
"legal_entity_name": "<string>",
"profile_revision": 2
},
"detail": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
],
"reason": "agreement_terminated",
"retry_after_s": 123
}{
"instance": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": 123,
"title": "<string>",
"type": "<string>",
"current_offer": {
"content_markdown": "<string>",
"display_label": "<string>",
"document_id": "<string>",
"offer_id": "<string>",
"published_url": "<string>",
"source_sha256": "<string>",
"title": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"version_id": "<string>"
},
"current_organization": {
"legal_entity_name": "<string>",
"profile_revision": 2
},
"detail": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
],
"reason": "agreement_terminated",
"retry_after_s": 123
}{
"instance": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": 123,
"title": "<string>",
"type": "<string>",
"current_offer": {
"content_markdown": "<string>",
"display_label": "<string>",
"document_id": "<string>",
"offer_id": "<string>",
"published_url": "<string>",
"source_sha256": "<string>",
"title": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"version_id": "<string>"
},
"current_organization": {
"legal_entity_name": "<string>",
"profile_revision": 2
},
"detail": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
],
"reason": "agreement_terminated",
"retry_after_s": 123
}