Skip to main content
POST
/
api-keys
Create an API key
curl --request POST \
  --url https://api-sandbox.ledgersyncappv2.com/v3/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "scopes": [
    "<string>"
  ]
}
'
{
  "id": "15a81d54-0471-4f3c-9c1f-2f0a0c7b8d31",
  "prefix": "sk_test_a89d15d0",
  "scopes": [],
  "created_at": "2023-11-07T05:31:56Z",
  "secret": "sk_test_a89d15d0805c041eb058f040669c3a6d",
  "last_used_at": "2023-11-07T05:31:56Z",
  "revoked_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Pass your secret key in the Authorization header as a Bearer token: Authorization: Bearer sk_test_... (sandbox) or Bearer sk_live_... (production).

Keys are created in the developer portal and the plaintext secret is shown exactly once at creation. Treat them like passwords — never embed them in mobile apps or front-end code.

Body

application/json
environment
enum<string>
required
Available options:
sandbox,
live
scopes
string[]
required
Minimum array length: 1

Response

Key created. The secret field is the only time we show you the plaintext value — copy it now.

id
string
required

Plain UUID v4 (e.g. 15a81d54-0471-...). No prefix is applied today. SDKs should treat the value as opaque.

Example:

"15a81d54-0471-4f3c-9c1f-2f0a0c7b8d31"

environment
enum<string>
required
Available options:
sandbox,
live
prefix
string
required

First few characters of the key, safe to display in lists and logs (the rest is irrecoverable after creation).

Example:

"sk_test_a89d15d0"

scopes
enum<string>[]
required
Available options:
read:clients,
write:clients,
read:connections,
write:connections,
read:accounts,
read:transactions,
read:statements,
write:statements,
manage:webhooks,
read:webhooks,
write:webhooks,
read:api-keys,
write:api-keys
status
enum<string>
required
Available options:
active,
revoked
created_at
string<date-time>
required
secret
string
required

The full plaintext API key — pass this as Authorization: Bearer <secret> on every request.

Returned once at creation (or rotation). We only keep a hash on our side, so if you lose it you'll need to create a new key.

The first few characters (visible in prefix) start with sk_test_ for sandbox keys or sk_live_ for live keys.

Example:

"sk_test_a89d15d0805c041eb058f040669c3a6d"

last_used_at
string<date-time> | null
revoked_at
string<date-time> | null