v1 · OpenAPI 3.1Dashboard

Die API-Referenz ist auf Englisch.

Applications

Update an application

PATCH/v1/applications/{app_id}

Changes the name, the redirect URLs, the country restriction or Google sign-in. Send only the fields you change; the others keep their value. redirect_urls and country_restriction replace the whole stored value, so send the complete list every time.

region cannot be changed. Sending the current region is accepted; any other value answers 422 region_immutable. Fields this endpoint does not know, such as sector and user_countries, are ignored.

Redirect URLs. Google sign-in sends users back only to a URL on this list, and the redirect_uri of GET /v1/oauth/google/start must match an entry character for character: scheme, host, port, path and query. There are no wildcards. Each URL uses https; http is allowed only for localhost, 127.0.0.1 and [::1], for local development. A URL has a host, no user name or password, no #, * or spaces, and at most 500 characters. An application has at most 20; duplicates are dropped.

The application's region is told about the change before it is saved. If the region cannot answer, nothing changes and the response is 503 region_unavailable.

A secret key can update only its own application; of the secret key roles, only admin has applications:write.

Benötigter Scope
applications:write
Authentifizierung
Secret key · Organization API key

Pfadparameter

  • app_idstringerforderlich

    Beispiel: app_seller

Body application/json

  • namestring

  • regionstring

    Optional. Must equal the application's region; any other value is 422 region_immutable.

    Werte: EU TR

  • redirect_urlsstring (uri)[]

    Replaces the whole list. The exact URLs Google sign-in may send users back to. https, or http for localhost, 127.0.0.1 and [::1]; a host, no user name or password, no #, * or spaces, at most 500 characters each. Duplicates are dropped. With an empty list, Google sign-in cannot start.

  • country_restrictionobject

    Replaces the stored restriction. A missing mode means all, missing countries means [].

    2 Felder
    • modestring

      Werte: all only_listedStandard: all

    • countriesstring[]

  • providersobject

    1 Feld
    • googleobject

      1 Feld
      • enabledbooleanerforderlich

        Turns Google sign-in on or off for this application. On by default.

Antworten

  • 200OKApplication

    The updated application

    • idstring

      Beispiel: app_seller

    • namestring

    • regionstring

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

      Werte: EU TR

    • multi_regionboolean

      Not available yet; planned.

      Standard: false

    • blockstring

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

      Werte: west eastStandard: west

    • sectorstringnullable

    • user_countriesstring[]

    • country_restrictionobject

      2 Felder
      • modestring

        Werte: 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 Feld
      • googleobject

        2 Felder
        • enabledboolean

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

          Standard: true

        • modestring

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

          Werte: platform

    • publishable_keystring

      Beispiel: pk_live_tr_8f2c91a7b3d04e5f

    • created_atstring (date-time)

  • 400Bad RequestError

    invalid_redirect_url (the message names the URL and the rule it breaks), too_many_redirect_urls (more than 20), invalid_name (1-100 characters), invalid_country_restriction (mode must be all or only_listed), invalid_country (not an ISO 3166-1 alpha-2 code) or invalid_body.

    • errorobjecterforderlich

      5 Felder
      • codestringerforderlich

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

        Beispiel: region_unavailable

      • messagestringerforderlich

        Plain English, for developers

      • regionstringnullable

        Region that produced the error, if any

        Werte: EU TR

      • retryablebooleanerforderlich

      • 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).

    • errorobjecterforderlich

      5 Felder
      • codestringerforderlich

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

        Beispiel: region_unavailable

      • messagestringerforderlich

        Plain English, for developers

      • regionstringnullable

        Region that produced the error, if any

        Werte: EU TR

      • retryablebooleanerforderlich

      • 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).

    • errorobjecterforderlich

      5 Felder
      • codestringerforderlich

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

        Beispiel: region_unavailable

      • messagestringerforderlich

        Plain English, for developers

      • regionstringnullable

        Region that produced the error, if any

        Werte: EU TR

      • retryablebooleanerforderlich

      • detailsobject

  • 404Not FoundError

    Not found

    • errorobjecterforderlich

      5 Felder
      • codestringerforderlich

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

        Beispiel: region_unavailable

      • messagestringerforderlich

        Plain English, for developers

      • regionstringnullable

        Region that produced the error, if any

        Werte: EU TR

      • retryablebooleanerforderlich

      • detailsobject

  • 422Unprocessable ContentError

    region_immutable: region differs from the application's region.

    • errorobjecterforderlich

      5 Felder
      • codestringerforderlich

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

        Beispiel: region_unavailable

      • messagestringerforderlich

        Plain English, for developers

      • regionstringnullable

        Region that produced the error, if any

        Werte: EU TR

      • retryablebooleanerforderlich

      • detailsobject

  • 503Service UnavailableError

    region_unavailable: the user's region cannot answer right now. Retry after Retry-After seconds.

    • errorobjecterforderlich

      5 Felder
      • codestringerforderlich

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

        Beispiel: region_unavailable

      • messagestringerforderlich

        Plain English, for developers

      • regionstringnullable

        Region that produced the error, if any

        Werte: EU TR

      • retryablebooleanerforderlich

      • detailsobject