API, CI and scripts

Everything you can do in the app, a script or CI job can do through the management API at https://api.slydog.dev/api/v1. The full reference is at api.slydog.dev/api/v1/docs, with an OpenAPI spec.

API tokens

Owners and admins make tokens on the API tokens page with New token. A token belongs to one organization and carries a role (viewer, editor, admin or owner, up to yours) and an expiry, 90 days unless you choose otherwise. It starts with sly_tok_ and is only shown once.

curl https://api.slydog.dev/api/v1/me \
  -H "Authorization: Bearer $SLYDOG_TOKEN"

Give each job its own token with the smallest role it needs, so you can see what each did in the audit log and revoke one without breaking the others.

Paths

Resources are addressed by key: your organization's slug, then the app, environment and flag. For example, a flag's rules in one environment live under /api/v1/orgs/acme/apps/web/flags/new-checkout/environments/production.

Protected environments

A change to a protected environment, such as production, answers 428 CONFIRMATION_REQUIRED until the request includes "confirm": true. When the organization requires approval, it answers 202 with a change request that someone else approves in the app.

An environment per pull request

Give each pull request's preview its own flags: create an environment cloned from development when the pull request opens, and delete it when it closes. Creating is safe to retry, and the environment deletes itself after ttlSeconds if CI never cleans up. Expiring environments need the Pro plan.

# When the pull request opens: create it (safe to retry), with its own keys.
curl -X PUT "https://api.slydog.dev/api/v1/orgs/acme/apps/web/environments/pr-$PR" \
  -H "Authorization: Bearer $SLYDOG_TOKEN" -H "content-type: application/json" \
  -d '{"clonedFrom": "development", "ttlSeconds": 604800}'
# → { "environment": {…}, "created": true, "serverKey": "sly_srv_…", "clientKey": "sly_cli_…" }

# When it closes: delete it and its keys.
curl -X DELETE "https://api.slydog.dev/api/v1/orgs/acme/apps/web/environments/pr-$PR" \
  -H "Authorization: Bearer $SLYDOG_TOKEN"

Pass the returned server key to your preview deployment as SLYDOG_SERVER_KEY.

Scheduled changes

Apply a flag change at a set time, within a minute of it:

curl -X POST "https://api.slydog.dev/api/v1/orgs/acme/apps/web/flags/new-checkout/environments/production/schedules" \
  -H "Authorization: Bearer $SLYDOG_TOKEN" -H "content-type: application/json" \
  -d '{"change": {"enabled": true, "fallthrough": {"variation": "on"}},
       "applyAt": "2026-12-01T09:00:00-05:00", "confirm": true}'

applyAt needs a time zone offset and can be up to a year ahead. List what's waiting with GET /api/v1/orgs/acme/scheduled-changes, and pause, resume or cancel one with POST …/scheduled-changes/:id/pause, /resume or /cancel.

Ramps

Raise a rollout on a timetable:

curl -X POST "https://api.slydog.dev/api/v1/orgs/acme/apps/web/flags/new-checkout/environments/production/ramps" \
  -H "Authorization: Bearer $SLYDOG_TOKEN" -H "content-type: application/json" \
  -d '{"contextKind": "user", "variations": ["on", "off"], "ramp": "on", "confirm": true,
       "steps": [{"applyAt": "2026-12-01T09:00:00Z", "weight": 5000},
                 {"applyAt": "2026-12-02T09:00:00Z", "weight": 25000},
                 {"applyAt": "2026-12-03T09:00:00Z", "weight": 50000},
                 {"applyAt": "2026-12-04T09:00:00Z", "weight": 100000}]}'

Weights are out of 100,000 for the variation that climbs (here 5%, 25%, 50%, then everyone). It ramps the default rule, or one rule with "rule": "<rule id>".

From Claude

For one-off questions and changes, you may not need a script at all: connect Claude to Slydog and ask in plain language.