User endpoints
Base user by id
GET /user/:id — returns the base user row for backend callers. Requires X-APIKEY and X-Tenant-ID headers.
fetch('https://auth.magicrunez.com/user/{id}', {
method: 'GET',
headers: { 'X-APIKEY': '', 'X-Tenant-ID': '' }
})
.then(r => r.json())
.then(console.log)
.catch(console.error);
Full profile by id
GET /user/:id/profile — returns the full profile for backend callers. Requires X-APIKEY and X-Tenant-ID headers.
fetch('https://auth.magicrunez.com/user/{id}/profile', {
method: 'GET',
headers: { 'X-APIKEY': '', 'X-Tenant-ID': '' }
})
.then(r => r.json())
.then(console.log)
.catch(console.error);
Profile
GET /user/profile — returns the authenticated user's full profile. Requires Authorization header with a Bearer token.
fetch('https://auth.magicrunez.com/user/profile', {
method: 'GET',
headers: { 'Authorization': 'Bearer ' }
})
.then(r => r.json())
.then(console.log)
.catch(console.error);
User secrets
Secrets are managed under /user/:id/secrets. All secret endpoints require authentication and typically a X-Tenant-ID header.
List secrets
fetch('https://auth.magicrunez.com/user/{id}/secrets', {
method: 'GET',
headers: { 'Authorization': 'Bearer ', 'X-Tenant-ID': 'your-tenant-id' }
})
.then(r => r.json())
.then(console.log)
.catch(console.error);
Create secret
fetch('https://auth.magicrunez.com/user/{id}/secrets', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer ', 'X-Tenant-ID': 'your-tenant-id' },
body: JSON.stringify({ name: 'my-secret', value: 's3cret' })
})
.then(r => r.json())
.then(console.log)
.catch(console.error);
Get secret value
fetch('https://auth.magicrunez.com/user/{id}/secrets/{secretId}/value', {
method: 'GET',
headers: { 'Authorization': 'Bearer ', 'X-Tenant-ID': 'your-tenant-id' }
})
.then(r => r.text())
.then(console.log)
.catch(console.error);
There are also update and delete endpoints at PUT /user/:id/secrets/:secretId and DELETE /user/:id/secrets/:secretId.
User properties
Properties are mounted under /user/:id/properties. Common endpoints: GET, POST, GET /:propId, PUT /:propId, DELETE /:propId.