Complete passkey registration
curl --request POST \
--url https://api-sandbox.circle.com/v1/accounts/passkeys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"registrationId": "a1b2c3d4-e5f6-7890-ab12-cdef34567890",
"attestationResponse": {}
}
'import requests
url = "https://api-sandbox.circle.com/v1/accounts/passkeys"
payload = {
"registrationId": "a1b2c3d4-e5f6-7890-ab12-cdef34567890",
"attestationResponse": {}
}
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({
registrationId: 'a1b2c3d4-e5f6-7890-ab12-cdef34567890',
attestationResponse: {}
})
};
fetch('https://api-sandbox.circle.com/v1/accounts/passkeys', 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-sandbox.circle.com/v1/accounts/passkeys",
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([
'registrationId' => 'a1b2c3d4-e5f6-7890-ab12-cdef34567890',
'attestationResponse' => [
]
]),
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://api-sandbox.circle.com/v1/accounts/passkeys"
payload := strings.NewReader("{\n \"registrationId\": \"a1b2c3d4-e5f6-7890-ab12-cdef34567890\",\n \"attestationResponse\": {}\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://api-sandbox.circle.com/v1/accounts/passkeys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"registrationId\": \"a1b2c3d4-e5f6-7890-ab12-cdef34567890\",\n \"attestationResponse\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.circle.com/v1/accounts/passkeys")
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 \"registrationId\": \"a1b2c3d4-e5f6-7890-ab12-cdef34567890\",\n \"attestationResponse\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"passkeyId": "a1b2c3d4-e5f6-7890-ab12-cdef34567890",
"credentialId": "dGhpcyBpcyBhIGJhc2U2NHVybCBleGFtcGxl"
}
}{
"code": 2,
"message": "API parameter invalid."
}{
"code": 4,
"message": "Unauthorized."
}{
"code": 2,
"message": "API parameter invalid.",
"externalMessage": "The provided amount exceeds the maximum allowed.",
"errors": [
{
"error": "invalid_value",
"message": "The operation and assetType combination is invalid.",
"location": "assetType"
}
]
}{
"code": 2,
"message": "API parameter invalid.",
"externalMessage": "The provided amount exceeds the maximum allowed.",
"errors": [
{
"error": "invalid_value",
"message": "The operation and assetType combination is invalid.",
"location": "assetType"
}
]
}{
"code": 2,
"message": "API parameter invalid.",
"externalMessage": "The provided amount exceeds the maximum allowed.",
"errors": [
{
"error": "invalid_value",
"message": "The operation and assetType combination is invalid.",
"location": "assetType"
}
]
}{
"code": 2,
"message": "API parameter invalid.",
"externalMessage": "The provided amount exceeds the maximum allowed.",
"errors": [
{
"error": "invalid_value",
"message": "The operation and assetType combination is invalid.",
"location": "assetType"
}
]
}{
"code": -1,
"message": "Something went wrong. errId: 1f0b0c455e40f753f07b4f0ae6abd4b4"
}Complete passkey registration
Completes WebAuthn passkey enrollment by verifying the attestation response produced by the DAA web SDK’s sca.enroll method. Returns a passkeyId that uniquely identifies the registered credential.
POST
/
v1
/
accounts
/
passkeys
Complete passkey registration
curl --request POST \
--url https://api-sandbox.circle.com/v1/accounts/passkeys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"registrationId": "a1b2c3d4-e5f6-7890-ab12-cdef34567890",
"attestationResponse": {}
}
'import requests
url = "https://api-sandbox.circle.com/v1/accounts/passkeys"
payload = {
"registrationId": "a1b2c3d4-e5f6-7890-ab12-cdef34567890",
"attestationResponse": {}
}
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({
registrationId: 'a1b2c3d4-e5f6-7890-ab12-cdef34567890',
attestationResponse: {}
})
};
fetch('https://api-sandbox.circle.com/v1/accounts/passkeys', 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-sandbox.circle.com/v1/accounts/passkeys",
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([
'registrationId' => 'a1b2c3d4-e5f6-7890-ab12-cdef34567890',
'attestationResponse' => [
]
]),
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://api-sandbox.circle.com/v1/accounts/passkeys"
payload := strings.NewReader("{\n \"registrationId\": \"a1b2c3d4-e5f6-7890-ab12-cdef34567890\",\n \"attestationResponse\": {}\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://api-sandbox.circle.com/v1/accounts/passkeys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"registrationId\": \"a1b2c3d4-e5f6-7890-ab12-cdef34567890\",\n \"attestationResponse\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.circle.com/v1/accounts/passkeys")
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 \"registrationId\": \"a1b2c3d4-e5f6-7890-ab12-cdef34567890\",\n \"attestationResponse\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"passkeyId": "a1b2c3d4-e5f6-7890-ab12-cdef34567890",
"credentialId": "dGhpcyBpcyBhIGJhc2U2NHVybCBleGFtcGxl"
}
}{
"code": 2,
"message": "API parameter invalid."
}{
"code": 4,
"message": "Unauthorized."
}{
"code": 2,
"message": "API parameter invalid.",
"externalMessage": "The provided amount exceeds the maximum allowed.",
"errors": [
{
"error": "invalid_value",
"message": "The operation and assetType combination is invalid.",
"location": "assetType"
}
]
}{
"code": 2,
"message": "API parameter invalid.",
"externalMessage": "The provided amount exceeds the maximum allowed.",
"errors": [
{
"error": "invalid_value",
"message": "The operation and assetType combination is invalid.",
"location": "assetType"
}
]
}{
"code": 2,
"message": "API parameter invalid.",
"externalMessage": "The provided amount exceeds the maximum allowed.",
"errors": [
{
"error": "invalid_value",
"message": "The operation and assetType combination is invalid.",
"location": "assetType"
}
]
}{
"code": 2,
"message": "API parameter invalid.",
"externalMessage": "The provided amount exceeds the maximum allowed.",
"errors": [
{
"error": "invalid_value",
"message": "The operation and assetType combination is invalid.",
"location": "assetType"
}
]
}{
"code": -1,
"message": "Something went wrong. errId: 1f0b0c455e40f753f07b4f0ae6abd4b4"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
The registrationId returned by POST /v1/accounts/passkeys/registrations.
Example:
"a1b2c3d4-e5f6-7890-ab12-cdef34567890"
The raw attestation response object returned by the DAA web SDK's sca.enroll method. Pass it through unchanged — do not re-serialize.
Response
Successfully registered the passkey.
Show child attributes
Show child attributes
Was this page helpful?