Skip to main content

Modify Master API Key

Modify the settings of master api key. Use the api key pending to be modified to call the endpoint. Use master user's api key only.

tip

The API key must have one of the below permissions in order to call this endpoint..

  • master API key: "Account Transfer", "Subaccount Transfer", "Withdrawal"
  • For Read_Write apikey, adding or deleting FiatP2P, FiatBitPay, and FiatConvertBroker is prohibited.
  • ComplianceAppeal can be granted only to Bybit global master accounts with read-write API keys (readOnly=0). Subaccounts, other sites, OAuth, and TaxAPI keys are not supported.
info

Only the api key that calls this interface can be modified

HTTP Request​

POST/v5/user/update-api

Request Parameters​

ParameterRequiredTypeComments
readOnlyfalseinteger0 (default): Read and Write. 1: Read only
permissionsfalseObjectTick the types of permission. Don't send this param if you don't want to change the permission
> ContractTradefalsearrayContract Trade. ["Order","Position"]
> SpotfalsearraySpot Trade. ["SpotTrade"]
> WalletfalsearrayWallet. ["AccountTransfer","SubMemberTransfer"]
> OptionsfalsearrayUSDC Contract. ["OptionsTrade"]
> ExchangefalsearrayConvert. ["ExchangeHistory"]
> EarnfalsearrayEarn product. ["Earn"]
> FiatP2PfalsearrayP2P ["FiatP2POrder", "Advertising"]
> FiatBitPayfalsearrayBybit Pay ["FaitPayOrder"]
> FiatConvertBrokerfalsearrayFiat convert ["FiatConvertBrokerOrder"]
> BitCardfalsearrayBybit card permission, ["BitCard"]
> ByXPostfalsearrayCommunity post permission, ["ByXPost"]
> AffiliatefalsearrayAffiliate permission. ["Affiliate"]
  • This permission is only useful for affiliate
  • If you need this permission, make sure you remove all other permissions
> Derivativesfalsearray["DerivativesTrade"]
> BlockTradefalsearray["BlockTrade"]
> CompliancefalsearrayCompliance permission for querying TM Onchain appeal status and submitting related materials. Set to ["ComplianceAppeal"] to grant or [] to revoke. When updating other permission categories, include the current value to retain this permission. Clear this category before changing readOnly to 1.

Response Parameters​

ParameterTypeComments
idstringUnique id. Internal used
notestringThe remark
apiKeystringApi key
readOnlyinteger0: Read and Write. 1: Read only
secretstringAlways ""
permissionsObjectThe types of permission
> ContractTradearrayPermisson of contract trade
> SpotarrayPermisson of spot
> WalletarrayPermisson of wallet
> OptionsarrayPermission of USDC Contract. It supports trade option and usdc perpetual.
> DerivativesarrayPermission of Unified account
> BlockTradearrayPermission of blocktrade
> ExchangearrayPermission of convert
> EarnarrayPermission of earn
> AffiliatearrayAffiliate permission
> FiatP2ParrayPermission of P2P
> FiatBitPayarrayPermission of Bybit pay
> FiatConvertBrokerarrayPermission of fiat convert
> NFTarrayDeprecated, always []
> CopyTradingarrayDeprecated, always []
> CompliancearrayUpdated Compliance permission, ComplianceAppeal, for querying TM Onchain appeal status and submitting related materials. Only Bybit global master accounts with read-write API keys (readOnly=0) can hold this permission; returns [] when not granted or revoked.
ipsarrayIP bound

Request Example​

POST /v5/user/update-api HTTP/1.1
Host: api.bybit.com
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1676431264739
X-BAPI-RECV-WINDOW: 5000
X-BAPI-SIGN: XXXXXX
Content-Type: application/json

{
"readOnly": null,
"permissions": {
"ContractTrade": [
"Order",
"Position"
],
"Spot": [
"SpotTrade"
],
"Wallet": [
"AccountTransfer",
"SubMemberTransfer"
],
"Options": [
"OptionsTrade"
],
"CopyTrading": [
"CopyTrading"
],
"BlockTrade": [],
"Exchange": [
"ExchangeHistory"
],
"Compliance": [
"ComplianceAppeal"
],
"NFT": [
"NFTQueryProductList"
]
}
}

Response Example​

{
"retCode": 0,
"retMsg": "",
"result": {
"id": "13770661",
"note": "xxxxx",
"apiKey": "xxxxx",
"readOnly": 0,
"secret": "",
"permissions": {
"ContractTrade": [
"Order",
"Position"
],
"Spot": [
"SpotTrade"
],
"Wallet": [
"AccountTransfer",
"SubMemberTransfer"
],
"Options": [
"OptionsTrade"
],
"Derivatives": [
"DerivativesTrade"
],
"CopyTrading": [
"CopyTrading"
],
"BlockTrade": [],
"Exchange": [
"ExchangeHistory"
],
"Earn": [],
"Compliance": [
"ComplianceAppeal"
],
"NFT": [
"NFTQueryProductList"
]
},
"ips": [
"*"
]
},
"retExtInfo": {},
"time": 1676431265427
}