Skip to main content
POST
/
staking
/
stakes
/
{stakeId}
/
actions
Create Stake Action
curl --request POST \
  --url https://api.dfns.io/staking/stakes/{stakeId}/actions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-DFNS-USERACTION: <api-key>' \
  --data '
{
  "protocol": "Iota",
  "kind": "Withdraw",
  "amount": "<string>",
  "externalId": "<string>"
}
'
{
  "id": "stk-0pmu3-tog2k-fdtn0teii2i4r13f",
  "walletId": "wa-5pfuu-9euek-h0odgb6snva8ph3k",
  "status": "Active",
  "requester": {
    "userId": "us-6b58p-r53sr-rlrd3l5cj3uc4ome",
    "tokenId": "to-202a0-cdo33-o65mbt6q758lvvnt"
  },
  "requestBody": {
    "protocol": "Babylon",
    "walletId": "wa-5pfuu-9euek-h0odgb6snva8ph3k",
    "provider": "Figment",
    "amount": "<string>",
    "duration": 123,
    "externalId": "<string>"
  },
  "dateCreated": "2023-04-14T20:41:28.715Z",
  "protocol": "Babylon",
  "data": {
    "finalityProviders": [
      "<string>"
    ],
    "covenantPubkeys": [
      "<string>"
    ],
    "magicBytes": "<string>",
    "covenantThreshold": 123,
    "minUnbondingTime": 123,
    "lockHeight": 123
  },
  "actions": [
    {
      "id": "stka-567ui-9g9b7-ftgvpstk8qfa71b4",
      "stakeId": "stk-0pmu3-tog2k-fdtn0teii2i4r13f",
      "status": "PendingPolicyApproval",
      "kind": "Stake",
      "requester": {
        "userId": "us-6b58p-r53sr-rlrd3l5cj3uc4ome",
        "tokenId": "to-202a0-cdo33-o65mbt6q758lvvnt"
      },
      "requestBody": {
        "protocol": "Babylon",
        "walletId": "wa-5pfuu-9euek-h0odgb6snva8ph3k",
        "provider": "Figment",
        "amount": "<string>",
        "duration": 123,
        "externalId": "<string>"
      },
      "dateCreated": "2023-04-14T20:41:28.715Z",
      "transactionId": "tx-583hu-sp2p7-slvb9nqpa3hd8bus",
      "signatureId": "sig-4sfvl-f4iha-umighfi3hk4t54dr",
      "transactionHash": "<string>",
      "failureReason": "<string>"
    }
  ],
  "provider": "Figment"
}

Documentation Index

Fetch the complete documentation index at: https://docs.dfns.co/llms.txt

Use this file to discover all available pages before exploring further.

Authentication

✅ Organization User (CustomerEmployee)
❌ Delegated User (EndUser)
✅ Service Account

Required Permissions

Stakes:Update: Always required.

Authorizations

Authorization
string
header
required

Bearer Token: Used to authenticate API requests. More details how to generate the token: Authentication flows

X-DFNS-USERACTION
string
header
required

User Action Signature: Used to sign the change-inducing API requests. More details how to generate the token: User Action Signing flows

Path Parameters

stakeId
string
required
Required string length: 1 - 64
Pattern: ^stk-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{14,16}$

Body

application/json
protocol
enum<string>
required
Available options:
Iota
kind
enum<string>
required
Available options:
Withdraw
amount
string
required
Pattern: ^\d+$
externalId
string

Response

200 - application/json

Success

id
string
required
Required string length: 1 - 64
Pattern: ^stk-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{14,16}$
Example:

"stk-0pmu3-tog2k-fdtn0teii2i4r13f"

walletId
string
required

Wallet id.

Required string length: 1 - 64
Pattern: ^wa-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{14,16}$
Example:

"wa-5pfuu-9euek-h0odgb6snva8ph3k"

status
enum<string>
required

Status of the stake position.

StatusDefinition
StakingThe stake is being created and funds are being delegated to the validator.
ActiveThe stake is active and earning rewards.
UnbondingThe stake is in the process of being unbonded (cooldown period).
UnbondThe stake has been unbonded and is ready for withdrawal.
WithdrawingThe staked funds are in the process of being withdrawn.
WithdrawnThe staked funds have been fully withdrawn.
FailedThe staking operation failed.
Available options:
Active,
Failed,
Staking,
Unbonding,
Unbond,
Withdrawing,
Withdrawn
requester
object
required

The user who initiated the request.

requestBody
Babylon · object
required
dateCreated
string<date-time>
required

ISO 8601 date (must be UTC). When the stake was created.

Example:

"2023-04-14T20:41:28.715Z"

protocol
enum<string>
required
Available options:
Babylon
data
object
required
actions
object[]
required
provider
enum<string>

The staking infrastructure provider used to manage the stake.

Available options:
Figment
Last modified on May 11, 2026