/systems/register - Register system with system_secret
Public endpoint for external systems to register themselves using their system_secret token. This endpoint does NOT require authentication - the system_secret itself provides authentication.
Token Format: my_<public_part>.<secret_part>
Workflow:
- User creates system in management UI → receives system_secret (one time only)
- External system uses system_secret to register → receives system_key
- External system uses system_key for future operations (inventory, heartbeat)
Important:
- Systems can only be registered once
- Deleted systems cannot be registered
- The system_secret is validated using Argon2id hashing
POST
/systems/register
curl \
--request POST 'https://api.your-domain.com/api/systems/register' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"system_secret":"my_a1b2c3d4e5f6g7h8i9j0.k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6a7b8c9d0"}'
Request examples
{
"system_secret": "my_a1b2c3d4e5f6g7h8i9j0.k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6a7b8c9d0"
}
Response examples (200)
{
"code": 200,
"message": "system registered successfully",
"data": {
"system_key": "my_sys_a1b2c3d4e5f6g7h8",
"registered_at": "2025-11-06T10:30:00Z",
"message": "system registered successfully"
}
}
Response examples (400)
{
"code": 400,
"message": "invalid system secret format"
}
Response examples (401)
{
"code": 401,
"message": "invalid system secret"
}
Response examples (403)
{
"code": 403,
"message": "system has been deleted"
}
Response examples (409)
{
"code": 409,
"message": "system is already registered"
}
Response examples (500)
{
"code": 500,
"message": "internal server error",
"data": {}
}