> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api.docs.modulards.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api.docs.modulards.com/_mcp/server.

# Update integration

PATCH https://api.modulards.com/api/public/v1/alerts/{alert_id}/integrations/{integration_type}

Changes the URL of the existing Slack or Discord destination of that type; never creates one, never deletes, never sends a test message and never touches the channel flag. Answers **200** with the resource. A configuration with no destination of that type answers **404** and nothing is created - create it with "Create integration". `PUT` is an alias of `PATCH`. `{integration_type}` (path, default `slack`) is `slack` or `discord`.

**Body** (JSON):

* `url` (string, required, max 2048): a complete `https://hooks.slack.com/services/...` or `https://discord.com/api/webhooks/...` URL matching `{integration_type}`. Always required - an empty, missing or masked URL is invalid input, never a deletion command (use "Delete integration" for that).

The complete URL is returned on ordinary reads too (a conscious exception); the MCP answers only a mask. Requires a full-access token (read-only tokens answer 403), permission to edit notification configurations and the organization's channel permission for that type; without them the configuration answers 404. Body validation runs before authorization: a foreign configuration with an invalid or missing `url` answers 422; only a foreign configuration with a valid `url` answers 404. Never run this request against production with a real webhook URL - use a fictional one.

**Path variables**

* `integration_type`: Destination type: `slack` or `discord`.

Reference: https://api.docs.modulards.com/modular-ds-public-api/notification-configurations/update-integration

## Authentication

- `Authorization` header (bearer token, required) — Personal access token created in the Modular DS dashboard; read-only tokens can only call GET endpoints.

## Request

### Path parameters

- `alert_id` (string, required)
- `integration_type` (string, required)

## Response

### 200

200 - Integration URL changed

- `data` (ApiPublicV1AlertsAlertIdIntegrationsIntegrationTypePatchResponsesContentApplicationJsonSchemaData, optional)
- `jsonapi` (ApiPublicV1AlertsAlertIdIntegrationsIntegrationTypePatchResponsesContentApplicationJsonSchemaJsonapi, optional)

## Errors

### 404 Not Found Error

404 - No integration of that type / 404 - Unknown integration type in the path

- `errors` (list of ApiPublicV1AlertsAlertIdIntegrationsIntegrationTypePatchResponsesContentApplicationJsonSchemaErrorsItems, optional)
- `jsonapi` (ApiPublicV1AlertsAlertIdIntegrationsIntegrationTypePatchResponsesContentApplicationJsonSchemaJsonapi, optional)

### 422 Unprocessable Entity Error

422 - Empty or masked URL

- `errors` (list of ApiPublicV1AlertsAlertIdIntegrationsIntegrationTypePatchResponsesContentApplicationJsonSchemaErrorsItems, optional)
- `jsonapi` (ApiPublicV1AlertsAlertIdIntegrationsIntegrationTypePatchResponsesContentApplicationJsonSchemaJsonapi, optional)

## Types

### ApiPublicV1AlertsAlertIdIntegrationsIntegrationTypePatchResponsesContentApplicationJsonSchemaData

- `attributes` (ApiPublicV1AlertsAlertIdIntegrationsIntegrationTypePatchResponsesContentApplicationJsonSchemaDataAttributes, optional)
- `id` (string, optional)
- `type` (string, optional)

### ApiPublicV1AlertsAlertIdIntegrationsIntegrationTypePatchResponsesContentApplicationJsonSchemaJsonapi

- `version` (string, optional)

### ApiPublicV1AlertsAlertIdIntegrationsIntegrationTypePatchResponsesContentApplicationJsonSchemaErrorsItems

- `detail` (string, optional)
- `source` (ApiPublicV1AlertsAlertIdIntegrationsIntegrationTypePatchResponsesContentApplicationJsonSchemaErrorsItemsSource, optional)
- `status` (string, optional)
- `title` (string, optional)

### ApiPublicV1AlertsAlertIdIntegrationsIntegrationTypePatchResponsesContentApplicationJsonSchemaDataAttributes

- `created_at` (string, optional)
- `type` (string, optional)
- `updated_at` (string, optional)
- `url` (string, optional)

### ApiPublicV1AlertsAlertIdIntegrationsIntegrationTypePatchResponsesContentApplicationJsonSchemaErrorsItemsSource

- `parameter` (string, optional)

## Examples

**Response**

```json
{
  "data": {
    "attributes": {
      "created_at": "2026-09-18T10:00:00.000000Z",
      "type": "slack",
      "updated_at": "2026-09-28T09:15:00.000000Z",
      "url": "https://hooks.slack.com/services/EXAMPLE/EXAMPLE/EXAMPLE"
    },
    "id": "9",
    "type": "alert-integrations"
  },
  "jsonapi": {
    "version": "1.1"
  }
}
```

**SDK Code**

```python 200 - Integration URL changed
import requests

url = "https://api.modulards.com/api/public/v1/alerts/alert_id/integrations/integration_type"

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

```javascript 200 - Integration URL changed
const url = 'https://api.modulards.com/api/public/v1/alerts/alert_id/integrations/integration_type';
const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};

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

```go 200 - Integration URL changed
package main

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

func main() {

	url := "https://api.modulards.com/api/public/v1/alerts/alert_id/integrations/integration_type"

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

	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

```ruby 200 - Integration URL changed
require 'uri'
require 'net/http'

url = URI("https://api.modulards.com/api/public/v1/alerts/alert_id/integrations/integration_type")

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'

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

```java 200 - Integration URL changed
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.modulards.com/api/public/v1/alerts/alert_id/integrations/integration_type")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php 200 - Integration URL changed
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.modulards.com/api/public/v1/alerts/alert_id/integrations/integration_type', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp 200 - Integration URL changed
using RestSharp;

var client = new RestClient("https://api.modulards.com/api/public/v1/alerts/alert_id/integrations/integration_type");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift 200 - Integration URL changed
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.modulards.com/api/public/v1/alerts/alert_id/integrations/integration_type")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers

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()
```