GET identity
curl -H "X-TRI-API-Key: $TRI_API_SERVICE_TOKEN" https://api.tri1space.com/v1/identity/tri1qexample
Identity v1
| POST | /v1/identity/create | Create or update a public identity profile |
| GET | /v1/identity/:triId | Return public identity fields only |
| POST | /v1/identity/verify | Verify public signature material |
| GET | /v1/identity/:triId/public-key | Return public key fields only |
| GET | /v1/identity/:triId/status | Return identity status fields only |
curl -X POST https://api.tri1space.com/v1/identity/create \
-H "Authorization: Bearer $TRI_API_SERVICE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"profile": {
"triId": "tri1qexample000000000000000000000000000000000000000000",
"identity": "TRI1-P-PUB-example",
"displayName": "Ada TRI",
"handle": "@ada",
"bio": "Public profile only",
"edPub": "BASE64_ED25519_PUBLIC_KEY",
"xPub": "BASE64_ENCRYPTION_PUBLIC_KEY",
"fingerprint": "pub-fingerprint"
}
}'
const response = await fetch('https://api.tri1space.com/v1/identity/create', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TRI_API_SERVICE_TOKEN}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
profile: {
triId: 'tri1qexample000000000000000000000000000000000000000000',
identity: 'TRI1-P-PUB-example',
displayName: 'Ada TRI',
handle: '@ada',
bio: 'Public profile only',
edPub: 'BASE64_ED25519_PUBLIC_KEY',
xPub: 'BASE64_ENCRYPTION_PUBLIC_KEY',
fingerprint: 'pub-fingerprint'
}
})
});
const body = await response.json();
{
"ok": true,
"identity": {
"triId": "tri1qexample000000000000000000000000000000000000000000",
"identity": "TRI1-P-PUB-example",
"displayName": "Ada TRI",
"handle": "@ada",
"bio": "Public profile only",
"edPub": "BASE64_ED25519_PUBLIC_KEY",
"xPub": "BASE64_ENCRYPTION_PUBLIC_KEY",
"fingerprint": "pub-fingerprint",
"identityClass": "likely_real",
"isTestIdentity": false
}
}
curl -H "X-TRI-API-Key: $TRI_API_SERVICE_TOKEN" https://api.tri1space.com/v1/identity/tri1qexample
curl -H "Authorization: Bearer $TRI_API_SERVICE_TOKEN" https://api.tri1space.com/v1/identity/tri1qexample/public-key
curl -H "Authorization: Bearer $TRI_API_SERVICE_TOKEN" https://api.tri1space.com/v1/identity/tri1qexample/status
fetch('https://api.tri1space.com/v1/identity/verify', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TRI_API_SERVICE_TOKEN}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
triId: 'tri1qexample',
identity: 'TRI1-P-PUB-example',
edPub: 'BASE64_ED25519_PUBLIC_KEY',
challenge: 'tri-api:challenge',
signature: 'BASE64_SIGNATURE'
})
});
Requests are rejected before persistence when they include private-key-like fields such as privateKey, seedPhrase, recoveryKey, or backupKey.