CorefinityCorefinityDocs
Open the Control PanelControl Panel
Get started · 7 of 9

Quickstart: your first API call

Create a read-only API token, call GET /api/user and list your sites.

On this page

Before you start

  • You can sign in to the Control Panel.
  • Your account has two-factor authentication on, if your organisation requires it.
  1. Create a token

    In the Control Panel, open the menu under your name, choose Profile, then API tokens. Create a token with only Read ticked and 7 days under Expires, then copy it: see API tokens.

    Terminal
    export COREFINITY_TOKEN='YOUR_TOKEN'
  2. Check who you are

    Terminal
    curl https://manage.corefinity.com/api/user \
      -H "Authorization: Bearer $COREFINITY_TOKEN" \
      -H "Accept: application/json"
    json
    {
      "user": {
        "id": "1042",
        "company_id": "77",
        "name": "Alex Example",
        "email": "[email protected]"
      }
    }
  3. List your sites

    Terminal
    curl "https://manage.corefinity.com/api/corestack/sites?limit=20" \
      -H "Authorization: Bearer $COREFINITY_TOKEN" \
      -H "Accept: application/json"

    The answer holds sites, one entry per site with its kind, platform and environments, and next_cursor for the next page.

Next

Was this helpful?
Open in ClaudeOpen in ChatGPT