Skip to content
API status
API reference

Withdraw account funds

POST
/api/v1/management/servers/{serverId}/accounts/{accountNumber}/finance/withdrawals
curl --request POST \
--url https://api.koneth.com/api/v1/management/servers/6be9a699-2f28-402e-b64e-93ba6bdafe1b/accounts/7001042/finance/withdrawals \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: account-create-client-1042' \
--header 'X-Request-Id: onboarding-client-1042' \
--data '{ "amount": 5000, "description": "Evaluation fee credit", "requestId": "deposit-client-1042" }'

Queues a withdrawal greater than 0 and no more than 1,000,000,000. Requires finance:withdraw.

serverId
required
string format: uuid

UUID of a trading server owned by your organization.

Example
6be9a699-2f28-402e-b64e-93ba6bdafe1b
accountNumber
required
string
>= 4 characters <= 32 characters /^[A-Za-z0-9_-]+$/

Trading account number.

Example
7001042
Idempotency-Key
required
string
>= 1 characters <= 100 characters

Unique key for this logical mutation. Reuse it only when retrying the same operation. Maximum 100 characters.

Example
account-create-client-1042
X-Request-Id
string

Optional correlation ID used for API request billing and logs.

Example
onboarding-client-1042
Media typeapplication/json
object
amount
required
number
> 0 <= 1000000000
description
string
<= 250 characters
requestId
required
string
>= 1 characters <= 100 characters
Example
{
"amount": 5000,
"description": "Evaluation fee credit",
"requestId": "deposit-client-1042"
}

An earlier command was returned for the idempotency key.

Media typeapplication/json
object
command
required
object
id
required
string format: uuid
operation
required
string
Allowed values: account.create account.update account.enable account.disable account.archive account.delete account.password_reset account.investor_password_reset account.history_export finance.deposit finance.withdraw
status
required
string
Allowed values: queued leased succeeded failed expired
managedAccountId
One of:
string format: uuid
attempts
required
integer
payload
object
key
additional properties
any
result
One of:
object
key
additional properties
any
errorCode
One of:
string
errorMessage
One of:
string
idempotencyKey
required
string
createdAt
required
string format: date-time
completedAt
One of:
string format: date-time
key
additional properties
any
duplicate
required
boolean
Example
{
"command": {
"operation": "account.create",
"status": "queued"
}
}

Operation queued.

Media typeapplication/json
object
command
required
object
id
required
string format: uuid
operation
required
string
Allowed values: account.create account.update account.enable account.disable account.archive account.delete account.password_reset account.investor_password_reset account.history_export finance.deposit finance.withdraw
status
required
string
Allowed values: queued leased succeeded failed expired
managedAccountId
One of:
string format: uuid
attempts
required
integer
payload
object
key
additional properties
any
result
One of:
object
key
additional properties
any
errorCode
One of:
string
errorMessage
One of:
string
idempotencyKey
required
string
createdAt
required
string format: date-time
completedAt
One of:
string format: date-time
key
additional properties
any
duplicate
required
boolean
Example
{
"command": {
"operation": "account.create",
"status": "queued"
}
}

Invalid request.

Media typeapplication/json
object
error
required
string
issues

Validation issue details when the request fails schema validation.

Array<object>
object
key
additional properties
any
Examplegenerated
{
"error": "example",
"issues": [
{}
]
}

Management API authentication is missing or invalid.

Media typeapplication/json
object
error
required
string
issues

Validation issue details when the request fails schema validation.

Array<object>
object
key
additional properties
any
Example
{
"error": "Management API authentication required"
}

The organization cannot cover the active API request price.

Media typeapplication/json
object
error
required
string
issues

Validation issue details when the request fails schema validation.

Array<object>
object
key
additional properties
any
Example
{
"error": "Insufficient API credits"
}

The key lacks the required scope or server access.

Media typeapplication/json
object
error
required
string
issues

Validation issue details when the request fails schema validation.

Array<object>
object
key
additional properties
any
Example
{
"error": "Missing API scope: accounts:read"
}

The requested resource was not found.

Media typeapplication/json
object
error
required
string
issues

Validation issue details when the request fails schema validation.

Array<object>
object
key
additional properties
any
Examplegenerated
{
"error": "example",
"issues": [
{}
]
}

Unexpected server error.

Media typeapplication/json
object
error
required
string
issues

Validation issue details when the request fails schema validation.

Array<object>
object
key
additional properties
any
Example
{
"error": "Internal server error"
}