Skip to content
Documentation menu

Getting started

Create a token, make a first request and create a short link.

Prerequisites#

The public API is included in the plans that list it: the limits by plan table shows which ones. Without it, every request answers 402 plan_required.

You must be a member of the workspace. A token acts with your rights in that workspace: a viewer can only read, an editor can also write, and only an admin can manage webhooks. See Roles.

A token belongs to a single workspace. To work in several workspaces, create one token per workspace.

Create a token#

  1. Open the app, then Settings, API.
  2. Click Create a token and give it a name, for example the name of the integration.
  3. Choose the access: read, or read and write, for each family, and Manage for webhooks. Keep only what you need (see Scopes).
  4. Choose an expiry: 30, 90 or 365 days, or none. Prefer a limited lifetime.
  5. Click Create token, then copy it. It starts with hyl_.

In your scripts, read it from the HYLLO_API_TOKEN environment variable, as the examples in this guide do.

First request#

Call GET /me: no scope is required, it is the reference connection test. The base URL is given in Requests.

curl -sS "https://api.hyllo.fr/api/public/v1/me" \
  -H "Authorization: Bearer $HYLLO_API_TOKEN" \
  -H "Accept: application/json"

The response describes the token, its workspace and the requests-per-minute limit:

{
  "data": {
    "token": {
      "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "name": "Zapier",
      "prefix": "hyl_a1b2c3d4",
      "scopes": [
        "short_links:read",
        "short_links:write"
      ],
      "expires_at": "2027-03-01T10:00:00.000000Z"
    },
    "workspace": {
      "id": "01J9ZQ0K7TQ3P8W2M5N6R4S1VX",
      "name": "My workspace",
      "plan": "pro"
    },
    "rate_limit": {
      "per_minute": 60
    }
  }
}

rate_limit.per_minute depends on the plan; it is null when the plan has no limit by contract. A 401 means a token that was copied wrongly, expired or revoked; a 402, a plan without API access.

Create a short link with POST /short-links (scope short_links:write). Only url is required; title is optional.

curl -sS -X POST "https://api.hyllo.fr/api/public/v1/short-links" \
  -H "Authorization: Bearer $HYLLO_API_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"url":"https://example.com/promo","title":"Promo"}'

The 201 response contains the created link, with its short address (short_url). The Idempotency-Key header prevents a duplicate if you replay the request after a network error: see Idempotency.

A 402 means the short link quota is reached or a feature the plan does not include.

Next steps#

Continue with Authentication to pick the right scopes, Requests for pagination, Errors to know what to do with a failure, and Webhooks to receive events. A few common operations:

Read next