> This page is for Voice Agents.

> Sarvam Voice Agents (Samvaad) is a voice AI agent platform for Indian languages: build, test and deploy AI calling agents on your own phone numbers, from ₹3 a minute. Start here: https://docs.sarvam.ai/voice-agents/why-voice-agents.
> For clean Markdown of any page, append `.md` to the page URL.
> For a complete documentation index, see https://docs.sarvam.ai/llms.txt. For a section index, append `/llms.txt` to any section URL (for example https://docs.sarvam.ai/voice-agents/llms.txt).
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server.

# Update webhook config

PATCH https://apps.sarvam.ai/api/scheduling/v1/orgs/{org_id}/workspaces/{workspace_id}/webhooks/{webhook_id}
Content-Type: application/json

Update a webhook config's name, URL, or custom headers. The signing secret never changes. Campaigns and deployments referencing the config by id immediately deliver to the updated URL.

Reference: https://docs.sarvam.ai/voice-agents/api/webhook-configs/update

## Request

### Path parameters

- `org_id` (string, required) — Organization ID
- `workspace_id` (string, required) — Workspace ID
- `webhook_id` (string, required) — ID of the webhook config

### Body (application/json)

This endpoint expects an UpdateWebhookConfig.

- `name` (string, optional, nullable) — New display name (1-50 characters; letters, digits, spaces, underscores, hyphens).
- `url` (string, optional, nullable) — New webhook endpoint URL (HTTPS only, up to 2048 characters).
- `custom_headers` (map from string to string, optional, nullable) — New custom headers (up to 10). Sending null clears them; omit to keep the current value.

## Response

### 200

Successful Response

- `webhook_id` (string, required) — ID to reference this config from a campaign or deployment.
- `name` (string, required)
- `url` (string, required)
- `created_by` (string, required)
- `created_at` (datetime, required)
- `updated_at` (datetime, required)
- `custom_headers` (map from string to string, optional, nullable)
- `updated_by` (string, optional, nullable)

## Errors

### 404 Not Found Error

Webhook config not found

- `error` (ErrorBody, required) — Details of the error that occurred.

### 422 Unprocessable Entity Error

Validation Error

- `error` (ErrorBody, required) — Details of the error that occurred.

## Types

### ErrorBody

Details of the error that occurred.

- `code` (string, required) — A service-specific error code.
- `message` (string, required) — A human-readable description of the error.

## Examples

**Request**

```json
{
  "url": "https://api.example.com/webhooks/collections-v2"
}
```

**Response**

```json
{
  "webhook_id": "019ec7f2-8d34-7c1a-9f22-3b9d4e5a6c11",
  "name": "Collections webhook",
  "url": "https://api.example.com/webhooks/collections",
  "created_by": "user@acme.com",
  "created_at": "2026-11-12T09:15:22Z",
  "updated_at": "2026-11-12T09:15:22Z",
  "custom_headers": {
    "X-Tenant": "acme"
  },
  "updated_by": null
}
```

**SDK Code**

```python
import requests

url = "https://apps.sarvam.ai/api/scheduling/v1/orgs/org_id/workspaces/workspace_id/webhooks/webhook_id"

payload = { "url": "https://api.example.com/webhooks/collections-v2" }
headers = {"Content-Type": "application/json"}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://apps.sarvam.ai/api/scheduling/v1/orgs/org_id/workspaces/workspace_id/webhooks/webhook_id';
const options = {
  method: 'PATCH',
  headers: {'Content-Type': 'application/json'},
  body: '{"url":"https://api.example.com/webhooks/collections-v2"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://apps.sarvam.ai/api/scheduling/v1/orgs/org_id/workspaces/workspace_id/webhooks/webhook_id"

	payload := strings.NewReader("{\n  \"url\": \"https://api.example.com/webhooks/collections-v2\"\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://apps.sarvam.ai/api/scheduling/v1/orgs/org_id/workspaces/workspace_id/webhooks/webhook_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"url\": \"https://api.example.com/webhooks/collections-v2\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://apps.sarvam.ai/api/scheduling/v1/orgs/org_id/workspaces/workspace_id/webhooks/webhook_id")
  .header("Content-Type", "application/json")
  .body("{\n  \"url\": \"https://api.example.com/webhooks/collections-v2\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://apps.sarvam.ai/api/scheduling/v1/orgs/org_id/workspaces/workspace_id/webhooks/webhook_id', [
  'body' => '{
  "url": "https://api.example.com/webhooks/collections-v2"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://apps.sarvam.ai/api/scheduling/v1/orgs/org_id/workspaces/workspace_id/webhooks/webhook_id");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"url\": \"https://api.example.com/webhooks/collections-v2\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = ["url": "https://api.example.com/webhooks/collections-v2"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://apps.sarvam.ai/api/scheduling/v1/orgs/org_id/workspaces/workspace_id/webhooks/webhook_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```