> For the complete documentation index, see [llms.txt](https://tsanet.gitbook.io/connect/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tsanet.gitbook.io/connect/api-reference/webhooks-v1.md).

# Webhooks V1

V1 webhook subscriptions (legacy flat JSON — collaboration-request.created and note.created only)

## List webhook subscriptions for the current company

> \*\*Deprecated\*\* — use \`GET /v2/webhooks\` instead. This endpoint will be removed after 2027-01-01.&#x20;

```json
{"openapi":"3.0.1","info":{"title":"OpenAPI definition","version":"v0"},"tags":[{"name":"WebhooksV1","description":"V1 webhook subscriptions (legacy flat JSON — collaboration-request.created and note.created only)"}],"servers":[{"url":"http://connect2.tsanet.org","description":"Generated server url"}],"security":[{"bearerAuth":[]}],"paths":{"/v1/webhooks":{"get":{"tags":["WebhooksV1"],"summary":"List webhook subscriptions for the current company","description":"**Deprecated** — use `GET /v2/webhooks` instead. This endpoint will be removed after 2027-01-01. ","operationId":"listWebhookSubscriptions","responses":{"200":{"description":"List of webhook subscriptions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookSubscriptionDTO"}}},"application/problem+json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookSubscriptionDTO"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"deprecated":true}}},"components":{"schemas":{"WebhookSubscriptionDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"callbackUrl":{"type":"string"},"eventTypes":{"type":"array","items":{"type":"string","enum":["collaboration-request.created","note.created"]}},"payloadVersion":{"type":"string","enum":["V1","V2"]},"active":{"type":"boolean"},"callbackAuthType":{"type":"string","description":"The authentication type configured for this subscription. Credential values are never returned."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"validationErrors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Register a new V1 webhook subscription (legacy flat JSON)

> \*\*Deprecated\*\* — use \`POST /v2/webhooks\` instead. This endpoint will be removed after 2027-01-01.  Subscribe to receive legacy flat JSON webhook notifications for \`collaboration-request.created\` and \`note.created\` events.  For new integrations, prefer \`POST /v2/webhooks\` which delivers all 5 event types as CloudEvents 1.0 structured payloads.  \*\*Security\*\*: Every delivery is signed with HMAC-SHA256. The signature is sent in the \`X-Hub-Signature-256\` header as \`sha256=\<hex>\`. Verify it using the secret returned on subscription creation (rotate via \`POST /v1/webhooks/{id}/secret\`).  \*\*Retries\*\*: Failed deliveries are retried up to 4 additional times (5 total attempts) with exponential backoff starting at 10s, doubling each attempt, capped at 300s. Messages that exhaust all retries are moved to a dead-letter queue. Contact TSANet support to replay dead-lettered deliveries.&#x20;

```json
{"openapi":"3.0.1","info":{"title":"OpenAPI definition","version":"v0"},"tags":[{"name":"WebhooksV1","description":"V1 webhook subscriptions (legacy flat JSON — collaboration-request.created and note.created only)"}],"servers":[{"url":"http://connect2.tsanet.org","description":"Generated server url"}],"security":[{"bearerAuth":[]}],"paths":{"/v1/webhooks":{"post":{"tags":["WebhooksV1"],"summary":"Register a new V1 webhook subscription (legacy flat JSON)","description":"**Deprecated** — use `POST /v2/webhooks` instead. This endpoint will be removed after 2027-01-01.  Subscribe to receive legacy flat JSON webhook notifications for `collaboration-request.created` and `note.created` events.  For new integrations, prefer `POST /v2/webhooks` which delivers all 5 event types as CloudEvents 1.0 structured payloads.  **Security**: Every delivery is signed with HMAC-SHA256. The signature is sent in the `X-Hub-Signature-256` header as `sha256=<hex>`. Verify it using the secret returned on subscription creation (rotate via `POST /v1/webhooks/{id}/secret`).  **Retries**: Failed deliveries are retried up to 4 additional times (5 total attempts) with exponential backoff starting at 10s, doubling each attempt, capped at 300s. Messages that exhaust all retries are moved to a dead-letter queue. Contact TSANet support to replay dead-lettered deliveries. ","operationId":"createWebhookSubscription","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookSubscriptionRequestDTO"}}},"required":true},"responses":{"200":{"description":"Webhook subscription created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionResponseDTO"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionResponseDTO"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"deprecated":true}}},"components":{"schemas":{"CreateWebhookSubscriptionRequestDTO":{"required":["callbackUrl"],"type":"object","properties":{"callbackUrl":{"type":"string","description":"The URL to receive webhook events. Must be accessible via HTTPS in production.","format":"uri"},"eventTypes":{"type":"array","description":"Optional list of V1 event types to subscribe to. If empty or null, both `collaboration-request.created` and `note.created` are delivered. ","items":{"type":"string","description":"Optional list of V1 event types to subscribe to. If empty or null, both `collaboration-request.created` and `note.created` are delivered. ","enum":["collaboration-request.created","note.created"]}},"callbackAuth":{"$ref":"#/components/schemas/WebhookCallbackAuthDTO"}}},"WebhookCallbackAuthDTO":{"required":["type"],"type":"object","properties":{"type":{"type":"string","enum":["NONE","BASIC","BEARER","HEADER"]},"username":{"type":"string","description":"Required when type is BASIC."},"password":{"type":"string","description":"Required when type is BASIC."},"token":{"type":"string","description":"Required when type is BEARER."},"headerName":{"type":"string","description":"Required when type is HEADER. The name of the custom header to send."},"headerValue":{"type":"string","description":"Required when type is HEADER. The value of the custom header to send."}}},"WebhookSubscriptionResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"callbackUrl":{"type":"string"},"eventTypes":{"type":"array","items":{"type":"string","enum":["collaboration-request.created","note.created"]}},"payloadVersion":{"type":"string","enum":["V1","V2"]},"active":{"type":"boolean"},"secret":{"type":"string","description":"HMAC secret for signing webhooks (only returned on creation — use POST /v1/webhooks/{id}/secret to rotate)"},"callbackAuthType":{"type":"string","description":"The authentication type configured for this subscription. Credential values are never returned."},"createdAt":{"type":"string","format":"date-time"}}},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"validationErrors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}}}}}}
```
