Update the draft with a new set of rules
Legacy Endpoint – Update the draft and return its validation. Note:
- This endpoint will remain available for the foreseeable future and is not deprecated. - The
updateDraftendpoint under policy/paths provides policy type-specific operations and improved functionality. - These endpoints are currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks TAP, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com.
PUT
/
tap
/
draft
TypeScript
const response: Promise<FireblocksResponse<LegacyDraftReviewAndValidationResponse>> = fireblocks.policyEditorBeta.updateDraftLegacy(policyEditorBetaApiUpdateDraftLegacyRequest);CompletableFuture<ApiResponse<LegacyDraftReviewAndValidationResponse>> response = fireblocks.policyEditorBeta().updateDraftLegacy(legacyPolicyRules, idempotencyKey);response = fireblocks.policy_editor_beta.update_draft_legacy(legacy_policy_rules, idempotency_key);curl --request PUT \
--url https://api.fireblocks.io/v1/tap/draft \
--header 'Content-Type: application/json' \
--data '
{
"rules": [
{
"type": "TRANSFER",
"asset": "<string>",
"amount": "<string>",
"periodSec": 123,
"operator": "<string>",
"operators": {
"wildcard": "*",
"users": [
"<string>"
],
"usersGroups": [
"<string>"
],
"services": [
"<string>"
]
},
"designatedSigner": "<string>",
"designatedSigners": {
"users": [
"<string>"
],
"usersGroups": [
"<string>"
]
},
"srcId": "<string>",
"src": {
"ids": [
[
"<string>"
]
]
},
"dstId": "<string>",
"dst": {
"ids": [
[
"<string>"
]
]
},
"authorizers": [
"<string>"
],
"authorizersCount": 123,
"authorizationGroups": {
"allowOperatorAsAuthorizer": true,
"groups": [
{
"users": [
"<string>"
],
"usersGroups": [
"<string>"
],
"th": 123
}
]
},
"amountAggregation": {},
"rawMessageSigning": {
"algorithm": "<string>",
"derivationPath": {
"path": [
123
]
}
},
"applyForApprove": true,
"applyForTypedMessage": true,
"externalDescriptor": "<string>"
}
]
}
'const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
rules: [
{
type: 'TRANSFER',
asset: '<string>',
amount: '<string>',
periodSec: 123,
operator: '<string>',
operators: {
wildcard: '*',
users: ['<string>'],
usersGroups: ['<string>'],
services: ['<string>']
},
designatedSigner: '<string>',
designatedSigners: {users: ['<string>'], usersGroups: ['<string>']},
srcId: '<string>',
src: {ids: [['<string>']]},
dstId: '<string>',
dst: {ids: [['<string>']]},
authorizers: ['<string>'],
authorizersCount: 123,
authorizationGroups: {
allowOperatorAsAuthorizer: true,
groups: [{users: ['<string>'], usersGroups: ['<string>'], th: 123}]
},
amountAggregation: {},
rawMessageSigning: {algorithm: '<string>', derivationPath: {path: [123]}},
applyForApprove: true,
applyForTypedMessage: true,
externalDescriptor: '<string>'
}
]
})
};
fetch('https://api.fireblocks.io/v1/tap/draft', 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://api.fireblocks.io/v1/tap/draft",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'rules' => [
[
'type' => 'TRANSFER',
'asset' => '<string>',
'amount' => '<string>',
'periodSec' => 123,
'operator' => '<string>',
'operators' => [
'wildcard' => '*',
'users' => [
'<string>'
],
'usersGroups' => [
'<string>'
],
'services' => [
'<string>'
]
],
'designatedSigner' => '<string>',
'designatedSigners' => [
'users' => [
'<string>'
],
'usersGroups' => [
'<string>'
]
],
'srcId' => '<string>',
'src' => [
'ids' => [
[
'<string>'
]
]
],
'dstId' => '<string>',
'dst' => [
'ids' => [
[
'<string>'
]
]
],
'authorizers' => [
'<string>'
],
'authorizersCount' => 123,
'authorizationGroups' => [
'allowOperatorAsAuthorizer' => true,
'groups' => [
[
'users' => [
'<string>'
],
'usersGroups' => [
'<string>'
],
'th' => 123
]
]
],
'amountAggregation' => [
],
'rawMessageSigning' => [
'algorithm' => '<string>',
'derivationPath' => [
'path' => [
123
]
]
],
'applyForApprove' => true,
'applyForTypedMessage' => true,
'externalDescriptor' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"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://api.fireblocks.io/v1/tap/draft"
payload := strings.NewReader("{\n \"rules\": [\n {\n \"type\": \"TRANSFER\",\n \"asset\": \"<string>\",\n \"amount\": \"<string>\",\n \"periodSec\": 123,\n \"operator\": \"<string>\",\n \"operators\": {\n \"wildcard\": \"*\",\n \"users\": [\n \"<string>\"\n ],\n \"usersGroups\": [\n \"<string>\"\n ],\n \"services\": [\n \"<string>\"\n ]\n },\n \"designatedSigner\": \"<string>\",\n \"designatedSigners\": {\n \"users\": [\n \"<string>\"\n ],\n \"usersGroups\": [\n \"<string>\"\n ]\n },\n \"srcId\": \"<string>\",\n \"src\": {\n \"ids\": [\n [\n \"<string>\"\n ]\n ]\n },\n \"dstId\": \"<string>\",\n \"dst\": {\n \"ids\": [\n [\n \"<string>\"\n ]\n ]\n },\n \"authorizers\": [\n \"<string>\"\n ],\n \"authorizersCount\": 123,\n \"authorizationGroups\": {\n \"allowOperatorAsAuthorizer\": true,\n \"groups\": [\n {\n \"users\": [\n \"<string>\"\n ],\n \"usersGroups\": [\n \"<string>\"\n ],\n \"th\": 123\n }\n ]\n },\n \"amountAggregation\": {},\n \"rawMessageSigning\": {\n \"algorithm\": \"<string>\",\n \"derivationPath\": {\n \"path\": [\n 123\n ]\n }\n },\n \"applyForApprove\": true,\n \"applyForTypedMessage\": true,\n \"externalDescriptor\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
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))
}require 'uri'
require 'net/http'
url = URI("https://api.fireblocks.io/v1/tap/draft")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"rules\": [\n {\n \"type\": \"TRANSFER\",\n \"asset\": \"<string>\",\n \"amount\": \"<string>\",\n \"periodSec\": 123,\n \"operator\": \"<string>\",\n \"operators\": {\n \"wildcard\": \"*\",\n \"users\": [\n \"<string>\"\n ],\n \"usersGroups\": [\n \"<string>\"\n ],\n \"services\": [\n \"<string>\"\n ]\n },\n \"designatedSigner\": \"<string>\",\n \"designatedSigners\": {\n \"users\": [\n \"<string>\"\n ],\n \"usersGroups\": [\n \"<string>\"\n ]\n },\n \"srcId\": \"<string>\",\n \"src\": {\n \"ids\": [\n [\n \"<string>\"\n ]\n ]\n },\n \"dstId\": \"<string>\",\n \"dst\": {\n \"ids\": [\n [\n \"<string>\"\n ]\n ]\n },\n \"authorizers\": [\n \"<string>\"\n ],\n \"authorizersCount\": 123,\n \"authorizationGroups\": {\n \"allowOperatorAsAuthorizer\": true,\n \"groups\": [\n {\n \"users\": [\n \"<string>\"\n ],\n \"usersGroups\": [\n \"<string>\"\n ],\n \"th\": 123\n }\n ]\n },\n \"amountAggregation\": {},\n \"rawMessageSigning\": {\n \"algorithm\": \"<string>\",\n \"derivationPath\": {\n \"path\": [\n 123\n ]\n }\n },\n \"applyForApprove\": true,\n \"applyForTypedMessage\": true,\n \"externalDescriptor\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"draftResponse": {
"status": "<string>",
"rules": [
{
"type": "TRANSFER",
"asset": "<string>",
"amount": "<string>",
"periodSec": 123,
"operator": "<string>",
"operators": {
"wildcard": "*",
"users": [
"<string>"
],
"usersGroups": [
"<string>"
],
"services": [
"<string>"
]
},
"designatedSigner": "<string>",
"designatedSigners": {
"users": [
"<string>"
],
"usersGroups": [
"<string>"
]
},
"srcId": "<string>",
"src": {
"ids": [
[
"<string>"
]
]
},
"dstId": "<string>",
"dst": {
"ids": [
[
"<string>"
]
]
},
"authorizers": [
"<string>"
],
"authorizersCount": 123,
"authorizationGroups": {
"allowOperatorAsAuthorizer": true,
"groups": [
{
"users": [
"<string>"
],
"usersGroups": [
"<string>"
],
"th": 123
}
]
},
"amountAggregation": {},
"rawMessageSigning": {
"algorithm": "<string>",
"derivationPath": {
"path": [
123
]
}
},
"applyForApprove": true,
"applyForTypedMessage": true,
"externalDescriptor": "<string>"
}
],
"draftId": "<string>",
"metadata": {
"editedBy": "<string>",
"editedAt": "<string>",
"publishedBy": "<string>",
"publishedAt": "<string>"
}
},
"validation": {
"status": "<string>",
"checkResult": {
"errors": 123,
"results": [
{
"index": 123,
"errors": [
{
"errorMessage": "<string>",
"errorCode": 123,
"errorCodeName": "<string>"
}
]
}
]
}
}
}{
"message": "<string>",
"code": 123
}Headers
A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.
Body
application/json
Policy rules
Show child attributes
Show child attributes
Was this page helpful?
Previous
Send publish request for a certain draft idLegacy Endpoint – Send publish request of certain draft id and returns the response.
**Note:**
- This endpoint will remain available for the foreseeable future and is not deprecated. - The `publishDraft` endpoint under policy/paths provides improved functionality and better performance. - These endpoints are currently in beta and might be subject to changes.
If you want to participate and learn more about the Fireblocks TAP, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com.
Next
⌘I
TypeScript
const response: Promise<FireblocksResponse<LegacyDraftReviewAndValidationResponse>> = fireblocks.policyEditorBeta.updateDraftLegacy(policyEditorBetaApiUpdateDraftLegacyRequest);CompletableFuture<ApiResponse<LegacyDraftReviewAndValidationResponse>> response = fireblocks.policyEditorBeta().updateDraftLegacy(legacyPolicyRules, idempotencyKey);response = fireblocks.policy_editor_beta.update_draft_legacy(legacy_policy_rules, idempotency_key);curl --request PUT \
--url https://api.fireblocks.io/v1/tap/draft \
--header 'Content-Type: application/json' \
--data '
{
"rules": [
{
"type": "TRANSFER",
"asset": "<string>",
"amount": "<string>",
"periodSec": 123,
"operator": "<string>",
"operators": {
"wildcard": "*",
"users": [
"<string>"
],
"usersGroups": [
"<string>"
],
"services": [
"<string>"
]
},
"designatedSigner": "<string>",
"designatedSigners": {
"users": [
"<string>"
],
"usersGroups": [
"<string>"
]
},
"srcId": "<string>",
"src": {
"ids": [
[
"<string>"
]
]
},
"dstId": "<string>",
"dst": {
"ids": [
[
"<string>"
]
]
},
"authorizers": [
"<string>"
],
"authorizersCount": 123,
"authorizationGroups": {
"allowOperatorAsAuthorizer": true,
"groups": [
{
"users": [
"<string>"
],
"usersGroups": [
"<string>"
],
"th": 123
}
]
},
"amountAggregation": {},
"rawMessageSigning": {
"algorithm": "<string>",
"derivationPath": {
"path": [
123
]
}
},
"applyForApprove": true,
"applyForTypedMessage": true,
"externalDescriptor": "<string>"
}
]
}
'const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
rules: [
{
type: 'TRANSFER',
asset: '<string>',
amount: '<string>',
periodSec: 123,
operator: '<string>',
operators: {
wildcard: '*',
users: ['<string>'],
usersGroups: ['<string>'],
services: ['<string>']
},
designatedSigner: '<string>',
designatedSigners: {users: ['<string>'], usersGroups: ['<string>']},
srcId: '<string>',
src: {ids: [['<string>']]},
dstId: '<string>',
dst: {ids: [['<string>']]},
authorizers: ['<string>'],
authorizersCount: 123,
authorizationGroups: {
allowOperatorAsAuthorizer: true,
groups: [{users: ['<string>'], usersGroups: ['<string>'], th: 123}]
},
amountAggregation: {},
rawMessageSigning: {algorithm: '<string>', derivationPath: {path: [123]}},
applyForApprove: true,
applyForTypedMessage: true,
externalDescriptor: '<string>'
}
]
})
};
fetch('https://api.fireblocks.io/v1/tap/draft', 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://api.fireblocks.io/v1/tap/draft",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'rules' => [
[
'type' => 'TRANSFER',
'asset' => '<string>',
'amount' => '<string>',
'periodSec' => 123,
'operator' => '<string>',
'operators' => [
'wildcard' => '*',
'users' => [
'<string>'
],
'usersGroups' => [
'<string>'
],
'services' => [
'<string>'
]
],
'designatedSigner' => '<string>',
'designatedSigners' => [
'users' => [
'<string>'
],
'usersGroups' => [
'<string>'
]
],
'srcId' => '<string>',
'src' => [
'ids' => [
[
'<string>'
]
]
],
'dstId' => '<string>',
'dst' => [
'ids' => [
[
'<string>'
]
]
],
'authorizers' => [
'<string>'
],
'authorizersCount' => 123,
'authorizationGroups' => [
'allowOperatorAsAuthorizer' => true,
'groups' => [
[
'users' => [
'<string>'
],
'usersGroups' => [
'<string>'
],
'th' => 123
]
]
],
'amountAggregation' => [
],
'rawMessageSigning' => [
'algorithm' => '<string>',
'derivationPath' => [
'path' => [
123
]
]
],
'applyForApprove' => true,
'applyForTypedMessage' => true,
'externalDescriptor' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"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://api.fireblocks.io/v1/tap/draft"
payload := strings.NewReader("{\n \"rules\": [\n {\n \"type\": \"TRANSFER\",\n \"asset\": \"<string>\",\n \"amount\": \"<string>\",\n \"periodSec\": 123,\n \"operator\": \"<string>\",\n \"operators\": {\n \"wildcard\": \"*\",\n \"users\": [\n \"<string>\"\n ],\n \"usersGroups\": [\n \"<string>\"\n ],\n \"services\": [\n \"<string>\"\n ]\n },\n \"designatedSigner\": \"<string>\",\n \"designatedSigners\": {\n \"users\": [\n \"<string>\"\n ],\n \"usersGroups\": [\n \"<string>\"\n ]\n },\n \"srcId\": \"<string>\",\n \"src\": {\n \"ids\": [\n [\n \"<string>\"\n ]\n ]\n },\n \"dstId\": \"<string>\",\n \"dst\": {\n \"ids\": [\n [\n \"<string>\"\n ]\n ]\n },\n \"authorizers\": [\n \"<string>\"\n ],\n \"authorizersCount\": 123,\n \"authorizationGroups\": {\n \"allowOperatorAsAuthorizer\": true,\n \"groups\": [\n {\n \"users\": [\n \"<string>\"\n ],\n \"usersGroups\": [\n \"<string>\"\n ],\n \"th\": 123\n }\n ]\n },\n \"amountAggregation\": {},\n \"rawMessageSigning\": {\n \"algorithm\": \"<string>\",\n \"derivationPath\": {\n \"path\": [\n 123\n ]\n }\n },\n \"applyForApprove\": true,\n \"applyForTypedMessage\": true,\n \"externalDescriptor\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
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))
}require 'uri'
require 'net/http'
url = URI("https://api.fireblocks.io/v1/tap/draft")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"rules\": [\n {\n \"type\": \"TRANSFER\",\n \"asset\": \"<string>\",\n \"amount\": \"<string>\",\n \"periodSec\": 123,\n \"operator\": \"<string>\",\n \"operators\": {\n \"wildcard\": \"*\",\n \"users\": [\n \"<string>\"\n ],\n \"usersGroups\": [\n \"<string>\"\n ],\n \"services\": [\n \"<string>\"\n ]\n },\n \"designatedSigner\": \"<string>\",\n \"designatedSigners\": {\n \"users\": [\n \"<string>\"\n ],\n \"usersGroups\": [\n \"<string>\"\n ]\n },\n \"srcId\": \"<string>\",\n \"src\": {\n \"ids\": [\n [\n \"<string>\"\n ]\n ]\n },\n \"dstId\": \"<string>\",\n \"dst\": {\n \"ids\": [\n [\n \"<string>\"\n ]\n ]\n },\n \"authorizers\": [\n \"<string>\"\n ],\n \"authorizersCount\": 123,\n \"authorizationGroups\": {\n \"allowOperatorAsAuthorizer\": true,\n \"groups\": [\n {\n \"users\": [\n \"<string>\"\n ],\n \"usersGroups\": [\n \"<string>\"\n ],\n \"th\": 123\n }\n ]\n },\n \"amountAggregation\": {},\n \"rawMessageSigning\": {\n \"algorithm\": \"<string>\",\n \"derivationPath\": {\n \"path\": [\n 123\n ]\n }\n },\n \"applyForApprove\": true,\n \"applyForTypedMessage\": true,\n \"externalDescriptor\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"draftResponse": {
"status": "<string>",
"rules": [
{
"type": "TRANSFER",
"asset": "<string>",
"amount": "<string>",
"periodSec": 123,
"operator": "<string>",
"operators": {
"wildcard": "*",
"users": [
"<string>"
],
"usersGroups": [
"<string>"
],
"services": [
"<string>"
]
},
"designatedSigner": "<string>",
"designatedSigners": {
"users": [
"<string>"
],
"usersGroups": [
"<string>"
]
},
"srcId": "<string>",
"src": {
"ids": [
[
"<string>"
]
]
},
"dstId": "<string>",
"dst": {
"ids": [
[
"<string>"
]
]
},
"authorizers": [
"<string>"
],
"authorizersCount": 123,
"authorizationGroups": {
"allowOperatorAsAuthorizer": true,
"groups": [
{
"users": [
"<string>"
],
"usersGroups": [
"<string>"
],
"th": 123
}
]
},
"amountAggregation": {},
"rawMessageSigning": {
"algorithm": "<string>",
"derivationPath": {
"path": [
123
]
}
},
"applyForApprove": true,
"applyForTypedMessage": true,
"externalDescriptor": "<string>"
}
],
"draftId": "<string>",
"metadata": {
"editedBy": "<string>",
"editedAt": "<string>",
"publishedBy": "<string>",
"publishedAt": "<string>"
}
},
"validation": {
"status": "<string>",
"checkResult": {
"errors": 123,
"results": [
{
"index": 123,
"errors": [
{
"errorMessage": "<string>",
"errorCode": 123,
"errorCodeName": "<string>"
}
]
}
]
}
}
}{
"message": "<string>",
"code": 123
}