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

# Short Links

> Crea y gestiona enlaces cortos con tracking integrado.

Shimli incluye un acortador de URLs integrado. Útil para campañas por WhatsApp y SMS donde los enlaces largos se ven feos y quieres trackear clics.

## Crear un short link

```bash theme={null}
curl -X POST https://api.shimli.app/v1/short \
  -H "Content-Type: application/json" \
  -d '{
    "token": "TOKEN_SHIMLI",
    "longUrl": "https://mitienda.com/productos/credito-personal-express-2026?utm_source=whatsapp"
  }'
```

### Con identificador personalizado

```json theme={null}
{
  "token": "TOKEN_SHIMLI",
  "longUrl": "https://mitienda.com/promo",
  "idUrl": "promo-julio-2026"
}
```

<Callout type="info">
  Si especificas `idUrl`, el enlace corto será `sh.li/promo-julio-2026` (o tu dominio corto configurado). Si lo omites, Shimli genera un identificador automático.
</Callout>

## Actualizar el destino de un short link

Puedes cambiar a dónde apunta un short link sin cambiar la URL corta:

```bash theme={null}
curl -X PATCH https://api.shimli.app/v1/short \
  -H "Content-Type: application/json" \
  -d '{
    "idUrl": "ID_SHORT_LINK",
    "token": "TOKEN_SHIMLI",
    "longUrl": "https://mitienda.com/nueva-promo-agosto"
  }'
```

Esto es útil para campañas recurrentes: mantienes el mismo enlace corto en tus plantillas pero actualizas el destino según la promo vigente.

## Casos de uso

* **Campañas por WhatsApp**: enlaces cortos en plantillas para trackear clics
* **SMS**: ahorra caracteres (importante en SMS con límite de 160)
* **QR codes**: short links generan QRs más limpios
* **A/B testing**: un mismo short link que actualizas a diferentes destinos

## Referencia

* [Create Short Link](/api-reference/short-links/create)
* [Update Short Link](/api-reference/short-links/update)
