# GET /certificates

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the certificates group.

List TLS certificates across the server

- Who may call it: administrator
- Token scope, any of: certificates, read, all
- Answers: 200 OK

Filters certificate entries by q, status, and owner. The certificate for the UrbeStack web interface appears first. The remaining entries without an expiration date come next, followed by entries in order of earliest expiration. Entries with the same expiration date or with no expiration date are ordered by name.

The response includes matching entries in certificates, pagination metadata, filtered and server-wide counts, and the nightly renewal schedule. Supply page or per_page to paginate. If both are omitted, the response returns every matching row on page 1 of 1. The response also reports page 1 of 1 when no rows match. The API returns 400 if per_page is a valid non-negative integer outside the range from 1 to 1000.

## Parameters

- `q` (query, string, up to 200 characters): Search text matched case-insensitively against any part of the certificate name or against the full owner's username.
- `status` (query, string, one of failed, soon, expired, own, off): Status filter with five values. failed selects entries whose last issuance attempt failed, for domains configured to request certificates or for the UrbeStack web interface. soon selects certificates due for nightly renewal because they expire within ssl.renew_days, which defaults to 30 days. expired selects certificates that have expired. own selects custom certificates, which are excluded from automatic renewal. off selects domains with certificate management turned off, including domains without a certificate, whose entries have no status.
- `owner` (query, Username): Username of the owner whose entries to include.
- `page` (query, integer, 1 or more): Page number as a non-negative integer of up to 10 digits without leading zeros. The default is 1, a value of 0 selects the first page, and values beyond the last page select the last page.
- `per_page` (query, integer, 1 to 1000): Maximum number of rows per page, from 1 to 1000. The default is 25 when pagination is enabled.

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X GET "$API/certificates?q=text&status=failed&owner=alice&page=1&per_page=1" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "all": {
    "expired": 1,
    "failed": 1,
    "off": 1,
    "own": 1,
    "soon": 1,
    "total": 1
  },
  "certificates": [
    {
      "attempts": 1,
      "challenge": "http",
      "created_at": "2026-09-09T10:15:00Z",
      "domain": "example.com",
      "fingerprint": "text",
      "issuer": "text",
      "kind": "auto",
      "last_attempt_at": "text",
      "last_error": "text",
      "name": "alice",
      "names": [
        "text"
      ],
      "not_after": "text",
      "not_before": "text",
      "package": "basic",
      "panel": true,
      "self_signed": true,
      "ssl_mode": "auto",
      "status": "pending",
      "updated_at": "text",
      "user": "alice"
    }
  ],
  "counts": {
    "expired": 1,
    "failed": 1,
    "off": 1,
    "own": 1,
    "soon": 1,
    "total": 1
  },
  "page": 1,
  "pages": 1,
  "per_page": 1,
  "renew": {
    "at": "text",
    "days": 1,
    "within_minutes": 1
  },
  "total": 1
}
```

## Errors

- 400: Invalid <what>: expected a non-negative integer
- 400: per_page is a number from 1 to 1000
- 401: Authentication required
