v1 · OpenAPI 3.1Dashboard

Applications

Create an application

POST/v1/applications

Creates a new, separate login with its own users, a publishable key and a first secret key. The response's secret_key holds that key (name Default, role admin); the full key appears only in this response, so store it on your server right away.

The body takes no redirect URLs or provider settings; set them afterwards with PATCH /applications/{app_id}. Google sign-in is on by default (providers.google.enabled: true) and works once the application has at least one redirect URL.

region is required and cannot be changed later (PATCH answers 422 region_immutable): all end users of the application are stored in that region. Pick the region of your users' country (TR for Turkey, EU for everyone else at launch).

Needs an organization API key or a dashboard session. The caller receives the new application's admin secret key, so it needs all of that role's scopes (applications:read, applications:write, users:read, users:write, events:read), or it gets 403 missing_scope. A secret key gets 403 secret_key_not_allowed.

Required scope
applications:write
Auth
Organization API key · Dashboard session

Headers

  • X-Fox-Tenantstring

    Required when authenticating with a dashboard session token instead of a tenant API key.

    Example: ten_8f2c91a7

Body application/json

  • namestringrequired

  • regionstringrequired

    All end users of this application are stored in this region, whatever country they choose (single-region applications). Cannot be changed after creation; PATCH answers 422 region_immutable.

    Values: EU TR

  • sectorstring

    finance, fintech, payments, insurance, health, government, telecom and crypto show a warning and a contact address in the dashboard. Banks, payment institutions and e-money institutions are excluded by the Terms.

    Values: ecommerce saas education health finance fintech payments insurance government telecom crypto gaming media other

  • user_countriesstring[]

    Informational only today; does not affect sign-up. ISO 3166-1 alpha-2.

    Default: []

  • country_restrictionobject

    Default all: users from every country can sign up and are stored in the application's region. Accepting users from countries with their own data-location rules (for example Russia or China) is the tenant's responsibility under the DPA. only_listed: only the listed countries can sign up; others get 422 country_not_allowed.

    2 properties
    • modestring

      Values: all only_listedDefault: all

    • countriesstring[]

Responses

  • 201CreatedApplicationWithKeys

    Created. secret_key.key is returned only once.

    • idstring

      Example: app_seller

    • namestring

    • regionstring

      More regions will be added; clients must accept unknown values.

      Values: EU TR

    • multi_regionboolean

      Not available yet; planned.

      Default: false

    • blockstring

      East block planned; operated by a separate company. Every application is west today.

      Values: west eastDefault: west

    • sectorstringnullable

    • user_countriesstring[]

    • country_restrictionobject

      2 properties
      • modestring

        Values: all only_listed

      • countriesstring[]

    • redirect_urlsstring[]

      The exact URLs Google sign-in may send users back to. Empty until you set them with PATCH /applications/{app_id}.

    • providersobject

      Social sign-in providers. Google is the only one today.

      1 property
      • googleobject

        2 properties
        • enabledboolean

          On unless turned off with PATCH /applications/{app_id}.

          Default: true

        • modestring

          platform: Fox Login's own Google app. Using your own Google app is planned.

          Values: platform

    • publishable_keystring

      Example: pk_live_tr_8f2c91a7b3d04e5f

    • created_atstring (date-time)

    • secret_keySecretKeyWithKeyrequired

      A new secret key. The full key appears only in this response; only its hash is stored.

      8 properties
      • idstring

        Example: key_3b7e10c2

      • namestring

        Example: Billing worker

      • rolestring

        admin (Full access), editor (Read and write users) or viewer (Read only). The secretKey security scheme lists the scopes of each role.

        Values: admin editor viewer

      • prefixstring

        Example: sk_live_eu_Q9xT

      • keystring

        The full key. Send it as Authorization: Bearer <key>.

        Example: sk_live_eu_Q9xTa7Lm2Nb4Vc6Xz8Sd1Fg3Hj5Kl7Pq9Wr2Ey4Tu6I

      • created_atstring (date-time)

      • created_bystringnullable

        Example: usr_eu_8f2c91a7

      • last_used_atnull

  • 400Bad RequestError

    invalid_name (1-100 characters), invalid_country_restriction (mode must be all or only_listed) or invalid_country (not an ISO 3166-1 alpha-2 code, in country_restriction.countries or user_countries).

    • errorobjectrequired

      5 properties
      • codestringrequired

        Stable machine code, e.g. email_exists, country_not_allowed, user_moved, method_not_available, region_unavailable

        Example: region_unavailable

      • messagestringrequired

        Plain English, for developers

      • regionstringnullable

        Region that produced the error, if any

        Values: EU TR

      • retryablebooleanrequired

      • detailsobject

  • 401UnauthorizedError

    Missing or invalid key or token. The Management API answers missing_api_key (no Bearer token) or invalid_api_key (unknown or revoked secret key or organization API key).

    • errorobjectrequired

      5 properties
      • codestringrequired

        Stable machine code, e.g. email_exists, country_not_allowed, user_moved, method_not_available, region_unavailable

        Example: region_unavailable

      • messagestringrequired

        Plain English, for developers

      • regionstringnullable

        Region that produced the error, if any

        Values: EU TR

      • retryablebooleanrequired

      • detailsobject

  • 403ForbiddenError

    missing_scope (the role or scopes of the key, or the dashboard role, lack the scope), secret_key_not_allowed (a secret key called an endpoint for the whole organization) or not_a_member (X-Fox-Tenant names a tenant the caller does not belong to).

    • errorobjectrequired

      5 properties
      • codestringrequired

        Stable machine code, e.g. email_exists, country_not_allowed, user_moved, method_not_available, region_unavailable

        Example: region_unavailable

      • messagestringrequired

        Plain English, for developers

      • regionstringnullable

        Region that produced the error, if any

        Values: EU TR

      • retryablebooleanrequired

      • detailsobject

  • 503Service UnavailableError

    region_unavailable: the application is not created if its region cannot be told about it.

    • errorobjectrequired

      5 properties
      • codestringrequired

        Stable machine code, e.g. email_exists, country_not_allowed, user_moved, method_not_available, region_unavailable

        Example: region_unavailable

      • messagestringrequired

        Plain English, for developers

      • regionstringnullable

        Region that produced the error, if any

        Values: EU TR

      • retryablebooleanrequired

      • detailsobject