Integrations
Preview

Change a Teams or Discord channel

Changes the name, the rules, whether the channel is paused, or its webhook address. Fields left out stay as they are. A paused channel takes no events; nothing is disconnected.

PATCH
/integrations/chat-webhooks/{kind}/channels/{channelId}
cookiebetter-auth.session_token<token>

Better Auth session cookie. Production uses the __Secure- prefixed name.

kind*string

Which chat the channels are in.

Value in"teams""discord"
channelId*string
Formatuuid
Idempotency-Key?string

Makes retries safe. A repeated key with the same request returns the first result and sets Idempotent-Replayed: true. The same key with a different request answers 409 idempotency.key_reused, and while the first request is still running 409 idempotency.in_progress. Results are kept for 24 hours. Server errors and refusals for lack of sign-in or permission are not kept, so a retry runs again.

Match^[A-Za-z0-9_.:-]+$
Length1 <= length <= 255
application/json
  1. body
name?string
Length1 <= length <= 100
webhookUrl?string

A new webhook address, which replaces the old one.

Lengthlength <= 1024
paused?boolean
rules?

Which events a channel takes. An empty list matches everything, so a channel with no rules takes every event.

Response Body

The channel after the change.

application/json
  1. response
id*string
Formatuuid
kind*string
Value in"teams""discord"
name*string
host*string

The host of the webhook address.

tail*string

The last characters of the webhook address, which is all that is shown of it.

paused*boolean
failing*boolean

True while the newest post to the channel failed.

lastError?string
lastOkAt?string
Formatdate-time
lastFailureAt?string
Formatdate-time
rules*

Which events a channel takes. An empty list matches everything, so a channel with no rules takes every event.

createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X PATCH 'https://wardn.example.com/api/v1/integrations/chat-webhooks/teams/channels/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "kind": "teams",  "name": "string",  "host": "string",  "tail": "string",  "paused": true,  "failing": true,  "lastError": "string",  "lastOkAt": "2019-08-24T14:15:22Z",  "lastFailureAt": "2019-08-24T14:15:22Z",  "rules": {    "events": [      "string"    ],    "environments": [      "string"    ],    "teams": [      "string"    ],    "minSeverity": "info"  },  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}