> For the complete documentation index, see [llms.txt](https://docs.channex.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.channex.io/api-v.1-documentation/webhook-collection/delete-signing-key-api.md). Agents can also search and read this documentation through its [MCP server](https://docs.channex.io/~gitbook/mcp).

# Delete Signing Key API

## Delete a signing key

> Delete a signing key. A key a webhook still signs with cannot be deleted: the request\
> answers \`422\` naming the key. Re-point or delete those webhooks first.

```json
{"openapi":"3.1.0","info":{"title":"Channex.io — Public API","version":"0.0.0"},"tags":[{"name":"Webhook Signing Keys","description":"HMAC keys that sign webhook deliveries, so that a receiving endpoint can tell that a\ncallback came from Channex and that its body was not altered on the way.\n\nA key is a shared secret: Channex holds it and so do you. It is not an API credential\n— it authenticates nothing against this API and grants no access. It is used in one\ndirection only, on the callbacks Channex sends to you.\n\nA key belongs to a billing account and holds up to two secret versions — the current\none plus an optional pending one, which is what makes rotation zero-downtime. To turn\nsigning on, point a webhook at the key with `signing_key_id` and set `is_signed`.\n\n## What is signed\n\nEvery delivery of a signed webhook — the `POST` Channex makes to the webhook's\n`callback_url` — carries three headers:\n\n- `x-hmac-timestamp` — Unix timestamp (seconds) taken when the delivery was signed.\n- `x-hmac-signature-256` — comma-separated lowercase-hex HMAC-SHA256 signatures, one\n  per secret version of the key, the current version first.\n- `x-hmac-keys-256` — comma-separated version labels (`...` followed by each secret's\n  last 6 characters), in the same order as the signatures.\n\nEach signature is computed over the string `{timestamp}.{raw request body}`: the value\nof `x-hmac-timestamp`, a dot, and the exact bytes of that delivery's body. Nothing else\nenters it — neither the callback URL nor the webhook's `request_params` and `headers`.\n\n## Verifying a delivery\n\nRecompute HMAC-SHA256 over `{timestamp}.{raw body}` with your stored secret, then\ncompare it against the signature at the position whose label in `x-hmac-keys-256` ends\nwith your secret's last 6 characters.\n\n## Rotating a key\n\n`generate` adds a pending secret version beside the current one, and deliveries are\nthen signed with both — so verification against the current secret keeps working while\nthe new secret is stored on your side. `rotate` promotes the newest version to be the\nsole current version, after which deliveries carry its signature alone."}],"servers":[{"url":"https://app.channex.io/api/v1","description":"Production server","variables":{}},{"url":"https://staging.channex.io/api/v1","description":"Staging server","variables":{}}],"security":[{"UserApiKeyAuth":[]}],"components":{"securitySchemes":{"UserApiKeyAuth":{"type":"apiKey","in":"header","name":"user-api-key","description":"API key for programmatic access, sent in the `user-api-key` header."}},"schemas":{"Common.Scalars.id":{"type":"string","format":"uuid"},"Common.JsonApi.SuccessMessage":{"type":"object","required":["meta"],"properties":{"meta":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}},"description":"Success response carrying only a meta message (no resource body)."},"Common.Errors.Unauthorized":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"title":{"type":"string","enum":["Unauthorized"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"Authentication credentials are missing or invalid."},"Common.Errors.Forbidden":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["forbidden"]},"title":{"type":"string","enum":["Forbidden"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The authenticated user lacks permission to perform this action."},"Common.Errors.NotFound":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["resource_not_found"]},"title":{"type":"string","enum":["Resource Not Found"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The requested resource does not exist."},"Common.Errors.InvalidArguments":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.InvalidArgumentsObject"}},"description":"The request has missing or invalid arguments; `details` lists the messages per argument."},"Common.Errors.InvalidArgumentsObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]},"details":{"type":"object","unevaluatedProperties":{"type":"array","items":{"type":"string"}},"description":"Maps each invalid argument to the list of validation messages for that argument."}},"description":"Error object for invalid request arguments, adding per-argument messages."},"Common.Errors.ValidationError":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.ValidationErrorObject"}},"description":"The request body failed validation."},"Common.Errors.ValidationErrorObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["validation_error"]},"title":{"type":"string","enum":["Validation Error"]},"details":{"type":"object","unevaluatedProperties":{"type":"array","items":{"type":"string"}},"description":"Maps each invalid field to the list of validation messages for that field."}},"description":"Error object for a failed validation, adding per-field messages."}}},"paths":{"/signing_keys/{id}":{"delete":{"operationId":"SigningKeys_delete","summary":"Delete a signing key","description":"Delete a signing key. A key a webhook still signs with cannot be deleted: the request\nanswers `422` naming the key. Re-point or delete those webhooks first.","parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Common.Scalars.id"}}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.JsonApi.SuccessMessage"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Unauthorized"}}}},"403":{"description":"The authenticated user lacks permission to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Forbidden"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.NotFound"}}}},"422":{"description":"The request has missing or invalid arguments; `details` lists the messages per argument.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Common.Errors.InvalidArguments"},{"$ref":"#/components/schemas/Common.Errors.ValidationError"}]}}}}},"tags":["Webhook Signing Keys"]}}}}
```
