> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://api.docs.modulards.com/modular-ds-public-api/websites/connection/verify-a-website-s-connection/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api.docs.modulards.com/_mcp/server. # Verify a website's connection POST https://api.modulards.com/api/public/v1/sites/{site_id}/connection/verify Re-checks a website's existing connection and returns the resulting state. Use it after reinstalling the plugin or when a website shows as disconnected. Unlike the automatic background checks, the request waits for the check to finish. The check repeats the connection handshake, so your role must be one of those that connect websites (owner, administrator and collaborator); any other member, such as a viewer, gets 404. A failure is reported only through the connection status, never as raw connector error text. Reference: https://api.docs.modulards.com/modular-ds-public-api/websites/connection/verify-a-website-s-connection ## 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 - `site_id` (string, required) ## Response ### 200 200 - Connection verified - `jsonapi` (ApiPublicV1SitesSiteIdConnectionVerifyPostResponsesContentApplicationJsonSchemaJsonapi, optional) - `meta` (ApiPublicV1SitesSiteIdConnectionVerifyPostResponsesContentApplicationJsonSchemaMeta, optional) ## Types ### ApiPublicV1SitesSiteIdConnectionVerifyPostResponsesContentApplicationJsonSchemaJsonapi - `version` (string, optional) ### ApiPublicV1SitesSiteIdConnectionVerifyPostResponsesContentApplicationJsonSchemaMeta - `connection_status` (string, optional) — Resulting connection status, for example established, lost, restoring, pending, or a specific connector error code. - `is_connected` (boolean, optional) — Whether the website counts as connected: true for established, maintaining and restoring. ## Examples **Response** ```json { "jsonapi": { "version": "1.1" }, "meta": { "connection_status": "established", "is_connected": true } } ``` **SDK Code** ```python 200 - Connection verified import requests url = "https://api.modulards.com/api/public/v1/sites/site_id/connection/verify" headers = {"Authorization": "Bearer "} response = requests.post(url, headers=headers) print(response.json()) ``` ```javascript 200 - Connection verified const url = 'https://api.modulards.com/api/public/v1/sites/site_id/connection/verify'; const options = {method: 'POST', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go 200 - Connection verified package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.modulards.com/api/public/v1/sites/site_id/connection/verify" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby 200 - Connection verified require 'uri' require 'net/http' url = URI("https://api.modulards.com/api/public/v1/sites/site_id/connection/verify") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java 200 - Connection verified import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.modulards.com/api/public/v1/sites/site_id/connection/verify") .header("Authorization", "Bearer ") .asString(); ``` ```php 200 - Connection verified request('POST', 'https://api.modulards.com/api/public/v1/sites/site_id/connection/verify', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp 200 - Connection verified using RestSharp; var client = new RestClient("https://api.modulards.com/api/public/v1/sites/site_id/connection/verify"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift 200 - Connection verified import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.modulards.com/api/public/v1/sites/site_id/connection/verify")! 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() ```