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": "team_docs",
"tenant_id": "acme_corp"
},
"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
}Set Signing Secret
Generate or replace the secret used to sign webhook deliveries.
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": "team_docs",
"tenant_id": "acme_corp"
},
"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
}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
API key sent as a Bearer token: "Bearer prefix.secret"
Body
Omit the body to have a secret generated for you
Secret used to sign webhook payloads. Deliveries carry X-HydraDB-Signature: sha256=<hex>, the HMAC-SHA256 of the raw request body keyed by this secret. Minimum 16 characters when you supply your own; omit it and one is generated for you. On registration, omitting this field preserves any existing secret - to disable signing, call DELETE /webhooks/indexing/signing-secret.
"whsec_EXAMPLE_ONLY_THIS_IS_NOT_A_REAL_SIGNING_KEY"
Response
OK
Show child attributes
Show child attributes
{
"generated": true,
"message": "Success",
"signing_secret": "whsec_EXAMPLE_ONLY_THIS_IS_NOT_A_REAL_SIGNING_KEY"
}
Null on success; an object with code and message on failure.
Show child attributes
Show child attributes
null
Show child attributes
Show child attributes
{
"collection": "team_docs",
"database": "acme_corp",
"latency_ms": 12.3,
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d",
"source_type": "file",
"sub_tenant_id": "team_docs",
"tenant_id": "acme_corp"
}
Whether the request succeeded.
true
Was this page helpful?
