Submit Application registration
curl --request PUT \
--url https://api.example.com/applications/{applicationId}/registration \
--header 'Content-Type: application/json' \
--data '
{
"control_did": "<string>",
"signer_key_id": "<string>",
"nonce": 123,
"canonical_payload": "<string>",
"signature": "<string>"
}
'import requests
url = "https://api.example.com/applications/{applicationId}/registration"
payload = {
"control_did": "<string>",
"signer_key_id": "<string>",
"nonce": 123,
"canonical_payload": "<string>",
"signature": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
control_did: '<string>',
signer_key_id: '<string>',
nonce: 123,
canonical_payload: '<string>',
signature: '<string>'
})
};
fetch('https://api.example.com/applications/{applicationId}/registration', 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.example.com/applications/{applicationId}/registration",
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([
'control_did' => '<string>',
'signer_key_id' => '<string>',
'nonce' => 123,
'canonical_payload' => '<string>',
'signature' => '<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.example.com/applications/{applicationId}/registration"
payload := strings.NewReader("{\n \"control_did\": \"<string>\",\n \"signer_key_id\": \"<string>\",\n \"nonce\": 123,\n \"canonical_payload\": \"<string>\",\n \"signature\": \"<string>\"\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))
}HttpResponse<String> response = Unirest.put("https://api.example.com/applications/{applicationId}/registration")
.header("Content-Type", "application/json")
.body("{\n \"control_did\": \"<string>\",\n \"signer_key_id\": \"<string>\",\n \"nonce\": 123,\n \"canonical_payload\": \"<string>\",\n \"signature\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/applications/{applicationId}/registration")
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 \"control_did\": \"<string>\",\n \"signer_key_id\": \"<string>\",\n \"nonce\": 123,\n \"canonical_payload\": \"<string>\",\n \"signature\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyApplications
Submit Application registration
Submit a control DID signature for a prepared Application registration
Submit Application registration
curl --request PUT \
--url https://api.example.com/applications/{applicationId}/registration \
--header 'Content-Type: application/json' \
--data '
{
"control_did": "<string>",
"signer_key_id": "<string>",
"nonce": 123,
"canonical_payload": "<string>",
"signature": "<string>"
}
'import requests
url = "https://api.example.com/applications/{applicationId}/registration"
payload = {
"control_did": "<string>",
"signer_key_id": "<string>",
"nonce": 123,
"canonical_payload": "<string>",
"signature": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
control_did: '<string>',
signer_key_id: '<string>',
nonce: 123,
canonical_payload: '<string>',
signature: '<string>'
})
};
fetch('https://api.example.com/applications/{applicationId}/registration', 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.example.com/applications/{applicationId}/registration",
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([
'control_did' => '<string>',
'signer_key_id' => '<string>',
'nonce' => 123,
'canonical_payload' => '<string>',
'signature' => '<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.example.com/applications/{applicationId}/registration"
payload := strings.NewReader("{\n \"control_did\": \"<string>\",\n \"signer_key_id\": \"<string>\",\n \"nonce\": 123,\n \"canonical_payload\": \"<string>\",\n \"signature\": \"<string>\"\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))
}HttpResponse<String> response = Unirest.put("https://api.example.com/applications/{applicationId}/registration")
.header("Content-Type", "application/json")
.body("{\n \"control_did\": \"<string>\",\n \"signer_key_id\": \"<string>\",\n \"nonce\": 123,\n \"canonical_payload\": \"<string>\",\n \"signature\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/applications/{applicationId}/registration")
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 \"control_did\": \"<string>\",\n \"signer_key_id\": \"<string>\",\n \"nonce\": 123,\n \"canonical_payload\": \"<string>\",\n \"signature\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyFirst prepare the registration. Sign the decoded
Replace the nonce and both placeholders with the actual prepared values.
canonical_payload bytes with the control DID key named in that request.
Request
curl --request PUT \
--url "https://directory.example.com/applications/example/registration" \
--header "Content-Type: application/json" \
--data '{"control_did":"did:openpayload:1111111111111111111111","signer_key_id":"did:openpayload:1111111111111111111111#signing","nonce":0,"canonical_payload":"0x<prepared-payload>","signature":"<base64-signature>"}'
202 Accepted returns application_id, status: "accepted", and tx_hash. It means chain submission, not final registration. Poll Get an Application until the record appears in finalized state. A stale nonce or payload returns 409 application_proof_stale; prepare and sign again.
Straight to the point
PUT /applications/{applicationId}/registration
Sign: decoded canonical_payload bytes
Accepted submission: 202; verify finalization with GET /applications/{applicationId}

