result = client.webhooks.set_signing_secret()
secret = result.data.signing_secret
const result = await client.webhooks.setSigningSecret();
const secret = result.data?.signingSecret;
curl -X POST 'https://api.hydradb.com/webhooks/indexing/signing-secret' \
-H "Authorization: Bearer $HYDRA_DB_API_KEY" \
-H "API-Version: 2"
{
"data": {
"generated": true,
"message": "Success",
"signing_secret": "whsec_EXAMPLE_ONLY_THIS_IS_NOT_A_REAL_SIGNING_KEY"
},
"error": null,
"meta": {
"collection": "team_docs",
"database": "acme_corp",
"latency_ms": 12.3,
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d",
"source_type": "file",
"sub_tenant_id": "sub_tenant_4567",
"tenant_id": "tenant_1234"
},
"success": true
}{
"data": "<unknown>",
"detail": {
"deprecated": true,
"deprecated_field": "tenant_id",
"error_code": "VALIDATION_ERROR",
"message": "Request validation failed",
"preferred_field": "database"
},
"error": {
"code": "DATABASE_NOT_FOUND",
"message": "Database not found"
},
"meta": {
"latency_ms": 12.3,
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d"
},
"success": false
}{
"data": "<unknown>",
"detail": {
"deprecated": true,
"deprecated_field": "tenant_id",
"error_code": "VALIDATION_ERROR",
"message": "Request validation failed",
"preferred_field": "database"
},
"error": {
"code": "DATABASE_NOT_FOUND",
"message": "Database not found"
},
"meta": {
"latency_ms": 12.3,
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d"
},
"success": false
}Webhooks
Set Signing Secret
Generate or replace the secret used to sign webhook deliveries.
POST
/
webhooks
/
indexing
/
signing-secret
result = client.webhooks.set_signing_secret()
secret = result.data.signing_secret
const result = await client.webhooks.setSigningSecret();
const secret = result.data?.signingSecret;
curl -X POST 'https://api.hydradb.com/webhooks/indexing/signing-secret' \
-H "Authorization: Bearer $HYDRA_DB_API_KEY" \
-H "API-Version: 2"
{
"data": {
"generated": true,
"message": "Success",
"signing_secret": "whsec_EXAMPLE_ONLY_THIS_IS_NOT_A_REAL_SIGNING_KEY"
},
"error": null,
"meta": {
"collection": "team_docs",
"database": "acme_corp",
"latency_ms": 12.3,
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d",
"source_type": "file",
"sub_tenant_id": "sub_tenant_4567",
"tenant_id": "tenant_1234"
},
"success": true
}{
"data": "<unknown>",
"detail": {
"deprecated": true,
"deprecated_field": "tenant_id",
"error_code": "VALIDATION_ERROR",
"message": "Request validation failed",
"preferred_field": "database"
},
"error": {
"code": "DATABASE_NOT_FOUND",
"message": "Database not found"
},
"meta": {
"latency_ms": 12.3,
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d"
},
"success": false
}{
"data": "<unknown>",
"detail": {
"deprecated": true,
"deprecated_field": "tenant_id",
"error_code": "VALIDATION_ERROR",
"message": "Request validation failed",
"preferred_field": "database"
},
"error": {
"code": "DATABASE_NOT_FOUND",
"message": "Database not found"
},
"meta": {
"latency_ms": 12.3,
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d"
},
"success": false
}Generates a signing secret for an existing webhook, or replaces it with the
To enable signing when creating a webhook, use
signing_secret you supply. A supplied secret must contain at least 16 characters. The secret is returned once in data.signing_secret; store it securely, since it cannot be read back.
Rotation takes effect immediately. If you supply your own secret, configure your receiver to accept it before making this call. See Secret rotation.
result = client.webhooks.set_signing_secret()
secret = result.data.signing_secret
const result = await client.webhooks.setSigningSecret();
const secret = result.data?.signingSecret;
curl -X POST 'https://api.hydradb.com/webhooks/indexing/signing-secret' \
-H "Authorization: Bearer $HYDRA_DB_API_KEY" \
-H "API-Version: 2"
generate_signing_secret: true on Register Webhook. If no webhook is registered, this endpoint returns 404.
Related resources
- Webhooks guide: verify signatures on your receiver
- Send Test Delivery: check signature verification
- Disable Signing: remove the secret
Authorizations
Send your API key as Authorization: Bearer <your_api_key>.
Body
application/json
Omit the body to have a secret generated for you
Secret for signing webhook deliveries, at least 16 characters. Omit it or send null to generate one.
Example:
"whsec_EXAMPLE_ONLY_THIS_IS_NOT_A_REAL_SIGNING_KEY"
Response
OK
Show child attributes
Show child attributes
Example:
{
"generated": true,
"message": "Success",
"signing_secret": "whsec_EXAMPLE_ONLY_THIS_IS_NOT_A_REAL_SIGNING_KEY"
}
Error details on failure, or null on success.
Show child attributes
Show child attributes
Example:
null
Show child attributes
Show child attributes
Example:
{
"collection": "team_docs",
"database": "acme_corp",
"latency_ms": 12.3,
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d",
"source_type": "file",
"sub_tenant_id": "sub_tenant_4567",
"tenant_id": "tenant_1234"
}
Whether the request succeeded.
Example:
true
Was this page helpful?
