> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pinakelai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Service health

> Public health check of the API and its data stores.

Public: no key needed, not counted and not logged, and callable from any origin.

Returns 200 with `"status": "ok"` when the API can reach both of its data stores, and 503 [`unavailable`](https://docs.pinakelai.com/errors/unavailable) otherwise. The result is cached for 5 seconds. `build` identifies the deployed version, which helps when you report a problem.

Use it for smoke checks after a deployment and for status pages. A 503 here means requests may fail for a while; your normal error handling covers that.

```bash cURL theme={null}
curl "https://api.pinakelai.com/v1/health"
```

```python Python theme={null}
import requests

resp = requests.get("https://api.pinakelai.com/v1/health", timeout=10)
healthy = resp.status_code == 200
```

```javascript JavaScript theme={null}
const res = await fetch("https://api.pinakelai.com/v1/health");
const healthy = res.status === 200;
```

```json 200 theme={null}
{
  "status": "ok",
  "build": "4f9a2c71d0e8"
}
```

```json 503 theme={null}
{
  "type": "https://docs.pinakelai.com/errors/unavailable",
  "title": "Service unavailable",
  "status": 503,
  "detail": "A data store did not answer in time.",
  "request_id": "req_01M7Q41M2N3P4Q5R6S7T8V9W0X"
}
```


## OpenAPI

````yaml GET /v1/health
openapi: 3.1.0
info:
  title: Pinakel Trademark Data API
  summary: 'Trademark records from 119 registers: search, retrieve, sync and coverage.'
  description: >
    Structured trademark records from national, regional and international
    registers, normalized into one object.


    - **Authentication:** every endpoint except `GET /v1/health` needs
    `Authorization: Bearer <key>` (`pk_live_...` or `pk_test_...`). Keys are
    never accepted in the URL.

    - **Errors** are RFC 9457 problem details (`application/problem+json`) whose
    `type` links to the error's documentation; every response carries
    `X-Request-Id`.

    - **Limits:** the `RateLimit` and `RateLimit-Policy` headers report the
    key's per-minute and monthly allowance; `429` responses say which one ran
    out and when to retry.

    - **Pagination** is by opaque cursor: send `next_cursor` back with the same
    filters.

    - **Stability:** v1 only gains additive changes. Enumerations in responses
    are open (`x-extensible-enum`): treat unknown values as `other`.


    Guides, concepts and coverage: https://docs.pinakelai.com
  termsOfService: https://www.pinakelai.com/terms-of-use
  contact:
    name: Pinakel API support
    url: https://docs.pinakelai.com/
  license:
    name: 'Proprietary: use under the Pinakel terms of use'
    url: https://www.pinakelai.com/terms-of-use
  version: 1.0.0
servers:
  - url: https://api.pinakelai.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Trademarks
    description: Search, retrieve and batch-retrieve records.
  - name: Changes
    description: Follow every record that changed, by cursor.
  - name: Jurisdictions
    description: Registers covered, their state and freshness.
  - name: Account
    description: Your usage, and the public health check.
paths:
  /v1/health:
    get:
      tags:
        - Account
      summary: Service health
      description: >-
        Public. 200 when both stores answer within a second (checked at most
        every 5 seconds), else 503. Not a liveness probe; never counted or
        billed.
      operationId: getHealth
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Health'
        '503':
          description: unavailable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDocument'
        default:
          description: Any other problem (RFC 9457).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDocument'
      security: []
components:
  schemas:
    Health:
      properties:
        status:
          type: string
          const: ok
          title: Status
        build:
          type: string
          title: Build
          description: Fingerprint of the running code.
      type: object
      required:
        - status
        - build
      title: Health
    ProblemDocument:
      properties:
        type:
          type: string
          title: Type
        title:
          type: string
          title: Title
        status:
          type: integer
          title: Status
        detail:
          type: string
          title: Detail
        request_id:
          type: string
          title: Request Id
        errors:
          anyOf:
            - items:
                $ref: '#/components/schemas/FieldErrorDocument'
              type: array
            - type: 'null'
          title: Errors
        violated_policies:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Violated Policies
      additionalProperties: true
      type: object
      required:
        - type
        - title
        - status
        - detail
        - request_id
      title: ProblemDocument
      description: OpenAPI schema of every error response (RFC 9457).
    FieldErrorDocument:
      properties:
        code:
          type: string
          title: Code
        detail:
          type: string
          title: Detail
        parameter:
          anyOf:
            - type: string
            - type: 'null'
          title: Parameter
        pointer:
          anyOf:
            - type: string
            - type: 'null'
          title: Pointer
      additionalProperties: false
      type: object
      required:
        - code
        - detail
      title: FieldErrorDocument
      description: OpenAPI schema of one `errors[]` item.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your API key: Authorization: Bearer pk_live_... (or pk_test_...).'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.