Connect an external integration webhook route and rotate matching signing secrets
curl --request POST \
--url https://api.acornops.dev/api/v1/external-integrations/webhook-routes/connect \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-acornops-external-user-id: <x-acornops-external-user-id>' \
--data '
{
"deliveryUrl": "https://bot.example.com/acornops/webhooks/routes/route-token"
}
'const options = {
method: 'POST',
headers: {
'x-acornops-external-user-id': '<x-acornops-external-user-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({deliveryUrl: 'https://bot.example.com/acornops/webhooks/routes/route-token'})
};
fetch('https://api.acornops.dev/api/v1/external-integrations/webhook-routes/connect', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "unconfigured",
"connectedAt": "2023-11-07T05:31:56Z",
"lastSyncedAt": "2023-11-07T05:31:56Z",
"subscriptions": [
{
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceName": "<string>",
"webhookId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"eventTypes": [
"<string>"
],
"enabled": true,
"status": "enabled",
"updatedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"targetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"signingSecret": "<string>"
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}Webhooks
Connect an external integration webhook route and rotate matching signing secrets
Connect an external integration webhook route and rotate matching signing secrets
curl --request POST \
--url https://api.acornops.dev/api/v1/external-integrations/webhook-routes/connect \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-acornops-external-user-id: <x-acornops-external-user-id>' \
--data '
{
"deliveryUrl": "https://bot.example.com/acornops/webhooks/routes/route-token"
}
'const options = {
method: 'POST',
headers: {
'x-acornops-external-user-id': '<x-acornops-external-user-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({deliveryUrl: 'https://bot.example.com/acornops/webhooks/routes/route-token'})
};
fetch('https://api.acornops.dev/api/v1/external-integrations/webhook-routes/connect', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "unconfigured",
"connectedAt": "2023-11-07T05:31:56Z",
"lastSyncedAt": "2023-11-07T05:31:56Z",
"subscriptions": [
{
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceName": "<string>",
"webhookId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"eventTypes": [
"<string>"
],
"enabled": true,
"status": "enabled",
"updatedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"targetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"signingSecret": "<string>"
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Example:
"external-user-1"
Body
application/json
Example:
"https://bot.example.com/acornops/webhooks/routes/route-token"
Response
External webhook route state. Connected subscriptions include freshly rotated signing secrets.