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

# Verificar la API key

> Confirma que la API key es válida y pertenece a un partner activo

Úsalo para comprobar la integración antes de consultar datos: si responde `pong`, la key tiene el scope `partners:read` y pertenece a un partner activo.

No consulta subcompañías ni cuenta datos, así que es la forma más barata de validar una key nueva o rotada.

| Respuesta | Qué significa |
| - | - |
| `200` con `pong` | La key es válida y el partner está activo. |
| `401` | Falta la key o no es válida. |
| `403` | La key no tiene `partners:read`, usa el comodín `*` o no pertenece a un partner activo. |

```bash cURL theme={null}
curl --request GET \
  --url 'https://gateway.jelou.ai/v1/partner/ping' \
  --header 'x-api-key: <API_KEY>'
```

```json 200 Éxito theme={null}
{
  "success": true,
  "result": "pong",
  "statusCode": 200
}
```

```json 403 Sin partners:read theme={null}
{
  "success": false,
  "statusCode": 403
}
```


## OpenAPI

````yaml api/partner/openapi.json GET /ping
openapi: 3.1.0
info:
  title: Jelou Partner API
  version: 1.0.0
  description: >-
    Read-only API for partners to monitor the companies subscribed to their
    products. The partner is resolved from the API key, so no route takes a
    partner identifier.
servers:
  - url: https://gateway.jelou.ai/v1/partner
    description: Production
security:
  - apiKey: []
paths:
  /ping:
    get:
      summary: Verify the API key
      description: Confirms that the API key is valid and belongs to an active partner.
      operationId: pingPartner
      responses:
        '200':
          description: The key belongs to an active partner.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - result
                  - statusCode
                properties:
                  success:
                    const: true
                  result:
                    const: pong
                  statusCode:
                    const: 200
        '401':
          description: Missing or invalid API key.
        '403':
          description: >-
            The API key lacks the `partners:read` scope, carries the `*`
            wildcard, or does not belong to an active partner.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - statusCode
                properties:
                  success:
                    const: false
                  statusCode:
                    const: 403
        '404':
          description: >-
            Resource not found. Also returned for a company that is not a
            subscriber of the partner.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - statusCode
                properties:
                  success:
                    const: false
                  statusCode:
                    const: 404
        '429':
          description: 'Rate limit exceeded: 60 requests per minute.'
        '500':
          description: Unexpected error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - statusCode
                properties:
                  success:
                    const: false
                  statusCode:
                    const: 500
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Organization API key with the `partners:read` scope.

````

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