Skip to content

Commit c7c7731

Browse files
docs(webhooks): add --name to CLI examples and correct multi-endpoint language
After the `endpoints create --name` CLI fix, three examples still showed the old `tango webhooks endpoints create --url URL` shape. Without `--name` the CLI now errors out (Click marks it required). Updated all three call sites (lines 123, 243, 373) to include `--name`. Also fixed the stale "one endpoint per user" wording in the troubleshooting section. Endpoint uniqueness is on `(user, name)` post-tango#2256 — users can have multiple endpoints with distinct names. The 400 case is name collision, not a user-level cap. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c81b480 commit c7c7731

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

docs/WEBHOOKS.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ When you're ready for end-to-end testing against Tango itself, expose your local
120120

121121
```bash
122122
# Use the public URL the tunnel gave you.
123-
tango webhooks endpoints create --url https://<your-tunnel>.ngrok.io/tango/webhooks
123+
tango webhooks endpoints create --name dev --url https://<your-tunnel>.ngrok.io/tango/webhooks
124124
# Save the `secret` from the response — that's what your handler uses to verify.
125125
```
126126

@@ -240,11 +240,11 @@ Manage **where Tango delivers**.
240240
```bash
241241
tango webhooks endpoints list [--page N] [--limit N]
242242
tango webhooks endpoints get ENDPOINT_ID
243-
tango webhooks endpoints create --url URL [--inactive]
243+
tango webhooks endpoints create --name NAME --url URL [--inactive]
244244
tango webhooks endpoints delete ENDPOINT_ID [--yes]
245245
```
246246

247-
`create` returns the generated `secret` once — save it. `delete` prompts for confirmation; `--yes` skips. `--inactive` registers the endpoint disabled (no deliveries until you re-enable it).
247+
`create` returns the generated `secret` once — save it. `--name` is required and must be unique per user (uniqueness is enforced on `(user, name)`, so you can have multiple endpoints with distinct names). `delete` prompts for confirmation; `--yes` skips. `--inactive` registers the endpoint disabled (no deliveries until you re-enable it).
248248

249249
### Managing alerts
250250

@@ -370,7 +370,7 @@ tango webhooks list-event-types
370370
# 2. Stand up a tunnel so Tango can reach you
371371
ngrok http 8011 &
372372
# 3. Register your endpoint
373-
tango webhooks endpoints create --url https://<id>.ngrok.io/tango/webhooks
373+
tango webhooks endpoints create --name dev --url https://<id>.ngrok.io/tango/webhooks
374374
# (save the `secret` from the response into TANGO_WEBHOOK_SECRET)
375375
# 4. Create an alert via the SDK
376376
python -c '
@@ -442,7 +442,7 @@ This is the shape your handler will receive — including the exact `X-Tango-Sig
442442

443443
**`fetch-sample` returns 401.** Set `TANGO_API_KEY` (or pass `--api-key`). `fetch-sample` reads from Tango's API.
444444

445-
**`endpoints create` returns 403 or "endpoint already exists".** Tango limits one endpoint per user. Use `endpoints list` to find the existing one, then either reuse it or delete it first.
445+
**`endpoints create` returns 400 or "endpoint already exists".** Endpoint names are unique per user — if you've already created one with that `--name`, either pick a different name or use `endpoints list` to find the existing one and reuse it.
446446

447447
**`simulate --event-type X` fails with HTTP 4xx.** Tango doesn't recognize the event type. Run `list-event-types` to see the current list.
448448

0 commit comments

Comments
 (0)