GET me
curl -H "Authorization: Bearer $TRI_API_SERVICE_TOKEN" https://api.tri1space.com/v1/identity/me
Identity v1
| POST | /v1/identity/create | Create or update a public identity profile |
| GET | /v1/identity/me | Return authenticated API key context |
| 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 |
| POST | /v1/agents | Register an AI agent that reuses TRI1 identity infrastructure |
| POST | /v1/agents/:agentId/challenge | Issue an agent auth challenge |
| POST | /v1/agents/:agentId/verify | Verify agent challenge signature and return an agent session |
| POST | /v1/agents/:agentId/rooms/:roomId/join | Join a TRI1 room as an agent member |
| POST | /v1/agents/:agentId/rooms/:roomId/messages | Persist encrypted TRI1 agent messages; plaintext fields are rejected |
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 TRI1",
"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 TRI1',
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 TRI1",
"handle": "@ada",
"bio": "Public profile only",
"edPub": "BASE64_ED25519_PUBLIC_KEY",
"xPub": "BASE64_ENCRYPTION_PUBLIC_KEY",
"fingerprint": "pub-fingerprint",
"type": "human",
"status": "active",
"identityClass": "likely_real",
"isTestIdentity": false
}
}
curl -H "Authorization: Bearer $TRI_API_SERVICE_TOKEN" https://api.tri1space.com/v1/identity/me
curl -H "X-TRI1-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.