Skip to main content
PATCH
Update an API key

Authorizations

x-api-key
string
header
required

Headers

x-idempotency-key
string<uuid>
required

Unique key (UUID) to ensure request idempotency on POST, PUT and PATCH requests.

A key is scoped to your client, the HTTP method and the path, and is remembered for 24 hours after a successful (below 400) response. Repeating the same request (same JSON body, whatever the key order or whitespace) with the same key within that window returns the original response with X-Idempotent-Replayed: true instead of executing the request again. Using the same key on the same endpoint with a different body returns 422 with problem type idempotency-key-reused; the request is not executed. Error responses (4xx and 5xx) are not remembered, so a request refused for a fixable reason can be corrected and retried under the same key. Request bodies that are not JSON (for example file uploads) are not compared.

Path Parameters

api_key_id
string
required

Unique identifier of the API key to update KSUID is a 27-character globally unique ID that combines a timestamp with a random component. Used for all entity identifiers in the Dakota platform.

Required string length: 27
Pattern: ^[0-9A-Za-z]{27}$
Example:

"1NFHrqBHb3cTfLVkFSGmHZqdDPi"

Body

application/json

Send name, scope or both. A new scope applies from the next request made with the key, and the key value stays the same.

name
string

A label that says what the key is for. No two live keys of a client share a name.

Required string length: 1 - 128
Example:

"prod-payouts"

scope
enum<string>

What the key can do. The scopes nest: read_only is inside operate, and operate is inside full_access.

  • full_access: everything that an admin of the client can do. A key created without a scope gets it.
  • operate: moves money and runs daily operations, but cannot add recipients or destinations, delete anything, or manage users, keys, signers, policies, mandates or webhooks. Wallet transactions and scheduled payments can still pay an address that is not a saved destination. A wallet transaction needs signatures from the signers of the wallet, and the policies of the wallet apply to it. A scheduled payment goes out only when a mandate of the client covers it.
  • read_only: reads only.

A key does not take the role of the person who created it.

Available options:
full_access,
operate,
read_only
Example:

"read_only"

Response

API key updated

id
string
required

KSUID is a 27-character globally unique ID that combines a timestamp with a random component. Used for all entity identifiers in the Dakota platform.

Required string length: 27
Pattern: ^[0-9A-Za-z]{27}$
Example:

"1NFHrqBHb3cTfLVkFSGmHZqdDPi"

name
string
required

A label that says what the key is for. No two live keys of a client share a name.

Required string length: 1 - 128
Example:

"prod-payouts"

user_id
string
required

KSUID is a 27-character globally unique ID that combines a timestamp with a random component. Used for all entity identifiers in the Dakota platform.

Required string length: 27
Pattern: ^[0-9A-Za-z]{27}$
Example:

"1NFHrqBHb3cTfLVkFSGmHZqdDPi"

key_suffix
string
required

Last six characters of the API key

Example:

"HpAb4a"

created_at
integer
required

Timestamp of when the API key was created

Example:

1234567890

last_used_at
integer | null
required

Timestamp of the most recent request made with the API key, accurate to one hour. Null when the key was never used.

Example:

1234567890

scope
enum<string>

What the key can do. The scopes nest: read_only is inside operate, and operate is inside full_access.

  • full_access: everything that an admin of the client can do. A key created without a scope gets it.
  • operate: moves money and runs daily operations, but cannot add recipients or destinations, delete anything, or manage users, keys, signers, policies, mandates or webhooks. Wallet transactions and scheduled payments can still pay an address that is not a saved destination. A wallet transaction needs signatures from the signers of the wallet, and the policies of the wallet apply to it. A scheduled payment goes out only when a mandate of the client covers it.
  • read_only: reads only.

A key does not take the role of the person who created it.

Available options:
full_access,
operate,
read_only
Example:

"read_only"