Skip to content
FiveCord Docs

Admin applications

An application is an OAuth2 client that can own one bot account. These routes inspect applications and transfer their ownership.

These records are the same ones the public Applications resource serves. Creation, deletion, renaming, bot creation, redirect URI editing, and credential rotation are available only through that resource.

The Admin view of one application. An application and its bot account share one identifier, so an application that has a bot reports the same snowflake in id and bot_user_id.

FieldTypeDescription
idsnowflakeThe ID of the application
namestringThe display name (1-256 characters)
owner_user_idsnowflakeThe ID of the owning account
owner_username1?stringThe username of the owner
owner_global_name1?stringThe display name of the owner, or null when unset
owner_discriminator1?stringThe discriminator of the owner, as four decimal digits with leading zeroes
bot_user_id?snowflakeThe ID of the bot account, or null when the application has no bot
bot_username2?stringThe username of the bot
bot_global_name2?stringThe display name of the bot, or null when unset
bot_discriminator2?stringThe discriminator of the bot, as four decimal digits with leading zeroes
bot_is_publicbooleanWhether an account other than the owner can add the bot
bot_require_code_grantbooleanWhether adding the bot requires a completed authorisation code grant
oauth2_redirect_uris3array[string]The registered OAuth2 redirect URIs (at most 10 entries)
has_client_secretbooleanWhether a client secret hash is stored
has_bot_tokenbooleanWhether a bot token hash is stored
bot_token_preview?stringThe non-secret trailing preview of the bot token, or null when none is stored
bot_token_created_at?ISO8601 timestampWhen the bot token was created, or null when none is stored
client_secret_created_at4?ISO8601 timestampWhen the client secret was created
version5integerThe optimistic locking version of the stored record (0-2147483647)

1 Null when no account with owner_user_id exists

2 Null when the application has no bot, and also null when no account with bot_user_id exists

3 The stored set arrives in no guaranteed order

4 Null when no client secret is stored, and null for the built-in Admin application

5 Incremented by every stored change, including one made through the public Applications resource

{
"id": "1501314428688998182",
"name": "Metronome",
"owner_user_id": "1483920011884392448",
"owner_username": "wren",
"owner_global_name": "Wren",
"owner_discriminator": "0042",
"bot_user_id": "1501314428688998182",
"bot_username": "metronome",
"bot_global_name": null,
"bot_discriminator": "0001",
"bot_is_public": true,
"bot_require_code_grant": false,
"oauth2_redirect_uris": ["https://example.com/oauth2/callback"],
"has_client_secret": true,
"has_bot_token": true,
"bot_token_preview": "kQ9x",
"bot_token_created_at": "2026-02-11T09:14:02.117Z",
"client_secret_created_at": "2026-02-11T09:13:58.004Z",
"version": 7
}

FiveCord serves one synthetic application for its own Admin OAuth2 client. The application has no bot, so every bot_ field is null or false and has_bot_token is false. It also reports these values:

  • id is the fixed constant 1234567890123456789.
  • name is FiveCord Admin, and owner_user_id is the system account 0.
  • oauth2_redirect_uris has one entry, the configured Admin endpoint followed by /oauth2_callback.
  • has_client_secret is true in every response that returns this application, and client_secret_created_at is null.
  • version is always 1.
GET/v1/admin/applicationsAudit reason

Returns the Admin application objects selected by exactly one of owner_id and guild_id. Requires application:lookup or application:list:by_owner.

The route returns the complete selection in one response. There is no cursor, no limit, and no name search.

FieldTypeDescription
owner_id?1 2snowflakeSelect the applications owned by this account
guild_id?1 3snowflakeSelect the applications whose bot account is a member of this guild

1 Supplying both fails with 400 INVALID_FORM_BODY reported against guild_id, and supplying neither fails against owner_id

2 An owner_id naming no account fails with 404 UNKNOWN_USER

3 A guild_id naming no guild fails with 404 UNKNOWN_GUILD

owner_id returns every application the account owns, with or without a bot. guild_id returns an application only while its own bot account is a member of that guild.

FieldTypeDescription
applications1array[Admin application object]The selected applications

1 No order is guaranteed, and the array is empty when the account owns no application or the guild has no bot member

StatusBodyCondition
200response bodyThe selected applications were returned
404error responseUNKNOWN_USER when owner_id names no account, or UNKNOWN_GUILD when guild_id names no guild

The operation records one Admin audit entry with a metadata key application_count. An owner_id request records action list_user_applications, target type user, and the owner as target ID. A guild_id request records action list_guild_applications, target type guild, and the guild as target ID. A failed request records nothing.

200 requests per minute for each authenticated user, on the admin:lookup bucket.

GET/v1/admin/applications/{application_id}Audit reason

Returns one Admin application object wrapped in a single-member object. Requires application:lookup.

FiveCord answers 200 with application set to null when the ID names no application.

FieldTypeDescription
application_idsnowflakeThe ID of the application
FieldTypeDescription
application1?Admin application objectThe resolved application, or null when no application has this ID

1 Also null for the built-in Admin application on a deployment with no configured Admin client secret

StatusBodyCondition
200response bodyThe lookup completed, whether or not it resolved an application

The operation records one Admin audit entry with action get_application, target type application, the path application_id as target ID, and a metadata key found. found is true when application is an object and false when it is null. A returned application adds owner_user_id, and bot_user_id when the application has a bot.

200 requests per minute for each authenticated user, on the admin:lookup bucket.

PATCH/v1/admin/applications/{application_id}Audit reason

Moves the application to another account and returns the stored Admin application object. Requires application:transfer_ownership.

Ownership is the only field this operation writes. The new owner can be any existing account, and FiveCord does not notify the previous owner.

FieldTypeDescription
application_idsnowflakeThe ID of the application
FieldTypeDescription
new_owner_id1snowflakeThe account to transfer the application to

1 An unknown application fails with 404 UNKNOWN_APPLICATION, and an unknown replacement owner fails with 404 UNKNOWN_USER. FiveCord looks up the application first, so a request where both are unknown fails with UNKNOWN_APPLICATION

FieldTypeDescription
applicationAdmin application objectThe application as stored after the transfer
StatusBodyCondition
200response bodyOwnership was transferred
403error responseFORBIDDEN because the target is the built-in Admin application
404error responseUNKNOWN_APPLICATION for the application, or UNKNOWN_USER for the replacement owner

The transfer changes owner_user_id, increments version, and updates the results of List applications and List user applications. It emits no Gateway Dispatch.

FiveCord records one Admin audit entry with the target type application, the target ID equal to the application ID, and the action transfer_ownership. Its metadata is old_owner_id and new_owner_id. Neither owner is resolved into related_users.

100 requests per minute for each authenticated user, on the admin:guild:modify bucket.