TRI TRI APIapi.tri1space.com

Identity v1

Identity v1

Identity, public-key discovery, and verification

Identity API

Base URL: https://api.tri1space.com
POST/v1/identity/createCreate or update a public identity profile
GET/v1/identity/:triIdReturn public identity fields only
POST/v1/identity/verifyVerify public signature material
GET/v1/identity/:triId/public-keyReturn public key fields only
GET/v1/identity/:triId/statusReturn identity status fields only

POST /v1/identity/create

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();

Response example

{
  "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
  }
}

Lookup, verify, public key, and status examples

GET identity

curl -H "X-TRI-API-Key: $TRI_API_SERVICE_TOKEN" https://api.tri1space.com/v1/identity/tri1qexample

GET public key

curl -H "Authorization: Bearer $TRI_API_SERVICE_TOKEN" https://api.tri1space.com/v1/identity/tri1qexample/public-key

GET status

curl -H "Authorization: Bearer $TRI_API_SERVICE_TOKEN" https://api.tri1space.com/v1/identity/tri1qexample/status

POST verify

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'
  })
});
Rejected sensitive fields

Requests are rejected before persistence when they include private-key-like fields such as privateKey, seedPhrase, recoveryKey, or backupKey.