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": "<string>",
  "provider": "Figment",
  "walletId": "<string>",
  "status": "Active",
  "requester": {
    "userId": "<string>",
    "tokenId": "<string>"
  },
  "requestBody": {
    "protocol": "Babylon",
    "walletId": "<string>",
    "provider": "Figment",
    "amount": "<string>",
    "duration": 123,
    "externalId": "<string>"
  },
  "dateCreated": "<string>",
  "protocol": "Babylon",
  "data": {
    "finalityProviders": [
      "<string>"
    ],
    "covenantPubkeys": [
      "<string>"
    ],
    "magicBytes": "<string>",
    "covenantThreshold": 123,
    "minUnbondingTime": 123,
    "lockHeight": 123
  },
  "actions": [
    {
      "id": "<string>",
      "stakeId": "<string>",
      "transactionId": "<string>",
      "signatureId": "<string>",
      "transactionHash": "<string>",
      "kind": "Stake",
      "requester": {
        "userId": "<string>",
        "tokenId": "<string>"
      },
      "requestBody": {
        "protocol": "Babylon",
        "walletId": "<string>",
        "provider": "Figment",
        "amount": "<string>",
        "duration": 123,
        "externalId": "<string>"
      },
      "dateCreated": "<string>"
    }
  ]
}

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
Minimum length: 1

Body

application/json
  • Option 1
  • Option 2
  • Option 3
  • Option 4
  • Option 5
protocol
enum<string>
required
Available options:
Iota
kind
enum<string>
required
Available options:
Withdraw
amount
string
required
externalId
string

Response

200 - application/json

Success

  • Babylon
  • Iota
  • Ethereum
actions
object[]
required
id
string
required
walletId
string
required
status
enum<string>
required
Available options:
Active,
Failed,
Staking,
Unbonding,
Unbond,
Withdrawing,
Withdrawn
requester
object
required
requestBody
object
required
  • Babylon
  • Ethereum
  • Iota
dateCreated
string
required
protocol
enum<string>
required
Available options:
Babylon
data
object
required
provider
enum<string>
Available options:
Figment
I