Submit the payload to create new wallet
curl --request POST \
--url https://api.custody.api-zodia.io/v2/api/core/wallets/{walletId}/intent \
--header 'Content-Type: application/json' \
--data '
{
"request": {
"author": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"domainId": "8a0b02c3-fdd8-452e-bc6e-ef07a335ec7e"
},
"expiryAt": "2022-01-09T10:51:00Z",
"targetDomainId": "cef1a96b-aa13-443a-b4cc-e3286f2af910",
"id": "b0393b72-83e8-4809-ba89-7e63ea11a49a",
"payload": {
"id": "39ed5bd5-5844-44b9-b4b4-6d3533c3b3e9",
"alias": "ZTEST-NOBENF-849P8XKKAO",
"providerDetails": {
"vaultId": "2d95a0f0-2acf-11ec-8d3d-0242ac130003",
"keyStrategy": "VaultHard",
"type": "Vault"
},
"ledgerId": "bitcoin-testnet",
"lock": "Unlocked",
"customProperties": {
"property1": "string",
"property2": "string"
},
"type": "v0_CreateAccount",
"description": "Description of my account"
},
"customProperties": {
"property1": "string",
"property2": "string"
},
"type": "Propose",
"description": "create an intent for account"
},
"signature": "MEUCIC3VIuw4pfk+BLnZrk1qklGS9phAlQFSQoAnlhw59x7cAiEAm5nq8ANlHcRNcONj5FXXl1v0EK5U8gZyQ22geFSsFL8="
}
'import requests
url = "https://api.custody.api-zodia.io/v2/api/core/wallets/{walletId}/intent"
payload = {
"request": {
"author": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"domainId": "8a0b02c3-fdd8-452e-bc6e-ef07a335ec7e"
},
"expiryAt": "2022-01-09T10:51:00Z",
"targetDomainId": "cef1a96b-aa13-443a-b4cc-e3286f2af910",
"id": "b0393b72-83e8-4809-ba89-7e63ea11a49a",
"payload": {
"id": "39ed5bd5-5844-44b9-b4b4-6d3533c3b3e9",
"alias": "ZTEST-NOBENF-849P8XKKAO",
"providerDetails": {
"vaultId": "2d95a0f0-2acf-11ec-8d3d-0242ac130003",
"keyStrategy": "VaultHard",
"type": "Vault"
},
"ledgerId": "bitcoin-testnet",
"lock": "Unlocked",
"customProperties": {
"property1": "string",
"property2": "string"
},
"type": "v0_CreateAccount",
"description": "Description of my account"
},
"customProperties": {
"property1": "string",
"property2": "string"
},
"type": "Propose",
"description": "create an intent for account"
},
"signature": "MEUCIC3VIuw4pfk+BLnZrk1qklGS9phAlQFSQoAnlhw59x7cAiEAm5nq8ANlHcRNcONj5FXXl1v0EK5U8gZyQ22geFSsFL8="
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
request: {
author: {
id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
domainId: '8a0b02c3-fdd8-452e-bc6e-ef07a335ec7e'
},
expiryAt: '2022-01-09T10:51:00Z',
targetDomainId: 'cef1a96b-aa13-443a-b4cc-e3286f2af910',
id: 'b0393b72-83e8-4809-ba89-7e63ea11a49a',
payload: {
id: '39ed5bd5-5844-44b9-b4b4-6d3533c3b3e9',
alias: 'ZTEST-NOBENF-849P8XKKAO',
providerDetails: {
vaultId: '2d95a0f0-2acf-11ec-8d3d-0242ac130003',
keyStrategy: 'VaultHard',
type: 'Vault'
},
ledgerId: 'bitcoin-testnet',
lock: 'Unlocked',
customProperties: {property1: 'string', property2: 'string'},
type: 'v0_CreateAccount',
description: 'Description of my account'
},
customProperties: {property1: 'string', property2: 'string'},
type: 'Propose',
description: 'create an intent for account'
},
signature: 'MEUCIC3VIuw4pfk+BLnZrk1qklGS9phAlQFSQoAnlhw59x7cAiEAm5nq8ANlHcRNcONj5FXXl1v0EK5U8gZyQ22geFSsFL8='
})
};
fetch('https://api.custody.api-zodia.io/v2/api/core/wallets/{walletId}/intent', 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.custody.api-zodia.io/v2/api/core/wallets/{walletId}/intent",
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([
'request' => [
'author' => [
'id' => '497f6eca-6276-4993-bfeb-53cbbbba6f08',
'domainId' => '8a0b02c3-fdd8-452e-bc6e-ef07a335ec7e'
],
'expiryAt' => '2022-01-09T10:51:00Z',
'targetDomainId' => 'cef1a96b-aa13-443a-b4cc-e3286f2af910',
'id' => 'b0393b72-83e8-4809-ba89-7e63ea11a49a',
'payload' => [
'id' => '39ed5bd5-5844-44b9-b4b4-6d3533c3b3e9',
'alias' => 'ZTEST-NOBENF-849P8XKKAO',
'providerDetails' => [
'vaultId' => '2d95a0f0-2acf-11ec-8d3d-0242ac130003',
'keyStrategy' => 'VaultHard',
'type' => 'Vault'
],
'ledgerId' => 'bitcoin-testnet',
'lock' => 'Unlocked',
'customProperties' => [
'property1' => 'string',
'property2' => 'string'
],
'type' => 'v0_CreateAccount',
'description' => 'Description of my account'
],
'customProperties' => [
'property1' => 'string',
'property2' => 'string'
],
'type' => 'Propose',
'description' => 'create an intent for account'
],
'signature' => 'MEUCIC3VIuw4pfk+BLnZrk1qklGS9phAlQFSQoAnlhw59x7cAiEAm5nq8ANlHcRNcONj5FXXl1v0EK5U8gZyQ22geFSsFL8='
]),
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.custody.api-zodia.io/v2/api/core/wallets/{walletId}/intent"
payload := strings.NewReader("{\n \"request\": {\n \"author\": {\n \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n \"domainId\": \"8a0b02c3-fdd8-452e-bc6e-ef07a335ec7e\"\n },\n \"expiryAt\": \"2022-01-09T10:51:00Z\",\n \"targetDomainId\": \"cef1a96b-aa13-443a-b4cc-e3286f2af910\",\n \"id\": \"b0393b72-83e8-4809-ba89-7e63ea11a49a\",\n \"payload\": {\n \"id\": \"39ed5bd5-5844-44b9-b4b4-6d3533c3b3e9\",\n \"alias\": \"ZTEST-NOBENF-849P8XKKAO\",\n \"providerDetails\": {\n \"vaultId\": \"2d95a0f0-2acf-11ec-8d3d-0242ac130003\",\n \"keyStrategy\": \"VaultHard\",\n \"type\": \"Vault\"\n },\n \"ledgerId\": \"bitcoin-testnet\",\n \"lock\": \"Unlocked\",\n \"customProperties\": {\n \"property1\": \"string\",\n \"property2\": \"string\"\n },\n \"type\": \"v0_CreateAccount\",\n \"description\": \"Description of my account\"\n },\n \"customProperties\": {\n \"property1\": \"string\",\n \"property2\": \"string\"\n },\n \"type\": \"Propose\",\n \"description\": \"create an intent for account\"\n },\n \"signature\": \"MEUCIC3VIuw4pfk+BLnZrk1qklGS9phAlQFSQoAnlhw59x7cAiEAm5nq8ANlHcRNcONj5FXXl1v0EK5U8gZyQ22geFSsFL8=\"\n}")
req, _ := http.NewRequest("POST", 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))
}HttpResponse<String> response = Unirest.post("https://api.custody.api-zodia.io/v2/api/core/wallets/{walletId}/intent")
.header("Content-Type", "application/json")
.body("{\n \"request\": {\n \"author\": {\n \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n \"domainId\": \"8a0b02c3-fdd8-452e-bc6e-ef07a335ec7e\"\n },\n \"expiryAt\": \"2022-01-09T10:51:00Z\",\n \"targetDomainId\": \"cef1a96b-aa13-443a-b4cc-e3286f2af910\",\n \"id\": \"b0393b72-83e8-4809-ba89-7e63ea11a49a\",\n \"payload\": {\n \"id\": \"39ed5bd5-5844-44b9-b4b4-6d3533c3b3e9\",\n \"alias\": \"ZTEST-NOBENF-849P8XKKAO\",\n \"providerDetails\": {\n \"vaultId\": \"2d95a0f0-2acf-11ec-8d3d-0242ac130003\",\n \"keyStrategy\": \"VaultHard\",\n \"type\": \"Vault\"\n },\n \"ledgerId\": \"bitcoin-testnet\",\n \"lock\": \"Unlocked\",\n \"customProperties\": {\n \"property1\": \"string\",\n \"property2\": \"string\"\n },\n \"type\": \"v0_CreateAccount\",\n \"description\": \"Description of my account\"\n },\n \"customProperties\": {\n \"property1\": \"string\",\n \"property2\": \"string\"\n },\n \"type\": \"Propose\",\n \"description\": \"create an intent for account\"\n },\n \"signature\": \"MEUCIC3VIuw4pfk+BLnZrk1qklGS9phAlQFSQoAnlhw59x7cAiEAm5nq8ANlHcRNcONj5FXXl1v0EK5U8gZyQ22geFSsFL8=\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.custody.api-zodia.io/v2/api/core/wallets/{walletId}/intent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"request\": {\n \"author\": {\n \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n \"domainId\": \"8a0b02c3-fdd8-452e-bc6e-ef07a335ec7e\"\n },\n \"expiryAt\": \"2022-01-09T10:51:00Z\",\n \"targetDomainId\": \"cef1a96b-aa13-443a-b4cc-e3286f2af910\",\n \"id\": \"b0393b72-83e8-4809-ba89-7e63ea11a49a\",\n \"payload\": {\n \"id\": \"39ed5bd5-5844-44b9-b4b4-6d3533c3b3e9\",\n \"alias\": \"ZTEST-NOBENF-849P8XKKAO\",\n \"providerDetails\": {\n \"vaultId\": \"2d95a0f0-2acf-11ec-8d3d-0242ac130003\",\n \"keyStrategy\": \"VaultHard\",\n \"type\": \"Vault\"\n },\n \"ledgerId\": \"bitcoin-testnet\",\n \"lock\": \"Unlocked\",\n \"customProperties\": {\n \"property1\": \"string\",\n \"property2\": \"string\"\n },\n \"type\": \"v0_CreateAccount\",\n \"description\": \"Description of my account\"\n },\n \"customProperties\": {\n \"property1\": \"string\",\n \"property2\": \"string\"\n },\n \"type\": \"Propose\",\n \"description\": \"create an intent for account\"\n },\n \"signature\": \"MEUCIC3VIuw4pfk+BLnZrk1qklGS9phAlQFSQoAnlhw59x7cAiEAm5nq8ANlHcRNcONj5FXXl1v0EK5U8gZyQ22geFSsFL8=\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>"
}{
"timestamp": "2021-10-27T14:30:13.912Z",
"title": "Method Not Allowed",
"status": 415,
"details": [
{
"message": "Available methods : GET,POST",
"code": "ER-204"
}
]
}{
"timestamp": "2021-10-27T14:30:13.912Z",
"title": "Method Not Allowed",
"status": 415,
"details": [
{
"message": "Available methods : GET,POST",
"code": "ER-204"
}
]
}{
"timestamp": "2021-10-27T14:30:13.912Z",
"title": "Method Not Allowed",
"status": 415,
"details": [
{
"message": "Available methods : GET,POST",
"code": "ER-204"
}
]
}{
"timestamp": "2021-10-27T14:30:13.912Z",
"title": "Method Not Allowed",
"status": 415,
"details": [
{
"message": "Available methods : GET,POST",
"code": "ER-204"
}
]
}API - WALLETS - V2
Submit the payload to create new wallet
POST
/
v2
/
api
/
core
/
wallets
/
{walletId}
/
intent
Submit the payload to create new wallet
curl --request POST \
--url https://api.custody.api-zodia.io/v2/api/core/wallets/{walletId}/intent \
--header 'Content-Type: application/json' \
--data '
{
"request": {
"author": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"domainId": "8a0b02c3-fdd8-452e-bc6e-ef07a335ec7e"
},
"expiryAt": "2022-01-09T10:51:00Z",
"targetDomainId": "cef1a96b-aa13-443a-b4cc-e3286f2af910",
"id": "b0393b72-83e8-4809-ba89-7e63ea11a49a",
"payload": {
"id": "39ed5bd5-5844-44b9-b4b4-6d3533c3b3e9",
"alias": "ZTEST-NOBENF-849P8XKKAO",
"providerDetails": {
"vaultId": "2d95a0f0-2acf-11ec-8d3d-0242ac130003",
"keyStrategy": "VaultHard",
"type": "Vault"
},
"ledgerId": "bitcoin-testnet",
"lock": "Unlocked",
"customProperties": {
"property1": "string",
"property2": "string"
},
"type": "v0_CreateAccount",
"description": "Description of my account"
},
"customProperties": {
"property1": "string",
"property2": "string"
},
"type": "Propose",
"description": "create an intent for account"
},
"signature": "MEUCIC3VIuw4pfk+BLnZrk1qklGS9phAlQFSQoAnlhw59x7cAiEAm5nq8ANlHcRNcONj5FXXl1v0EK5U8gZyQ22geFSsFL8="
}
'import requests
url = "https://api.custody.api-zodia.io/v2/api/core/wallets/{walletId}/intent"
payload = {
"request": {
"author": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"domainId": "8a0b02c3-fdd8-452e-bc6e-ef07a335ec7e"
},
"expiryAt": "2022-01-09T10:51:00Z",
"targetDomainId": "cef1a96b-aa13-443a-b4cc-e3286f2af910",
"id": "b0393b72-83e8-4809-ba89-7e63ea11a49a",
"payload": {
"id": "39ed5bd5-5844-44b9-b4b4-6d3533c3b3e9",
"alias": "ZTEST-NOBENF-849P8XKKAO",
"providerDetails": {
"vaultId": "2d95a0f0-2acf-11ec-8d3d-0242ac130003",
"keyStrategy": "VaultHard",
"type": "Vault"
},
"ledgerId": "bitcoin-testnet",
"lock": "Unlocked",
"customProperties": {
"property1": "string",
"property2": "string"
},
"type": "v0_CreateAccount",
"description": "Description of my account"
},
"customProperties": {
"property1": "string",
"property2": "string"
},
"type": "Propose",
"description": "create an intent for account"
},
"signature": "MEUCIC3VIuw4pfk+BLnZrk1qklGS9phAlQFSQoAnlhw59x7cAiEAm5nq8ANlHcRNcONj5FXXl1v0EK5U8gZyQ22geFSsFL8="
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
request: {
author: {
id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',
domainId: '8a0b02c3-fdd8-452e-bc6e-ef07a335ec7e'
},
expiryAt: '2022-01-09T10:51:00Z',
targetDomainId: 'cef1a96b-aa13-443a-b4cc-e3286f2af910',
id: 'b0393b72-83e8-4809-ba89-7e63ea11a49a',
payload: {
id: '39ed5bd5-5844-44b9-b4b4-6d3533c3b3e9',
alias: 'ZTEST-NOBENF-849P8XKKAO',
providerDetails: {
vaultId: '2d95a0f0-2acf-11ec-8d3d-0242ac130003',
keyStrategy: 'VaultHard',
type: 'Vault'
},
ledgerId: 'bitcoin-testnet',
lock: 'Unlocked',
customProperties: {property1: 'string', property2: 'string'},
type: 'v0_CreateAccount',
description: 'Description of my account'
},
customProperties: {property1: 'string', property2: 'string'},
type: 'Propose',
description: 'create an intent for account'
},
signature: 'MEUCIC3VIuw4pfk+BLnZrk1qklGS9phAlQFSQoAnlhw59x7cAiEAm5nq8ANlHcRNcONj5FXXl1v0EK5U8gZyQ22geFSsFL8='
})
};
fetch('https://api.custody.api-zodia.io/v2/api/core/wallets/{walletId}/intent', 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.custody.api-zodia.io/v2/api/core/wallets/{walletId}/intent",
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([
'request' => [
'author' => [
'id' => '497f6eca-6276-4993-bfeb-53cbbbba6f08',
'domainId' => '8a0b02c3-fdd8-452e-bc6e-ef07a335ec7e'
],
'expiryAt' => '2022-01-09T10:51:00Z',
'targetDomainId' => 'cef1a96b-aa13-443a-b4cc-e3286f2af910',
'id' => 'b0393b72-83e8-4809-ba89-7e63ea11a49a',
'payload' => [
'id' => '39ed5bd5-5844-44b9-b4b4-6d3533c3b3e9',
'alias' => 'ZTEST-NOBENF-849P8XKKAO',
'providerDetails' => [
'vaultId' => '2d95a0f0-2acf-11ec-8d3d-0242ac130003',
'keyStrategy' => 'VaultHard',
'type' => 'Vault'
],
'ledgerId' => 'bitcoin-testnet',
'lock' => 'Unlocked',
'customProperties' => [
'property1' => 'string',
'property2' => 'string'
],
'type' => 'v0_CreateAccount',
'description' => 'Description of my account'
],
'customProperties' => [
'property1' => 'string',
'property2' => 'string'
],
'type' => 'Propose',
'description' => 'create an intent for account'
],
'signature' => 'MEUCIC3VIuw4pfk+BLnZrk1qklGS9phAlQFSQoAnlhw59x7cAiEAm5nq8ANlHcRNcONj5FXXl1v0EK5U8gZyQ22geFSsFL8='
]),
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.custody.api-zodia.io/v2/api/core/wallets/{walletId}/intent"
payload := strings.NewReader("{\n \"request\": {\n \"author\": {\n \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n \"domainId\": \"8a0b02c3-fdd8-452e-bc6e-ef07a335ec7e\"\n },\n \"expiryAt\": \"2022-01-09T10:51:00Z\",\n \"targetDomainId\": \"cef1a96b-aa13-443a-b4cc-e3286f2af910\",\n \"id\": \"b0393b72-83e8-4809-ba89-7e63ea11a49a\",\n \"payload\": {\n \"id\": \"39ed5bd5-5844-44b9-b4b4-6d3533c3b3e9\",\n \"alias\": \"ZTEST-NOBENF-849P8XKKAO\",\n \"providerDetails\": {\n \"vaultId\": \"2d95a0f0-2acf-11ec-8d3d-0242ac130003\",\n \"keyStrategy\": \"VaultHard\",\n \"type\": \"Vault\"\n },\n \"ledgerId\": \"bitcoin-testnet\",\n \"lock\": \"Unlocked\",\n \"customProperties\": {\n \"property1\": \"string\",\n \"property2\": \"string\"\n },\n \"type\": \"v0_CreateAccount\",\n \"description\": \"Description of my account\"\n },\n \"customProperties\": {\n \"property1\": \"string\",\n \"property2\": \"string\"\n },\n \"type\": \"Propose\",\n \"description\": \"create an intent for account\"\n },\n \"signature\": \"MEUCIC3VIuw4pfk+BLnZrk1qklGS9phAlQFSQoAnlhw59x7cAiEAm5nq8ANlHcRNcONj5FXXl1v0EK5U8gZyQ22geFSsFL8=\"\n}")
req, _ := http.NewRequest("POST", 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))
}HttpResponse<String> response = Unirest.post("https://api.custody.api-zodia.io/v2/api/core/wallets/{walletId}/intent")
.header("Content-Type", "application/json")
.body("{\n \"request\": {\n \"author\": {\n \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n \"domainId\": \"8a0b02c3-fdd8-452e-bc6e-ef07a335ec7e\"\n },\n \"expiryAt\": \"2022-01-09T10:51:00Z\",\n \"targetDomainId\": \"cef1a96b-aa13-443a-b4cc-e3286f2af910\",\n \"id\": \"b0393b72-83e8-4809-ba89-7e63ea11a49a\",\n \"payload\": {\n \"id\": \"39ed5bd5-5844-44b9-b4b4-6d3533c3b3e9\",\n \"alias\": \"ZTEST-NOBENF-849P8XKKAO\",\n \"providerDetails\": {\n \"vaultId\": \"2d95a0f0-2acf-11ec-8d3d-0242ac130003\",\n \"keyStrategy\": \"VaultHard\",\n \"type\": \"Vault\"\n },\n \"ledgerId\": \"bitcoin-testnet\",\n \"lock\": \"Unlocked\",\n \"customProperties\": {\n \"property1\": \"string\",\n \"property2\": \"string\"\n },\n \"type\": \"v0_CreateAccount\",\n \"description\": \"Description of my account\"\n },\n \"customProperties\": {\n \"property1\": \"string\",\n \"property2\": \"string\"\n },\n \"type\": \"Propose\",\n \"description\": \"create an intent for account\"\n },\n \"signature\": \"MEUCIC3VIuw4pfk+BLnZrk1qklGS9phAlQFSQoAnlhw59x7cAiEAm5nq8ANlHcRNcONj5FXXl1v0EK5U8gZyQ22geFSsFL8=\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.custody.api-zodia.io/v2/api/core/wallets/{walletId}/intent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"request\": {\n \"author\": {\n \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n \"domainId\": \"8a0b02c3-fdd8-452e-bc6e-ef07a335ec7e\"\n },\n \"expiryAt\": \"2022-01-09T10:51:00Z\",\n \"targetDomainId\": \"cef1a96b-aa13-443a-b4cc-e3286f2af910\",\n \"id\": \"b0393b72-83e8-4809-ba89-7e63ea11a49a\",\n \"payload\": {\n \"id\": \"39ed5bd5-5844-44b9-b4b4-6d3533c3b3e9\",\n \"alias\": \"ZTEST-NOBENF-849P8XKKAO\",\n \"providerDetails\": {\n \"vaultId\": \"2d95a0f0-2acf-11ec-8d3d-0242ac130003\",\n \"keyStrategy\": \"VaultHard\",\n \"type\": \"Vault\"\n },\n \"ledgerId\": \"bitcoin-testnet\",\n \"lock\": \"Unlocked\",\n \"customProperties\": {\n \"property1\": \"string\",\n \"property2\": \"string\"\n },\n \"type\": \"v0_CreateAccount\",\n \"description\": \"Description of my account\"\n },\n \"customProperties\": {\n \"property1\": \"string\",\n \"property2\": \"string\"\n },\n \"type\": \"Propose\",\n \"description\": \"create an intent for account\"\n },\n \"signature\": \"MEUCIC3VIuw4pfk+BLnZrk1qklGS9phAlQFSQoAnlhw59x7cAiEAm5nq8ANlHcRNcONj5FXXl1v0EK5U8gZyQ22geFSsFL8=\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>"
}{
"timestamp": "2021-10-27T14:30:13.912Z",
"title": "Method Not Allowed",
"status": 415,
"details": [
{
"message": "Available methods : GET,POST",
"code": "ER-204"
}
]
}{
"timestamp": "2021-10-27T14:30:13.912Z",
"title": "Method Not Allowed",
"status": 415,
"details": [
{
"message": "Available methods : GET,POST",
"code": "ER-204"
}
]
}{
"timestamp": "2021-10-27T14:30:13.912Z",
"title": "Method Not Allowed",
"status": 415,
"details": [
{
"message": "Available methods : GET,POST",
"code": "ER-204"
}
]
}{
"timestamp": "2021-10-27T14:30:13.912Z",
"title": "Method Not Allowed",
"status": 415,
"details": [
{
"message": "Available methods : GET,POST",
"code": "ER-204"
}
]
}Path Parameters
Body
application/json
Response
OK
Id of the entity
⌘I