Platform Admin
Webhook Configuration
Configure platform-wide and per-tenant webhook endpoints from the Platform Admin console or via the REST API.
Platform Admins can provision webhook endpoints at two levels and inspect or test delivery without leaving the console. This page covers both the UI flow and the equivalent REST endpoints so partner integrations can automate the same operations.
Resolution order
When an event fires, Teamcast picks the destination URL by first match:
| Priority | Layer | Scope | Who configures |
|---|---|---|---|
| 1 | interview.callbackUrl | Single interview only | Caller of POST /integration/interviews |
| 2 | TenantWebhookConfig | All interviews for one tenant | Tenant Admin OR Platform Admin |
| 3 | PlatformWebhookConfig | All tenants under the platform | Platform Admin |
tenantId to route internally. Override per-tenant only when a specific customer needs a different endpoint or signing secret.UI walkthrough — Platform webhook
Register a platform-wide endpoint
From the Platform Admin console:
| Step | Action |
|---|---|
| 1 | Sign in at /login → Platform Admin tab |
| 2 | Open Webhooks in the sidebar |
| 3 | Enter a public HTTPS callbackUrl |
| 4 | Tick the events you want delivered (empty = all events) |
| 5 | Save — the signing secret is auto-generated and shown ONCE. Copy it now. |
****<last4>) for verification only.Rotate, deactivate, or remove
Re-saving with a new secret value rotates the HMAC key. Leave the field blank to keep the current one. Use Deactivate to soft-pause event delivery — the row is preserved (URL, secret, events, history) and only isActive flips to false. Saving the form again (with URL + events) registers a fresh active webhook and flips isActive back to true — this is the only path back to active in the UI; no separate “Activate” button is exposed by design. The DELETE endpoint still exists for tooling/API consumers that want a hard removal.
UI walkthrough — Per-tenant webhook
Platform Admins can manage any tenant's webhook from the same console without needing tenant-admin credentials. Strict isolation: only tenants belonging to the calling platform are editable (others return 403).
| Step | Action |
|---|---|
| 1 | Open Tenants in the sidebar |
| 2 | Click the webhook icon on the tenant row |
| 3 | Dialog opens — fill callbackUrl, subscribed events, auto-approve, retention windows |
| 4 | Save — secret auto-generated if blank; existing secret preserved on update |
| 5 | Click Send Test Webhook — fires a synthetic interview.plan_generated to your URL |
API reference
Platform-level endpoints
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /api/v1/platform-admin/webhook-config | Read current platform webhook (secret masked) |
| PUT | /api/v1/platform-admin/webhook-config | Create or update platform webhook (re-saving an existing config reactivates it) |
| PATCH | /api/v1/platform-admin/webhook-config/deactivate | Soft-pause delivery — sets isActive=false, keeps URL/secret/events |
| PATCH | /api/v1/platform-admin/webhook-config/activate | Re-enable delivery (API/tooling only — not surfaced in the Platform Admin UI) |
| DELETE | /api/v1/platform-admin/webhook-config | Hard-remove platform webhook (API only — not surfaced in the Platform Admin UI) |
# Create or update platform webhook
curl -X PUT https://mayaapi.teamcast.ai/api/v1/platform-admin/webhook-config \
-H "Authorization: Bearer <PLATFORM_ADMIN_JWT>" \
-H "Content-Type: application/json" \
-d '{
"callbackUrl": "https://api.acme.com/webhooks/teamcast",
"events": [
"interview.plan_generated",
"interview.approved",
"interview.rejected",
"interview.assessment_pending"
]
}'Per-tenant endpoints (Platform Admin scope)
Platform Admin has two equivalent paths to manage a specific tenant's webhook: the dedicated /platform-admin/tenants/:tenantId/webhook-config route (recommended from a Platform Admin UI) and the shared /tenants/:id/webhook-config route (also used by Tenant Admins and Super Admins — see the Authorization section below for the caller-aware scoping rule).
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /api/v1/platform-admin/tenants/:tenantId/webhook-config | Read tenant webhook |
| PUT | /api/v1/platform-admin/tenants/:tenantId/webhook-config | Create or update tenant webhook |
| DELETE | /api/v1/platform-admin/tenants/:tenantId/webhook-config | Remove tenant webhook |
| POST | /api/v1/platform-admin/tenants/:tenantId/webhook-test | Send synthetic test event |
# Configure webhook for one tenant under your platform
curl -X PUT https://mayaapi.teamcast.ai/api/v1/platform-admin/tenants/{tenantId}/webhook-config \
-H "Authorization: Bearer <PLATFORM_ADMIN_JWT>" \
-H "Content-Type: application/json" \
-d '{
"callbackUrl": "https://api.tenant.com/webhooks/teamcast",
"events": [],
"autoApprovePlans": false,
"candidatePiiRetentionDays": 90,
"assessmentRetentionDays": 365,
"recordingRetentionDays": 30
}'
# Send a test event (debugging)
curl -X POST https://mayaapi.teamcast.ai/api/v1/platform-admin/tenants/{tenantId}/webhook-test \
-H "Authorization: Bearer <PLATFORM_ADMIN_JWT>" \
-H "Content-Type: application/json" \
-d '{ "event": "interview.plan_generated" }'source field ("tenant" or "platform") so you can confirm which layer resolved the callback URL.Authorization & isolation
All endpoints under /platform-admin/* require a Platform Admin JWT (the token issued at POST /api/v1/platform-admin/auth/login). The server enforces that the target tenant belongs to the caller's platform — a Platform Admin from Platform A cannot touch a tenant under Platform B; the API returns 403 Forbidden.
Shared /tenants/:id/webhook-config route
The tenant self-serve route /api/v1/tenants/:id/webhook-config (GET / PUT / DELETE) is also callable by Platform Admin and Super Admin, with the same scoping rule applied to the URL :id:
| Caller | Rule applied to URL :id |
|---|---|
| super-admin | Any tenant id is accepted |
| platform-admin | Tenant must belong to the caller's platform (else 403) |
| Tenant Admin login JWT | URL :id must equal the user's tenantId (else 403) |
| API key + X-Tenant-ID | URL :id must equal X-Tenant-ID (else 403) |
| OAuth tenant token / client_credentials with tenant_id claim | URL :id must equal the token tenant_id claim (else 403) |
Using a Platform Admin JWT against this shared route is equivalent to using the dedicated /platform-admin/tenants/:tenantId/webhook-config route — pick whichever fits your client. Cross-platform access is rejected with 403 Forbidden in both.
platformUserId and the target tenantId.Common operations
Quiet a webhook temporarily
For the platform-level webhook, click Deactivate in the Platform Admin console (or call PATCH /platform-admin/webhook-config/deactivate). For a tenant webhook, set isActive: false on the tenant config via the API. In both cases events still fire in Maya but no HTTP delivery is attempted. Useful during planned maintenance on the receiver side.
Subscribe to a subset of events
Pass a non-empty events array. Empty array (default) delivers all events. Valid values:
[
"interview.info_needed",
"interview.info_completed",
"interview.plan_generated",
"interview.approved",
"interview.rejected",
"interview.assessment_ready",
"interview.assessment_pending",
"interview.modification_requested",
"interview.cancelled"
]Rotate the HMAC secret
Supply a new secret (min 32 chars) in the upsert payload. The previous secret immediately stops verifying. Roll receivers in lock-step to avoid dropped deliveries — or run them side-by-side for a brief overlap window.