Skip to content
API status
API reference

Create a connection QR code

POST
/api/v1/management/servers/{serverId}/connection-qr
curl --request POST \
--url https://api.koneth.com/api/v1/management/servers/6be9a699-2f28-402e-b64e-93ba6bdafe1b/connection-qr \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--header 'X-Request-Id: onboarding-client-1042' \
--data '{ "mode": "broker" }'

Generates a versioned Koneth Terminal connection payload and an SVG QR image. Requires accounts:connect and access to the target server.

broker identifies the broker without an account. account also prefills an account number. auto_login creates a single-use code that expires after 10 minutes by default and signs in with the selected stored credential. Auto-login QR codes never contain a password.

serverId
required
string format: uuid

UUID of a trading server owned by your organization.

Example
6be9a699-2f28-402e-b64e-93ba6bdafe1b
X-Request-Id
string

Optional correlation ID used for API request billing and logs.

Example
onboarding-client-1042
Media typeapplication/json
object
mode
required

broker selects the broker, account also prefills an account number, and auto_login creates a single-use sign-in code.

string
Allowed values: broker account auto_login
accountNumber

Required for account and auto_login.

string
>= 1 characters <= 32 characters
credentialType

Stored credential used by auto_login. Investor credentials create the server’s read-only access mode.

string
default: trading
Allowed values: trading investor
expiresInSeconds

Lifetime of an auto_login code. Ignored for static broker and account QR codes.

integer
default: 600 >= 60 <= 3600
Examples

Broker only

{
"mode": "broker"
}

Connection payload and QR image created.

Media typeapplication/json
object
connection
required
object
id
required
string format: uuid
mode
required
string
Allowed values: broker account auto_login
credentialType
required
string
Allowed values: trading investor
serverId
required
string format: uuid
serverName
required
string
accountNumber
required
string | null
payload
required

Versioned koneth-trader://connect payload encoded in the QR image.

string
expiresAt
required

Expiry for auto_login; null for a static QR code.

string | null format: date-time
qr
required
object
mimeType
required
string
Allowed value: image/svg+xml
dataBase64
required

Base64-encoded SVG image. Prefix with data:image/svg+xml;base64, to display it.

string
Example
{
"connection": {
"mode": "broker",
"credentialType": "trading"
},
"qr": {
"mimeType": "image/svg+xml"
}
}

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": [
{}
]
}

The request conflicts with the current resource state.

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"
}