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.
Path parameters
app_idstringrequiredExample:
app_seller
Body application/json
namestringregionstringOptional. Must equal the application's region; any other value is
422 region_immutable.Values:
EUTRredirect_urlsstring (uri)[]Replaces the whole list. The exact URLs Google sign-in may send users back to.
https, orhttpforlocalhost,127.0.0.1and[::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_restrictionobjectReplaces the stored restriction. A missing
modemeansall, missingcountriesmeans[].2 properties
modestringValues:
allonly_listedDefault:allcountriesstring[]
providersobject1 property
googleobject1 property
enabledbooleanrequiredTurns Google sign-in on or off for this application. On by default.
Responses
200OKApplication
The updated application
idstringExample:
app_sellernamestringregionstringMore regions will be added; clients must accept unknown values.
Values:
EUTRmulti_regionbooleanNot available yet; planned.
Default:
falseblockstringEast block planned; operated by a separate company. Every application is
westtoday.Values:
westeastDefault:westsectorstringnullableuser_countriesstring[]country_restrictionobject2 properties
modestringValues:
allonly_listedcountriesstring[]
redirect_urlsstring[]The exact URLs Google sign-in may send users back to. Empty until you set them with
PATCH /applications/{app_id}.providersobjectSocial sign-in providers. Google is the only one today.
1 property
googleobject2 properties
enabledbooleanOn unless turned off with
PATCH /applications/{app_id}.Default:
truemodestringplatform: Fox Login's own Google app. Using your own Google app is planned.Values:
platform
publishable_keystringExample:
pk_live_tr_8f2c91a7b3d04e5fcreated_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(modemust bealloronly_listed),invalid_country(not an ISO 3166-1 alpha-2 code) orinvalid_body.errorobjectrequired5 properties
codestringrequiredStable machine code, e.g. email_exists, country_not_allowed, user_moved, method_not_available, region_unavailable
Example:
region_unavailablemessagestringrequiredPlain English, for developers
regionstringnullableRegion that produced the error, if any
Values:
EUTRretryablebooleanrequireddetailsobject
401UnauthorizedError
Missing or invalid key or token. The Management API answers
missing_api_key(no Bearer token) orinvalid_api_key(unknown or revoked secret key or organization API key).errorobjectrequired5 properties
codestringrequiredStable machine code, e.g. email_exists, country_not_allowed, user_moved, method_not_available, region_unavailable
Example:
region_unavailablemessagestringrequiredPlain English, for developers
regionstringnullableRegion that produced the error, if any
Values:
EUTRretryablebooleanrequireddetailsobject
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) ornot_a_member(X-Fox-Tenant names a tenant the caller does not belong to).errorobjectrequired5 properties
codestringrequiredStable machine code, e.g. email_exists, country_not_allowed, user_moved, method_not_available, region_unavailable
Example:
region_unavailablemessagestringrequiredPlain English, for developers
regionstringnullableRegion that produced the error, if any
Values:
EUTRretryablebooleanrequireddetailsobject
404Not FoundError
Not found
errorobjectrequired5 properties
codestringrequiredStable machine code, e.g. email_exists, country_not_allowed, user_moved, method_not_available, region_unavailable
Example:
region_unavailablemessagestringrequiredPlain English, for developers
regionstringnullableRegion that produced the error, if any
Values:
EUTRretryablebooleanrequireddetailsobject
422Unprocessable ContentError
region_immutable:regiondiffers from the application's region.errorobjectrequired5 properties
codestringrequiredStable machine code, e.g. email_exists, country_not_allowed, user_moved, method_not_available, region_unavailable
Example:
region_unavailablemessagestringrequiredPlain English, for developers
regionstringnullableRegion that produced the error, if any
Values:
EUTRretryablebooleanrequireddetailsobject
503Service UnavailableError
region_unavailable: the user's region cannot answer right now. Retry afterRetry-Afterseconds.errorobjectrequired5 properties
codestringrequiredStable machine code, e.g. email_exists, country_not_allowed, user_moved, method_not_available, region_unavailable
Example:
region_unavailablemessagestringrequiredPlain English, for developers
regionstringnullableRegion that produced the error, if any
Values:
EUTRretryablebooleanrequireddetailsobject