Gravv docs
Docs Agent Sign in Get API keys

Update an external account

Corrects an external account. Use it to fix the bank details of a setup_failed account, which runs setup again, or to add the national ID, PIX key or address that a payout corridor asks for. An empty body on a failed account retries setup.

It always returns 202. Get the account until it is active or setup_failed. A 409 means the account cannot change in its current state, so add a new one instead. This route needs no Idempotency-Key.

PATCHhttps://api.gravv.xyz/v1/external-accounts/{external_account_id}

Path Parameters

ID of the external account

Request Body

Cannot be cleared

Possible values: individual, business

Possible values: ach, wire, rtp

Possible values: checking, savings

A new address needs address_line1, city and country. It cannot be cleared.

Checked against the country's postal code format

Alpha-2 code

Request Examples

{
"account_number": "87654321",
"bank_postal_code": "E14 5HQ"
}

Responses

Status Description
202 Updated. Setup runs again after a bank details change.
400 Invalid field or ID
404 No such external account
409 The account cannot change in its state, its address is already registered, the change makes a duplicate, or another request changed it first
500 The update failed. Retry later.

202 response

An external account. Empty fields are left out.

Use it as the transfer destination

How the account is paid. bank_account and mobile_money are active at once. swift, sepa, ach_wire and fps need a setup step and start as pending.

Possible values: bank_account, mobile_money, swift, sepa, ach_wire, fps

Possible values: bank, mobile_money, swift, swift_intermediary

In upper case. It may be the name the bank holds.

The account holder's address. Required for swift, sepa, ach_wire and fps, and for some banks and payout corridors.

Checked against the country's postal code format

Alpha-2 code

Possible values: individual, business

pending while setup runs, then active (ready for transfers) or setup_failed (read error_message, then correct it with PATCH).

Possible values: pending, active, setup_failed, archived, deleted

Why setup failed

The national ID with only the last 4 characters shown

400 response

Null, except for a duplicate, which returns the existing payee_id

What went wrong

Error code such as ERROR_CODE_DUPLICATE_PAYEE, when one is sent

{
"data": null,
"error": "account name cannot be cleared: invalid input"
}

404 response

Null, except for a duplicate, which returns the existing payee_id

What went wrong

Error code such as ERROR_CODE_DUPLICATE_PAYEE, when one is sent

{
"data": null,
"error": "payee 6a2f0c1e-93b4-4d0e-8f57-1c2b3d4e5f60: resource not found",
"code": "ERROR_CODE_NOT_FOUND"
}

409 response

Null, except for a duplicate, which returns the existing payee_id

What went wrong

Error code such as ERROR_CODE_DUPLICATE_PAYEE, when one is sent

{
"data": null,
"error": "payee 6a2f0c1e-93b4-4d0e-8f57-1c2b3d4e5f60 is not correctable in its current state (active): invalid state transition",
"code": "ERROR_CODE_PAYEE_INVALID_STATE"
}

500 response

Null, except for a duplicate, which returns the existing payee_id

What went wrong

Error code such as ERROR_CODE_DUPLICATE_PAYEE, when one is sent

{
"data": null,
"error": "We couldn't update this payee. Please try again later.",
"code": "ERROR_CODE_INTERNAL_ERROR"
}

Authorization

  • ApiKeyAuth
Was this page helpful?
ESC