Skip to main content
POST
/
sdk
/
{environmentId}
/
waas
/
{walletId}
/
privateKey
/
export
Export private Key of a waas account
curl --request POST \
  --url https://app.dynamicauth.com/api/v0/sdk/{environmentId}/waas/{walletId}/privateKey/export \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "exportId": "<string>",
  "addressType": "<string>"
}
'
import requests

url = "https://app.dynamicauth.com/api/v0/sdk/{environmentId}/waas/{walletId}/privateKey/export"

payload = {
"exportId": "<string>",
"addressType": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({exportId: '<string>', addressType: '<string>'})
};

fetch('https://app.dynamicauth.com/api/v0/sdk/{environmentId}/waas/{walletId}/privateKey/export', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://app.dynamicauth.com/api/v0/sdk/{environmentId}/waas/{walletId}/privateKey/export",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'exportId' => '<string>',
'addressType' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://app.dynamicauth.com/api/v0/sdk/{environmentId}/waas/{walletId}/privateKey/export"

payload := strings.NewReader("{\n \"exportId\": \"<string>\",\n \"addressType\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://app.dynamicauth.com/api/v0/sdk/{environmentId}/waas/{walletId}/privateKey/export")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"exportId\": \"<string>\",\n \"addressType\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://app.dynamicauth.com/api/v0/sdk/{environmentId}/waas/{walletId}/privateKey/export")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"exportId\": \"<string>\",\n \"addressType\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "roomId": "<string>",
  "serverKeygenIds": [
    "<string>"
  ],
  "newServerKeygenIds": [
    "<string>"
  ],
  "walletId": "95b11417-f18f-457f-8804-68e361f9164f"
}
{
"error": "<string>"
}
{
"error": "No jwt provided!"
}
{
"error": "Internal Server Error"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

environmentId
string
required

ID of the environment

Required string length: 36
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Example:

"95b11417-f18f-457f-8804-68e361f9164f"

walletId
string
required

UUID of the wallet

Required string length: 36
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Example:

"95b11417-f18f-457f-8804-68e361f9164f"

Body

application/json

Export Private Key Request

exportId
string
required
addressType
string

Response

Successfully created a room for wallet private key export ceremony

roomId
string
required
serverKeygenIds
string[]
required

A base58 string with a max length of 100 characters

Maximum string length: 100
Pattern: ^[1-9A-HJ-NP-Za-km-z]+$
newServerKeygenIds
string[]

A base58 string with a max length of 100 characters

Maximum string length: 100
Pattern: ^[1-9A-HJ-NP-Za-km-z]+$
walletId
string
Required string length: 36
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Example:

"95b11417-f18f-457f-8804-68e361f9164f"

Last modified on January 21, 2026