Skip to main content
POST
Create a new policy

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.

Body

application/json
name
string
required

Human-readable name for the policy

Example:

"High Value Transaction Policy"

description
string | null

Optional description of the policy's purpose

Example:

"Requires approval for transactions above $10,000"

signer_group_id
string | null

ID of the signer group to associate with this policy

Example:

"grp_2N4YkKpKu7M3mKpGYmF8kcJ8oZT"

rules
object[]

Initial rules for this policy

Response

Policy created successfully

id
string
required

Unique identifier for the policy

Example:

"pol_2N4YkKpKu7M3mKpGYmF8kcJ8oZT"

version
integer<int32>
required

Version number of the policy (incremented on rule changes)

Example:

1

name
string
required

Human-readable name for the policy

Example:

"High Value Transaction Policy"

created_at
integer
required

Unix timestamp when the policy was created

Example:

1640995200

updated_at
integer
required

Unix timestamp when the policy was last updated

Example:

1640995200

client_id
string

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"

signer_group_id
string | null

ID of the signer group that governs mutations of this policy. Members of this group must endorse any add_policy_rule, update_policy_rule, remove_policy_rule, or delete_policy intent.

Example:

"grp_2N4YkKpKu7M3mKpGYmF8kcJ8oZT"

description
string | null

Optional description of the policy's purpose

Example:

"Requires approval for transactions above $10,000"

rules
object[]

Rules that make up this policy