{
  "aod": "0.1",
  "provider": {
    "name": "Featureflip",
    "url": "https://featureflip.io/",
    "portalUrl": "https://featureflip.io/docs/management-api/overview/",
    "apisJsonUrl": "https://featureflip.io/.well-known/apis.json"
  },
  "maturity": "bootstrap-token",
  "account": {
    "required": true,
    "signupUrl": "https://app.featureflip.io/signup",
    "agentPolicy": "allowed",
    "plans": [
      {
        "name": "Free",
        "requiredFor": "10 flags per project, 2 environments per project, 1 project, Up to 3 team members, Flag expiry dates, 7-day audit logs, 1 webhook endpoint, Management API access, Community support",
        "url": "https://featureflip.io/pricing/"
      },
      {
        "name": "Team",
        "requiredFor": "Unlimited flags, 3 environments per project, 3 projects, Up to 5 team members, Scheduled changes, Flag expiry dates, Flag cleanup emails, Require 2FA for every member, 30-day audit logs, 3 webhook endpoints, Management API access, Email support",
        "url": "https://featureflip.io/pricing/"
      },
      {
        "name": "Pro",
        "requiredFor": "Unlimited flags, 5 environments per project, 10 projects, Up to 10 team members, Scheduled changes, Flag expiry dates, Flag cleanup emails, Require 2FA for every member, Flag owners, 30-day audit logs, 3 webhook endpoints, Management API access, Email support",
        "url": "https://featureflip.io/pricing/"
      },
      {
        "name": "Business",
        "requiredFor": "Unlimited flags, Unlimited environments, 25 projects, Up to 25 team members, Scheduled changes, Flag expiry dates, Flag cleanup emails, Require 2FA for every member, Flag owners, SSO with your identity provider (OIDC), Maximum API token lifetime, Required change reasons on critical environments, 90-day audit logs, Unlimited webhook endpoints, Management API access, Priority support",
        "url": "https://featureflip.io/pricing/"
      }
    ],
    "termsOfService": {
      "url": "https://featureflip.io/terms/",
      "acceptance": "implicit"
    }
  },
  "registration": {
    "applicationNoun": "API token",
    "mechanisms": [
      {
        "type": "console-only",
        "description": "The first credential is created in the Featureflip dashboard. A Personal Access Token acts as you and is created under Settings, API Tokens. A Service Token is a machine identity owned by one organization, created under Organization Settings, Service Tokens, and carries a role plus an optional allowlist of the projects it may reach. Both are displayed once, at creation.",
        "docsUrls": [
          "https://featureflip.io/docs/management-api/authentication/",
          "https://featureflip.io/docs/management-api/agents/"
        ]
      },
      {
        "type": "management-api",
        "description": "Everything after that first token is REST. The Management API mints and revokes the SDK keys the Evaluation API authenticates with, one key per environment, so an agent holding a token provisions its own serving credentials without returning to the dashboard.",
        "baseUrl": "https://api.featureflip.io",
        "docsUrls": [
          "https://featureflip.io/docs/management-api/quickstart/",
          "https://featureflip.io/docs/management-api/reference/"
        ],
        "auth": "api-token"
      }
    ]
  },
  "authentication": {
    "methods": [
      {
        "id": "api-token",
        "type": "bearer-env",
        "env": [
          "FEATUREFLIP_TOKEN"
        ],
        "tokenPrefix": "ffp_",
        "bootstrap": "Sign up at https://app.featureflip.io/signup and confirm the email address from the verification email, then create a Personal Access Token under Settings, API Tokens, or a Service Token under Organization Settings, Service Tokens. Token creation requires a confirmed address. The value is shown once.",
        "notes": "A Service Token is presented identically and is prefixed ffs_. Both go in the Authorization header as a bearer token."
      },
      {
        "id": "sdk-key",
        "type": "bearer-env",
        "env": [
          "FEATUREFLIP_SDK_KEY"
        ],
        "tokenPrefix": "sdk_server_",
        "bootstrap": "",
        "notes": "The Evaluation API credential rather than a registration one: scoped to a single environment, minted over the Management API by the flow below or from the dashboard, and never a step on the way to anything else. Client-side keys are prefixed sdk_client_ and are safe to ship in a browser bundle. A server key reads every flag in the project and belongs only on a backend."
      }
    ]
  },
  "credentials": [
    {
      "type": "personal-access-token",
      "fields": {
        "access_token": "Authorization: Bearer ffp_…"
      },
      "ttl": "Optional. A token may be created with an expiry.",
      "rotation": "Create a replacement under Settings, API Tokens, then delete the old one.",
      "oneTimeDisplay": true
    },
    {
      "type": "service-account",
      "fields": {
        "access_token": "Authorization: Bearer ffs_…"
      },
      "ttl": "Optional. A token may be created with an expiry.",
      "rotation": "Create a replacement under Organization Settings, Service Tokens, then delete the old one. A service token survives team changes, so rotation is the only reason one turns over.",
      "oneTimeDisplay": true
    },
    {
      "type": "api-key",
      "fields": {
        "api_key": "Authorization: Bearer sdk_server_… or sdk_client_…"
      },
      "ttl": "None. An SDK key is valid until it is revoked.",
      "rotation": "Create a second key for the environment, move your deployments onto it, then POST to https://api.featureflip.io/api/v1/orgs/{org}/projects/{project}/environments/{env}/sdk-keys/{sdkKey}/revoke.",
      "oneTimeDisplay": true
    }
  ],
  "scopes": {
    "model": "permission-matrix",
    "vocabularyUrl": "https://featureflip.io/docs/management-api/authentication/",
    "resourceSelection": "projects",
    "notes": "Every token acts with one of four hierarchical roles: Owner, Admin, Member, Viewer. A write above the token role answers 403 forbidden. A service token may additionally be held to an allowlist of projects, and a project outside it answers 404 not_found rather than 403, so an excluded project is indistinguishable from one that does not exist. Every resource response also carries an _actions object saying which follow-up operations this token may perform on it, which is the cheapest way to read the effective permission without attempting the call."
  },
  "flow": {
    "args": [
      {
        "name": "project",
        "description": "Key of the project to mint an SDK key in.",
        "required": true
      },
      {
        "name": "environment",
        "description": "Key of the environment within that project.",
        "required": true
      }
    ],
    "steps": [
      {
        "id": "identity",
        "description": "Confirm the token is live and read back what it authenticates as.",
        "auth": "api-token",
        "request": {
          "method": "GET",
          "url": "https://api.featureflip.io/api/v1/me"
        },
        "onStatus": {
          "401": {
            "action": "fail",
            "message": "The token is missing, malformed, expired or revoked. Create a new one in the dashboard under Settings, API Tokens."
          }
        }
      },
      {
        "id": "orgs",
        "description": "List the organizations this token can reach. The response is cursor-paginated, and the first page is enough to pick one.",
        "auth": "api-token",
        "request": {
          "method": "GET",
          "url": "https://api.featureflip.io/api/v1/orgs"
        }
      },
      {
        "id": "sdk_key",
        "description": "Mint a server-side SDK key for the named environment. The plaintext key is in this response and in no other, so capture it here.",
        "auth": "api-token",
        "request": {
          "method": "POST",
          "url": "https://api.featureflip.io/api/v1/orgs/{steps.orgs.items.0.key}/projects/{arg.project}/environments/{arg.environment}/sdk-keys",
          "headers": {
            "Content-Type": "application/json"
          },
          "body": {
            "name": "Onboarding",
            "type": "ServerSide"
          }
        }
      }
    ],
    "outputs": {
      "api_key": "{steps.sdk_key.key}",
      "base_url": "https://eval.featureflip.io"
    }
  },
  "economics": {
    "pricingUrl": "https://featureflip.io/pricing/",
    "freeTier": "Free: free forever, and built to run in production. 10 flags per project, 2 environments per project, 1 project, Up to 3 team members, Flag expiry dates, 7-day audit logs, 1 webhook endpoint, Management API access, Community support. No credit card, no trial window, and it does not expire.",
    "rateLimitsUrl": "https://featureflip.io/docs/management-api/conventions/"
  }
}
