Authentication
Issue and refresh access tokens, close sessions, and retrieve the current profile.
Quick start
Use the base URL assigned to your environment. The examples below use environment variables so credentials never appear in source code.
Store the environment origin, such as https://devm.hyperionwave.com, in BASE_URL.
Authenticate with Security API, then keep the access token in a secure runtime variable.
Add the service prefix, send JSON or multipart data, and handle every non-2xx status explicitly.
Security API
Base path: /security-api/api/v1/auth
Send the access token on protected requests as Authorization: Bearer <JWT>. Keep access and refresh tokens out of logs, URLs, analytics events, and browser storage you do not control.
Payload example
POST /security-api/api/v1/auth/login
{
"provider": "local",
"email": "developer@example.com",
"password": "<password>"
}
{
"accessToken": "eyJ...",
"refreshToken": "eyJ...",
"tokenType": "Bearer",
"expiresIn": 3600,
"companyRequired": false,
"user": {
"id": "usr_4f8d2",
"email": "developer@example.com",
"name": "Alex Morgan",
"companyId": "cmp_91ab",
"roles": ["member"]
}
}
POST /security-api/api/v1/auth/refresh
{
"refreshToken": "eyJ..."
}
Payload example
POST /data-api/api/v1/schemas
{
"table": "orders",
"description": "Customer orders received from the commerce platform",
"fields": [
{ "name": "customerId", "type": "string", "required": true },
{ "name": "amount", "type": "number", "required": true },
{
"name": "status",
"type": "string",
"required": true,
"enum": ["open", "approved", "rejected"]
}
]
}
POST /data-api/api/v1/data
{
"table": "orders",
"data": {
"customerId": "cus_8021",
"amount": 249.95,
"status": "open"
},
"metadata": {
"source": "commerce-sync",
"correlationId": "req_7b21"
}
}
{
"success": true,
"table": "orders",
"recordId": "67a2f98c41b6d2a71f003e12",
"validated": true,
"verified": true,
"timestamp": "2026-08-11T09:30:00Z"
}
Payload example
POST /data-api/api/v1/data/query
{
"table": "orders",
"filters": {
"status": "open",
"amount": { "$gte": 100 }
},
"projection": { "customerId": 1, "amount": 1, "status": 1 },
"sort": { "amount": -1 },
"limit": 25,
"offset": 0
}
{
"table": "orders",
"records": [
{
"recordId": "67a2f98c41b6d2a71f003e12",
"table": "orders",
"data": {
"customerId": "cus_8021",
"amount": 249.95,
"status": "open"
},
"version": 1,
"createdAt": "2026-08-11T09:30:00Z"
}
],
"totalRecords": 1,
"returnedRecords": 1,
"hasMore": false
}
Payload example
POST /tasks-api/api/v1/tasks
{
"name": "Review Q3 supplier contract",
"description": "Check renewal terms and summarize commercial risks.",
"priority": "high",
"assignedTo": {
"type": "agent",
"id": "agent_legal_01",
"name": "Legal Analyst"
},
"dueDateTime": "2026-08-15T16:00:00Z",
"context": { "supplierId": "sup_204" },
"todos": [
{ "description": "Review renewal and termination clauses", "order": 1 },
{ "description": "Prepare a risk summary", "order": 2 }
]
}
{
"id": "67a30f1c41b6d2a71f003e99",
"uri": "unago://tasks/67a30f1c41b6d2a71f003e99",
"name": "Review Q3 supplier contract",
"status": "pending",
"priority": "high",
"isBlocked": false,
"createdAt": "2026-08-11T10:00:00Z"
}
PUT /tasks-api/api/v1/tasks/67a30f1c41b6d2a71f003e99/status
{
"status": "completed",
"result": "Review complete. Two renewal risks require approval."
}
Payload example
POST /tasks-api/api/v1/automations
{
"name": "Weekday pipeline summary",
"taskDescription": "Summarize pipeline movement and highlight blocked deals.",
"todos": [
"Read the latest CRM changes",
"Group material movement by owner",
"Write an executive summary"
],
"agent": {
"type": "agent",
"id": "agent_sales_01",
"name": "Sales Analyst"
},
"schedule": {
"type": "recurring",
"cronPattern": "0 9 * * 1-5",
"timezone": "Europe/London",
"enabled": true
},
"reuseConversation": true
}
{
"id": "67a3152d41b6d2a71f004010",
"name": "Weekday pipeline summary",
"status": "active",
"todos": [
"Read the latest CRM changes",
"Group material movement by owner",
"Write an executive summary"
],
"reuseConversation": true,
"runAsUser": false
}
POST /tasks-api/api/v1/automations/67a3152d41b6d2a71f004010/run
{ "confirmed": true }
Payload example
The file part must be sent last so the service can stream it directly to storage.
curl -X POST "$BASE_URL/storage-api/api/v2/storage/files/upload" \
-H "Authorization: Bearer $TOKEN" \
-F "path=/user-data/reports/q3-review.pdf" \
-F "overwrite=true" \
-F "file=@q3-review.pdf;type=application/pdf"
{
"success": true,
"fileId": "fil_85e03",
"path": "/user-data/reports/q3-review.pdf",
"hyperionURI": "unago://files/user-data/reports/q3-review.pdf",
"outputUri": "unago://files/user-data/reports/q3-review.pdf",
"size": 248193,
"checksum": "sha256:7e2d...",
"uploadedAt": "2026-08-11T10:15:00Z",
"scope": "user"
}
POST /storage-api/api/v2/storage/files/move
{
"source": "/user-data/reports/q3-review.pdf",
"destination": "/company-data/contracts/q3-review.pdf"
}
Error handling
Preserve the status code and safe error details in integration logs. Never log tokens, passwords, uploaded file contents, or private record values.
{
"error": "Invalid request body",
"details": {
"field": "status",
"message": "status is required"
}
}
const response = await fetch(url, options);
const payload = await response.json();
if (!response.ok) {
throw new Error(payload.error || `HTTP ${response.status}`);
}
return payload;
FAQ
Common implementation questions for external platform teams.
Use the HTTPS origin assigned to your environment. Keep it configurable so development, staging, and production can use separate values without code changes.
Keep tokens in a secure server-side secret store or protected runtime memory. Do not place them in URLs, source code, analytics events, or application logs.
Send limit and offset, retain the returned total where available, and continue only while hasMore is true. Apply a deterministic sort when stable ordering matters.
Persist the canonical unago://files/... value returned by Storage API. Use the corresponding download or metadata endpoint when the file is needed later.