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

# Visión general

> Resumen de los endpoints disponibles en el Auth Server

## Base URL

```
https://auth.mipos.co.cr
```

## Endpoints

<CardGroup cols={2}>
  <Card title="POST /login" icon="right-to-bracket" href="/api-reference/login">
    Autenticar con `base` y `password` para obtener un JWT firmado.
  </Card>

  <Card title="GET /.well-known/jwks.json" icon="key" href="/api-reference/jwks">
    Obtener la clave pública RSA en formato JWKS para verificar tokens.
  </Card>
</CardGroup>

## Formato de respuesta

Todas las respuestas son `application/json`.

**Exitosas:**

```json theme={null}
{
  "token": "eyJhbGciOi...",
  "expires_in": 28800,
  "token_type": "Bearer"
}
```

**Errores:**

```json theme={null}
{
  "error": "codigo_de_error",
  "message": "Descripción legible"
}
```

Ver la [referencia de errores](/api-reference/errors) para todos los códigos posibles.

## API Cliente

Una vez autenticado, usa el token JWT para acceder a los endpoints de facturación electrónica:

<Card title="Ver API Cliente" icon="file-invoice-dollar" href="/api-reference/cliente/overview">
  Documentos electrónicos, gestión de emisores, consultas a Hacienda y webhooks.
</Card>

## Headers requeridos

| Header          | Valor              | Requerido en                     |
| --------------- | ------------------ | -------------------------------- |
| `Content-Type`  | `application/json` | `POST /login`                    |
| `Authorization` | `Bearer <token>`   | APIs cliente (no en Auth Server) |
