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

# Show site certificate

GET https://api/public/v1/sites/{site}/certificate

Returns the site's SSL certificate summary as a meta-only JSON:API document (a computed structure, not a resource): `200` with `{"meta": {...}, "jsonapi": {"version": "1.1"}}`.

`meta` keys, in order: `site_id` (integer), `configured` (boolean), `enabled` (boolean|null), `ssl_status` (`up` / `down` / `unknown` / null), `issuer` (`{cn, o, c, ou}`|null), `subject` (`{cn, o, c, ou}`|null), `valid_from` (string|null), `valid_to` (string|null), `days_until_expiry` (integer|null, negative once expired), `protocol` (string|null, e.g. `TLSv1.3`) and `sans` (string array|null).

Example body:

```json
{"meta":{"site_id":12345,"configured":true,"enabled":true,"ssl_status":"up","issuer":{"cn":"R11","o":"Let's Encrypt","c":"US","ou":null},"subject":{"cn":"example.com","o":null,"c":null,"ou":null},"valid_from":"2026-01-01 00:00:00","valid_to":"2026-03-12 12:00:00","days_until_expiry":30,"protocol":"TLSv1.3","sans":["example.com","www.example.com"]},"jsonapi":{"version":"1.1"}}
```

Path variable `site` is the exact site id (e.g. `12345`). A site without a certificate service answers 200 with `configured: false` and every other field null.

This endpoint accepts **no query parameters at all**: any key (`filter`, `sort`, `page`, `include`, `fields`, anything) answers 422. Sites of other organizations — and members without the certificate read permission — answer 404. A read-only token is enough. The MCP twin of this endpoint is the `sites-certificate-show` tool.

Reference: https://api.docs.modulards.com/modular-ds-public-api/sites/show-site-certificate

## Authentication

- `Authorization` header (bearer token, required)

## Request

### Path parameters

- `site` (string, required)

## Response

### 200

Successful response

## Examples

**Response**

```json
{}
```

**SDK Code**

```python
import requests

url = "https://https/api/public/v1/sites/site/certificate"

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

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

print(response.json())
```

```javascript
const url = 'https://https/api/public/v1/sites/site/certificate';
const options = {method: 'GET', 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
package main

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

func main() {

	url := "https://https/api/public/v1/sites/site/certificate"

	req, _ := http.NewRequest("GET", 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
require 'uri'
require 'net/http'

url = URI("https://https/api/public/v1/sites/site/certificate")

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

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

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.get("https://https/api/public/v1/sites/site/certificate")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://https/api/public/v1/sites/site/certificate', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://https/api/public/v1/sites/site/certificate");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://https/api/public/v1/sites/site/certificate")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
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()
```