> 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.

# Test integration

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

Sends a real test message to a candidate URL without saving it: a meta-only document with `meta.valid`, true only when the provider answers 2xx. `{integration_type}` (path, default `slack`) is `slack` or `discord`.\n\n**Body** (JSON): `url` (string, required) - same rules as "Save integration"; an empty URL answers 422 rather than a failed test.\n\nA read-only token can read the integration's URL but cannot send a test (403) - sending one requires a full-access token. A configuration of another organization answers 404 whatever the body. Rate limited to 10 test messages per minute per token (shared with the dashboard and the MCP test tool by credential): the 11th call within a minute answers 429 with no message sent. Never run this request against production with a real webhook URL.

Reference: https://api.docs.modulards.com/modular-ds-public-api/notification-configurations/test-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 - Valid (provider 2xx) / 200 - Not valid (provider failure)

- `jsonapi` (ApiPublicV1AlertsAlertIdIntegrationsIntegrationTypeTestPostResponsesContentApplicationJsonSchemaJsonapi, optional)
- `meta` (ApiPublicV1AlertsAlertIdIntegrationsIntegrationTypeTestPostResponsesContentApplicationJsonSchemaMeta, optional)

## Errors

### 422 Unprocessable Entity Error

422 - Empty URL

- `errors` (list of ApiPublicV1AlertsAlertIdIntegrationsIntegrationTypeTestPostResponsesContentApplicationJsonSchemaErrorsItems, optional)
- `jsonapi` (ApiPublicV1AlertsAlertIdIntegrationsIntegrationTypeTestPostResponsesContentApplicationJsonSchemaJsonapi, optional)

### 429 Too Many Requests Error

429 - Too many test messages this minute

- `errors` (list of ApiPublicV1AlertsAlertIdIntegrationsIntegrationTypeTestPostResponsesContentApplicationJsonSchemaErrorsItems, optional)
- `jsonapi` (ApiPublicV1AlertsAlertIdIntegrationsIntegrationTypeTestPostResponsesContentApplicationJsonSchemaJsonapi, optional)

## Types

### ApiPublicV1AlertsAlertIdIntegrationsIntegrationTypeTestPostResponsesContentApplicationJsonSchemaJsonapi

- `version` (string, optional)

### ApiPublicV1AlertsAlertIdIntegrationsIntegrationTypeTestPostResponsesContentApplicationJsonSchemaMeta

- `valid` (boolean, optional)

### ApiPublicV1AlertsAlertIdIntegrationsIntegrationTypeTestPostResponsesContentApplicationJsonSchemaErrorsItems

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

## Examples

### 200 - Not valid (provider failure)

**Response**

```json
{
  "jsonapi": {
    "version": "1.1"
  },
  "meta": {
    "valid": false
  }
}
```

**SDK Code**

```python 200 - Not valid (provider failure)
import requests

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

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

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

print(response.json())
```

```javascript 200 - Not valid (provider failure)
const url = 'https://api.modulards.com/api/public/v1/alerts/alert_id/integrations/integration_type/test';
const options = {method: 'POST', 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 - Not valid (provider failure)
package main

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

func main() {

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

	req, _ := http.NewRequest("POST", 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 - Not valid (provider failure)
require 'uri'
require 'net/http'

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

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

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

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

```java 200 - Not valid (provider failure)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

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

```php 200 - Not valid (provider failure)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

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

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

```csharp 200 - Not valid (provider failure)
using RestSharp;

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

```swift 200 - Not valid (provider failure)
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/test")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```

### 200 - Valid (provider 2xx)

**Response**

```json
{
  "jsonapi": {
    "version": "1.1"
  },
  "meta": {
    "valid": true
  }
}
```

**SDK Code**

```python 200 - Valid (provider 2xx)
import requests

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

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

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

print(response.json())
```

```javascript 200 - Valid (provider 2xx)
const url = 'https://api.modulards.com/api/public/v1/alerts/alert_id/integrations/integration_type/test';
const options = {method: 'POST', 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 - Valid (provider 2xx)
package main

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

func main() {

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

	req, _ := http.NewRequest("POST", 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 - Valid (provider 2xx)
require 'uri'
require 'net/http'

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

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

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

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

```java 200 - Valid (provider 2xx)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

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

```php 200 - Valid (provider 2xx)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

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

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

```csharp 200 - Valid (provider 2xx)
using RestSharp;

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

```swift 200 - Valid (provider 2xx)
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/test")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```