xYago APIv1

Authentication

Every request is authenticated with an API key of your company. The key determines the company, the environment (live or sandbox) and what it may do (scopes).

Use the Authorization header with the Bearer scheme:

Authorization: Bearer xy_live_AbCd...

If your tool cannot set Authorization, use X-Api-Key: xy_live_AbCd.... If both are present, Authorization wins. A missing, invalid, revoked or expired key returns 401 invalid_api_key.

The company is never sent in the URL or the body: it comes from the key. An id of another company returns 404, exactly like a non-existent one.

Environments: live and sandbox

Key prefixEnvironmentBehaviour
xy_live_liveReal company data. Writes have real effects (notifications, calendar...).
xy_test_test (sandbox)Fixed example data; writes return plausible responses but nothing is stored. See Sandbox.

Both environments use the same base URL (https://api.xyago.com/v1); going live only means switching the key. Each environment has its own settings in the panel (enabled products, rate limit, IP allowlist, webhooks and signing secret).

Creating, rotating and revoking keys

An administrator manages keys in the xYago panel → API Developer → Credentials:

Recommendations: one key per integrated system (the panel log then shows who made each request), least-privilege scopes, keep keys in a secrets manager or environment variable and rotate them periodically or whenever you suspect a leak.

Scopes

ScopeAllows
areas:readList and read areas
areas:writeCreate areas
employees:readList and read employees and import jobs
employees:writeCreate, update, deactivate and import employees
vacations:readList vacation requests and read balances
vacations:writeRequest, approve and reject vacations
time:readList time entries
time:writeRegister time entries

Order of checks

Every request is checked in this order; the first failure is returned:

  1. Valid API key → 401 invalid_api_key
  2. Product enabled for the key's environment → 403 api_disabled
  3. Endpoint enabled → 403 endpoint_disabled
  4. Scope on the key → 403 insufficient_scope
  5. Source IP allowed → 403 ip_not_allowed (IP allowlist)
  6. Rate limit → 429 rate_limited (rate limits)

X-Request-Id

Every response carries X-Request-Id. You can send your own (8 to 64 characters A-Z a-z 0-9 . _ : -, e.g. your ERP job id) and it is echoed back; otherwise xYago generates one (req_...). The id appears in the panel's request log: always include it when contacting support.

curl -i "https://api.xyago.com/v1/employees?limit=10" \
  -H "Authorization: Bearer $XYAGO_API_KEY" \
  -H "X-Request-Id: siesa-sync-20260302-0001"

Transport

HTTPS only. Calls are server to server: there is no CORS, so the API cannot be called from a browser (and must not be: the key would be exposed).