put
https://partner.gupshup.io/partner/account/api/wallet/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
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Which wallets can be markedAny wallet you own, including loader (subscription) wallets. The partner is taken from your token, so you can only change your own default wallet.
Already defaultMarking the wallet that is already your default is rejected with
400, and nothing is changed.
Rate limit10 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
| Parameter | Type | Required | Description |
|---|---|---|---|
walletId | String | Yes | Id of the wallet to mark as default, as returned by GET /partner/account/api/wallet/list. Digits only. Surrounding spaces are trimmed. |
Request Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Partner token of a partner admin or partner user |
Accept | No | application/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
| Header | Value |
|---|---|
Content-Type | application/json |
Response Body
| Parameter | Type | Description |
|---|---|---|
defaultWallet | Boolean | Always true for the marked wallet. |
partnerId | Integer | Your partner id. |
walletId | String | Id of the wallet now marked as default. |
walletName | String | Name of that wallet. |
status | String | API request status (success). |
Error Responses
| Status | When | Response body |
|---|---|---|
| 400 | walletId parameter not sent | {"status": "error", "message": "Required request parameter 'walletId' for method parameter type String is not present"} |
| 400 | walletId empty | {"status": "error", "message": "walletId is required."} |
| 400 | walletId not digits only | {"status": "error", "message": "Invalid walletId 1234567m. Wallet ID must contain digits only (for example 50000838)."} |
| 400 | Wallet 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."} |
| 400 | Wallet is already your default; nothing is changed | {"status": "error", "message": "Wallet 1234567 is already the default wallet for partner 12345."} |
| 401 | Missing 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"} |
| 405 | Wrong HTTP method (e.g. POST) | {"status": "error", "message": "Request method 'POST' is not supported"} |
| 429 | More than 10 requests in 60 seconds | {"status": "error", "message": "Too Many Requests"} |
