Mark wallet as default

  • Marks one of your wallets as your default wallet.
  • All your other wallets are unmarked, so exactly one wallet is the default afterwards.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
📘

Which wallets can be marked

Any wallet you own, including loader (subscription) wallets. The partner is taken from your token, so you can only change your own default wallet.

🚧

Already default

Marking the wallet that is already your default is rejected with 400, and nothing is changed.

🚧

Rate limit

10 requests per 60 seconds.

API Request

curl --location --request PUT 'https://partner.gupshup.io/partner/account/api/wallet/default?walletId={{WALLET_ID}}' \
  --header 'Accept: application/json' \
  --header 'Authorization: {{PARTNER_TOKEN}}'

Query parameters

ParameterTypeRequiredDescription
walletIdStringYesId of the wallet to mark as default, as returned by GET /partner/account/api/wallet/list. Digits only. Surrounding spaces are trimmed.

Request Headers

HeaderRequiredValue
AuthorizationYesPartner token of a partner admin or partner user
AcceptNoapplication/json

Request Body

None. The wallet is passed as the walletId query parameter.

API Response

{
    "defaultWallet": true,
    "partnerId": 12345,
    "walletId": "1234567",
    "walletName": "MarketingUSD",
    "status": "success"
}

Response Headers

HeaderValue
Content-Typeapplication/json

Response Body

ParameterTypeDescription
defaultWalletBooleanAlways true for the marked wallet.
partnerIdIntegerYour partner id.
walletIdStringId of the wallet now marked as default.
walletNameStringName of that wallet.
statusStringAPI request status (success).

Error Responses

StatusWhenResponse body
400walletId parameter not sent{"status": "error", "message": "Required request parameter 'walletId' for method parameter type String is not present"}
400walletId empty{"status": "error", "message": "walletId is required."}
400walletId not digits only{"status": "error", "message": "Invalid walletId 1234567m. Wallet ID must contain digits only (for example 50000838)."}
400Wallet is not one of your wallets{"status": "error", "message": "No wallet found with ID 1234567 for partner 12345. Verify the wallet ID and try again."}
400Wallet is already your default; nothing is changed{"status": "error", "message": "Wallet 1234567 is already the default wallet for partner 12345."}
401Missing or invalid token, or not a partner token (e.g. an app token){"status": "error", "message": "Unauthorised access to the resource. Please review request parameters and headers and retry"}
405Wrong HTTP method (e.g. POST){"status": "error", "message": "Request method 'POST' is not supported"}
429More than 10 requests in 60 seconds{"status": "error", "message": "Too Many Requests"}
Query Params
string
required
^\s*\d+\s*$

Id of the wallet to mark as default, as returned by GET /partner/account/api/wallet/list. Digits only. Surrounding spaces are trimmed.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json