chore: add telephony configuration docs

This commit is contained in:
Abhishek Kumar 2026-05-02 17:37:48 +05:30
parent fbf0687c79
commit 91a62178c1
17 changed files with 162 additions and 10 deletions

View file

@ -0,0 +1,9 @@
---
title: "Create Configuration"
description: "Create a new telephony configuration"
openapi: "POST /api/v1/organizations/telephony-configs"
---
Call [List Supported Providers](/api-reference/telephony-configs/providers) first to discover the credential fields for the provider you want to configure — they vary per provider.
Configuration `name` must be unique within your organization. Set `is_default_outbound: true` to mark this configuration as the org-wide default for outbound calls (any existing default is unset). New configurations have no phone numbers; add them via [Add a phone number](/api-reference/telephony-configs/phone-numbers/create).

View file

@ -0,0 +1,7 @@
---
title: "Delete Configuration"
description: "Delete a telephony configuration"
openapi: "DELETE /api/v1/organizations/telephony-configs/{config_id}"
---
Returns `409 Conflict` if the configuration is referenced by any campaign or phone number. Detach those resources first, then retry.

View file

@ -0,0 +1,7 @@
---
title: "Get Configuration"
description: "Retrieve a telephony configuration by id"
openapi: "GET /api/v1/organizations/telephony-configs/{config_id}"
---
Sensitive credential fields (API keys, auth tokens) are returned in masked form.

View file

@ -0,0 +1,5 @@
---
title: "List Configurations"
description: "List all telephony configurations in your organization"
openapi: "GET /api/v1/organizations/telephony-configs"
---

View file

@ -0,0 +1,9 @@
---
title: "Add Phone Number"
description: "Attach a new phone number to a telephony configuration"
openapi: "POST /api/v1/organizations/telephony-configs/{config_id}/phone-numbers"
---
Set `inbound_workflow_id` to bind incoming calls on this number to a specific agent — Dograh will register the inbound webhook with the provider and the response will include a `provider_sync` block reporting the result. Omit it to add the number for outbound use only.
The `(provider, account_id, address)` tuple must be globally unique across all Dograh organizations, since inbound dispatch keys on it. Attempting to add a number that another organization already owns returns `409`.

View file

@ -0,0 +1,5 @@
---
title: "Delete Phone Number"
description: "Remove a phone number from a telephony configuration"
openapi: "DELETE /api/v1/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id}"
---

View file

@ -0,0 +1,5 @@
---
title: "Get Phone Number"
description: "Retrieve a phone number by id"
openapi: "GET /api/v1/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id}"
---

View file

@ -0,0 +1,5 @@
---
title: "List Phone Numbers"
description: "List phone numbers attached to a telephony configuration"
openapi: "GET /api/v1/organizations/telephony-configs/{config_id}/phone-numbers"
---

View file

@ -0,0 +1,7 @@
---
title: "Set Default Caller"
description: "Designate a phone number as the configuration's default outbound caller id"
openapi: "POST /api/v1/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id}/set-default-caller"
---
Outbound calls placed through this configuration that don't specify a `from_number` use the default caller. Setting a new default automatically clears the previous one — at most one phone number per configuration can be the default caller.

View file

@ -0,0 +1,9 @@
---
title: "Update Phone Number"
description: "Update label, inbound binding, or activation state of a phone number"
openapi: "PUT /api/v1/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id}"
---
Changing `inbound_workflow_id` re-syncs the inbound webhook with the provider; the response includes a `provider_sync` block with the result.
To remove an existing inbound binding, send `clear_inbound_workflow: true`. Sending `inbound_workflow_id: null` alone is treated as "no change".

View file

@ -0,0 +1,7 @@
---
title: "List Supported Providers"
description: "Discover available telephony providers and the credential fields each one requires"
openapi: "GET /api/v1/organizations/telephony-providers/metadata"
---
Use this endpoint to discover which telephony providers Dograh supports and the exact credential fields each one expects. The response drives the configuration form in the dashboard, and is the recommended way to build a provider-agnostic integration.

View file

@ -0,0 +1,7 @@
---
title: "Set Default Outbound"
description: "Designate this configuration as the org-wide default for outbound calls"
openapi: "POST /api/v1/organizations/telephony-configs/{config_id}/set-default-outbound"
---
Campaigns and ad-hoc calls that omit `telephony_configuration_id` use the default outbound configuration. Setting a new default automatically clears the previous one — at most one configuration can be the default at a time.

View file

@ -0,0 +1,9 @@
---
title: "Update Configuration"
description: "Rename a configuration or rotate its credentials"
openapi: "PUT /api/v1/organizations/telephony-configs/{config_id}"
---
The `provider` cannot be changed once a configuration exists — create a new configuration if you need to switch providers.
When rotating credentials, you only need to send the fields you're changing. Re-submitting a masked sensitive value preserves the original secret, so it's safe to round-trip a `GET` response back to a `PUT`.