OpenAPI JSONMarkdown Docs

OpenAPI Explorer

Auto-generated OpenAPI definition for all enabled modules.

Default server: https://apiv2.tronergy.io/api

Authentication & Accounts

28 endpoints
GET/auth/admin/nav
Auth required

Resolve sidebar entries

Returns the backend navigation tree available to the authenticated administrator after applying role and personal sidebar preferences.

Responses

200Sidebar navigation structure
Content-Type: application/json
{
  "groups": [
    {
      "id": "string",
      "name": "string",
      "defaultName": "string",
      "items": [
        {
          "href": "string",
          "title": "string",
          "defaultTitle": "string",
          "enabled": true
        }
      ]
    }
  ]
}

Example

curl -X GET "https://apiv2.tronergy.io/api/auth/admin/nav" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/auth/feature-check
Auth required

Check feature grants for the current user

Evaluates which of the requested features are available to the signed-in user within the active tenant / organization context.

Request body (application/json)

{
  "features": [
    "string"
  ]
}

Responses

200Evaluation result
Content-Type: application/json
{
  "ok": true,
  "granted": [
    "string"
  ],
  "userId": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/auth/feature-check" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"features\": [
    \"string\"
  ]
}"
GET/auth/features
Auth requiredauth.acl.manage

List declared feature flags

Returns all static features contributed by the enabled modules along with their module source. Requires features: auth.acl.manage

Responses

200Aggregated feature catalog
Content-Type: application/json
{
  "items": [
    {
      "id": "string",
      "title": "string",
      "module": "string"
    }
  ],
  "modules": [
    {
      "id": "string",
      "title": "string"
    }
  ]
}

Example

curl -X GET "https://apiv2.tronergy.io/api/auth/features" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/auth/locale

GET /auth/locale

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/auth/locale" \
  -H "Accept: application/json"
POST/auth/locale

POST /auth/locale

Responses

201Success response
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/auth/locale" \
  -H "Accept: application/json"
POST/auth/login

Authenticate user credentials

Validates the submitted credentials and issues a bearer token cookie for subsequent API calls.

Request body (application/x-www-form-urlencoded)

email=user%40example.com&password=string

Responses

200Authentication succeeded
Content-Type: application/json
{
  "ok": true,
  "token": "string",
  "redirect": null
}
400Validation failed
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
401Invalid credentials
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
403User lacks required role
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
429Too many login attempts
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/auth/login" \
  -H "Accept: application/json" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "email=user%40example.com&password=string"
GET/auth/logout
Auth required

Log out (legacy GET)

For convenience, the GET variant performs the same logout logic as POST and issues a redirect.

Responses

200Success response
Content-Type: application/json
{}
302Redirect to login after successful logout
Content-Type: text/html
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/auth/logout" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/auth/logout
Auth required

Invalidate session and redirect

Clears authentication cookies and redirects the browser to the login page.

Responses

201Success response
Content-Type: application/json
{}
302Redirect to login after successful logout
Content-Type: text/html
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/auth/logout" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/auth/profile
Auth required

Get current profile

Returns the email address for the signed-in user.

Responses

200Profile payload
Content-Type: application/json
{
  "email": "user@example.com",
  "roles": [
    "string"
  ]
}
404User not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/auth/profile" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PUT/auth/profile
Auth required

Update current profile

Updates the email address or password for the signed-in user.

Request body (application/json)

{}

Responses

200Profile updated
Content-Type: application/json
{
  "ok": true,
  "email": "user@example.com"
}
400Invalid payload
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/auth/profile" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{}"
POST/auth/reset

Send reset email

Requests a password reset email for the given account. The endpoint always returns `ok: true` to avoid leaking account existence.

Request body (application/x-www-form-urlencoded)

email=user%40example.com

Responses

200Reset email dispatched (or ignored for unknown accounts)
Content-Type: application/json
{
  "ok": true
}
429Too many password reset requests
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/auth/reset" \
  -H "Accept: application/json" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "email=user%40example.com"
POST/auth/reset/confirm

Complete password reset

Validates the reset token and updates the user password.

Request body (application/x-www-form-urlencoded)

token=string&password=string

Responses

200Password reset succeeded
Content-Type: application/json
{
  "ok": true,
  "redirect": "string"
}
400Invalid token or payload
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
429Too many reset confirmation attempts
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/auth/reset/confirm" \
  -H "Accept: application/json" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "token=string&password=string"
GET/auth/roles
Auth requiredauth.roles.list

List roles

Returns available roles within the current tenant. Super administrators receive visibility across tenants. Requires features: auth.roles.list

Parameters

NameInRequiredSchemaDescription
idqueryNostring
pagequeryNonumber
pageSizequeryNonumber
searchqueryNostring
tenantIdqueryNostring

Responses

200Role collection
Content-Type: application/json
{
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "name": "string",
      "usersCount": 1,
      "tenantId": null,
      "tenantName": null
    }
  ],
  "total": 1,
  "totalPages": 1
}

Example

curl -X GET "https://apiv2.tronergy.io/api/auth/roles?page=1&pageSize=50" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/auth/roles
Auth requiredauth.roles.manage

Create role

Creates a new role for the current tenant or globally when `tenantId` is omitted. Requires features: auth.roles.manage

Request body (application/json)

{
  "name": "string",
  "tenantId": null
}

Responses

201Role created
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000"
}
400Invalid payload
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/auth/roles" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"name\": \"string\",
  \"tenantId\": null
}"
PUT/auth/roles
Auth requiredauth.roles.manage

Update role

Updates mutable fields on an existing role. Requires features: auth.roles.manage

Request body (application/json)

{
  "id": "00000000-0000-4000-8000-000000000000",
  "tenantId": null
}

Responses

200Role updated
Content-Type: application/json
{
  "ok": true
}
400Invalid payload
Content-Type: application/json
{
  "error": "string"
}
404Role not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/auth/roles" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"id\": \"00000000-0000-4000-8000-000000000000\",
  \"tenantId\": null
}"
DELETE/auth/roles
Auth requiredauth.roles.manage

Delete role

Deletes a role by identifier. Fails when users remain assigned. Requires features: auth.roles.manage

Parameters

NameInRequiredSchemaDescription
idqueryYesstringRole identifier

Responses

200Role deleted
Content-Type: application/json
{
  "ok": true
}
400Role cannot be deleted
Content-Type: application/json
{
  "error": "string"
}
404Role not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/auth/roles?id=00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/auth/roles/acl
Auth requiredauth.acl.manage

Fetch role ACL

Returns the feature and organization assignments associated with a role within the current tenant. Requires features: auth.acl.manage

Parameters

NameInRequiredSchemaDescription
roleIdqueryYesstring
tenantIdqueryNostring

Responses

200Role ACL entry
Content-Type: application/json
{
  "isSuperAdmin": true,
  "features": [
    "string"
  ],
  "organizations": null
}
400Invalid role id
Content-Type: application/json
{
  "error": "string"
}
404Role not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/auth/roles/acl?roleId=00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PUT/auth/roles/acl
Auth requiredauth.acl.manage

Update role ACL

Replaces the feature list, super admin flag, and optional organization assignments for a role. Requires features: auth.acl.manage

Request body (application/json)

{
  "roleId": "00000000-0000-4000-8000-000000000000",
  "organizations": null
}

Responses

200Role ACL updated
Content-Type: application/json
{
  "ok": true,
  "sanitized": true
}
400Invalid payload
Content-Type: application/json
{
  "error": "string"
}
404Role not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/auth/roles/acl" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"roleId\": \"00000000-0000-4000-8000-000000000000\",
  \"organizations\": null
}"
GET/auth/session/refresh

Refresh auth cookie from session token (browser)

Exchanges an existing `session_token` cookie for a fresh JWT auth cookie and redirects the browser.

Parameters

NameInRequiredSchemaDescription
redirectqueryNostringAbsolute or relative URL to redirect after refresh

Responses

200Success response
Content-Type: application/json
{}
302Redirect to target location when session is valid
Content-Type: text/html
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/auth/session/refresh" \
  -H "Accept: application/json"
POST/auth/session/refresh

Refresh access token (API/mobile)

Exchanges a refresh token for a new JWT access token. Pass the refresh token obtained from login in the request body.

Request body (application/json)

{
  "refreshToken": "string"
}

Responses

200New access token issued
Content-Type: application/json
{
  "ok": true,
  "accessToken": "string",
  "expiresIn": 1
}
400Missing refresh token
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
401Invalid or expired token
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
429Too many refresh attempts
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/auth/session/refresh" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{
  \"refreshToken\": \"string\"
}"
GET/auth/sidebar/preferences
Auth required

Get sidebar preferences

Returns personal sidebar customization and any role-level preferences the user can manage.

Responses

200Current sidebar configuration
Content-Type: application/json
{
  "locale": "string",
  "settings": {
    "version": 1,
    "groupOrder": [
      "string"
    ],
    "groupLabels": {
      "key": "string"
    },
    "itemLabels": {
      "key": "string"
    },
    "hiddenItems": [
      "string"
    ]
  },
  "canApplyToRoles": true,
  "roles": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "name": "string",
      "hasPreference": true
    }
  ]
}

Example

curl -X GET "https://apiv2.tronergy.io/api/auth/sidebar/preferences" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PUT/auth/sidebar/preferences
Auth required

Update sidebar preferences

Updates personal sidebar configuration and, optionally, applies the same settings to selected roles.

Request body (application/json)

{}

Responses

200Preferences saved
Content-Type: application/json
{
  "locale": "string",
  "settings": {
    "version": 1,
    "groupOrder": [
      "string"
    ],
    "groupLabels": {
      "key": "string"
    },
    "itemLabels": {
      "key": "string"
    },
    "hiddenItems": [
      "string"
    ]
  },
  "canApplyToRoles": true,
  "roles": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "name": "string",
      "hasPreference": true
    }
  ],
  "appliedRoles": [
    "00000000-0000-4000-8000-000000000000"
  ],
  "clearedRoles": [
    "00000000-0000-4000-8000-000000000000"
  ]
}
400Invalid payload
Content-Type: application/json
{
  "error": "string"
}
403Missing features for role-wide updates
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/auth/sidebar/preferences" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{}"
GET/auth/users
Auth requiredauth.users.list

List users

Returns users for the current tenant. Super administrators may scope the response via organization or role filters. Requires features: auth.users.list

Parameters

NameInRequiredSchemaDescription
idqueryNostring
pagequeryNonumber
pageSizequeryNonumber
searchqueryNostring
organizationIdqueryNostring
roleIdsqueryNoarray

Responses

200User collection
Content-Type: application/json
{
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "email": "user@example.com",
      "organizationId": null,
      "organizationName": null,
      "tenantId": null,
      "tenantName": null,
      "roles": [
        "string"
      ]
    }
  ],
  "total": 1,
  "totalPages": 1
}

Example

curl -X GET "https://apiv2.tronergy.io/api/auth/users?page=1&pageSize=50" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/auth/users
Auth requiredauth.users.create

Create user

Creates a new confirmed user within the specified organization and optional roles. Requires features: auth.users.create

Request body (application/json)

{
  "email": "user@example.com",
  "password": "string",
  "organizationId": "00000000-0000-4000-8000-000000000000"
}

Responses

201User created
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000"
}
400Invalid payload or duplicate email
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/auth/users" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"email\": \"user@example.com\",
  \"password\": \"string\",
  \"organizationId\": \"00000000-0000-4000-8000-000000000000\"
}"
PUT/auth/users
Auth requiredauth.users.edit

Update user

Updates profile fields, organization assignment, credentials, or role memberships. Requires features: auth.users.edit

Request body (application/json)

{
  "id": "00000000-0000-4000-8000-000000000000"
}

Responses

200User updated
Content-Type: application/json
{
  "ok": true
}
400Invalid payload
Content-Type: application/json
{
  "error": "string"
}
404User not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/auth/users" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"id\": \"00000000-0000-4000-8000-000000000000\"
}"
DELETE/auth/users
Auth requiredauth.users.delete

Delete user

Deletes a user by identifier. Undo support is provided via the command bus. Requires features: auth.users.delete

Parameters

NameInRequiredSchemaDescription
idqueryYesstringUser identifier

Responses

200User deleted
Content-Type: application/json
{
  "ok": true
}
400User cannot be deleted
Content-Type: application/json
{
  "error": "string"
}
404User not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/auth/users?id=00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/auth/users/acl
Auth requiredauth.acl.manage

Fetch user ACL

Returns custom ACL overrides for a user within the current tenant, if any. Requires features: auth.acl.manage

Parameters

NameInRequiredSchemaDescription
userIdqueryYesstring

Responses

200User ACL entry
Content-Type: application/json
{
  "hasCustomAcl": true,
  "isSuperAdmin": true,
  "features": [
    "string"
  ],
  "organizations": null
}
400Invalid user id
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/auth/users/acl?userId=00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PUT/auth/users/acl
Auth requiredauth.acl.manage

Update user ACL

Configures per-user ACL overrides, including super admin access, feature list, and organization scope. Requires features: auth.acl.manage

Request body (application/json)

{
  "userId": "00000000-0000-4000-8000-000000000000",
  "organizations": null
}

Responses

200User ACL updated
Content-Type: application/json
{
  "ok": true,
  "sanitized": true
}
400Invalid payload
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/auth/users/acl" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"userId\": \"00000000-0000-4000-8000-000000000000\",
  \"organizations\": null
}"

Directory (Tenants & Organizations)

2 endpoints
GET/directory/organizations/lookup

Public organization lookup by slug

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/directory/organizations/lookup" \
  -H "Accept: application/json"
GET/directory/tenants/lookup

Public tenant lookup

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/directory/tenants/lookup" \
  -H "Accept: application/json"

Audit & Action Logs

4 endpoints
GET/audit_logs/audit-logs/access
Auth requiredaudit_logs.view_self

Retrieve access logs

Fetches paginated access audit logs scoped to the authenticated user. Tenant administrators can optionally expand the search to other actors or organizations. Requires features: audit_logs.view_self

Parameters

NameInRequiredSchemaDescription
organizationIdqueryNostringLimit results to a specific organization
actorUserIdqueryNostringFilter by actor user id (tenant administrators only)
resourceKindqueryNostringRestrict to a resource kind such as `order` or `product`
accessTypequeryNostringAccess type filter, e.g. `read` or `export`
pagequeryNostringPage number (default 1)
pageSizequeryNostringPage size (default 50)
limitqueryNostringExplicit maximum number of records when paginating manually
beforequeryNostringReturn logs created before this ISO-8601 timestamp
afterqueryNostringReturn logs created after this ISO-8601 timestamp

Responses

200Access logs returned successfully
Content-Type: application/json
{
  "items": [
    {
      "id": "string",
      "resourceKind": "string",
      "resourceId": "string",
      "accessType": "string",
      "actorUserId": null,
      "actorUserName": null,
      "tenantId": null,
      "tenantName": null,
      "organizationId": null,
      "organizationName": null,
      "fields": [
        "string"
      ],
      "context": null,
      "createdAt": "string"
    }
  ],
  "canViewTenant": true,
  "page": 1,
  "pageSize": 1,
  "total": 1,
  "totalPages": 1
}
400Invalid filters supplied
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/audit_logs/audit-logs/access" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/audit_logs/audit-logs/actions
Auth requiredaudit_logs.view_self

Fetch action logs

Returns recent action audit log entries. Tenant administrators can widen the scope to other actors or organizations, and callers can optionally restrict results to undoable actions. Requires features: audit_logs.view_self

Parameters

NameInRequiredSchemaDescription
organizationIdqueryNostringLimit results to a specific organization
actorUserIdqueryNostringFilter logs created by a specific actor (tenant administrators only)
resourceKindqueryNostringFilter by resource kind (e.g., "order", "product")
resourceIdqueryNostringFilter by resource ID (UUID of the specific record)
includeRelatedqueryNostringWhen `true`, also returns changes to child entities linked via parentResourceKind/parentResourceId
undoableOnlyqueryNostringWhen `true`, only undoable actions are returned
limitqueryNostringMaximum number of records to return (default 50)
beforequeryNostringReturn actions created before this ISO-8601 timestamp
afterqueryNostringReturn actions created after this ISO-8601 timestamp

Responses

200Action logs retrieved successfully
Content-Type: application/json
{
  "items": [
    {
      "id": "string",
      "commandId": "string",
      "actionLabel": null,
      "executionState": "done",
      "actorUserId": null,
      "actorUserName": null,
      "tenantId": null,
      "tenantName": null,
      "organizationId": null,
      "organizationName": null,
      "resourceKind": null,
      "resourceId": null,
      "parentResourceKind": null,
      "parentResourceId": null,
      "undoToken": null,
      "createdAt": "string",
      "updatedAt": "string",
      "snapshotBefore": null,
      "snapshotAfter": null,
      "changes": null,
      "context": null
    }
  ],
  "canViewTenant": true
}
400Invalid filter values
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/audit_logs/audit-logs/actions?includeRelated=false&undoableOnly=false" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/audit_logs/audit-logs/actions/redo
Auth requiredaudit_logs.redo_self

Redo by action log id

Redoes the latest undone command owned by the caller. Requires the action to still be eligible for redo within tenant and organization scope. Requires features: audit_logs.redo_self

Request body (application/json)

{
  "logId": "string"
}

Responses

200Redo executed successfully
Content-Type: application/json
{
  "ok": true,
  "logId": null,
  "undoToken": null
}
400Log not eligible for redo
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/audit_logs/audit-logs/actions/redo" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"logId\": \"string\"
}"
POST/audit_logs/audit-logs/actions/undo
Auth requiredaudit_logs.undo_self

Undo action by token

Replays the undo handler registered for a command. The provided undo token must match the latest undoable log entry accessible to the caller. Requires features: audit_logs.undo_self

Request body (application/json)

{
  "undoToken": "string"
}

Responses

200Undo applied successfully
Content-Type: application/json
{
  "ok": true,
  "logId": "string"
}
400Invalid or unavailable undo token
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/audit_logs/audit-logs/actions/undo" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"undoToken\": \"string\"
}"

Attachments

14 endpoints
GET/attachments
Auth requiredattachments.view

List attachments for a record

Returns uploaded attachments for the given entity record, ordered by newest first. Requires features: attachments.view

Parameters

NameInRequiredSchemaDescription
entityIdqueryYesstringEntity identifier that owns the attachments
recordIdqueryYesstringRecord identifier within the entity

Responses

200Attachments found for the record
Content-Type: application/json
{
  "items": [
    {
      "id": "string",
      "url": "string",
      "fileName": "string",
      "fileSize": 1,
      "createdAt": "string",
      "mimeType": null,
      "content": null
    }
  ]
}
400Missing entity or record identifiers
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/attachments?entityId=string&recordId=string" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/attachments
Auth requiredattachments.manage

Upload attachment

Uploads a new attachment using multipart form-data and stores metadata for later retrieval. Requires features: attachments.manage

Request body (multipart/form-data)

entityId=string
recordId=string
file=string

Responses

200Attachment stored successfully
Content-Type: application/json
{
  "ok": true,
  "item": {
    "id": "string",
    "url": "string",
    "fileName": "string",
    "fileSize": 1,
    "content": null
  }
}
400Payload validation error
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/attachments" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: multipart/form-data" \
  -d "{
  \"entityId\": \"string\",
  \"recordId\": \"string\",
  \"file\": \"string\"
}"
DELETE/attachments
Auth requiredattachments.manage

Delete attachment

Removes an uploaded attachment and deletes the stored asset. Requires features: attachments.manage

Parameters

NameInRequiredSchemaDescription
idqueryYesstring

Responses

200Attachment deleted
Content-Type: application/json
{
  "ok": true
}
400Missing attachment identifier
Content-Type: application/json
{
  "error": "string"
}
404Attachment not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/attachments?id=00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/attachments/file/{id}

Download or serve attachment file

Returns the raw file content for an attachment. Path parameter: {id} - Attachment UUID. Query parameter: ?download=1 - Force file download with Content-Disposition header. Access control is enforced based on partition settings.

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200File content with appropriate MIME type
Content-Type: application/json
"string"
400Missing attachment ID
Content-Type: application/json
{
  "error": "string"
}
401Unauthorized - authentication required for private partitions
Content-Type: application/json
{
  "error": "string"
}
403Forbidden - insufficient permissions
Content-Type: application/json
{
  "error": "string"
}
404Attachment or file not found
Content-Type: application/json
{
  "error": "string"
}
500Partition misconfigured
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/attachments/file/:id" \
  -H "Accept: application/json"
GET/attachments/image/{id}/{slug}

Serve image with optional resizing

Returns an image attachment with optional on-the-fly resizing and cropping. Resized images are cached for performance. Only works with image MIME types. Path parameter: {id} - Attachment UUID. Query parameters: ?width=N (1-4000 pixels), ?height=N (1-4000 pixels), ?cropType=cover|contain (resize behavior).

Parameters

NameInRequiredSchemaDescription
idpathYesstring
slugpathNostring

Responses

200Binary image content (Content-Type: image/jpeg, image/png, etc.)
Content-Type: application/json
"string"
400Invalid parameters, missing ID, or non-image attachment
Content-Type: application/json
{
  "error": "string"
}
401Unauthorized - authentication required for private partitions
Content-Type: application/json
{
  "error": "string"
}
403Forbidden - insufficient permissions
Content-Type: application/json
{
  "error": "string"
}
404Image not found
Content-Type: application/json
{
  "error": "string"
}
500Partition misconfigured or image rendering failed
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/attachments/image/:id/:slug" \
  -H "Accept: application/json"
GET/attachments/library
Auth requiredattachments.view

List attachments

Returns paginated list of attachments with optional filtering by search term, partition, and tags. Includes available tags and partitions. Requires features: attachments.view

Parameters

NameInRequiredSchemaDescription
pagequeryNonumberPage number for pagination
pageSizequeryNonumberNumber of items per page (max 100)
searchqueryNostringSearch by file name (case-insensitive)
partitionqueryNostringFilter by partition code
tagsqueryNostringFilter by tags (comma-separated)
sortFieldqueryNostringField to sort by
sortDirqueryNostringSort direction

Responses

200Attachments list with pagination and metadata
Content-Type: application/json
{
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "fileName": "string",
      "fileSize": 1,
      "mimeType": "string",
      "partitionCode": "string",
      "partitionTitle": null,
      "url": null,
      "createdAt": "string",
      "tags": [
        "string"
      ],
      "assignments": [],
      "content": null
    }
  ],
  "total": 1,
  "page": 1,
  "pageSize": 1,
  "totalPages": 1,
  "availableTags": [
    "string"
  ],
  "partitions": [
    {
      "code": "string",
      "title": "string",
      "description": null,
      "isPublic": true
    }
  ]
}
400Invalid query parameters
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/attachments/library?page=1&pageSize=25" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/attachments/library/{id}
Auth requiredattachments.view

Get attachment details

Returns complete details of an attachment including metadata, tags, assignments, and custom fields. Requires features: attachments.view

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Attachment details
Content-Type: application/json
{
  "item": {
    "id": "00000000-0000-4000-8000-000000000000",
    "fileName": "string",
    "fileSize": 1,
    "mimeType": "string",
    "partitionCode": "string",
    "partitionTitle": null,
    "tags": [
      "string"
    ],
    "assignments": [],
    "content": null,
    "customFields": null
  }
}
400Invalid attachment ID
Content-Type: application/json
{
  "error": "string"
}
404Attachment not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/attachments/library/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PATCH/attachments/library/{id}
Auth requiredattachments.manage

Update attachment metadata

Updates attachment tags, assignments, and custom fields. Emits CRUD side effects for indexing and events. Requires features: attachments.manage

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Request body (application/json)

{}

Responses

200Attachment updated successfully
Content-Type: application/json
{
  "ok": true
}
400Invalid payload or attachment ID
Content-Type: application/json
{
  "error": "string"
}
404Attachment not found
Content-Type: application/json
{
  "error": "string"
}
500Failed to save attributes
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X PATCH "https://apiv2.tronergy.io/api/attachments/library/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{}"
DELETE/attachments/library/{id}
Auth requiredattachments.manage

Delete attachment

Permanently deletes an attachment file from storage and database. Emits CRUD side effects. Requires features: attachments.manage

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Attachment deleted successfully
Content-Type: application/json
{
  "ok": true
}
400Invalid attachment ID
Content-Type: application/json
{
  "error": "string"
}
404Attachment not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/attachments/library/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/attachments/partitions
Auth requiredattachments.manage

List all attachment partitions

Returns all configured attachment partitions with storage settings, OCR configuration, and access control settings. Requires features: attachments.manage

Responses

200List of partitions
Content-Type: application/json
{
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "code": "string",
      "title": "string",
      "description": null,
      "isPublic": true,
      "requiresOcr": true,
      "ocrModel": null,
      "createdAt": null,
      "updatedAt": null,
      "envKey": "string"
    }
  ]
}

Example

curl -X GET "https://apiv2.tronergy.io/api/attachments/partitions" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/attachments/partitions
Auth requiredattachments.manage

Create new partition

Creates a new attachment partition with specified storage and OCR settings. Requires unique partition code. Requires features: attachments.manage

Request body (application/json)

{
  "code": "string",
  "title": "string",
  "description": null,
  "ocrModel": null
}

Responses

201Partition created successfully
Content-Type: application/json
{
  "item": {
    "id": "00000000-0000-4000-8000-000000000000",
    "code": "string",
    "title": "string",
    "description": null,
    "isPublic": true,
    "requiresOcr": true,
    "ocrModel": null,
    "createdAt": null,
    "updatedAt": null,
    "envKey": "string"
  }
}
400Invalid payload or partition code
Content-Type: application/json
{
  "error": "string"
}
409Partition code already exists
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/attachments/partitions" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"code\": \"string\",
  \"title\": \"string\",
  \"description\": null,
  \"ocrModel\": null
}"
PUT/attachments/partitions
Auth requiredattachments.manage

Update partition

Updates an existing partition. Partition code cannot be changed. Title, description, OCR settings, and access control can be modified. Requires features: attachments.manage

Request body (application/json)

{
  "code": "string",
  "title": "string",
  "description": null,
  "ocrModel": null,
  "id": "00000000-0000-4000-8000-000000000000"
}

Responses

200Partition updated successfully
Content-Type: application/json
{
  "item": {
    "id": "00000000-0000-4000-8000-000000000000",
    "code": "string",
    "title": "string",
    "description": null,
    "isPublic": true,
    "requiresOcr": true,
    "ocrModel": null,
    "createdAt": null,
    "updatedAt": null,
    "envKey": "string"
  }
}
400Invalid payload or code change attempt
Content-Type: application/json
{
  "error": "string"
}
404Partition not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/attachments/partitions" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"code\": \"string\",
  \"title\": \"string\",
  \"description\": null,
  \"ocrModel\": null,
  \"id\": \"00000000-0000-4000-8000-000000000000\"
}"
DELETE/attachments/partitions
Auth requiredattachments.manage

Delete partition

Deletes a partition. Default partitions cannot be deleted. Partitions with existing attachments cannot be deleted. Requires features: attachments.manage

Responses

200Partition deleted successfully
Content-Type: application/json
{
  "ok": true
}
400Invalid ID or default partition deletion attempt
Content-Type: application/json
{
  "error": "string"
}
404Partition not found
Content-Type: application/json
{
  "error": "string"
}
409Partition in use
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/attachments/partitions" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/attachments/transfer
Auth requiredattachments.manage

Transfer attachments to different record

Transfers one or more attachments from one record to another within the same entity type. Updates attachment assignments and metadata to reflect the new record. Requires features: attachments.manage

Request body (application/json)

{
  "entityId": "string",
  "attachmentIds": [
    "00000000-0000-4000-8000-000000000000"
  ],
  "toRecordId": "string"
}

Responses

200Attachments transferred successfully
Content-Type: application/json
{
  "ok": true,
  "updated": 1
}
400Invalid payload
Content-Type: application/json
{
  "error": "string"
}
404Attachments not found
Content-Type: application/json
{
  "error": "string"
}
500Attachment model missing
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/attachments/transfer" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"entityId\": \"string\",
  \"attachmentIds\": [
    \"00000000-0000-4000-8000-000000000000\"
  ],
  \"toRecordId\": \"string\"
}"

API Keys

3 endpoints
GET/api_keys/keys
Auth requiredapi_keys.view

List API keys

Returns paginated API keys visible to the current user, including per-key role assignments and organization context. Requires features: api_keys.view

Parameters

NameInRequiredSchemaDescription
pagequeryNostring
pageSizequeryNostring
searchqueryNostring

Responses

200Collection of API keys
Content-Type: application/json
{
  "items": [
    {
      "id": "string",
      "name": "string",
      "description": null,
      "keyPrefix": "string",
      "organizationId": null,
      "organizationName": null,
      "createdAt": "string",
      "lastUsedAt": null,
      "expiresAt": null,
      "roles": [
        {
          "id": "string",
          "name": null
        }
      ]
    }
  ],
  "total": 1,
  "page": 1,
  "pageSize": 1,
  "totalPages": 1
}
400Tenant context missing
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/api_keys/keys" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/api_keys/keys
Auth requiredapi_keys.create

Create API key

Creates a new API key, returning the one-time secret value together with the generated key prefix and scope details. Requires features: api_keys.create

Request body (application/json)

{
  "name": "string",
  "description": null,
  "tenantId": null,
  "organizationId": null,
  "roles": [],
  "expiresAt": null
}

Responses

201API key created successfully
Content-Type: application/json
{
  "id": "string",
  "name": "string",
  "keyPrefix": "string",
  "tenantId": null,
  "organizationId": null,
  "roles": [
    {
      "id": "string",
      "name": null
    }
  ]
}
400Invalid payload or missing tenant context
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/api_keys/keys" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"name\": \"string\",
  \"description\": null,
  \"tenantId\": null,
  \"organizationId\": null,
  \"roles\": [],
  \"expiresAt\": null
}"
DELETE/api_keys/keys
Auth requiredapi_keys.delete

Delete API key

Removes an API key by identifier. The key must belong to the current tenant and fall within the requester organization scope. Requires features: api_keys.delete

Parameters

NameInRequiredSchemaDescription
idqueryYesstringAPI key identifier to delete

Responses

200Key deleted successfully
Content-Type: application/json
{
  "success": true
}
400Missing or invalid identifier
Content-Type: application/json
{
  "error": "string"
}
404Key not found within scope
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/api_keys/keys?id=00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"

Onboarding

2 endpoints
POST/onboarding/onboarding

Self-service onboarding submission

Responses

201Success response
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/onboarding/onboarding" \
  -H "Accept: application/json"
GET/onboarding/onboarding/verify

Onboarding verification redirect

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/onboarding/onboarding/verify" \
  -H "Accept: application/json"

Business Rules

17 endpoints
POST/business_rules/execute
Auth requiredbusiness_rules.execute

Execute rules for given context

Manually executes applicable business rules for the specified entity type, event, and data. Supports dry-run mode to test rules without executing actions. Requires features: business_rules.execute

Request body (application/json)

{
  "entityType": "string",
  "dryRun": false
}

Responses

200Rules executed successfully
Content-Type: application/json
{
  "allowed": true,
  "executedRules": [
    {
      "ruleId": "string",
      "ruleName": "string",
      "conditionResult": true,
      "executionTime": 1
    }
  ],
  "totalExecutionTime": 1
}
400Invalid request payload
Content-Type: application/json
{
  "error": "string"
}
500Execution error
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/business_rules/execute" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"entityType\": \"string\",
  \"dryRun\": false
}"
POST/business_rules/execute/{ruleId}
Auth requiredbusiness_rules.execute

Execute a specific rule by its database UUID

Directly executes a specific business rule identified by its UUID, bypassing the normal entityType/eventType discovery mechanism. Useful for workflows and targeted rule execution. Requires features: business_rules.execute

Parameters

NameInRequiredSchemaDescription
ruleIdpathYesstringThe database UUID of the business rule to execute

Request body (application/json)

{
  "dryRun": false
}

Responses

200Rule executed successfully
Content-Type: application/json
{
  "success": true,
  "ruleId": "string",
  "ruleName": "string",
  "conditionResult": true,
  "actionsExecuted": null,
  "executionTime": 1
}
400Invalid request payload or rule ID
Content-Type: application/json
{
  "error": "string"
}
404Rule not found
Content-Type: application/json
{
  "error": "string"
}
500Execution error
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/business_rules/execute/00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"dryRun\": false
}"
GET/business_rules/logs
Auth requiredbusiness_rules.view_logs

List rule execution logs

Returns rule execution history for the current tenant and organization with filtering and pagination. Useful for audit trails and debugging. Requires features: business_rules.view_logs

Parameters

NameInRequiredSchemaDescription
idqueryNointeger
pagequeryNonumber
pageSizequeryNonumber
ruleIdqueryNostring
entityIdqueryNostring
entityTypequeryNostring
executionResultqueryNostring
executedByqueryNostring
executedAtFromqueryNostring
executedAtToqueryNostring
sortFieldqueryNostring
sortDirqueryNostring

Responses

200Rule execution logs collection
Content-Type: application/json
{
  "items": [
    {
      "id": "string",
      "ruleId": "string",
      "ruleName": "string",
      "ruleType": "string",
      "entityId": "00000000-0000-4000-8000-000000000000",
      "entityType": "string",
      "executionResult": "SUCCESS",
      "inputContext": null,
      "outputContext": null,
      "errorMessage": null,
      "executionTimeMs": 1,
      "executedAt": "string",
      "tenantId": "00000000-0000-4000-8000-000000000000",
      "organizationId": null,
      "executedBy": null
    }
  ],
  "total": 1,
  "totalPages": 1
}
400Invalid query parameters
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/business_rules/logs?page=1&pageSize=50&sortDir=desc" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/business_rules/logs/{id}
Auth requiredbusiness_rules.view_logs

Get execution log detail

Returns detailed information about a specific rule execution, including full context and results. Requires features: business_rules.view_logs

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Log entry details
Content-Type: application/json
{
  "id": "string",
  "rule": {
    "id": "00000000-0000-4000-8000-000000000000",
    "ruleId": "string",
    "ruleName": "string",
    "ruleType": "string",
    "entityType": "string"
  },
  "entityId": "00000000-0000-4000-8000-000000000000",
  "entityType": "string",
  "executionResult": "SUCCESS",
  "inputContext": null,
  "outputContext": null,
  "errorMessage": null,
  "executionTimeMs": 1,
  "executedAt": "string",
  "tenantId": "00000000-0000-4000-8000-000000000000",
  "organizationId": null,
  "executedBy": null
}
400Invalid log id
Content-Type: application/json
{
  "error": "string"
}
404Log entry not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/business_rules/logs/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/business_rules/rules
Auth requiredbusiness_rules.view

List business rules

Returns business rules for the current tenant and organization with filtering and pagination. Requires features: business_rules.view

Parameters

NameInRequiredSchemaDescription
idqueryNostring
pagequeryNonumber
pageSizequeryNonumber
searchqueryNostring
ruleIdqueryNostring
ruleTypequeryNostring
entityTypequeryNostring
eventTypequeryNostring
enabledqueryNoboolean
ruleCategoryqueryNostring
sortFieldqueryNostring
sortDirqueryNostring

Responses

200Business rules collection
Content-Type: application/json
{
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "ruleId": "string",
      "ruleName": "string",
      "description": null,
      "ruleType": "GUARD",
      "ruleCategory": null,
      "entityType": "string",
      "eventType": null,
      "enabled": true,
      "priority": 1,
      "version": 1,
      "effectiveFrom": null,
      "effectiveTo": null,
      "tenantId": "00000000-0000-4000-8000-000000000000",
      "organizationId": "00000000-0000-4000-8000-000000000000",
      "createdAt": "string",
      "updatedAt": "string"
    }
  ],
  "total": 1,
  "totalPages": 1
}
400Invalid query parameters
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/business_rules/rules?page=1&pageSize=50&sortDir=desc" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/business_rules/rules
Auth requiredbusiness_rules.manage

Create business rule

Creates a new business rule for the current tenant and organization. Requires features: business_rules.manage

Request body (application/json)

{
  "ruleId": "string",
  "ruleName": "string",
  "description": null,
  "ruleType": "GUARD",
  "ruleCategory": null,
  "entityType": "string",
  "eventType": null,
  "enabled": true,
  "priority": 100,
  "version": 1,
  "effectiveFrom": null,
  "effectiveTo": null,
  "tenantId": "string",
  "organizationId": "string",
  "createdBy": null,
  "successActions": null,
  "failureActions": null
}

Responses

201Business rule created
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000"
}
400Invalid payload
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/business_rules/rules" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"ruleId\": \"string\",
  \"ruleName\": \"string\",
  \"description\": null,
  \"ruleType\": \"GUARD\",
  \"ruleCategory\": null,
  \"entityType\": \"string\",
  \"eventType\": null,
  \"enabled\": true,
  \"priority\": 100,
  \"version\": 1,
  \"effectiveFrom\": null,
  \"effectiveTo\": null,
  \"tenantId\": \"string\",
  \"organizationId\": \"string\",
  \"createdBy\": null,
  \"successActions\": null,
  \"failureActions\": null
}"
PUT/business_rules/rules
Auth requiredbusiness_rules.manage

Update business rule

Updates an existing business rule. Requires features: business_rules.manage

Request body (application/json)

{
  "description": null,
  "ruleCategory": null,
  "eventType": null,
  "enabled": true,
  "priority": 100,
  "version": 1,
  "effectiveFrom": null,
  "effectiveTo": null,
  "createdBy": null,
  "successActions": null,
  "failureActions": null,
  "id": "string"
}

Responses

200Business rule updated
Content-Type: application/json
{
  "ok": true
}
400Invalid payload
Content-Type: application/json
{
  "error": "string"
}
404Business rule not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/business_rules/rules" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"description\": null,
  \"ruleCategory\": null,
  \"eventType\": null,
  \"enabled\": true,
  \"priority\": 100,
  \"version\": 1,
  \"effectiveFrom\": null,
  \"effectiveTo\": null,
  \"createdBy\": null,
  \"successActions\": null,
  \"failureActions\": null,
  \"id\": \"string\"
}"
DELETE/business_rules/rules
Auth requiredbusiness_rules.manage

Delete business rule

Soft deletes a business rule by identifier. Requires features: business_rules.manage

Parameters

NameInRequiredSchemaDescription
idqueryYesstringBusiness rule identifier

Responses

200Business rule deleted
Content-Type: application/json
{
  "ok": true
}
400Invalid identifier
Content-Type: application/json
{
  "error": "string"
}
404Business rule not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/business_rules/rules?id=00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/business_rules/rules/{id}
Auth requiredbusiness_rules.view

Fetch business rule by ID

Returns complete details of a business rule including conditions and actions. Requires features: business_rules.view

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Business rule detail
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000",
  "ruleId": "string",
  "ruleName": "string",
  "description": null,
  "ruleType": "GUARD",
  "ruleCategory": null,
  "entityType": "string",
  "eventType": null,
  "successActions": null,
  "failureActions": null,
  "enabled": true,
  "priority": 1,
  "version": 1,
  "effectiveFrom": null,
  "effectiveTo": null,
  "tenantId": "00000000-0000-4000-8000-000000000000",
  "organizationId": "00000000-0000-4000-8000-000000000000",
  "createdBy": null,
  "updatedBy": null,
  "createdAt": "string",
  "updatedAt": "string"
}
400Invalid identifier
Content-Type: application/json
{
  "error": "string"
}
404Business rule not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/business_rules/rules/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/business_rules/sets
Auth requiredbusiness_rules.view

List rule sets

Returns rule sets for the current tenant and organization with filtering and pagination. Requires features: business_rules.view

Parameters

NameInRequiredSchemaDescription
idqueryNostring
pagequeryNonumber
pageSizequeryNonumber
searchqueryNostring
setIdqueryNostring
enabledqueryNoboolean
sortFieldqueryNostring
sortDirqueryNostring

Responses

200Rule sets collection
Content-Type: application/json
{
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "setId": "string",
      "setName": "string",
      "description": null,
      "enabled": true,
      "tenantId": "00000000-0000-4000-8000-000000000000",
      "organizationId": "00000000-0000-4000-8000-000000000000",
      "createdBy": null,
      "updatedBy": null,
      "createdAt": "string",
      "updatedAt": "string"
    }
  ],
  "total": 1,
  "totalPages": 1
}
400Invalid query parameters
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/business_rules/sets?page=1&pageSize=50&sortDir=asc" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/business_rules/sets
Auth requiredbusiness_rules.manage_sets

Create rule set

Creates a new rule set for organizing business rules. Requires features: business_rules.manage_sets

Request body (application/json)

{
  "setId": "string",
  "setName": "string",
  "description": null,
  "enabled": true,
  "tenantId": "string",
  "organizationId": "string",
  "createdBy": null
}

Responses

201Rule set created
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000"
}
400Invalid payload
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/business_rules/sets" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"setId\": \"string\",
  \"setName\": \"string\",
  \"description\": null,
  \"enabled\": true,
  \"tenantId\": \"string\",
  \"organizationId\": \"string\",
  \"createdBy\": null
}"
PUT/business_rules/sets
Auth requiredbusiness_rules.manage_sets

Update rule set

Updates an existing rule set. Requires features: business_rules.manage_sets

Request body (application/json)

{
  "description": null,
  "enabled": true,
  "createdBy": null,
  "id": "string"
}

Responses

200Rule set updated
Content-Type: application/json
{
  "ok": true
}
400Invalid payload
Content-Type: application/json
{
  "error": "string"
}
404Rule set not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/business_rules/sets" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"description\": null,
  \"enabled\": true,
  \"createdBy\": null,
  \"id\": \"string\"
}"
DELETE/business_rules/sets
Auth requiredbusiness_rules.manage_sets

Delete rule set

Soft deletes a rule set by identifier. Requires features: business_rules.manage_sets

Parameters

NameInRequiredSchemaDescription
idqueryYesstringRule set identifier

Responses

200Rule set deleted
Content-Type: application/json
{
  "ok": true
}
400Invalid identifier
Content-Type: application/json
{
  "error": "string"
}
404Rule set not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/business_rules/sets?id=00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/business_rules/sets/{id}
Auth requiredbusiness_rules.view

Get rule set detail

Returns detailed information about a specific rule set, including all member rules. Requires features: business_rules.view

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Rule set details
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000",
  "setId": "string",
  "setName": "string",
  "description": null,
  "enabled": true,
  "tenantId": "00000000-0000-4000-8000-000000000000",
  "organizationId": "00000000-0000-4000-8000-000000000000",
  "createdBy": null,
  "updatedBy": null,
  "createdAt": "string",
  "updatedAt": "string",
  "members": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "ruleId": "00000000-0000-4000-8000-000000000000",
      "ruleName": "string",
      "ruleType": "string",
      "sequence": 1,
      "enabled": true
    }
  ]
}
400Invalid rule set id
Content-Type: application/json
{
  "error": "string"
}
404Rule set not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/business_rules/sets/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/business_rules/sets/{id}/members
Auth requiredbusiness_rules.manage_sets

Add rule to set

Adds a business rule to a rule set with specified sequence and enabled state. Requires features: business_rules.manage_sets

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Request body (application/json)

{
  "ruleId": "00000000-0000-4000-8000-000000000000",
  "sequence": 0,
  "enabled": true
}

Responses

201Member added
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000"
}
400Invalid payload
Content-Type: application/json
{
  "error": "string"
}
404Rule set or rule not found
Content-Type: application/json
{
  "error": "string"
}
409Rule already in set
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/business_rules/sets/:id/members" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"ruleId\": \"00000000-0000-4000-8000-000000000000\",
  \"sequence\": 0,
  \"enabled\": true
}"
PUT/business_rules/sets/{id}/members
Auth requiredbusiness_rules.manage_sets

Update set member

Updates sequence or enabled state of a rule set member. Requires features: business_rules.manage_sets

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Request body (application/json)

{
  "memberId": "00000000-0000-4000-8000-000000000000"
}

Responses

200Member updated
Content-Type: application/json
{
  "ok": true
}
400Invalid payload
Content-Type: application/json
{
  "error": "string"
}
404Member not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/business_rules/sets/:id/members" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"memberId\": \"00000000-0000-4000-8000-000000000000\"
}"
DELETE/business_rules/sets/{id}/members
Auth requiredbusiness_rules.manage_sets

Remove rule from set

Removes a business rule from a rule set (hard delete). Requires features: business_rules.manage_sets

Parameters

NameInRequiredSchemaDescription
idpathYesstring
memberIdqueryYesstringMember identifier

Responses

200Member removed
Content-Type: application/json
{
  "ok": true
}
400Invalid identifier
Content-Type: application/json
{
  "error": "string"
}
404Member not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/business_rules/sets/:id/members?memberId=00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"

Feature Toggles

12 endpoints
GET/feature_toggles/check/boolean
Auth required

Check if feature is enabled

Checks if a feature toggle is enabled for the current context.

Parameters

NameInRequiredSchemaDescription
identifierqueryYesstringFeature toggle identifier

Responses

200Feature status
Content-Type: application/json
{
  "enabled": true,
  "source": "override",
  "toggleId": "string",
  "identifier": "string",
  "tenantId": "string"
}
400Bad Request
Content-Type: application/json
{
  "error": "string"
}
404Tenant not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/feature_toggles/check/boolean?identifier=string" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/feature_toggles/check/json
Auth required

Get json config

Gets the json configuration for a feature toggle.

Parameters

NameInRequiredSchemaDescription
identifierqueryYesstringFeature toggle identifier

Responses

200Json config
Content-Type: application/json
{
  "valueType": "json",
  "source": "override",
  "toggleId": "string",
  "identifier": "string",
  "tenantId": "string"
}
400Bad Request
Content-Type: application/json
{
  "error": "string"
}
404Tenant not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/feature_toggles/check/json?identifier=string" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/feature_toggles/check/number
Auth required

Get number config

Gets the number configuration for a feature toggle.

Parameters

NameInRequiredSchemaDescription
identifierqueryYesstringFeature toggle identifier

Responses

200Number config
Content-Type: application/json
{
  "valueType": "number",
  "value": 1,
  "source": "override",
  "toggleId": "string",
  "identifier": "string",
  "tenantId": "string"
}
400Bad Request
Content-Type: application/json
{
  "error": "string"
}
404Tenant not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/feature_toggles/check/number?identifier=string" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/feature_toggles/check/string
Auth required

Get string config

Gets the string configuration for a feature toggle.

Parameters

NameInRequiredSchemaDescription
identifierqueryYesstringFeature toggle identifier

Responses

200String config
Content-Type: application/json
{
  "valueType": "string",
  "value": "string",
  "source": "override",
  "toggleId": "string",
  "identifier": "string",
  "tenantId": "string"
}
400Bad Request
Content-Type: application/json
{
  "error": "string"
}
404Tenant not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/feature_toggles/check/string?identifier=string" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/feature_toggles/global
Auth required

List global feature toggles

Returns all global feature toggles with filtering and pagination. Requires superadmin role. Requires roles: superadmin

Parameters

NameInRequiredSchemaDescription
pagequeryNonumberPage number for pagination
pageSizequeryNonumberNumber of items per page (max 200)
searchqueryNostringCase-insensitive search across identifier, name, description, and category
typequeryNostringFilter by toggle type (boolean, string, number, json)
categoryqueryNostringFilter by category (case-insensitive partial match)
namequeryNostringFilter by name (case-insensitive partial match)
identifierqueryNostringFilter by identifier (case-insensitive partial match)
sortFieldqueryNostringField to sort by
sortDirqueryNostringSort direction (ascending or descending)

Responses

200Feature toggles collection
Content-Type: application/json
{
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "identifier": "string",
      "name": "string",
      "description": null,
      "category": null,
      "type": "boolean",
      "defaultValue": null
    }
  ],
  "total": 1,
  "page": 1,
  "pageSize": 1,
  "totalPages": 1
}
400Invalid query parameters
Content-Type: application/json
{
  "error": "string"
}
403Forbidden - superadmin role required
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/feature_toggles/global?page=1&pageSize=50" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/feature_toggles/global
Auth required

Create global feature toggle

Creates a new global feature toggle. Requires superadmin role. Requires roles: superadmin

Request body (application/json)

{
  "identifier": "string",
  "name": "string",
  "description": null,
  "category": null,
  "type": "boolean",
  "defaultValue": null
}

Responses

201Feature toggle created
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000"
}
400Invalid payload
Content-Type: application/json
{
  "error": "string"
}
403Forbidden - superadmin role required
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/feature_toggles/global" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"identifier\": \"string\",
  \"name\": \"string\",
  \"description\": null,
  \"category\": null,
  \"type\": \"boolean\",
  \"defaultValue\": null
}"
PUT/feature_toggles/global
Auth required

Update global feature toggle

Updates an existing global feature toggle. Requires superadmin role. Requires roles: superadmin

Request body (application/json)

{
  "id": "00000000-0000-4000-8000-000000000000",
  "description": null,
  "category": null,
  "defaultValue": null
}

Responses

200Feature toggle updated
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000"
}
400Invalid payload
Content-Type: application/json
{
  "error": "string"
}
403Forbidden - superadmin role required
Content-Type: application/json
{
  "error": "string"
}
404Feature toggle not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/feature_toggles/global" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"id\": \"00000000-0000-4000-8000-000000000000\",
  \"description\": null,
  \"category\": null,
  \"defaultValue\": null
}"
DELETE/feature_toggles/global
Auth required

Delete global feature toggle

Soft deletes a global feature toggle by ID. Requires superadmin role. Requires roles: superadmin

Parameters

NameInRequiredSchemaDescription
idqueryYesstringFeature toggle identifier

Responses

200Feature toggle deleted
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000"
}
400Invalid identifier
Content-Type: application/json
{
  "error": "string"
}
403Forbidden - superadmin role required
Content-Type: application/json
{
  "error": "string"
}
404Feature toggle not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/feature_toggles/global?id=00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/feature_toggles/global/{id}
Auth required

Fetch feature toggle by ID

Returns complete details of a feature toggle. Requires roles: superadmin

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Feature toggle detail
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000",
  "identifier": "string",
  "name": "string",
  "description": null,
  "category": null,
  "type": "boolean",
  "defaultValue": null
}
400Invalid identifier
Content-Type: application/json
{
  "error": "string"
}
404Feature toggle not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/feature_toggles/global/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/feature_toggles/global/{id}/override
Auth required

Fetch feature toggle override

Returns feature toggle override. Requires roles: superadmin

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Feature toggle overrides
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000",
  "tenantName": "string",
  "tenantId": "00000000-0000-4000-8000-000000000000",
  "toggleType": "boolean"
}
400Invalid request
Content-Type: application/json
{
  "error": "string"
}
404Feature toggle not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/feature_toggles/global/:id/override" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/feature_toggles/overrides
Auth required

List overrides

Returns list of feature toggle overrides. Requires roles: superadmin

Parameters

NameInRequiredSchemaDescription
categoryqueryNostring
namequeryNostring
identifierqueryNostring
sortFieldqueryNostring
sortDirqueryNostring
pagequeryNonumber
pageSizequeryNonumber

Responses

200List of overrides
Content-Type: application/json
{
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "toggleId": "00000000-0000-4000-8000-000000000000",
      "overrideState": "enabled",
      "identifier": "string",
      "name": "string",
      "category": null,
      "defaultState": true,
      "tenantName": null
    }
  ],
  "total": 1,
  "page": 1,
  "pageSize": 1,
  "totalPages": 1,
  "isSuperAdmin": true
}
400Invalid query parameters
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/feature_toggles/overrides?page=1&pageSize=25" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PUT/feature_toggles/overrides
Auth required

Change override state

Enable, disable or inherit a feature toggle for a specific tenant. Requires roles: superadmin

Request body (application/json)

{
  "toggleId": "00000000-0000-4000-8000-000000000000",
  "isOverride": true
}

Responses

200Override updated
Content-Type: application/json
{
  "ok": true,
  "overrideToggleId": null
}
400Validation failed
Content-Type: application/json
{
  "error": "string"
}
404Not found
Content-Type: application/json
{
  "error": "string"
}
500Internal server error
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/feature_toggles/overrides" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"toggleId\": \"00000000-0000-4000-8000-000000000000\",
  \"isOverride\": true
}"

Events

1 endpoints
GET/events/stream
Auth required

GET /events/stream

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/events/stream" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"

Notifications

13 endpoints
GET/notifications
Auth required

List notifications

Returns a paginated collection of notifications.

Parameters

NameInRequiredSchemaDescription
statusqueryNoany
typequeryNostring
severityqueryNostring
sourceEntityTypequeryNostring
sourceEntityIdqueryNostring
sincequeryNostring
pagequeryNonumber
pageSizequeryNonumber
idsqueryNostringComma-separated list of record UUIDs to filter by (max 200).

Responses

200Paginated notifications
Content-Type: application/json
{
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "type": "string",
      "title": "string",
      "body": null,
      "titleKey": null,
      "bodyKey": null,
      "titleVariables": null,
      "bodyVariables": null,
      "icon": null,
      "severity": "string",
      "status": "string",
      "actions": [
        {
          "id": "string",
          "label": "string"
        }
      ],
      "sourceModule": null,
      "sourceEntityType": null,
      "sourceEntityId": null,
      "linkHref": null,
      "createdAt": "string",
      "readAt": null,
      "actionTaken": null
    }
  ],
  "total": 1,
  "page": 1,
  "pageSize": 1,
  "totalPages": 1
}

Example

curl -X GET "https://apiv2.tronergy.io/api/notifications?page=1&pageSize=20" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/notifications
Auth requirednotifications.create

Create notification

Creates a notification for a user. Requires features: notifications.create

Request body (application/json)

{
  "type": "string",
  "severity": "info",
  "recipientUserId": "00000000-0000-4000-8000-000000000000"
}

Responses

201Notification created
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/notifications" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"type\": \"string\",
  \"severity\": \"info\",
  \"recipientUserId\": \"00000000-0000-4000-8000-000000000000\"
}"
POST/notifications/{id}/action
Auth required

POST /notifications/{id}/action

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

201Success response
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/notifications/:id/action" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PUT/notifications/{id}/dismiss
Auth required

PUT /notifications/{id}/dismiss

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X PUT "https://apiv2.tronergy.io/api/notifications/:id/dismiss" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PUT/notifications/{id}/read
Auth required

PUT /notifications/{id}/read

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X PUT "https://apiv2.tronergy.io/api/notifications/:id/read" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PUT/notifications/{id}/restore
Auth required

PUT /notifications/{id}/restore

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X PUT "https://apiv2.tronergy.io/api/notifications/:id/restore" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/notifications/batch
Auth requirednotifications.create

POST /notifications/batch

Requires features: notifications.create

Responses

201Success response
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/notifications/batch" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/notifications/feature
Auth requirednotifications.create

POST /notifications/feature

Requires features: notifications.create

Responses

201Success response
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/notifications/feature" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PUT/notifications/mark-all-read
Auth required

PUT /notifications/mark-all-read

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X PUT "https://apiv2.tronergy.io/api/notifications/mark-all-read" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/notifications/role
Auth requirednotifications.create

POST /notifications/role

Requires features: notifications.create

Responses

201Success response
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/notifications/role" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/notifications/settings
Auth requirednotifications.manage

GET /notifications/settings

Requires features: notifications.manage

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/notifications/settings" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/notifications/settings
Auth requirednotifications.manage

POST /notifications/settings

Requires features: notifications.manage

Responses

201Success response
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/notifications/settings" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/notifications/unread-count
Auth required

GET /notifications/unread-count

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/notifications/unread-count" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"

Progress

6 endpoints
GET/progress/active
Auth required

GET /progress/active

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/progress/active" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/progress/jobs
Auth required

List progressjobs

Returns a paginated collection of progressjobs scoped to the authenticated tenant.

Parameters

NameInRequiredSchemaDescription
statusqueryNostring
jobTypequeryNostring
parentJobIdqueryNostring
includeCompletedqueryNostring
completedSincequeryNostring
pagequeryNonumber
pageSizequeryNonumber
searchqueryNostring
sortFieldqueryNostring
sortDirqueryNostring
idsqueryNostringComma-separated list of record UUIDs to filter by (max 200).

Responses

200Paginated progressjobs
Content-Type: application/json
{
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "jobType": "string",
      "name": "string",
      "description": null,
      "status": "string",
      "progressPercent": 1,
      "processedCount": 1,
      "totalCount": null,
      "etaSeconds": null,
      "cancellable": true,
      "startedAt": null,
      "finishedAt": null,
      "errorMessage": null,
      "createdAt": null,
      "tenantId": "00000000-0000-4000-8000-000000000000",
      "organizationId": null
    }
  ],
  "total": 1,
  "totalPages": 1
}

Example

curl -X GET "https://apiv2.tronergy.io/api/progress/jobs?page=1&pageSize=20" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/progress/jobs
Auth requiredprogress.create

Create progressjob

Creates a new progress job for tracking a long-running operation. Requires features: progress.create

Request body (application/json)

{
  "jobType": "string",
  "name": "string",
  "cancellable": false
}

Responses

201ProgressJob created
Content-Type: application/json
{
  "id": null
}

Example

curl -X POST "https://apiv2.tronergy.io/api/progress/jobs" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"jobType\": \"string\",
  \"name\": \"string\",
  \"cancellable\": false
}"
GET/progress/jobs/{id}
Auth required

GET /progress/jobs/{id}

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/progress/jobs/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PUT/progress/jobs/{id}
Auth requiredprogress.update

PUT /progress/jobs/{id}

Requires features: progress.update

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X PUT "https://apiv2.tronergy.io/api/progress/jobs/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
DELETE/progress/jobs/{id}
Auth requiredprogress.cancel

DELETE /progress/jobs/{id}

Requires features: progress.cancel

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

204Success

No response body.

Example

curl -X DELETE "https://apiv2.tronergy.io/api/progress/jobs/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"

Integrations

8 endpoints
GET/integrations
Auth requiredintegrations.view

List integrations

Returns a paginated collection of integrations. Requires features: integrations.view

Responses

200Paginated integrations
Content-Type: application/json
{
  "items": [
    {
      "id": "string",
      "title": "string",
      "category": null,
      "hub": null,
      "providerKey": null,
      "bundleId": null,
      "hasCredentials": true,
      "isEnabled": true,
      "apiVersion": null
    }
  ],
  "total": 1,
  "totalPages": 1
}

Example

curl -X GET "https://apiv2.tronergy.io/api/integrations" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/integrations/{id}
Auth requiredintegrations.view

Get integration detail

Requires features: integrations.view

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/integrations/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/integrations/{id}/credentials
Auth requiredintegrations.credentials.manage

Get or save integration credentials

Requires features: integrations.credentials.manage

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/integrations/:id/credentials" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PUT/integrations/{id}/credentials
Auth requiredintegrations.credentials.manage

Get or save integration credentials

Requires features: integrations.credentials.manage

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X PUT "https://apiv2.tronergy.io/api/integrations/:id/credentials" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/integrations/{id}/health
Auth requiredintegrations.manage

Run health check for an integration

Requires features: integrations.manage

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

201Success response
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/integrations/:id/health" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PUT/integrations/{id}/state
Auth requiredintegrations.manage

Update integration state

Requires features: integrations.manage

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X PUT "https://apiv2.tronergy.io/api/integrations/:id/state" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PUT/integrations/{id}/version
Auth requiredintegrations.manage

Change integration API version

Requires features: integrations.manage

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X PUT "https://apiv2.tronergy.io/api/integrations/:id/version" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/integrations/logs
Auth requiredintegrations.manage

List integration logs

Requires features: integrations.manage

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/integrations/logs" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"

Data Sync

17 endpoints
GET/data_sync/mappings
Auth requireddata_sync.configure

List or create field mappings

Requires features: data_sync.configure

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/data_sync/mappings" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/data_sync/mappings
Auth requireddata_sync.configure

List or create field mappings

Requires features: data_sync.configure

Responses

201Success response
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/data_sync/mappings" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/data_sync/mappings/{id}
Auth requireddata_sync.configure

Get, update, or delete a field mapping

Requires features: data_sync.configure

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/data_sync/mappings/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PUT/data_sync/mappings/{id}
Auth requireddata_sync.configure

Get, update, or delete a field mapping

Requires features: data_sync.configure

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X PUT "https://apiv2.tronergy.io/api/data_sync/mappings/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
DELETE/data_sync/mappings/{id}
Auth requireddata_sync.configure

Get, update, or delete a field mapping

Requires features: data_sync.configure

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

204Success

No response body.

Example

curl -X DELETE "https://apiv2.tronergy.io/api/data_sync/mappings/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/data_sync/options
Auth requireddata_sync.view

List data sync integration options

Requires features: data_sync.view

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/data_sync/options" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/data_sync/run
Auth requireddata_sync.run

Start a data sync run

Requires features: data_sync.run

Responses

201Success response
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/data_sync/run" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/data_sync/runs
Auth requireddata_sync.view

List sync runs

Requires features: data_sync.view

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/data_sync/runs" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/data_sync/runs/{id}
Auth requireddata_sync.view

Get sync run detail

Requires features: data_sync.view

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/data_sync/runs/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/data_sync/runs/{id}/cancel
Auth requireddata_sync.run

Cancel a running sync

Requires features: data_sync.run

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

201Success response
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/data_sync/runs/:id/cancel" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/data_sync/runs/{id}/retry
Auth requireddata_sync.run

Retry a failed sync run

Requires features: data_sync.run

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

201Success response
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/data_sync/runs/:id/retry" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/data_sync/schedules
Auth requireddata_sync.configure

List or create sync schedules

Requires features: data_sync.configure

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/data_sync/schedules" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/data_sync/schedules
Auth requireddata_sync.configure

List or create sync schedules

Requires features: data_sync.configure

Responses

201Success response
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/data_sync/schedules" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/data_sync/schedules/{id}
Auth requireddata_sync.configure

Manage a sync schedule

Requires features: data_sync.configure

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/data_sync/schedules/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PUT/data_sync/schedules/{id}
Auth requireddata_sync.configure

Manage a sync schedule

Requires features: data_sync.configure

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X PUT "https://apiv2.tronergy.io/api/data_sync/schedules/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
DELETE/data_sync/schedules/{id}
Auth requireddata_sync.configure

Manage a sync schedule

Requires features: data_sync.configure

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

204Success

No response body.

Example

curl -X DELETE "https://apiv2.tronergy.io/api/data_sync/schedules/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/data_sync/validate
Auth requireddata_sync.configure

Validate sync connection

Requires features: data_sync.configure

Responses

201Success response
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/data_sync/validate" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"

Messages

24 endpoints
GET/messages
Auth requiredmessages.view

List messages

Requires features: messages.view

Parameters

NameInRequiredSchemaDescription
folderqueryNostring
statusqueryNostring
typequeryNostring
visibilityqueryNostring
sourceEntityTypequeryNostring
sourceEntityIdqueryNostring
externalEmailqueryNostring
hasObjectsqueryNoboolean
hasAttachmentsqueryNoboolean
hasActionsqueryNoboolean
senderIdqueryNostring
searchqueryNostring
sincequeryNostring
pagequeryNonumber
pageSizequeryNonumber

Responses

200Message list
Content-Type: application/json
{
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "type": "string",
      "visibility": null,
      "sourceEntityType": null,
      "sourceEntityId": null,
      "externalEmail": null,
      "externalName": null,
      "subject": "string",
      "bodyPreview": "string",
      "senderUserId": "00000000-0000-4000-8000-000000000000",
      "senderName": null,
      "senderEmail": null,
      "priority": "string",
      "status": "string",
      "hasObjects": true,
      "objectCount": 1,
      "hasAttachments": true,
      "attachmentCount": 1,
      "recipientCount": 1,
      "hasActions": true,
      "actionTaken": null,
      "sentAt": null,
      "readAt": null,
      "threadId": null
    }
  ],
  "page": 1,
  "pageSize": 1,
  "total": 1,
  "totalPages": 1
}

Example

curl -X GET "https://apiv2.tronergy.io/api/messages?folder=inbox&page=1&pageSize=20" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/messages
Auth requiredmessages.compose

Compose a message

Requires features: messages.compose

Request body (application/json)

{
  "type": "default",
  "visibility": null,
  "recipients": [],
  "subject": "",
  "body": "",
  "bodyFormat": "text",
  "priority": "normal",
  "sendViaEmail": false,
  "isDraft": false
}

Responses

201Message created
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000",
  "threadId": null
}

Example

curl -X POST "https://apiv2.tronergy.io/api/messages" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"type\": \"default\",
  \"visibility\": null,
  \"recipients\": [],
  \"subject\": \"\",
  \"body\": \"\",
  \"bodyFormat\": \"text\",
  \"priority\": \"normal\",
  \"sendViaEmail\": false,
  \"isDraft\": false
}"
GET/messages/{id}
Auth requiredmessages.view

Get message detail

Requires features: messages.view

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Message detail with actor-visible thread items only
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000",
  "type": "string",
  "isDraft": true,
  "canEditDraft": true,
  "visibility": null,
  "sourceEntityType": null,
  "sourceEntityId": null,
  "externalEmail": null,
  "externalName": null,
  "typeDefinition": {
    "labelKey": "string",
    "icon": "string",
    "color": null,
    "allowReply": true,
    "allowForward": true,
    "ui": null
  },
  "threadId": null,
  "parentMessageId": null,
  "senderUserId": "00000000-0000-4000-8000-000000000000",
  "senderName": null,
  "senderEmail": null,
  "subject": "string",
  "body": "string",
  "bodyFormat": "text",
  "priority": "string",
  "sentAt": null,
  "actionData": null,
  "actionTaken": null,
  "actionTakenAt": null,
  "actionTakenByUserId": null,
  "recipients": [
    {
      "userId": "00000000-0000-4000-8000-000000000000",
      "type": "to",
      "status": "string",
      "readAt": null
    }
  ],
  "objects": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "entityModule": "string",
      "entityType": "string",
      "entityId": "00000000-0000-4000-8000-000000000000",
      "actionRequired": true,
      "actionType": null,
      "actionLabel": null,
      "snapshot": null,
      "preview": null
    }
  ],
  "thread": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "senderUserId": "00000000-0000-4000-8000-000000000000",
      "senderName": null,
      "senderEmail": null,
      "body": "string",
      "sentAt": null
    }
  ],
  "isRead": true
}
404Message not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/messages/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PATCH/messages/{id}
Auth requiredmessages.compose

Update draft message

Requires features: messages.compose

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Request body (application/json)

{
  "visibility": null
}

Responses

200Draft updated
Content-Type: application/json
{
  "ok": true
}
404Message not found
Content-Type: application/json
{
  "error": "string"
}
409Only drafts can be edited
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X PATCH "https://apiv2.tronergy.io/api/messages/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"visibility\": null
}"
DELETE/messages/{id}
Auth requiredmessages.view

Delete message for current sender/recipient context

Requires features: messages.view

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Message deleted
Content-Type: application/json
{
  "ok": true
}
404Message not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/messages/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/messages/{id}/actions/{actionId}
Auth requiredmessages.actions

Execute message action

Requires features: messages.actions

Parameters

NameInRequiredSchemaDescription
idpathYesstring
actionIdpathYesstring

Request body (application/json)

{}

Responses

200Action executed
Content-Type: application/json
{
  "ok": true,
  "actionId": "string"
}
404Action not found
Content-Type: application/json
{}
409Action already taken
Content-Type: application/json
{}
410Action expired
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/messages/:id/actions/:actionId" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PUT/messages/{id}/archive
Auth requiredmessages.view

Archive message

Requires features: messages.view

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Message archived
Content-Type: application/json
{
  "ok": true
}
404Message not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/messages/:id/archive" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
DELETE/messages/{id}/archive
Auth requiredmessages.view

Unarchive message

Requires features: messages.view

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Message unarchived
Content-Type: application/json
{
  "ok": true
}
404Message not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/messages/:id/archive" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/messages/{id}/attachments
Auth requiredmessages.view

List message attachments

Requires features: messages.view

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Attachments
Content-Type: application/json
{
  "attachments": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "fileName": "string",
      "fileSize": 1,
      "mimeType": "string",
      "url": "string"
    }
  ]
}
404Message not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/messages/:id/attachments" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/messages/{id}/attachments
Auth requiredmessages.attach_files

Link attachments to draft message

Requires features: messages.attach_files

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Request body (application/json)

{
  "attachmentIds": [
    "00000000-0000-4000-8000-000000000000"
  ]
}

Responses

200Attachments linked
Content-Type: application/json
{
  "ok": true
}
404Message not found
Content-Type: application/json
{
  "error": "string"
}
409Only draft messages can be edited
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/messages/:id/attachments" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"attachmentIds\": [
    \"00000000-0000-4000-8000-000000000000\"
  ]
}"
DELETE/messages/{id}/attachments
Auth requiredmessages.attach_files

Unlink attachments from draft message

Requires features: messages.attach_files

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Request body (application/json)

{}

Responses

200Attachments unlinked
Content-Type: application/json
{
  "ok": true
}
404Message not found
Content-Type: application/json
{
  "error": "string"
}
409Only draft messages can be edited
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/messages/:id/attachments" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{}"
GET/messages/{id}/confirmation
Auth requiredmessages.view

Read message confirmation status

Requires features: messages.view

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Confirmation status
Content-Type: application/json
{
  "messageId": "00000000-0000-4000-8000-000000000000",
  "confirmed": true,
  "confirmedAt": null,
  "confirmedByUserId": null
}
404Message not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/messages/:id/confirmation" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
DELETE/messages/{id}/conversation
Auth requiredmessages.view

Delete conversation for current actor

Requires features: messages.view

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Conversation deleted
Content-Type: application/json
{
  "ok": true,
  "affectedCount": 1
}
404Message not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/messages/:id/conversation" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PUT/messages/{id}/conversation/archive
Auth requiredmessages.view

Archive conversation for current actor

Requires features: messages.view

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Conversation archived
Content-Type: application/json
{
  "ok": true,
  "affectedCount": 1
}
404Message not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/messages/:id/conversation/archive" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
DELETE/messages/{id}/conversation/read
Auth requiredmessages.view

Mark entire conversation as unread for current actor

Requires features: messages.view

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Conversation marked unread
Content-Type: application/json
{
  "ok": true,
  "affectedCount": 1
}
404Message not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/messages/:id/conversation/read" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/messages/{id}/forward
Auth requiredmessages.compose

Forward a message and optionally include attachments from the forwarded conversation slice

Requires features: messages.compose

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Request body (application/json)

{
  "recipients": [
    {
      "userId": "00000000-0000-4000-8000-000000000000",
      "type": "to"
    }
  ],
  "includeAttachments": true,
  "sendViaEmail": false
}

Responses

201Message forwarded
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000"
}
404Message not found
Content-Type: application/json
{}
409Forward not allowed for message type
Content-Type: application/json
{}
413Forward body exceeds maximum length
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/messages/:id/forward" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"recipients\": [
    {
      \"userId\": \"00000000-0000-4000-8000-000000000000\",
      \"type\": \"to\"
    }
  ],
  \"includeAttachments\": true,
  \"sendViaEmail\": false
}"
GET/messages/{id}/forward-preview
Auth requiredmessages.compose

Get forward preview for a message

Requires features: messages.compose

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Forward preview generated
Content-Type: application/json
{
  "subject": "string",
  "body": "string"
}
404Message not found
Content-Type: application/json
{
  "error": "string"
}
413Forward body exceeds maximum length
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/messages/:id/forward-preview" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PUT/messages/{id}/read
Auth requiredmessages.view

Mark message as read

Requires features: messages.view

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Message marked read
Content-Type: application/json
{
  "ok": true
}
404Message not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/messages/:id/read" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
DELETE/messages/{id}/read
Auth requiredmessages.view

Mark message as unread

Requires features: messages.view

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Message marked unread
Content-Type: application/json
{
  "ok": true
}
404Message not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/messages/:id/read" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/messages/{id}/reply
Auth requiredmessages.compose

Reply to message

Requires features: messages.compose

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Request body (application/json)

{
  "body": "string",
  "bodyFormat": "text",
  "replyAll": false,
  "sendViaEmail": false
}

Responses

201Reply created
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000"
}
404Message not found
Content-Type: application/json
{
  "error": "string"
}
409No recipients available for reply
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/messages/:id/reply" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"body\": \"string\",
  \"bodyFormat\": \"text\",
  \"replyAll\": false,
  \"sendViaEmail\": false
}"
GET/messages/object-types
Auth requiredmessages.compose

List registered message object types for a message type

Requires features: messages.compose

Parameters

NameInRequiredSchemaDescription
messageTypequeryYesstring

Responses

200Message object types
Content-Type: application/json
{
  "items": [
    {
      "module": "string",
      "entityType": "string",
      "labelKey": "string",
      "icon": "string",
      "actions": [
        {
          "id": "string",
          "labelKey": "string"
        }
      ]
    }
  ]
}
400Invalid query
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/messages/object-types?messageType=string" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/messages/token/{token}

Access message via token

Parameters

NameInRequiredSchemaDescription
tokenpathYesstring

Responses

200Message detail via token
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000",
  "type": "string",
  "subject": "string",
  "body": "string",
  "bodyFormat": "text",
  "priority": "low",
  "senderUserId": "00000000-0000-4000-8000-000000000000",
  "sentAt": null,
  "actionData": null,
  "actionTaken": null,
  "actionTakenAt": null,
  "actionTakenByUserId": null,
  "objects": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "entityModule": "string",
      "entityType": "string",
      "entityId": "00000000-0000-4000-8000-000000000000",
      "actionRequired": true,
      "actionType": null,
      "actionLabel": null,
      "snapshot": null
    }
  ],
  "requiresAuth": true,
  "recipientUserId": "00000000-0000-4000-8000-000000000000"
}
404Invalid or expired link
Content-Type: application/json
{}
409Token usage exceeded
Content-Type: application/json
{}
410Token expired
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/messages/token/:token" \
  -H "Accept: application/json"
GET/messages/types
Auth requiredmessages.view

List registered message types

Requires features: messages.view

Responses

200Message types
Content-Type: application/json
{
  "items": [
    {
      "type": "string",
      "module": "string",
      "labelKey": "string",
      "icon": "string",
      "color": null,
      "allowReply": true,
      "allowForward": true,
      "actionsExpireAfterHours": null,
      "ui": null
    }
  ]
}

Example

curl -X GET "https://apiv2.tronergy.io/api/messages/types" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/messages/unread-count
Auth requiredmessages.view

Get unread message count

Requires features: messages.view

Responses

200Unread count
Content-Type: application/json
{
  "unreadCount": 1
}

Example

curl -X GET "https://apiv2.tronergy.io/api/messages/unread-count" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"

Entity Translations

2 endpoints
GET/translations/locales

List supported translation locales

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/translations/locales" \
  -H "Accept: application/json"
PUT/translations/locales

Update supported translation locales

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X PUT "https://apiv2.tronergy.io/api/translations/locales" \
  -H "Accept: application/json"

Scheduler

8 endpoints
GET/scheduler/jobs
Auth requiredscheduler.jobs.view

List scheduledjobs

Returns a paginated collection of scheduledjobs scoped to the authenticated organization. Requires features: scheduler.jobs.view

Parameters

NameInRequiredSchemaDescription
pagequeryNonumber
pageSizequeryNonumber
idqueryNostring
searchqueryNostring
scopeTypequeryNostring
isEnabledqueryYesany
sourceTypequeryNostring
sourceModulequeryNostring
sortqueryNostring
orderqueryNostring
idsqueryNostringComma-separated list of record UUIDs to filter by (max 200).

Responses

200Paginated scheduledjobs
Content-Type: application/json
{
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "name": "string",
      "description": null,
      "scopeType": "system",
      "organizationId": null,
      "tenantId": null,
      "scheduleType": "cron",
      "scheduleValue": "string",
      "timezone": "string",
      "targetType": "queue",
      "targetQueue": null,
      "targetCommand": null,
      "targetPayload": null,
      "requireFeature": null,
      "isEnabled": true,
      "lastRunAt": null,
      "nextRunAt": null,
      "sourceType": "user",
      "sourceModule": null,
      "createdAt": "string",
      "updatedAt": "string"
    }
  ],
  "total": 1,
  "totalPages": 1
}

Example

curl -X GET "https://apiv2.tronergy.io/api/scheduler/jobs?page=1&pageSize=20" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/scheduler/jobs
Auth requiredscheduler.jobs.manage

Create scheduledjob

Creates a new scheduled job with cron or interval-based scheduling. Requires features: scheduler.jobs.manage

Request body (application/json)

{
  "name": "string",
  "description": null,
  "scopeType": "system",
  "organizationId": null,
  "tenantId": null,
  "scheduleType": "cron",
  "scheduleValue": "string",
  "timezone": "UTC",
  "targetType": "queue",
  "targetQueue": null,
  "targetCommand": null,
  "targetPayload": null,
  "requireFeature": null,
  "isEnabled": true,
  "sourceType": "user",
  "sourceModule": null
}

Responses

201ScheduledJob created
Content-Type: application/json
{
  "id": null
}

Example

curl -X POST "https://apiv2.tronergy.io/api/scheduler/jobs" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"name\": \"string\",
  \"description\": null,
  \"scopeType\": \"system\",
  \"organizationId\": null,
  \"tenantId\": null,
  \"scheduleType\": \"cron\",
  \"scheduleValue\": \"string\",
  \"timezone\": \"UTC\",
  \"targetType\": \"queue\",
  \"targetQueue\": null,
  \"targetCommand\": null,
  \"targetPayload\": null,
  \"requireFeature\": null,
  \"isEnabled\": true,
  \"sourceType\": \"user\",
  \"sourceModule\": null
}"
PUT/scheduler/jobs
Auth requiredscheduler.jobs.manage

Update scheduledjob

Updates an existing scheduled job by ID. Requires features: scheduler.jobs.manage

Request body (application/json)

{
  "id": "string",
  "description": null,
  "targetQueue": null,
  "targetCommand": null,
  "targetPayload": null,
  "requireFeature": null
}

Responses

200ScheduledJob updated
Content-Type: application/json
{
  "ok": true
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/scheduler/jobs" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"id\": \"string\",
  \"description\": null,
  \"targetQueue\": null,
  \"targetCommand\": null,
  \"targetPayload\": null,
  \"requireFeature\": null
}"
DELETE/scheduler/jobs
Auth requiredscheduler.jobs.manage

Delete scheduledjob

Deletes a scheduled job by ID. Requires features: scheduler.jobs.manage

Request body (application/json)

{
  "id": "string"
}

Responses

200ScheduledJob deleted
Content-Type: application/json
{
  "ok": true
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/scheduler/jobs" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"id\": \"string\"
}"
GET/scheduler/jobs/{id}/executions

Get execution history for a schedule

Fetch recent executions from BullMQ for a scheduled job. Requires QUEUE_STRATEGY=async.

Parameters

NameInRequiredSchemaDescription
idpathYesstring
pageSizequeryNonumber

Responses

200Execution history
Content-Type: application/json
{
  "items": [
    {
      "id": "string",
      "scheduleId": "00000000-0000-4000-8000-000000000000",
      "startedAt": "string",
      "finishedAt": null,
      "status": "running",
      "triggerType": "scheduled",
      "triggeredByUserId": null,
      "errorMessage": null,
      "errorStack": null,
      "durationMs": null,
      "queueJobId": "string",
      "queueName": "string",
      "attemptsMade": 1,
      "result": null
    }
  ],
  "total": 1,
  "page": 1,
  "pageSize": 1
}
400Local strategy not supported
Content-Type: application/json
{
  "error": "string"
}
401Unauthorized
Content-Type: application/json
{
  "error": "string"
}
403Access denied
Content-Type: application/json
{
  "error": "string"
}
404Schedule not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/scheduler/jobs/:id/executions?pageSize=20" \
  -H "Accept: application/json"
GET/scheduler/queue-jobs/{jobId}

Get BullMQ job details and logs

Fetch detailed information and logs for a queue job. Requires QUEUE_STRATEGY=async.

Parameters

NameInRequiredSchemaDescription
jobIdpathYesstring
queuequeryYesstring

Responses

200Job details and logs
Content-Type: application/json
{
  "id": "string",
  "name": "string",
  "state": "waiting",
  "progress": null,
  "returnvalue": null,
  "failedReason": null,
  "stacktrace": null,
  "attemptsMade": 1,
  "processedOn": null,
  "finishedOn": null,
  "logs": [
    "string"
  ]
}
400Invalid request or local strategy not supported
Content-Type: application/json
{
  "error": "string"
}
401Unauthorized
Content-Type: application/json
{
  "error": "string"
}
403Access denied
Content-Type: application/json
{
  "error": "string"
}
404Job not found
Content-Type: application/json
{
  "error": "string"
}
500Internal server error
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/scheduler/queue-jobs/:jobId?queue=string" \
  -H "Accept: application/json"
GET/scheduler/targets

List available queues and commands

Returns all registered queue names (from module workers) and command IDs (from the command registry) that can be used as schedule targets.

Responses

200Available targets
Content-Type: application/json
{
  "queues": [
    {
      "value": "string",
      "label": "string"
    }
  ],
  "commands": [
    {
      "value": "string",
      "label": "string"
    }
  ]
}
401Unauthorized
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/scheduler/targets" \
  -H "Accept: application/json"
POST/scheduler/trigger

Manually trigger a schedule

Executes a scheduled job immediately, bypassing the scheduled time. Only works with async queue strategy.

Request body (application/json)

{
  "id": "string"
}

Responses

200Schedule triggered successfully
Content-Type: application/json
{
  "ok": true,
  "jobId": "string",
  "message": "string"
}
400Invalid request or local strategy not supported
Content-Type: application/json
{
  "error": "string"
}
401Unauthorized
Content-Type: application/json
{
  "error": "string"
}
403Access denied
Content-Type: application/json
{
  "error": "string"
}
404Schedule not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/scheduler/trigger" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{
  \"id\": \"string\"
}"

Customer Portal

53 endpoints
POST/chain_relayers/portal/estimate

Estimate cost for a gasless relay operation from the customer portal

Responses

200Cost estimate returned
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
403Insufficient permissions
Content-Type: application/json
{}
422Invalid payload or unsupported chain/mode
Content-Type: application/json
{}
429Rate limit exceeded
Content-Type: application/json
{}
502Provider estimation failed
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/chain_relayers/portal/estimate" \
  -H "Accept: application/json"
POST/chain_relayers/portal/execute

Execute a gasless relay operation from the customer portal

Responses

200Existing operation returned (idempotency hit)
Content-Type: application/json
{}
202Operation accepted for async processing
Content-Type: application/json
{}
400Pre-flight TX validation failed (malformed, unsigned, or expired)
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
403Insufficient permissions
Content-Type: application/json
{}
422Validation failure (Validation failed), removed field (UNSUPPORTED_FIELD), or delegate energy below provider minimum (ENERGY_AMOUNT_BELOW_MINIMUM)
Content-Type: application/json
{}
429Rate limit exceeded
Content-Type: application/json
{}
502Workflow failed to start
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/chain_relayers/portal/execute" \
  -H "Accept: application/json"
GET/chain_relayers/portal/operations

List relay operations for the authenticated customer

Responses

200Paginated list of relay operations
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/chain_relayers/portal/operations" \
  -H "Accept: application/json"
GET/chain_relayers/portal/operations/{id}

Get a single relay operation by ID for the authenticated customer

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Operation details
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
404Operation not found
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/chain_relayers/portal/operations/:id" \
  -H "Accept: application/json"
POST/chain_relayers/portal/operations/{id}/cancel

Cancel a relay operation from the customer portal (void non-terminal operations)

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Operation cancelled successfully
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
404Operation not found or belongs to a different tenant
Content-Type: application/json
{}
409Operation already in a terminal state
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/chain_relayers/portal/operations/:id/cancel" \
  -H "Accept: application/json"
GET/chain_relayers/portal/operations/stats

Get aggregated relay operation statistics for the authenticated customer

Parameters

NameInRequiredSchemaDescription
environmentqueryNostring

Responses

200Aggregated operation statistics
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
403Insufficient permissions
Content-Type: application/json
{}
422Invalid query parameters
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/chain_relayers/portal/operations/stats" \
  -H "Accept: application/json"
GET/chain_relayers/portal/providers

List available relay providers and their supported modes

Responses

200List of providers with supported modes
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/chain_relayers/portal/providers" \
  -H "Accept: application/json"
GET/chain_relayers/portal/stream

Subscribe to a single relay operation stream (portal)

Responses

200Event stream (text/event-stream)
Content-Type: application/json
{}
400Invalid operationId query parameter
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
403Insufficient permissions
Content-Type: application/json
{}
404Operation not found
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/chain_relayers/portal/stream" \
  -H "Accept: application/json"
GET/customer_accounts/portal/events/stream

Subscribe to portal events via SSE (Portal Event Bridge)

Long-lived SSE connection that receives server-side events marked with portalBroadcast: true. Events are filtered by the customer's tenant and organization.

Responses

200Event stream (text/event-stream)
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/customer_accounts/portal/events/stream" \
  -H "Accept: application/json"
POST/customer_accounts/portal/feature-check

Check customer portal feature access

Checks which of the requested features the authenticated customer user has. Used by portal menu injection for feature-gating.

Request body (application/json)

{
  "features": [
    "string"
  ]
}

Responses

200Feature check result
Content-Type: application/json
{
  "ok": true,
  "granted": [
    "string"
  ]
}
400Invalid request
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/customer_accounts/portal/feature-check" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{
  \"features\": [
    \"string\"
  ]
}"
POST/customer_accounts/portal/logout

Customer logout

Revokes the current session and clears authentication cookies.

Responses

200Logged out
Content-Type: application/json
{
  "ok": true
}

Example

curl -X POST "https://apiv2.tronergy.io/api/customer_accounts/portal/logout" \
  -H "Accept: application/json"
GET/customer_accounts/portal/notifications

List customer notifications

Returns paginated notifications for the authenticated customer user. Dismissed notifications are excluded by default unless ?status=dismissed is specified.

Responses

200Notification list
Content-Type: application/json
{
  "ok": true,
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "type": "string",
      "title": "string",
      "body": null,
      "titleKey": null,
      "bodyKey": null,
      "titleVariables": null,
      "bodyVariables": null,
      "icon": null,
      "severity": "info",
      "status": "unread",
      "actions": [
        {
          "id": "string",
          "label": "string"
        }
      ],
      "sourceModule": null,
      "sourceEntityType": null,
      "sourceEntityId": null,
      "linkHref": null,
      "createdAt": "string",
      "readAt": null,
      "actionTaken": null
    }
  ],
  "total": 1,
  "page": 1,
  "pageSize": 1
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/customer_accounts/portal/notifications" \
  -H "Accept: application/json"
PUT/customer_accounts/portal/notifications/{id}/dismiss

Dismiss notification

Dismisses a single notification for the authenticated customer user.

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Notification dismissed
Content-Type: application/json
{
  "ok": true
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
404Notification not found
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/customer_accounts/portal/notifications/00000000-0000-4000-8000-000000000000/dismiss" \
  -H "Accept: application/json"
PUT/customer_accounts/portal/notifications/{id}/read

Mark notification as read

Marks a single notification as read for the authenticated customer user.

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Notification marked as read
Content-Type: application/json
{
  "ok": true
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
404Notification not found
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/customer_accounts/portal/notifications/00000000-0000-4000-8000-000000000000/read" \
  -H "Accept: application/json"
PUT/customer_accounts/portal/notifications/mark-all-read

Mark all notifications as read

Marks all unread notifications as read for the authenticated customer user.

Responses

200All notifications marked as read
Content-Type: application/json
{
  "ok": true,
  "count": 1
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/customer_accounts/portal/notifications/mark-all-read" \
  -H "Accept: application/json"
GET/customer_accounts/portal/notifications/unread-count

Get unread notification count

Returns the number of unread notifications for the authenticated customer user.

Responses

200Unread count
Content-Type: application/json
{
  "ok": true,
  "unreadCount": 1
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/customer_accounts/portal/notifications/unread-count" \
  -H "Accept: application/json"
POST/customer_accounts/portal/password-change

Change customer password

Changes the authenticated customer user password after verifying the current password.

Request body (application/json)

{
  "currentPassword": "string",
  "newPassword": "string"
}

Responses

200Password changed
Content-Type: application/json
{
  "ok": true
}
400Current password incorrect or validation failed
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/customer_accounts/portal/password-change" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{
  \"currentPassword\": \"string\",
  \"newPassword\": \"string\"
}"
GET/customer_accounts/portal/profile

Get customer profile

Returns the authenticated customer user profile with roles and permissions.

Responses

200Profile data
Content-Type: application/json
{
  "ok": true,
  "user": {
    "id": "00000000-0000-4000-8000-000000000000",
    "email": "string",
    "displayName": "string",
    "emailVerified": true,
    "customerEntityId": null,
    "personEntityId": null,
    "isActive": true,
    "lastLoginAt": null,
    "createdAt": "string"
  },
  "roles": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "name": "string",
      "slug": "string"
    }
  ],
  "resolvedFeatures": [
    "string"
  ],
  "isPortalAdmin": true
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/customer_accounts/portal/profile" \
  -H "Accept: application/json"
PUT/customer_accounts/portal/profile

Update customer profile

Updates the authenticated customer user profile.

Request body (application/json)

{}

Responses

200Profile updated
Content-Type: application/json
{
  "ok": true,
  "user": {
    "id": "00000000-0000-4000-8000-000000000000",
    "email": "string",
    "displayName": "string"
  }
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
403Insufficient permissions
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/customer_accounts/portal/profile" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{}"
GET/customer_accounts/portal/sessions

List customer sessions

Returns active sessions for the authenticated customer user.

Responses

200Session list
Content-Type: application/json
{
  "ok": true,
  "sessions": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "ipAddress": null,
      "userAgent": null,
      "lastUsedAt": null,
      "createdAt": "string",
      "expiresAt": "string",
      "isCurrent": true
    }
  ]
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/customer_accounts/portal/sessions" \
  -H "Accept: application/json"
POST/customer_accounts/portal/sessions-refresh

Refresh customer JWT from session token

Uses the session cookie to issue a fresh JWT access token.

Responses

200Token refreshed
Content-Type: application/json
{
  "ok": true,
  "resolvedFeatures": [
    "string"
  ]
}
401Invalid session
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/customer_accounts/portal/sessions-refresh" \
  -H "Accept: application/json"
DELETE/customer_accounts/portal/sessions/{id}

Revoke a customer session

Revokes a specific session (not the current one).

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Session revoked
Content-Type: application/json
{
  "ok": true
}
400Cannot revoke current session
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
404Session not found
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/customer_accounts/portal/sessions/00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json"
GET/customer_accounts/portal/users

List company portal users

Lists all portal users associated with the same company.

Responses

200User list
Content-Type: application/json
{
  "ok": true,
  "users": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "email": "string",
      "displayName": "string",
      "emailVerified": true,
      "isActive": true,
      "lastLoginAt": null,
      "createdAt": "string",
      "roles": [
        {
          "id": "00000000-0000-4000-8000-000000000000",
          "name": "string",
          "slug": "string"
        }
      ]
    }
  ]
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
403Insufficient permissions
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/customer_accounts/portal/users" \
  -H "Accept: application/json"
POST/customer_accounts/portal/users-invite

Invite a user to the company portal

Creates an invitation for a new user to join the company portal.

Request body (application/json)

{
  "email": "user@example.com",
  "roleIds": [
    "00000000-0000-4000-8000-000000000000"
  ]
}

Responses

201Invitation created
Content-Type: application/json
{
  "ok": true,
  "invitation": {
    "id": "00000000-0000-4000-8000-000000000000",
    "email": "string",
    "expiresAt": "string"
  }
}
400Validation failed
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
403Insufficient permissions or non-assignable role
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/customer_accounts/portal/users-invite" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{
  \"email\": \"user@example.com\",
  \"roleIds\": [
    \"00000000-0000-4000-8000-000000000000\"
  ]
}"
DELETE/customer_accounts/portal/users/{id}

Delete a company portal user

Soft deletes a portal user and revokes all their sessions.

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200User deleted
Content-Type: application/json
{
  "ok": true
}
400Cannot delete self
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
403Insufficient permissions
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
404User not found
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/customer_accounts/portal/users/00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json"
PUT/customer_accounts/portal/users/{id}/roles

Update portal user roles

Assigns new roles to a company portal user.

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Request body (application/json)

{
  "roleIds": [
    "00000000-0000-4000-8000-000000000000"
  ]
}

Responses

200Roles updated
Content-Type: application/json
{
  "ok": true
}
400Validation failed
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
403Insufficient permissions
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
404User not found
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/customer_accounts/portal/users/00000000-0000-4000-8000-000000000000/roles" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{
  \"roleIds\": [
    \"00000000-0000-4000-8000-000000000000\"
  ]
}"
GET/customer_api_keys/portal/keys

List customer API keys

Returns paginated list of API keys owned by the authenticated portal customer.

Responses

200API key list
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/customer_api_keys/portal/keys" \
  -H "Accept: application/json"
POST/customer_api_keys/portal/keys

Create a customer API key

Creates a new API key with the customer role. The secret is returned once and cannot be retrieved later.

Responses

201API key created with secret
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
422Validation failed
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/customer_api_keys/portal/keys" \
  -H "Accept: application/json"
DELETE/customer_api_keys/portal/keys

Revoke a customer API key

Soft-deletes the API key and its link record. Immediate invalidation.

Responses

200Key revoked
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
404Key not found or not owned by customer
Content-Type: application/json
{}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/customer_api_keys/portal/keys" \
  -H "Accept: application/json"
GET/gas_tank/portal/accounts

List active gas tank accounts with balances for the authenticated customer

Responses

200List of accounts with balances
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/gas_tank/portal/accounts" \
  -H "Accept: application/json"
GET/gas_tank/portal/accounts/{id}/alerts

Get alert configuration for a gas tank account (returns defaults if not configured)

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Alert configuration
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
403Insufficient permissions
Content-Type: application/json
{}
404Account not found
Content-Type: application/json
{}
502Upstream service failure
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/gas_tank/portal/accounts/:id/alerts" \
  -H "Accept: application/json"
PUT/gas_tank/portal/accounts/{id}/alerts

Upsert alert configuration for a gas tank account

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Alert configuration updated
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
403Insufficient permissions
Content-Type: application/json
{}
404Account not found
Content-Type: application/json
{}
422Invalid payload
Content-Type: application/json
{}
502Upstream service failure
Content-Type: application/json
{}

Example

curl -X PUT "https://apiv2.tronergy.io/api/gas_tank/portal/accounts/:id/alerts" \
  -H "Accept: application/json"
GET/gas_tank/portal/stats

Get aggregated gas tank statistics for the authenticated customer

Responses

200Aggregated gas tank statistics
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
403Insufficient permissions
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/gas_tank/portal/stats" \
  -H "Accept: application/json"
GET/gas_tank/portal/transactions

List gas tank transactions for the authenticated customer

Responses

200Paginated list of transactions
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
403Insufficient permissions
Content-Type: application/json
{}
422Invalid query parameters
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/gas_tank/portal/transactions" \
  -H "Accept: application/json"
GET/gas_tank/portal/usage

Get gas tank usage aggregates for the authenticated customer

Responses

200Usage aggregates with per-chain breakdown
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
403Insufficient permissions
Content-Type: application/json
{}
422Invalid query parameters
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/gas_tank/portal/usage" \
  -H "Accept: application/json"
GET/gas_tank/portal/withdraw

Poll withdrawal payout status by holdId

Responses

200Payout record with status and tx_hash, or null if not found
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
403Insufficient permissions
Content-Type: application/json
{}
422holdId is required
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/gas_tank/portal/withdraw" \
  -H "Accept: application/json"
POST/gas_tank/portal/withdraw

Initiate a gas tank withdrawal via the customer portal (async workflow)

Responses

202Withdrawal dispatched; returns holdId for status polling
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
403Insufficient permissions
Content-Type: application/json
{}
422Validation failed or insufficient balance
Content-Type: application/json
{}
429Rate limit exceeded
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/gas_tank/portal/withdraw" \
  -H "Accept: application/json"
GET/payment_gateways/portal/deposit

Get customer deposit address and latest status snapshot

Responses

200Resolved customer deposit address and latest payment state
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
403Insufficient permissions
Content-Type: application/json
{}
422Invalid chain or provider not enabled
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/payment_gateways/portal/deposit" \
  -H "Accept: application/json"
POST/payment_gateways/portal/deposit

Resolve customer permanent deposit address and latest status snapshot

Responses

200Resolved customer deposit address and latest payment state
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
403Insufficient permissions
Content-Type: application/json
{}
422Validation failed
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/payment_gateways/portal/deposit" \
  -H "Accept: application/json"
GET/relayer_tron/portal/delegations

List energy delegations for the authenticated customer

Responses

200Paginated list of energy delegations
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
403Insufficient permissions
Content-Type: application/json
{}
422Invalid query parameters
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/relayer_tron/portal/delegations" \
  -H "Accept: application/json"
GET/relayer_tron/portal/pools

List tenant energy pools for the authenticated customer

Responses

200Paginated list of tenant pools
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
403Insufficient permissions
Content-Type: application/json
{}
422Invalid query parameters
Content-Type: application/json
{}
502Upstream service failure
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/relayer_tron/portal/pools" \
  -H "Accept: application/json"
POST/relayer_tron/portal/pools

Create a new pending pool for the authenticated customer

Responses

200Pending pool returned (resume flow)
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
403Insufficient permissions
Content-Type: application/json
{}
409Pool already exists for tenant
Content-Type: application/json
{}
422Invalid payload or staking address
Content-Type: application/json
{}
502Upstream service failure
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/relayer_tron/portal/pools" \
  -H "Accept: application/json"
GET/relayer_tron/portal/pools/{id}

Get a single tenant pool with recent delegations for the authenticated customer

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Pool details with delegations
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
403Insufficient permissions
Content-Type: application/json
{}
404Pool not found
Content-Type: application/json
{}
502Upstream service failure
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/relayer_tron/portal/pools/:id" \
  -H "Accept: application/json"
PUT/relayer_tron/portal/pools/{id}

Update a tenant pool (status, threshold settings)

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Pool updated
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
403Insufficient permissions
Content-Type: application/json
{}
404Pool not found
Content-Type: application/json
{}
422Invalid payload
Content-Type: application/json
{}
502Upstream service failure
Content-Type: application/json
{}

Example

curl -X PUT "https://apiv2.tronergy.io/api/relayer_tron/portal/pools/:id" \
  -H "Accept: application/json"
DELETE/relayer_tron/portal/pools/{id}

Soft-delete a tenant pool

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Pool deleted
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
403Insufficient permissions
Content-Type: application/json
{}
404Pool not found
Content-Type: application/json
{}
409Cannot delete pool with active delegations
Content-Type: application/json
{}
502Upstream service failure
Content-Type: application/json
{}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/relayer_tron/portal/pools/:id" \
  -H "Accept: application/json"
POST/relayer_tron/portal/pools/activate-with-permission

Activate a pending pool by verifying an existing on-chain permission (no TX hash needed)

Responses

200Pool activated with the specified permission
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
403Insufficient permissions
Content-Type: application/json
{}
404Pool or staking account not found
Content-Type: application/json
{}
422Invalid payload, pool not pending, or permission incompatible
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/relayer_tron/portal/pools/activate-with-permission" \
  -H "Accept: application/json"
POST/relayer_tron/portal/pools/confirm-permission

Confirm on-chain permission transaction and activate the pool

Responses

200Pool permission confirmed and pool activated
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
403Insufficient permissions
Content-Type: application/json
{}
404Pool not found
Content-Type: application/json
{}
422Invalid payload, pool not pending, or tx not confirmed
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/relayer_tron/portal/pools/confirm-permission" \
  -H "Accept: application/json"
POST/relayer_tron/portal/pools/generate-permission-tx

Build an unsigned AccountPermissionUpdate tx to grant delegate rights for a pending pool

Responses

200Unsigned tx and permission ID returned
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
403Insufficient permissions
Content-Type: application/json
{}
404Pool or staking account not found
Content-Type: application/json
{}
422Invalid payload or pool not pending
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/relayer_tron/portal/pools/generate-permission-tx" \
  -H "Accept: application/json"
POST/relayer_tron/portal/pools/list-permissions

Fetch active permissions from chain and analyze compatibility with the platform relayer

Responses

200List of permissions with compatibility analysis
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
403Insufficient permissions
Content-Type: application/json
{}
404Staking account not found on chain
Content-Type: application/json
{}
422Invalid payload
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/relayer_tron/portal/pools/list-permissions" \
  -H "Accept: application/json"
POST/relayer_tron/portal/pools/validate-address

Validate a Tron staking address for pool onboarding

Responses

200Validation result returned
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
403Insufficient permissions
Content-Type: application/json
{}
422Invalid payload
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/relayer_tron/portal/pools/validate-address" \
  -H "Accept: application/json"
GET/relayer_tron/portal/stats

Get aggregated Tron relayer statistics for the authenticated customer

Responses

200Aggregated relayer statistics
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
403Insufficient permissions
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/relayer_tron/portal/stats" \
  -H "Accept: application/json"
GET/wallet_connections/portal/onboarding-status

Get onboarding checklist status for the authenticated customer

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/wallet_connections/portal/onboarding-status" \
  -H "Accept: application/json"
POST/wallet_connections/portal/onboarding-status

Update onboarding checklist status (dismiss or reset)

Responses

201Success response
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/wallet_connections/portal/onboarding-status" \
  -H "Accept: application/json"

Chain Relayers

8 endpoints
POST/chain_relayers/estimate
Auth requiredchain_relayers.estimate

Estimate cost for a gasless relay operation (dry-run)

Requires features: chain_relayers.estimate

Responses

200Cost estimate returned
Content-Type: application/json
{}
422Invalid payload or unsupported chain/mode
Content-Type: application/json
{}
502Provider estimation failed
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/chain_relayers/estimate" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/chain_relayers/execute
Auth requiredchain_relayers.execute

Execute gasless relay operation (async or sync mode)

Requires features: chain_relayers.execute

Responses

200Existing operation returned (idempotency) or sync result
Content-Type: application/json
{}
202Operation accepted for async processing
Content-Type: application/json
{}
400Pre-flight TX validation failed (malformed, unsigned, or expired)
Content-Type: application/json
{}
422Validation failure (INVALID_PAYLOAD), removed field (UNSUPPORTED_FIELD), or delegate energy below provider minimum (ENERGY_AMOUNT_BELOW_MINIMUM)
Content-Type: application/json
{}
502Workflow failed to start
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/chain_relayers/execute" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/chain_relayers/operations
Auth requiredchain_relayers.view

List relay operations with filters and pagination

Requires features: chain_relayers.view

Responses

200Paginated list of operations
Content-Type: application/json
{}
422Invalid query parameters
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/chain_relayers/operations" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/chain_relayers/operations/{id}/retry
Auth requiredchain_relayers.manage

Creates a new operation with the same parameters as the failed one and dispatches it to the workflow engine

Creates a new operation with the same parameters as the original failed or expired operation and dispatches it to the workflow engine. Requires features: chain_relayers.manage

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Retry operation created and dispatched
Content-Type: application/json
{}
404Operation not found
Content-Type: application/json
{}
409Operation cannot be retried (not in failed/expired status)
Content-Type: application/json
{}
422No adapter available for chain/mode
Content-Type: application/json
{}
502Workflow failed to start for retried operation
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/chain_relayers/operations/:id/retry" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/chain_relayers/operations/{id}/void
Auth requiredchain_relayers.manage

Void a relay operation in any non-terminal status, releasing held funds and cancelling workflows

Requires features: chain_relayers.manage

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Operation voided successfully
Content-Type: application/json
{}
404Operation not found
Content-Type: application/json
{}
409Operation cannot be voided (already in terminal status)
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/chain_relayers/operations/:id/void" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/chain_relayers/operations/attention
Auth requiredchain_relayers.view

Get operations and delegations needing attention

Returns operations and delegations grouped by category that require operator attention: stuck operations, reconciliation-needed items, recent failures, and compensation-needed delegations. Requires features: chain_relayers.view

Responses

200Attention items grouped by category
Content-Type: application/json
{}
502Failed to fetch attention data
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/chain_relayers/operations/attention" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/chain_relayers/providers
Auth requiredchain_relayers.view

List all registered chain relayer providers and their supported modes

Requires features: chain_relayers.view

Responses

200List of registered providers
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/chain_relayers/providers" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/chain_relayers/status/{id}
Auth requiredchain_relayers.view

Poll a single relay operation status

Requires features: chain_relayers.view

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Operation status returned
Content-Type: application/json
{}
404Operation not found
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/chain_relayers/status/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"

Payment Gateways

24 endpoints
GET/payment_gateways/payments
Auth requiredpayment_gateways.view

List payments with filters and pagination

Requires features: payment_gateways.view

Responses

200Paginated list of payments
Content-Type: application/json
{}
422Invalid query parameters
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/payment_gateways/payments" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/payment_gateways/payments
Auth requiredpayment_gateways.manage

Create a payment (async via Inngest workflow)

Requires features: payment_gateways.manage

Responses

202Payment creation accepted for async processing
Content-Type: application/json
{}
422Invalid payload
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/payment_gateways/payments" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/payment_gateways/payments/{id}
Auth requiredpayment_gateways.view

Get a single payment with its transaction history

Requires features: payment_gateways.view

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Payment with transactions returned
Content-Type: application/json
{}
404Payment not found
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/payment_gateways/payments/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/payment_gateways/payments/{id}/authorize
Auth requiredpayment_gateways.manage

Authorize a payment (async via Inngest workflow)

Requires features: payment_gateways.manage

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

202Authorization accepted for async processing
Content-Type: application/json
{}
422Invalid payload
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/payment_gateways/payments/:id/authorize" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/payment_gateways/payments/{id}/cancel
Auth requiredpayment_gateways.manage

Cancel/void a payment (synchronous)

Requires features: payment_gateways.manage

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Payment canceled successfully
Content-Type: application/json
{}
404Payment not found
Content-Type: application/json
{}
409Payment cannot be canceled in its current status
Content-Type: application/json
{}
422Invalid payload
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/payment_gateways/payments/:id/cancel" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/payment_gateways/payments/{id}/capture
Auth requiredpayment_gateways.capture

Capture an authorized payment (async via Inngest workflow)

Requires features: payment_gateways.capture

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

202Capture accepted for async processing
Content-Type: application/json
{}
422Invalid payload
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/payment_gateways/payments/:id/capture" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/payment_gateways/payments/{id}/reconcile
Auth requiredpayment_gateways.reconcile

Clear reconciliation flag and create audit transaction

Requires features: payment_gateways.reconcile

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Payment reconciled successfully
Content-Type: application/json
{}
404Payment not found
Content-Type: application/json
{}
409Payment does not require reconciliation
Content-Type: application/json
{}
422Invalid payload
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/payment_gateways/payments/:id/reconcile" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/payment_gateways/payments/{id}/refund
Auth requiredpayment_gateways.refund

Refund a captured payment (async via Inngest workflow)

Requires features: payment_gateways.refund

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

202Refund accepted for async processing
Content-Type: application/json
{}
422Invalid payload
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/payment_gateways/payments/:id/refund" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/payment_gateways/payouts
Auth requiredpayment_gateways.view_payouts

List payouts with filters and pagination

Requires features: payment_gateways.view_payouts

Responses

200Paginated list of payouts
Content-Type: application/json
{}
422Invalid query parameters
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/payment_gateways/payouts" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/payment_gateways/payouts
Auth requiredpayment_gateways.create_payout

Create a payout (async via Inngest workflow)

Requires features: payment_gateways.create_payout

Responses

202Payout creation accepted for async processing
Content-Type: application/json
{}
422Invalid payload
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/payment_gateways/payouts" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/payment_gateways/payouts/{id}
Auth requiredpayment_gateways.view_payouts

Get a single payout with its transaction history

Requires features: payment_gateways.view_payouts

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Payout with transactions returned
Content-Type: application/json
{}
404Payout not found
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/payment_gateways/payouts/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/payment_gateways/payouts/{id}/cancel
Auth requiredpayment_gateways.cancel_payout

Cancel a pending payout (synchronous)

Requires features: payment_gateways.cancel_payout

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Payout canceled successfully
Content-Type: application/json
{}
404Payout not found
Content-Type: application/json
{}
409Payout cannot be canceled (invalid status transition)
Content-Type: application/json
{}
422Invalid payload
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/payment_gateways/payouts/:id/cancel" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/payment_gateways/providers
Auth requiredpayment_gateways.view

List payment providers

Returns paginated payment providers for the current tenant with optional provider_key filter. Requires features: payment_gateways.view

Parameters

NameInRequiredSchemaDescription
pagequeryNonumber
pageSizequeryNonumber
provider_keyqueryNostring

Responses

200Paginated list of payment providers
Content-Type: application/json
{
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "providerKey": "string",
      "isEnabled": true,
      "isPollingEnabled": true,
      "pollingInterval": 1,
      "organizationId": "00000000-0000-4000-8000-000000000000",
      "tenantId": "00000000-0000-4000-8000-000000000000",
      "createdAt": "string",
      "updatedAt": "string"
    }
  ],
  "total": 1,
  "page": 1,
  "pageSize": 1,
  "totalPages": 1
}

Example

curl -X GET "https://apiv2.tronergy.io/api/payment_gateways/providers?page=1&pageSize=20" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/payment_gateways/providers
Auth requiredpayment_gateways.manage

Register a payment provider

Creates a new payment provider configuration for the current tenant. Requires features: payment_gateways.manage

Request body (application/json)

{
  "provider_key": "string",
  "is_enabled": true,
  "is_polling_enabled": false,
  "polling_interval": 60000
}

Responses

201Provider created
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000",
  "providerKey": "string",
  "isEnabled": true,
  "isPollingEnabled": true,
  "pollingInterval": 1,
  "organizationId": "00000000-0000-4000-8000-000000000000",
  "tenantId": "00000000-0000-4000-8000-000000000000",
  "createdAt": "string",
  "updatedAt": "string"
}
400Invalid payload
Content-Type: application/json
{
  "error": "string"
}
409Provider key already exists for this tenant
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/payment_gateways/providers" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"provider_key\": \"string\",
  \"is_enabled\": true,
  \"is_polling_enabled\": false,
  \"polling_interval\": 60000
}"
PUT/payment_gateways/providers
Auth requiredpayment_gateways.manage

Update a payment provider

Updates an existing payment provider configuration. Requires features: payment_gateways.manage

Request body (application/json)

{
  "id": "00000000-0000-4000-8000-000000000000"
}

Responses

200Provider updated
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000",
  "providerKey": "string",
  "isEnabled": true,
  "isPollingEnabled": true,
  "pollingInterval": 1,
  "organizationId": "00000000-0000-4000-8000-000000000000",
  "tenantId": "00000000-0000-4000-8000-000000000000",
  "createdAt": "string",
  "updatedAt": "string"
}
400Invalid payload
Content-Type: application/json
{
  "error": "string"
}
404Provider not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/payment_gateways/providers" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"id\": \"00000000-0000-4000-8000-000000000000\"
}"
DELETE/payment_gateways/providers
Auth requiredpayment_gateways.manage

Deactivate a payment provider (soft delete)

Soft-deletes a payment provider by ID. Requires features: payment_gateways.manage

Parameters

NameInRequiredSchemaDescription
idqueryYesstringProvider identifier

Responses

200Provider deactivated
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000"
}
404Provider not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/payment_gateways/providers?id=00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/payment_gateways/refund-reasons
Auth requiredpayment_gateways.view

List refund reasons

Returns paginated refund reasons for the current tenant with optional is_active filter. Requires features: payment_gateways.view

Parameters

NameInRequiredSchemaDescription
pagequeryNonumber
pageSizequeryNonumber
is_activequeryYesany

Responses

200Paginated list of refund reasons
Content-Type: application/json
{
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "code": "string",
      "label": "string",
      "isActive": true,
      "organizationId": "00000000-0000-4000-8000-000000000000",
      "tenantId": "00000000-0000-4000-8000-000000000000",
      "createdAt": "string",
      "updatedAt": "string"
    }
  ],
  "total": 1,
  "page": 1,
  "pageSize": 1,
  "totalPages": 1
}

Example

curl -X GET "https://apiv2.tronergy.io/api/payment_gateways/refund-reasons?page=1&pageSize=20" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/payment_gateways/refund-reasons
Auth requiredpayment_gateways.manage

Create a refund reason

Creates a new refund reason with a unique code per tenant. Requires features: payment_gateways.manage

Request body (application/json)

{
  "code": "string",
  "label": "string",
  "is_active": true
}

Responses

201Refund reason created
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000",
  "code": "string",
  "label": "string",
  "isActive": true,
  "organizationId": "00000000-0000-4000-8000-000000000000",
  "tenantId": "00000000-0000-4000-8000-000000000000",
  "createdAt": "string",
  "updatedAt": "string"
}
400Invalid payload
Content-Type: application/json
{
  "error": "string"
}
409Code already exists for this tenant
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/payment_gateways/refund-reasons" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"code\": \"string\",
  \"label\": \"string\",
  \"is_active\": true
}"
PUT/payment_gateways/refund-reasons
Auth requiredpayment_gateways.manage

Update a refund reason

Updates an existing refund reason. Requires features: payment_gateways.manage

Request body (application/json)

{
  "id": "00000000-0000-4000-8000-000000000000"
}

Responses

200Refund reason updated
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000",
  "code": "string",
  "label": "string",
  "isActive": true,
  "organizationId": "00000000-0000-4000-8000-000000000000",
  "tenantId": "00000000-0000-4000-8000-000000000000",
  "createdAt": "string",
  "updatedAt": "string"
}
400Invalid payload
Content-Type: application/json
{
  "error": "string"
}
404Refund reason not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/payment_gateways/refund-reasons" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"id\": \"00000000-0000-4000-8000-000000000000\"
}"
DELETE/payment_gateways/refund-reasons
Auth requiredpayment_gateways.manage

Deactivate a refund reason (soft delete)

Soft-deletes a refund reason by ID. Requires features: payment_gateways.manage

Parameters

NameInRequiredSchemaDescription
idqueryYesstringRefund reason identifier

Responses

200Refund reason deactivated
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000"
}
404Refund reason not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/payment_gateways/refund-reasons?id=00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/payment_gateways/sync
Auth requiredpayment_gateways.manage

Manually trigger transaction sync for all or a specific provider

Enqueues a sync-transactions job. Optionally filter by provider_key. Requires features: payment_gateways.manage

Request body (application/json)

{}

Responses

200Sync job enqueued
Content-Type: application/json
{
  "status": "enqueued"
}
422Invalid payload
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/payment_gateways/sync" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{}"
GET/payment_gateways/transactions
Auth requiredpayment_gateways.view

List transactions

Returns paginated, append-only transaction records. Transactions are created internally by workflows and workers and cannot be modified via API. Requires features: payment_gateways.view

Parameters

NameInRequiredSchemaDescription
pagequeryNonumber
pageSizequeryNonumber
payment_idqueryNostring
payout_idqueryNostring
typequeryNostring
statusqueryNostring

Responses

200Paginated list of transactions
Content-Type: application/json
{
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "paymentId": null,
      "payoutId": null,
      "type": "authorization",
      "status": "succeeded",
      "amount": "string",
      "externalId": null,
      "idempotencyKey": "string",
      "data": null,
      "note": null,
      "refundReasonId": null,
      "organizationId": "00000000-0000-4000-8000-000000000000",
      "tenantId": "00000000-0000-4000-8000-000000000000",
      "createdAt": "string"
    }
  ],
  "total": 1,
  "page": 1,
  "pageSize": 1,
  "totalPages": 1
}
422Invalid query parameters
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/payment_gateways/transactions?page=1&pageSize=20" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/payment_gateways/transactions/{id}
Auth requiredpayment_gateways.view

Get transaction by ID

Returns a single append-only transaction record scoped to the current tenant and organization. Requires features: payment_gateways.view

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Transaction detail
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000",
  "paymentId": null,
  "payoutId": null,
  "type": "authorization",
  "status": "succeeded",
  "amount": "string",
  "externalId": null,
  "idempotencyKey": "string",
  "data": null,
  "note": null,
  "refundReasonId": null,
  "organizationId": "00000000-0000-4000-8000-000000000000",
  "tenantId": "00000000-0000-4000-8000-000000000000",
  "createdAt": "string"
}
404Transaction not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/payment_gateways/transactions/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/payment_gateways/webhook/{provider}

Receive webhook events from payment providers

Parameters

NameInRequiredSchemaDescription
providerpathYesstring

Responses

200Webhook received and queued for processing
Content-Type: application/json
{}
404Unknown provider key
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/payment_gateways/webhook/:provider" \
  -H "Accept: application/json"

Wallet

14 endpoints
GET/gas_tank/accounts
Auth requiredgas_tank.view

List gas tank accounts with filters, pagination, and optional balance enrichment

Requires features: gas_tank.view

Responses

200Paginated list of gas tank accounts (include=balance adds live ledger balances)
Content-Type: application/json
{}
422Invalid query parameters
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/gas_tank/accounts" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/gas_tank/accounts
Auth requiredgas_tank.manage

Create a new gas tank account

Requires features: gas_tank.manage

Responses

201Gas tank account created
Content-Type: application/json
{}
400Unsupported chain
Content-Type: application/json
{}
409Account already exists for this chain and environment
Content-Type: application/json
{}
422Invalid payload
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/gas_tank/accounts" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/gas_tank/accounts/{id}
Auth requiredgas_tank.view

Get a gas tank account with its current ledger balance

Requires features: gas_tank.view

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Account with balance returned
Content-Type: application/json
{}
404Account not found
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/gas_tank/accounts/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PUT/gas_tank/accounts/{id}
Auth requiredgas_tank.manage

Update gas tank account status

Requires features: gas_tank.manage

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Account status updated
Content-Type: application/json
{}
404Account not found
Content-Type: application/json
{}
422Invalid payload or invalid status transition
Content-Type: application/json
{}

Example

curl -X PUT "https://apiv2.tronergy.io/api/gas_tank/accounts/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/gas_tank/accounts/{id}/adjust
Auth requiredgas_tank.manage

Apply a manual credit or debit to a gas tank account

Requires features: gas_tank.manage

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Adjustment applied successfully
Content-Type: application/json
{}
404Account not found
Content-Type: application/json
{}
422Invalid payload, account not active, or insufficient balance for debit
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/gas_tank/accounts/:id/adjust" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/gas_tank/accounts/{id}/alerts
Auth requiredgas_tank.manage

Get alert configuration for a gas tank account (returns defaults if not configured)

Requires features: gas_tank.manage

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Alert configuration
Content-Type: application/json
{}
404Account not found
Content-Type: application/json
{}
502Upstream service failure
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/gas_tank/accounts/:id/alerts" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PUT/gas_tank/accounts/{id}/alerts
Auth requiredgas_tank.manage

Upsert alert configuration for a gas tank account

Requires features: gas_tank.manage

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Alert configuration updated
Content-Type: application/json
{}
404Account not found
Content-Type: application/json
{}
422Invalid payload
Content-Type: application/json
{}
502Upstream service failure
Content-Type: application/json
{}

Example

curl -X PUT "https://apiv2.tronergy.io/api/gas_tank/accounts/:id/alerts" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/gas_tank/accounts/{id}/balance
Auth requiredgas_tank.view

Get the current ledger balance for a specific gas tank account

Requires features: gas_tank.view

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Balance returned
Content-Type: application/json
{}
404Account not found
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/gas_tank/accounts/:id/balance" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/gas_tank/accounts/{id}/transactions
Auth requiredgas_tank.view

List ledger transactions for a specific gas tank account

Requires features: gas_tank.view

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Paginated list of transactions
Content-Type: application/json
{}
404Account not found
Content-Type: application/json
{}
422Invalid query parameters
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/gas_tank/accounts/:id/transactions" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/gas_tank/portal/deposit-address

Get deposit address for a chain and environment

Responses

200Success response
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/gas_tank/portal/deposit-address" \
  -H "Accept: application/json"
POST/gas_tank/portal/wallet-topup

Record a wallet-broadcast deposit TX for gas tank tracking

Responses

201Success response
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/gas_tank/portal/wallet-topup" \
  -H "Accept: application/json"
GET/gas_tank/stats
Auth requiredgas_tank.view

Aggregate balance stats across all active gas tank accounts

Requires features: gas_tank.view

Responses

200Aggregated stats returned
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/gas_tank/stats" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/gas_tank/transactions
Auth requiredgas_tank.view

List all ledger transactions scoped to the gas tank with enrichment and CSV export

Requires features: gas_tank.view

Responses

200Paginated list of enriched transactions or CSV export
Content-Type: application/json
{}
422Invalid query parameters
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/gas_tank/transactions" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/gas_tank/usage
Auth requiredgas_tank.view

Get gas tank usage aggregates for the authenticated tenant

Requires features: gas_tank.view

Responses

200Usage aggregates with per-chain breakdown
Content-Type: application/json
{}
422Invalid query parameters
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/gas_tank/usage" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"

ChainRelayers

11 endpoints
GET/chain_relayers/admin/stream
Auth requiredplatform.chain_relayers.analytics

Subscribe to cross-tenant operation status events via SSE (platform admin only)

Long-lived SSE connection that receives chain_relayers.operation.* events across all tenants. Requires platform.chain_relayers.analytics feature. Requires features: platform.chain_relayers.analytics

Responses

200Event stream (text/event-stream)
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/chain_relayers/admin/stream" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/chain_relayers/alerts/config
Auth requiredchain_relayers.manage

List all alert configurations for the tenant (returns defaults for unconfigured types)

Requires features: chain_relayers.manage

Responses

200Alert configurations list
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/chain_relayers/alerts/config" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PUT/chain_relayers/alerts/config
Auth requiredchain_relayers.manage

Upsert an alert configuration for a specific alert type

Requires features: chain_relayers.manage

Responses

200Alert configuration upserted
Content-Type: application/json
{}
422Invalid payload
Content-Type: application/json
{}

Example

curl -X PUT "https://apiv2.tronergy.io/api/chain_relayers/alerts/config" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/chain_relayers/analytics/revenue
Auth requiredchain_relayers.view

Get revenue analytics with time series, summary totals, and provider comparison

Requires features: chain_relayers.view

Parameters

NameInRequiredSchemaDescription
fromqueryYesstring
toqueryYesstring
groupByqueryNostring
formatqueryNostring

Responses

200Revenue analytics data
Content-Type: application/json
{}
422Invalid query parameters
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/chain_relayers/analytics/revenue?from=string&to=string&groupBy=day" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/chain_relayers/analytics/usage
Auth requiredchain_relayers.view

Get usage analytics aggregated by time period

Requires features: chain_relayers.view

Parameters

NameInRequiredSchemaDescription
fromqueryYesstring
toqueryYesstring
groupByqueryNostring
chainqueryNostring
modequeryNostring
sourcequeryNostring
environmentqueryNostring
formatqueryNostring

Responses

200Usage analytics data
Content-Type: application/json
{}
422Invalid query parameters
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/chain_relayers/analytics/usage?from=string&to=string&groupBy=day" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/chain_relayers/construct-tx
Auth requiredchain_relayers.execute

Construct unsigned Tron transaction(s) for wallet signing

Builds unsigned transaction(s) via TronWeb SDK using tenant credentials. Returns one TX for sponsored_broadcast and two TXs for token_pay or trx_fee_token_pay. Includes an inline cost estimate when available (null on estimation failure). The transaction(s) can then be signed by the connected wallet and submitted to /execute. Requires features: chain_relayers.execute

Responses

200Unsigned transaction(s) constructed
Content-Type: application/json
{}
422Invalid parameters
Content-Type: application/json
{}
429Rate limit exceeded
Content-Type: application/json
{}
500TronGrid unavailable or transaction construction failed
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/chain_relayers/construct-tx" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/chain_relayers/operations/stats
Auth requiredchain_relayers.view

Get aggregated operation statistics for the dashboard metrics bar

Requires features: chain_relayers.view

Responses

200Aggregated operation statistics
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/chain_relayers/operations/stats" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/chain_relayers/providers/health
Auth requiredchain_relayers.view

Return health status for all registered energy providers from cache

Requires features: chain_relayers.view

Responses

200Provider health data returned
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/chain_relayers/providers/health" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/chain_relayers/settings
Auth requiredchain_relayers.manage

Get current platform settings with defaults

Requires features: chain_relayers.manage

Responses

200Current platform settings
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/chain_relayers/settings" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PUT/chain_relayers/settings
Auth requiredchain_relayers.manage

Update platform settings (partial update)

Requires features: chain_relayers.manage

Responses

200Settings updated
Content-Type: application/json
{}
422Invalid payload
Content-Type: application/json
{}

Example

curl -X PUT "https://apiv2.tronergy.io/api/chain_relayers/settings" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/chain_relayers/stream
Auth requiredchain_relayers.view

Subscribe to one relay operation status stream

Long-lived SSE connection for one operation. Requires operationId query parameter. Requires features: chain_relayers.view

Responses

200Event stream (text/event-stream)
Content-Type: application/json
{}
400Invalid operationId query parameter
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/chain_relayers/stream" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"

Portal Relay

1 endpoints
POST/chain_relayers/portal/construct-tx

Construct unsigned Tron transaction(s) for wallet signing

Builds unsigned transaction(s) via TronWeb SDK using tenant credentials. Returns one TX for sponsored_broadcast and two TXs for token_pay or trx_fee_token_pay. Includes an inline cost estimate when available (null on estimation failure). The transaction(s) can then be signed by the connected wallet and submitted to /execute.

Responses

200Unsigned transaction(s) constructed
Content-Type: application/json
{}
401Not authenticated
Content-Type: application/json
{}
422Invalid parameters
Content-Type: application/json
{}
500TronGrid unavailable or transaction construction failed
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/chain_relayers/portal/construct-tx" \
  -H "Accept: application/json"

Chain Relayers Portal

1 endpoints
POST/chain_relayers/portal/dry-run

Dry-run transaction simulation before signing

Responses

201Success response
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/chain_relayers/portal/dry-run" \
  -H "Accept: application/json"

Configs

6 endpoints
GET/configs/cache
Auth requiredconfigs.cache.view

Get cache statistics

Returns detailed cache statistics including total entries and breakdown by cache segments. Requires cache service to be available. Requires features: configs.cache.view

Responses

200Cache statistics
Content-Type: application/json
{
  "total": 1,
  "segments": {
    "key": 1
  }
}
500Failed to resolve cache stats
Content-Type: application/json
{
  "error": "string"
}
503Cache service unavailable
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/configs/cache" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/configs/cache
Auth requiredconfigs.cache.manage

Purge cache

Purges cache entries. Supports two actions: purgeAll (clears entire cache) or purgeSegment (clears specific segment). Returns updated cache statistics after purge. Requires features: configs.cache.manage

Request body (application/json)

{
  "action": "purgeAll"
}

Responses

200Cache segment cleared successfully
Content-Type: application/json
{
  "action": "purgeSegment",
  "segment": "string",
  "deleted": 1,
  "stats": {
    "total": 1,
    "segments": {
      "key": 1
    }
  }
}
400Invalid request - missing segment identifier for purgeSegment action
Content-Type: application/json
{
  "error": "string"
}
500Failed to purge cache
Content-Type: application/json
{
  "error": "string"
}
503Cache service unavailable
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/configs/cache" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"action\": \"purgeAll\"
}"
GET/configs/system-status
Auth requiredconfigs.system_status.view

Get system health status

Returns comprehensive system health information including environment details, version, resource usage, and service connectivity status. Requires features: configs.system_status.view

Responses

200System status snapshot
Content-Type: application/json
{
  "generatedAt": "string",
  "runtimeMode": "development",
  "categories": [
    {
      "key": "profiling",
      "labelKey": "string",
      "descriptionKey": null,
      "items": [
        {
          "key": "string",
          "category": "profiling",
          "kind": "boolean",
          "labelKey": "string",
          "descriptionKey": "string",
          "docUrl": null,
          "defaultValue": null,
          "state": "enabled",
          "value": null,
          "normalizedValue": null
        }
      ]
    }
  ]
}
500Failed to load system status
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/configs/system-status" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/configs/system-status
Auth requiredconfigs.manage

Clear system cache

Purges the entire cache for the current tenant. Useful for troubleshooting or forcing fresh data loading. Requires features: configs.manage

Responses

200Cache cleared successfully
Content-Type: application/json
{
  "cleared": true
}
500Failed to purge cache
Content-Type: application/json
{
  "error": "string"
}
503Cache service unavailable
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/configs/system-status" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/configs/upgrade-actions
Auth requiredconfigs.manage

List pending upgrade actions

Returns a list of pending upgrade actions for the current version. These are one-time setup tasks that need to be executed after upgrading to a new version. Requires organization and tenant context. Requires features: configs.manage

Responses

200List of pending upgrade actions
Content-Type: application/json
{
  "version": "string",
  "actions": [
    {
      "id": "string",
      "version": "string",
      "message": "string",
      "ctaLabel": "string",
      "successMessage": "string",
      "loadingLabel": "string"
    }
  ]
}
400Missing organization or tenant context
Content-Type: application/json
{
  "error": "string"
}
500Failed to load upgrade actions
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/configs/upgrade-actions" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/configs/upgrade-actions
Auth requiredconfigs.manage

Execute upgrade action

Executes a specific upgrade action by ID. Typically used for one-time setup tasks like seeding example data after version upgrade. Returns execution status and localized success message. Requires features: configs.manage

Request body (application/json)

{
  "actionId": "string"
}

Responses

200Upgrade action executed successfully
Content-Type: application/json
{
  "status": "string",
  "message": "string",
  "version": "string"
}
400Invalid request body or missing context
Content-Type: application/json
{
  "error": "string"
}
500Failed to execute upgrade action
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/configs/upgrade-actions" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"actionId\": \"string\"
}"

Customer Accounts Admin

14 endpoints
GET/customer_accounts/admin/roles

List customer roles (admin)

Returns all customer roles for the tenant.

Responses

200Role list
Content-Type: application/json
{
  "ok": true,
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "name": "string",
      "slug": "string",
      "description": null,
      "isDefault": true,
      "isSystem": true,
      "customerAssignable": true,
      "createdAt": "string"
    }
  ],
  "total": 1,
  "totalPages": 1,
  "page": 1
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
403Insufficient permissions
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/customer_accounts/admin/roles" \
  -H "Accept: application/json"
POST/customer_accounts/admin/roles

Create customer role (admin)

Creates a new customer role with an empty ACL.

Request body (application/json)

{
  "name": "string",
  "slug": "string"
}

Responses

201Role created
Content-Type: application/json
{
  "ok": true,
  "role": {
    "id": "00000000-0000-4000-8000-000000000000",
    "name": "string",
    "slug": "string",
    "description": null,
    "isDefault": true,
    "isSystem": true,
    "customerAssignable": true,
    "createdAt": "string"
  }
}
400Validation failed
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
403Insufficient permissions
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
409Slug already exists
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/customer_accounts/admin/roles" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{
  \"name\": \"string\",
  \"slug\": \"string\"
}"
GET/customer_accounts/admin/roles/{id}

Get customer role detail (admin)

Returns full customer role details including ACL features.

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Role detail with ACL
Content-Type: application/json
{
  "ok": true,
  "role": {
    "id": "00000000-0000-4000-8000-000000000000",
    "name": "string",
    "slug": "string",
    "description": null,
    "isDefault": true,
    "isSystem": true,
    "customerAssignable": true,
    "createdAt": "string",
    "updatedAt": null,
    "acl": {
      "features": [
        "string"
      ],
      "isPortalAdmin": true
    }
  }
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
403Insufficient permissions
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
404Role not found
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/customer_accounts/admin/roles/00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json"
PUT/customer_accounts/admin/roles/{id}

Update customer role (admin)

Updates a customer role. System roles are protected from name changes.

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Request body (application/json)

{}

Responses

200Role updated
Content-Type: application/json
{
  "ok": true
}
400Validation failed or system role restriction
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
403Insufficient permissions
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
404Role not found
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/customer_accounts/admin/roles/00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{}"
DELETE/customer_accounts/admin/roles/{id}

Delete customer role (admin)

Soft deletes a customer role and its ACL. System roles and roles with assigned users cannot be deleted.

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Role deleted
Content-Type: application/json
{
  "ok": true
}
400System role or has assigned users
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
403Insufficient permissions
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
404Role not found
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/customer_accounts/admin/roles/00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json"
PUT/customer_accounts/admin/roles/{id}/acl

Update customer role ACL (admin)

Updates the ACL (features and portal admin flag) for a customer role. Invalidates RBAC cache after update.

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Request body (application/json)

{
  "features": [
    "string"
  ]
}

Responses

200ACL updated
Content-Type: application/json
{
  "ok": true
}
400Validation failed
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
403Insufficient permissions
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
404Role not found
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/customer_accounts/admin/roles/00000000-0000-4000-8000-000000000000/acl" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{
  \"features\": [
    \"string\"
  ]
}"
GET/customer_accounts/admin/users

List customer users (admin)

Returns a paginated list of customer users with roles. Supports filtering by status, company, role, and search.

Parameters

NameInRequiredSchemaDescription
pagequeryNonumber
pageSizequeryNonumber
statusqueryNostring
customerEntityIdqueryNostring
roleIdqueryNostring
searchqueryNostring

Responses

200Paginated user list
Content-Type: application/json
{
  "ok": true,
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "email": "string",
      "displayName": "string",
      "emailVerified": true,
      "isActive": true,
      "lockedUntil": null,
      "lastLoginAt": null,
      "customerEntityId": null,
      "personEntityId": null,
      "createdAt": "string",
      "roles": [
        {
          "id": "00000000-0000-4000-8000-000000000000",
          "name": "string",
          "slug": "string"
        }
      ]
    }
  ],
  "total": 1,
  "totalPages": 1,
  "page": 1
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
403Insufficient permissions
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/customer_accounts/admin/users" \
  -H "Accept: application/json"
POST/customer_accounts/admin/users

Create customer user (admin)

Creates a new customer user directly. Staff-initiated, bypasses signup flow.

Request body (application/json)

{
  "email": "user@example.com",
  "password": "string",
  "displayName": "string"
}

Responses

201User created
Content-Type: application/json
{
  "ok": true,
  "user": {
    "id": "00000000-0000-4000-8000-000000000000",
    "email": "string",
    "displayName": "string"
  }
}
400Validation failed
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
403Insufficient permissions
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
409Email already exists
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/customer_accounts/admin/users" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{
  \"email\": \"user@example.com\",
  \"password\": \"string\",
  \"displayName\": \"string\"
}"
POST/customer_accounts/admin/users-invite

Invite customer user (admin)

Creates a staff-initiated invitation for a new customer user. The invitedByUserId is set from the staff auth context.

Request body (application/json)

{
  "email": "user@example.com",
  "roleIds": [
    "00000000-0000-4000-8000-000000000000"
  ]
}

Responses

201Invitation created
Content-Type: application/json
{
  "ok": true,
  "invitation": {
    "id": "00000000-0000-4000-8000-000000000000",
    "email": "string",
    "expiresAt": "string"
  }
}
400Validation failed
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
403Insufficient permissions
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/customer_accounts/admin/users-invite" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{
  \"email\": \"user@example.com\",
  \"roleIds\": [
    \"00000000-0000-4000-8000-000000000000\"
  ]
}"
GET/customer_accounts/admin/users/{id}

Get customer user detail (admin)

Returns full customer user details including roles and active session count.

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200User detail
Content-Type: application/json
{
  "ok": true,
  "user": {
    "id": "00000000-0000-4000-8000-000000000000",
    "email": "string",
    "displayName": "string",
    "emailVerified": true,
    "isActive": true,
    "lockedUntil": null,
    "lastLoginAt": null,
    "failedLoginAttempts": 1,
    "customerEntityId": null,
    "personEntityId": null,
    "createdAt": "string",
    "updatedAt": null,
    "roles": [
      {
        "id": "00000000-0000-4000-8000-000000000000",
        "name": "string",
        "slug": "string"
      }
    ],
    "activeSessionCount": 1
  }
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
403Insufficient permissions
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
404User not found
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/customer_accounts/admin/users/00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json"
PUT/customer_accounts/admin/users/{id}

Update customer user (admin)

Updates a customer user. Staff can update status, lock, and roles. Role assignment bypasses customer_assignable check.

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Request body (application/json)

{
  "lockedUntil": null,
  "personEntityId": null,
  "customerEntityId": null
}

Responses

200User updated
Content-Type: application/json
{
  "ok": true
}
400Validation failed or role not found
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
403Insufficient permissions
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
404User not found
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/customer_accounts/admin/users/00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{
  \"lockedUntil\": null,
  \"personEntityId\": null,
  \"customerEntityId\": null
}"
DELETE/customer_accounts/admin/users/{id}

Delete customer user (admin)

Soft deletes a customer user and revokes all their active sessions.

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200User deleted
Content-Type: application/json
{
  "ok": true
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
403Insufficient permissions
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
404User not found
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/customer_accounts/admin/users/00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json"
POST/customer_accounts/admin/users/{id}/reset-password

Reset customer user password (admin)

Allows staff to set a new password for a customer user.

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Request body (application/json)

{
  "newPassword": "string"
}

Responses

200Password reset
Content-Type: application/json
{
  "ok": true
}
400Validation failed
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
403Insufficient permissions
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
404User not found
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/customer_accounts/admin/users/00000000-0000-4000-8000-000000000000/reset-password" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{
  \"newPassword\": \"string\"
}"
POST/customer_accounts/admin/users/{id}/verify-email

Verify customer user email (admin)

Allows staff to manually mark a customer user email as verified.

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Email verified
Content-Type: application/json
{
  "ok": true
}
401Not authenticated
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
403Insufficient permissions
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
404User not found
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/customer_accounts/admin/users/00000000-0000-4000-8000-000000000000/verify-email" \
  -H "Accept: application/json"

Customer Authentication

8 endpoints
POST/customer_accounts/email/verify

Verify customer email address

Validates the email verification token and marks the email as verified.

Request body (application/json)

{
  "token": "string"
}

Responses

200Email verified
Content-Type: application/json
{
  "ok": true
}
400Invalid or expired token
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/customer_accounts/email/verify" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{
  \"token\": \"string\"
}"
POST/customer_accounts/invitations/accept

Accept customer invitation

Accepts an invitation, creates the user account, assigns roles, and auto-logs in.

Request body (application/json)

{
  "token": "string",
  "password": "string",
  "displayName": "string"
}

Responses

201Invitation accepted and user created
Content-Type: application/json
{
  "ok": true,
  "user": {
    "id": "00000000-0000-4000-8000-000000000000",
    "email": "user@example.com",
    "displayName": "string",
    "emailVerified": true
  },
  "resolvedFeatures": [
    "string"
  ]
}
400Invalid or expired invitation
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/customer_accounts/invitations/accept" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{
  \"token\": \"string\",
  \"password\": \"string\",
  \"displayName\": \"string\"
}"
POST/customer_accounts/login

Authenticate customer credentials

Validates customer credentials and issues JWT + session cookies.

Request body (application/json)

{
  "email": "user@example.com",
  "password": "string"
}

Responses

200Login successful
Content-Type: application/json
{
  "ok": true,
  "user": {
    "id": "00000000-0000-4000-8000-000000000000",
    "email": "user@example.com",
    "displayName": "string",
    "emailVerified": true
  },
  "resolvedFeatures": [
    "string"
  ]
}
400Validation failed
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
401Invalid credentials
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
423Account locked
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
429Too many login attempts
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/customer_accounts/login" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{
  \"email\": \"user@example.com\",
  \"password\": \"string\"
}"
POST/customer_accounts/magic-link/request

Request magic link login

Sends a magic link to the customer email. Always returns 200 to prevent enumeration.

Request body (application/json)

{
  "email": "user@example.com"
}

Responses

200Request accepted
Content-Type: application/json
{
  "ok": true
}
429Too many requests
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/customer_accounts/magic-link/request" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{
  \"email\": \"user@example.com\"
}"
POST/customer_accounts/magic-link/verify

Verify magic link token

Validates the magic link token, auto-verifies email, and creates a session.

Request body (application/json)

{
  "token": "string"
}

Responses

200Login successful
Content-Type: application/json
{
  "ok": true,
  "user": {
    "id": "00000000-0000-4000-8000-000000000000",
    "email": "user@example.com",
    "displayName": "string",
    "emailVerified": true
  },
  "resolvedFeatures": [
    "string"
  ]
}
400Invalid or expired token
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
401Account not found
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/customer_accounts/magic-link/verify" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{
  \"token\": \"string\"
}"
POST/customer_accounts/password/reset-confirm

Confirm customer password reset

Validates the reset token and sets a new password. Revokes all existing sessions.

Request body (application/json)

{
  "token": "string",
  "password": "string"
}

Responses

200Password reset successful
Content-Type: application/json
{
  "ok": true
}
400Invalid or expired token
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/customer_accounts/password/reset-confirm" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{
  \"token\": \"string\",
  \"password\": \"string\"
}"
POST/customer_accounts/password/reset-request

Request customer password reset

Initiates a password reset flow. Always returns 200 to prevent email enumeration.

Request body (application/json)

{
  "email": "user@example.com"
}

Responses

200Request accepted
Content-Type: application/json
{
  "ok": true
}
429Too many requests
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/customer_accounts/password/reset-request" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{
  \"email\": \"user@example.com\"
}"
POST/customer_accounts/signup

Register a new customer account

Creates a new customer user account and sends an email verification token.

Request body (application/json)

{
  "email": "user@example.com",
  "password": "string",
  "displayName": "string"
}

Responses

201Account created successfully
Content-Type: application/json
{
  "ok": true,
  "user": {
    "id": "00000000-0000-4000-8000-000000000000",
    "email": "user@example.com",
    "displayName": "string",
    "emailVerified": true
  }
}
400Validation failed
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
409Email already registered
Content-Type: application/json
{
  "ok": false,
  "error": "string"
}
429Too many signup attempts
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/customer_accounts/signup" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{
  \"email\": \"user@example.com\",
  \"password\": \"string\",
  \"displayName\": \"string\"
}"

Dashboards

9 endpoints
GET/dashboards/layout
Auth requireddashboards.view

Load the current dashboard layout

Returns the saved widget layout together with the widgets the current user is allowed to place. Requires features: dashboards.view

Responses

200Current dashboard layout and available widgets.
Content-Type: application/json
{
  "layout": {
    "items": [
      {
        "id": "00000000-0000-4000-8000-000000000000",
        "widgetId": "string",
        "order": 1
      }
    ]
  },
  "allowedWidgetIds": [
    "string"
  ],
  "canConfigure": true,
  "context": {
    "userId": "00000000-0000-4000-8000-000000000000",
    "tenantId": null,
    "organizationId": null,
    "userName": null,
    "userEmail": null,
    "userLabel": "string"
  },
  "widgets": [
    {
      "id": "string",
      "title": "string",
      "description": null,
      "defaultSize": "sm",
      "defaultEnabled": true,
      "defaultSettings": null,
      "features": [
        "string"
      ],
      "moduleId": "string",
      "icon": null,
      "loaderKey": "string",
      "supportsRefresh": true
    }
  ]
}

Example

curl -X GET "https://apiv2.tronergy.io/api/dashboards/layout" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PUT/dashboards/layout
Auth requireddashboards.configure

Persist dashboard layout changes

Saves the provided widget ordering, sizes, and settings for the current user. Requires features: dashboards.configure

Request body (application/json)

{
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "widgetId": "string",
      "order": 1
    }
  ]
}

Responses

200Layout updated successfully.
Content-Type: application/json
{
  "ok": true
}
400Invalid layout payload
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/dashboards/layout" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"items\": [
    {
      \"id\": \"00000000-0000-4000-8000-000000000000\",
      \"widgetId\": \"string\",
      \"order\": 1
    }
  ]
}"
PATCH/dashboards/layout/{itemId}
Auth requireddashboards.configure

Update a dashboard layout item

Adjusts the size or settings for a single widget within the dashboard layout. Requires features: dashboards.configure

Parameters

NameInRequiredSchemaDescription
itemIdpathYesstring

Request body (application/json)

{}

Responses

200Layout item updated.
Content-Type: application/json
{
  "ok": true
}
400Invalid payload or missing item id
Content-Type: application/json
{
  "error": "string"
}
404Item not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X PATCH "https://apiv2.tronergy.io/api/dashboards/layout/00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{}"
GET/dashboards/roles/widgets
Auth requireddashboards.admin.assign-widgets

Fetch widget assignments for a role

Returns the widgets explicitly assigned to the given role together with the evaluation scope. Requires features: dashboards.admin.assign-widgets

Parameters

NameInRequiredSchemaDescription
roleIdqueryYesstring
tenantIdqueryNostring
organizationIdqueryNostring

Responses

200Current widget configuration for the role.
Content-Type: application/json
{
  "widgetIds": [
    "string"
  ],
  "hasCustom": true,
  "scope": {
    "tenantId": null,
    "organizationId": null
  }
}
400Missing role identifier
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/dashboards/roles/widgets?roleId=00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PUT/dashboards/roles/widgets
Auth requireddashboards.admin.assign-widgets

Update widgets assigned to a role

Persists the widget list for a role within the provided tenant and organization scope. Requires features: dashboards.admin.assign-widgets

Request body (application/json)

{
  "roleId": "00000000-0000-4000-8000-000000000000",
  "tenantId": null,
  "organizationId": null,
  "widgetIds": [
    "string"
  ]
}

Responses

200Widgets updated successfully.
Content-Type: application/json
{
  "ok": true,
  "widgetIds": [
    "string"
  ]
}
400Invalid payload or unknown widgets
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/dashboards/roles/widgets" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"roleId\": \"00000000-0000-4000-8000-000000000000\",
  \"tenantId\": null,
  \"organizationId\": null,
  \"widgetIds\": [
    \"string\"
  ]
}"
GET/dashboards/users/widgets
Auth requireddashboards.admin.assign-widgets

Read widget overrides for a user

Returns the widgets inherited and explicitly configured for the requested user within the current scope. Requires features: dashboards.admin.assign-widgets

Parameters

NameInRequiredSchemaDescription
userIdqueryYesstring
tenantIdqueryNostring
organizationIdqueryNostring

Responses

200Widget settings for the user.
Content-Type: application/json
{
  "mode": "inherit",
  "widgetIds": [
    "string"
  ],
  "hasCustom": true,
  "effectiveWidgetIds": [
    "string"
  ],
  "scope": {
    "tenantId": null,
    "organizationId": null
  }
}
400Missing user identifier
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/dashboards/users/widgets?userId=00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PUT/dashboards/users/widgets
Auth requireddashboards.admin.assign-widgets

Update user-specific dashboard widgets

Sets the widget override mode and allowed widgets for a user. Passing `mode: inherit` clears overrides. Requires features: dashboards.admin.assign-widgets

Request body (application/json)

{
  "userId": "00000000-0000-4000-8000-000000000000",
  "tenantId": null,
  "organizationId": null,
  "mode": "inherit",
  "widgetIds": [
    "string"
  ]
}

Responses

200Overrides saved.
Content-Type: application/json
{
  "ok": true,
  "mode": "inherit",
  "widgetIds": [
    "string"
  ]
}
400Invalid payload or unknown widgets
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/dashboards/users/widgets" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"userId\": \"00000000-0000-4000-8000-000000000000\",
  \"tenantId\": null,
  \"organizationId\": null,
  \"mode\": \"inherit\",
  \"widgetIds\": [
    \"string\"
  ]
}"
GET/dashboards/widgets/catalog
Auth requireddashboards.admin.assign-widgets

List available dashboard widgets

Returns the catalog of widgets that modules expose, including defaults and feature requirements. Requires features: dashboards.admin.assign-widgets

Responses

200Widgets available for assignment.
Content-Type: application/json
{
  "items": [
    {
      "id": "string",
      "title": "string",
      "description": null,
      "defaultSize": "sm",
      "defaultEnabled": true,
      "defaultSettings": null,
      "features": [
        "string"
      ],
      "moduleId": "string",
      "icon": null,
      "loaderKey": "string",
      "supportsRefresh": true
    }
  ]
}

Example

curl -X GET "https://apiv2.tronergy.io/api/dashboards/widgets/catalog" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/dashboards/widgets/data
Auth requiredanalytics.view

Fetch aggregated data for dashboard widgets

Executes an aggregation query against the specified entity type and returns the result. Supports date range filtering, grouping, and period-over-period comparison. Requires features: analytics.view

Request body (application/json)

{
  "entityType": "string",
  "metric": {
    "field": "string",
    "aggregate": "count"
  }
}

Responses

200Aggregated data for the widget.
Content-Type: application/json
{
  "value": null,
  "data": [
    {
      "value": null
    }
  ],
  "metadata": {
    "fetchedAt": "string",
    "recordCount": 1
  }
}
400Invalid request payload
Content-Type: application/json
{
  "error": "string"
}
500Internal server error
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/dashboards/widgets/data" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"entityType\": \"string\",
  \"metric\": {
    \"field\": \"string\",
    \"aggregate\": \"count\"
  }
}"

Dictionaries

9 endpoints
GET/dictionaries
Auth requireddictionaries.view

List dictionaries

Returns dictionaries accessible to the current organization, optionally including inactive records. Requires features: dictionaries.view

Parameters

NameInRequiredSchemaDescription
includeInactivequeryNostring

Responses

200Dictionary collection.
Content-Type: application/json
{
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "key": "string",
      "name": "string",
      "description": null,
      "isSystem": true,
      "isActive": true,
      "managerVisibility": null,
      "organizationId": null,
      "createdAt": "string",
      "updatedAt": null
    }
  ]
}
500Failed to load dictionaries
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/dictionaries" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/dictionaries
Auth requireddictionaries.manage

Create dictionary

Registers a dictionary scoped to the current organization. Requires features: dictionaries.manage

Request body (application/json)

{
  "key": "string",
  "name": "string"
}

Responses

201Dictionary created.
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000",
  "key": "string",
  "name": "string",
  "description": null,
  "isSystem": true,
  "isActive": true,
  "managerVisibility": null,
  "organizationId": null,
  "createdAt": "string",
  "updatedAt": null
}
400Validation failed
Content-Type: application/json
{
  "error": "string"
}
409Dictionary key already exists
Content-Type: application/json
{
  "error": "string"
}
500Failed to create dictionary
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/dictionaries" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"key\": \"string\",
  \"name\": \"string\"
}"
GET/dictionaries/{dictionaryId}
Auth requireddictionaries.view

Get dictionary

Returns details for the specified dictionary, including inheritance flags. Requires features: dictionaries.view

Parameters

NameInRequiredSchemaDescription
dictionaryIdpathYesstring

Responses

200Dictionary details.
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000",
  "key": "string",
  "name": "string",
  "description": null,
  "isSystem": true,
  "isActive": true,
  "managerVisibility": null,
  "organizationId": null,
  "createdAt": "string",
  "updatedAt": null
}
400Invalid parameters
Content-Type: application/json
{
  "error": "string"
}
404Dictionary not found
Content-Type: application/json
{
  "error": "string"
}
500Failed to load dictionary
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/dictionaries/00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PATCH/dictionaries/{dictionaryId}
Auth requireddictionaries.manage

Update dictionary

Updates mutable attributes of the dictionary. Currency dictionaries are protected from modification. Requires features: dictionaries.manage

Parameters

NameInRequiredSchemaDescription
dictionaryIdpathYesstring

Request body (application/json)

{}

Responses

200Dictionary updated.
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000",
  "key": "string",
  "name": "string",
  "description": null,
  "isSystem": true,
  "isActive": true,
  "managerVisibility": null,
  "organizationId": null,
  "createdAt": "string",
  "updatedAt": null
}
400Validation failed or protected dictionary
Content-Type: application/json
{
  "error": "string"
}
404Dictionary not found
Content-Type: application/json
{
  "error": "string"
}
409Dictionary key already exists
Content-Type: application/json
{
  "error": "string"
}
500Failed to update dictionary
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X PATCH "https://apiv2.tronergy.io/api/dictionaries/00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{}"
DELETE/dictionaries/{dictionaryId}
Auth requireddictionaries.manage

Delete dictionary

Soft deletes the dictionary unless it is the protected currency dictionary. Requires features: dictionaries.manage

Parameters

NameInRequiredSchemaDescription
dictionaryIdpathYesstring

Responses

200Dictionary archived.
Content-Type: application/json
{
  "ok": true
}
400Protected dictionary cannot be deleted
Content-Type: application/json
{
  "error": "string"
}
404Dictionary not found
Content-Type: application/json
{
  "error": "string"
}
500Failed to delete dictionary
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/dictionaries/00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/dictionaries/{dictionaryId}/entries
Auth requireddictionaries.view

List dictionary entries

Returns entries for the specified dictionary ordered alphabetically. Requires features: dictionaries.view

Parameters

NameInRequiredSchemaDescription
dictionaryIdpathYesstring

Responses

200Dictionary entries.
Content-Type: application/json
{
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "value": "string",
      "label": "string",
      "color": null,
      "icon": null,
      "createdAt": "string",
      "updatedAt": null
    }
  ]
}
400Invalid parameters
Content-Type: application/json
{
  "error": "string"
}
404Dictionary not found
Content-Type: application/json
{
  "error": "string"
}
500Failed to load dictionary entries
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/dictionaries/00000000-0000-4000-8000-000000000000/entries" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/dictionaries/{dictionaryId}/entries
Auth requireddictionaries.manage

Create dictionary entry

Creates a new entry in the specified dictionary. Requires features: dictionaries.manage

Parameters

NameInRequiredSchemaDescription
dictionaryIdpathYesstring

Request body (application/json)

{
  "value": "string",
  "color": null,
  "icon": null
}

Responses

201Dictionary entry created.
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000",
  "value": "string",
  "label": "string",
  "color": null,
  "icon": null,
  "createdAt": "string",
  "updatedAt": null
}
400Validation failed
Content-Type: application/json
{
  "error": "string"
}
404Dictionary not found
Content-Type: application/json
{
  "error": "string"
}
500Failed to create dictionary entry
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/dictionaries/00000000-0000-4000-8000-000000000000/entries" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"value\": \"string\",
  \"color\": null,
  \"icon\": null
}"
PATCH/dictionaries/{dictionaryId}/entries/{entryId}
Auth requireddictionaries.manage

Update dictionary entry

Updates the specified dictionary entry using the command bus pipeline. Requires features: dictionaries.manage

Parameters

NameInRequiredSchemaDescription
dictionaryIdpathYesstring
entryIdpathYesstring

Request body (application/json)

{
  "color": null,
  "icon": null
}

Responses

200Dictionary entry updated.
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000",
  "value": "string",
  "label": "string",
  "color": null,
  "icon": null,
  "createdAt": "string",
  "updatedAt": null
}
400Validation failed
Content-Type: application/json
{
  "error": "string"
}
404Dictionary or entry not found
Content-Type: application/json
{
  "error": "string"
}
500Failed to update entry
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X PATCH "https://apiv2.tronergy.io/api/dictionaries/00000000-0000-4000-8000-000000000000/entries/00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"color\": null,
  \"icon\": null
}"
DELETE/dictionaries/{dictionaryId}/entries/{entryId}
Auth requireddictionaries.manage

Delete dictionary entry

Deletes the specified dictionary entry via the command bus. Requires features: dictionaries.manage

Parameters

NameInRequiredSchemaDescription
dictionaryIdpathYesstring
entryIdpathYesstring

Responses

200Entry deleted.
Content-Type: application/json
{
  "ok": true
}
400Validation failed
Content-Type: application/json
{
  "error": "string"
}
404Dictionary or entry not found
Content-Type: application/json
{
  "error": "string"
}
500Failed to delete entry
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/dictionaries/00000000-0000-4000-8000-000000000000/entries/00000000-0000-4000-8000-000000000000" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"

Directory

9 endpoints
GET/directory/organization-switcher
Auth required

Load organization switcher menu

Returns the hierarchical menu of organizations the current user may switch to within the active tenant.

Responses

200Organization switcher payload.
Content-Type: application/json
{
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "name": "string",
      "depth": 1,
      "selectable": true,
      "children": []
    }
  ],
  "selectedId": null,
  "canManage": true,
  "tenantId": null,
  "tenants": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "name": "string",
      "isActive": true
    }
  ],
  "isSuperAdmin": true
}

Example

curl -X GET "https://apiv2.tronergy.io/api/directory/organization-switcher" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/directory/organizations
Auth requireddirectory.organizations.view

List organizations

Returns organizations using options, tree, or paginated manage view depending on the `view` parameter. Requires features: directory.organizations.view

Parameters

NameInRequiredSchemaDescription
pagequeryNonumber
pageSizequeryNonumber
searchqueryNostring
viewqueryNostring
idsqueryNostring
tenantIdqueryNostring
includeInactivequeryNostring
statusqueryNostring

Responses

200Organization data for the requested view.
Content-Type: application/json
{
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "name": "string",
      "parentId": null,
      "parentName": null,
      "tenantId": null,
      "tenantName": null,
      "rootId": null,
      "treePath": null
    }
  ]
}
400Invalid query or tenant scope
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/directory/organizations?page=1&pageSize=50&view=options" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/directory/organizations
Auth requireddirectory.organizations.manage

Create organization

Creates a new organization within a tenant and optionally assigns hierarchy relationships. Requires features: directory.organizations.manage

Request body (application/json)

{
  "name": "string",
  "slug": null,
  "parentId": null
}

Responses

201Organization created.
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000"
}
400Validation failed
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/directory/organizations" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"name\": \"string\",
  \"slug\": null,
  \"parentId\": null
}"
PUT/directory/organizations
Auth requireddirectory.organizations.manage

Update organization

Updates organization details and hierarchy assignments. Requires features: directory.organizations.manage

Request body (application/json)

{
  "id": "00000000-0000-4000-8000-000000000000",
  "slug": null,
  "parentId": null
}

Responses

200Organization updated.
Content-Type: application/json
{
  "ok": true
}
400Validation failed
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/directory/organizations" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"id\": \"00000000-0000-4000-8000-000000000000\",
  \"slug\": null,
  \"parentId\": null
}"
DELETE/directory/organizations
Auth requireddirectory.organizations.manage

Delete organization

Soft deletes an organization identified by id. Requires features: directory.organizations.manage

Request body (application/json)

{
  "id": "00000000-0000-4000-8000-000000000000"
}

Responses

200Organization deleted.
Content-Type: application/json
{
  "ok": true
}
400Validation failed
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/directory/organizations" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"id\": \"00000000-0000-4000-8000-000000000000\"
}"
GET/directory/tenants
Auth requireddirectory.tenants.view

List tenants

Returns tenants visible to the current user with optional search and pagination. Requires features: directory.tenants.view

Parameters

NameInRequiredSchemaDescription
idqueryNostring
pagequeryNonumber
pageSizequeryNonumber
searchqueryNostring
sortFieldqueryNostring
sortDirqueryNostring
isActivequeryNostring

Responses

200Paged list of tenants.
Content-Type: application/json
{
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "name": "string",
      "isActive": true,
      "createdAt": null,
      "updatedAt": null
    }
  ],
  "total": 1,
  "page": 1,
  "pageSize": 1,
  "totalPages": 1
}
400Invalid query parameters
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/directory/tenants?page=1&pageSize=50" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/directory/tenants
Auth requireddirectory.tenants.manage

Create tenant

Creates a new tenant and returns its identifier. Requires features: directory.tenants.manage

Request body (application/json)

{
  "name": "string"
}

Responses

201Tenant created.
Content-Type: application/json
{
  "id": "00000000-0000-4000-8000-000000000000"
}
400Validation failed
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/directory/tenants" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"name\": \"string\"
}"
PUT/directory/tenants
Auth requireddirectory.tenants.manage

Update tenant

Updates tenant properties such as name or activation state. Requires features: directory.tenants.manage

Request body (application/json)

{
  "id": "00000000-0000-4000-8000-000000000000"
}

Responses

200Tenant updated.
Content-Type: application/json
{
  "ok": true
}
400Validation failed
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/directory/tenants" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"id\": \"00000000-0000-4000-8000-000000000000\"
}"
DELETE/directory/tenants
Auth requireddirectory.tenants.manage

Delete tenant

Soft deletes the tenant identified by id. Requires features: directory.tenants.manage

Request body (application/json)

{
  "id": "00000000-0000-4000-8000-000000000000"
}

Responses

200Tenant removed.
Content-Type: application/json
{
  "ok": true
}
400Validation failed
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/directory/tenants" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"id\": \"00000000-0000-4000-8000-000000000000\"
}"

Entities

17 endpoints
GET/entities/definitions
Auth required

List active custom field definitions

Returns active custom field definitions for the supplied entity ids, respecting tenant scope and tombstones.

Parameters

NameInRequiredSchemaDescription
entityIdqueryNoany
entityIdsqueryNostring
fieldsetqueryNostring

Responses

200Definition list
Content-Type: application/json
{
  "items": [
    {
      "key": "string",
      "kind": "string",
      "label": "string",
      "entityId": "string"
    }
  ]
}
400Missing entity id
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/entities/definitions" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/entities/definitions
Auth requiredentities.definitions.manage

Upsert custom field definition

Creates or updates a custom field definition for the current tenant/org scope. Requires features: entities.definitions.manage

Request body (application/json)

{
  "entityId": "string",
  "key": "string",
  "kind": "text"
}

Responses

200Definition saved
Content-Type: application/json
{
  "ok": true,
  "item": {
    "id": "00000000-0000-4000-8000-000000000000",
    "key": "string",
    "kind": "string",
    "configJson": {}
  }
}
400Validation failed
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/entities/definitions" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"entityId\": \"string\",
  \"key\": \"string\",
  \"kind\": \"text\"
}"
DELETE/entities/definitions
Auth requiredentities.definitions.manage

Soft delete custom field definition

Marks the specified definition inactive and tombstones it for the current scope. Requires features: entities.definitions.manage

Request body (application/json)

{
  "entityId": "string",
  "key": "string"
}

Responses

200Definition deleted
Content-Type: application/json
{
  "ok": true
}
400Missing entity id or key
Content-Type: application/json
{
  "error": "string"
}
404Definition not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/entities/definitions" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"entityId\": \"string\",
  \"key\": \"string\"
}"
POST/entities/definitions.batch
Auth requiredentities.definitions.manage

Save multiple custom field definitions

Creates or updates multiple definitions for a single entity in one transaction. Requires features: entities.definitions.manage

Request body (application/json)

{
  "entityId": "string",
  "definitions": [
    {
      "key": "string",
      "kind": "text"
    }
  ]
}

Responses

200Definitions saved
Content-Type: application/json
{
  "ok": true
}
400Validation error
Content-Type: application/json
{
  "error": "string"
}
500Unexpected failure
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/entities/definitions.batch" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"entityId\": \"string\",
  \"definitions\": [
    {
      \"key\": \"string\",
      \"kind\": \"text\"
    }
  ]
}"
GET/entities/definitions.manage
Auth requiredentities.definitions.manage

Get management snapshot

Returns scoped custom field definitions (including inactive tombstones) for administration interfaces. Requires features: entities.definitions.manage

Parameters

NameInRequiredSchemaDescription
entityIdqueryYesstring

Responses

200Scoped definitions and deleted keys
Content-Type: application/json
{
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "key": "string",
      "kind": "string",
      "configJson": null,
      "organizationId": null,
      "tenantId": null
    }
  ],
  "deletedKeys": [
    "string"
  ]
}
400Missing entity id
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/entities/definitions.manage?entityId=string" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/entities/definitions.restore
Auth requiredentities.definitions.manage

Restore definition

Reactivates a previously soft-deleted definition within the current tenant/org scope. Requires features: entities.definitions.manage

Request body (application/json)

{
  "entityId": "string",
  "key": "string"
}

Responses

200Definition restored
Content-Type: application/json
{
  "ok": true
}
400Missing entity id or key
Content-Type: application/json
{
  "error": "string"
}
404Definition not found
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/entities/definitions.restore" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"entityId\": \"string\",
  \"key\": \"string\"
}"
GET/entities/encryption
Auth requiredentities.definitions.manage

Fetch encryption map

Returns the encrypted field map for the current tenant/organization scope. Requires features: entities.definitions.manage

Parameters

NameInRequiredSchemaDescription
entityIdqueryYesstring

Responses

200Map
Content-Type: application/json
{
  "entityId": "string",
  "fields": [
    {
      "field": "string",
      "hashField": null
    }
  ]
}

Example

curl -X GET "https://apiv2.tronergy.io/api/entities/encryption?entityId=string" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/entities/encryption
Auth requiredentities.definitions.manage

Upsert encryption map

Creates or updates the encryption map for the current tenant/organization scope. Requires features: entities.definitions.manage

Request body (application/json)

{
  "entityId": "string",
  "tenantId": null,
  "organizationId": null,
  "fields": [
    {
      "field": "string",
      "hashField": null
    }
  ]
}

Responses

200Saved
Content-Type: application/json
{
  "ok": true
}

Example

curl -X POST "https://apiv2.tronergy.io/api/entities/encryption" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"entityId\": \"string\",
  \"tenantId\": null,
  \"organizationId\": null,
  \"fields\": [
    {
      \"field\": \"string\",
      \"hashField\": null
    }
  ]
}"
GET/entities/entities
Auth required

List available entities

Returns generated and custom entities scoped to the caller with field counts per entity.

Responses

200List of entities
Content-Type: application/json
{
  "items": [
    {
      "entityId": "string",
      "source": "code",
      "label": "string",
      "count": 1
    }
  ]
}

Example

curl -X GET "https://apiv2.tronergy.io/api/entities/entities" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/entities/entities
Auth requiredentities.definitions.manage

Upsert custom entity

Creates or updates a tenant/org scoped custom entity definition. Requires features: entities.definitions.manage

Request body (application/json)

{
  "entityId": "string",
  "label": "string",
  "description": null,
  "showInSidebar": false
}

Responses

200Entity saved
Content-Type: application/json
{
  "ok": true,
  "item": {
    "id": "00000000-0000-4000-8000-000000000000",
    "entityId": "string",
    "label": "string"
  }
}
400Validation error
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/entities/entities" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"entityId\": \"string\",
  \"label\": \"string\",
  \"description\": null,
  \"showInSidebar\": false
}"
DELETE/entities/entities
Auth requiredentities.definitions.manage

Soft delete custom entity

Marks the specified custom entity inactive within the current scope. Requires features: entities.definitions.manage

Request body (application/json)

{
  "entityId": "string"
}

Responses

200Entity deleted
Content-Type: application/json
{
  "ok": true
}
400Missing entity id
Content-Type: application/json
{
  "error": "string"
}
404Entity not found in scope
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/entities/entities" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"entityId\": \"string\"
}"
GET/entities/records
Auth requiredentities.records.view

List records

Returns paginated records for the supplied entity. Supports custom field filters, exports, and soft-delete toggles. Requires features: entities.records.view

Parameters

NameInRequiredSchemaDescription
entityIdqueryYesstring
pagequeryNonumber
pageSizequeryNonumber
sortFieldqueryNostring
sortDirqueryNostring
withDeletedqueryNoboolean
formatqueryNostring
exportScopequeryNostring
export_scopequeryNostring
allqueryNoboolean
fullqueryNoboolean

Responses

200Paginated records
Content-Type: application/json
{
  "items": [
    {}
  ],
  "total": 1,
  "page": 1,
  "pageSize": 1,
  "totalPages": 1
}
400Missing entity id
Content-Type: application/json
{
  "error": "string"
}
500Unexpected failure
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/entities/records?entityId=string" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/entities/records
Auth requiredentities.records.manage

Create record

Creates a record for the given entity. When `recordId` is omitted or not a UUID the data engine will generate one automatically. Requires features: entities.records.manage

Request body (application/json)

{
  "entityId": "string",
  "values": {}
}

Responses

200Record created
Content-Type: application/json
{
  "ok": true
}
400Validation failure
Content-Type: application/json
{
  "error": "string"
}
500Unexpected failure
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/entities/records" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"entityId\": \"string\",
  \"values\": {}
}"
PUT/entities/records
Auth requiredentities.records.manage

Update record

Updates an existing record. If the provided recordId is not a UUID the record will be created instead to support optimistic flows. Requires features: entities.records.manage

Request body (application/json)

{
  "entityId": "string",
  "recordId": "string",
  "values": {}
}

Responses

200Record updated
Content-Type: application/json
{
  "ok": true
}
400Validation failure
Content-Type: application/json
{
  "error": "string"
}
500Unexpected failure
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X PUT "https://apiv2.tronergy.io/api/entities/records" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"entityId\": \"string\",
  \"recordId\": \"string\",
  \"values\": {}
}"
DELETE/entities/records
Auth requiredentities.records.manage

Delete record

Soft deletes the specified record within the current tenant/org scope. Requires features: entities.records.manage

Request body (application/json)

{
  "entityId": "string",
  "recordId": "string"
}

Responses

200Record deleted
Content-Type: application/json
{
  "ok": true
}
400Missing entity id or record id
Content-Type: application/json
{
  "error": "string"
}
404Record not found
Content-Type: application/json
{
  "error": "string"
}
500Unexpected failure
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/entities/records" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"entityId\": \"string\",
  \"recordId\": \"string\"
}"
GET/entities/relations/options
Auth requiredentities.definitions.view

List relation options

Returns up to 50 option entries for populating relation dropdowns, automatically resolving label fields when omitted. Requires features: entities.definitions.view

Parameters

NameInRequiredSchemaDescription
entityIdqueryYesstring
labelFieldqueryNostring
qqueryNostring

Responses

200Option list
Content-Type: application/json
{
  "items": [
    {
      "value": "string",
      "label": "string"
    }
  ]
}

Example

curl -X GET "https://apiv2.tronergy.io/api/entities/relations/options?entityId=string" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/entities/sidebar-entities
Auth required

Get sidebar entities

Returns custom entities flagged with `showInSidebar` for the current tenant/org scope.

Responses

200Sidebar entities for navigation
Content-Type: application/json
{
  "items": [
    {
      "entityId": "string",
      "label": "string",
      "href": "string"
    }
  ]
}

Example

curl -X GET "https://apiv2.tronergy.io/api/entities/sidebar-entities" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"

Gas Tank

2 endpoints
GET/gas_tank/withdraw
Auth requiredgas_tank.withdraw

Poll withdrawal payout status by hold_id

Requires features: gas_tank.withdraw

Responses

200Payout record with status and tx_hash, or null if not found
Content-Type: application/json
{}
422hold_id is required
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/gas_tank/withdraw" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/gas_tank/withdraw
Auth requiredgas_tank.withdraw

Initiate a gas tank withdrawal via API key (async workflow)

Requires features: gas_tank.withdraw

Responses

202Withdrawal dispatched; returns hold_id for status polling
Content-Type: application/json
{}
422Invalid payload or insufficient balance
Content-Type: application/json
{}
429Rate limit exceeded
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/gas_tank/withdraw" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"

Query Index

3 endpoints
POST/query_index/purge
Auth requiredquery_index.purge

Purge query index records

Queues a purge job to remove indexed records for an entity type within the active scope. Requires features: query_index.purge

Request body (application/json)

{
  "entityType": "string"
}

Responses

200Purge job accepted.
Content-Type: application/json
{
  "ok": true
}
400Missing entity type
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/query_index/purge" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"entityType\": \"string\"
}"
POST/query_index/reindex
Auth requiredquery_index.reindex

Trigger query index rebuild

Queues a reindex job for the specified entity type within the current tenant scope. Requires features: query_index.reindex

Request body (application/json)

{
  "entityType": "string"
}

Responses

200Reindex job accepted.
Content-Type: application/json
{
  "ok": true
}
400Missing entity type
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X POST "https://apiv2.tronergy.io/api/query_index/reindex" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"entityType\": \"string\"
}"
GET/query_index/status
Auth requiredquery_index.status.view

Inspect query index coverage

Returns entity counts comparing base tables with the query index along with the latest job status. Requires features: query_index.status.view

Responses

200Current query index status.
Content-Type: application/json
{
  "items": [
    {
      "entityId": "string",
      "label": "string",
      "baseCount": null,
      "indexCount": null,
      "vectorCount": null,
      "ok": true,
      "job": {
        "status": "idle",
        "startedAt": null,
        "finishedAt": null,
        "heartbeatAt": null,
        "processedCount": null,
        "totalCount": null,
        "scope": null
      }
    }
  ],
  "errors": [
    {
      "id": "string",
      "source": "string",
      "handler": "string",
      "entityType": null,
      "recordId": null,
      "tenantId": null,
      "organizationId": null,
      "message": "string",
      "stack": null,
      "payload": null,
      "occurredAt": "string"
    }
  ],
  "logs": [
    {
      "id": "string",
      "source": "string",
      "handler": "string",
      "level": "info",
      "entityType": null,
      "recordId": null,
      "tenantId": null,
      "organizationId": null,
      "message": "string",
      "details": null,
      "occurredAt": "string"
    }
  ]
}
400Tenant or organization context required
Content-Type: application/json
{
  "error": "string"
}

Example

curl -X GET "https://apiv2.tronergy.io/api/query_index/status" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"

TronRelayer

13 endpoints
GET/relayer_tron/delegations
Auth requiredrelayer_tron.view

List energy delegations with filters and pagination

Requires features: relayer_tron.view

Responses

200Paginated list of delegations
Content-Type: application/json
{}
422Invalid query parameters
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/relayer_tron/delegations" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/relayer_tron/delegations/{id}/reclaim
Auth requiredrelayer_tron.manage

Manually reclaim delegated energy

Requires features: relayer_tron.manage

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Request body (application/json)

{
  "force": false
}

Responses

200Delegation reclaimed successfully
Content-Type: application/json
{}
404Delegation not found
Content-Type: application/json
{}
409Delegation not in a reclaimable status or not yet expired
Content-Type: application/json
{}
422Invalid request body
Content-Type: application/json
{}
503Service configuration error (missing credentials)
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/relayer_tron/delegations/:id/reclaim" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"force\": false
}"
GET/relayer_tron/pools
Auth requiredrelayer_tron.view

List tenant energy pools with filters and pagination

Requires features: relayer_tron.view

Responses

200Paginated list of pools
Content-Type: application/json
{}
422Invalid query parameters
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/relayer_tron/pools" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/relayer_tron/pools
Auth requiredrelayer_tron.pools

Create a new tenant energy pool

Requires features: relayer_tron.pools

Responses

201Pool created
Content-Type: application/json
{}
409Pool already exists for this tenant
Content-Type: application/json
{}
422Invalid payload
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/relayer_tron/pools" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PUT/relayer_tron/pools
Auth requiredrelayer_tron.pools

Update an energy pool

Requires features: relayer_tron.pools

Responses

200Pool updated
Content-Type: application/json
{}
404Pool not found
Content-Type: application/json
{}
422Invalid payload
Content-Type: application/json
{}

Example

curl -X PUT "https://apiv2.tronergy.io/api/relayer_tron/pools" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
DELETE/relayer_tron/pools
Auth requiredrelayer_tron.pools

Deactivate an energy pool (soft delete)

Requires features: relayer_tron.pools

Responses

200Pool deactivated
Content-Type: application/json
{}
404Pool not found
Content-Type: application/json
{}

Example

curl -X DELETE "https://apiv2.tronergy.io/api/relayer_tron/pools" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/relayer_tron/pools/{id}/refresh
Auth requiredrelayer_tron.pools

Fetch fresh on-chain resources and update pool energy/staking fields

Requires features: relayer_tron.pools

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Pool refreshed with latest on-chain data
Content-Type: application/json
{}
404Pool not found
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/relayer_tron/pools/:id/refresh" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/relayer_tron/pools/{id}/status
Auth requiredrelayer_tron.view

Return staked TRX, total energy and available energy for the pool

Requires features: relayer_tron.view

Parameters

NameInRequiredSchemaDescription
idpathYesstring

Responses

200Pool resource status returned
Content-Type: application/json
{}
404Pool not found
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/relayer_tron/pools/:id/status" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/relayer_tron/pools/confirm-permission
Auth requiredrelayer_tron.pools

Confirm that the permission transaction has been confirmed on-chain and activate the pool

Requires features: relayer_tron.pools

Responses

200Pool permission confirmed and pool activated
Content-Type: application/json
{}
404Pool not found
Content-Type: application/json
{}
422Invalid payload or tx not confirmed after retries
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/relayer_tron/pools/confirm-permission" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/relayer_tron/pools/generate-permission-tx
Auth requiredrelayer_tron.pools

Build an unsigned AccountPermissionUpdate tx to grant delegate rights

Requires features: relayer_tron.pools

Responses

200Unsigned tx and permission ID returned
Content-Type: application/json
{}
404Staking account not found on chain
Content-Type: application/json
{}
422Invalid payload
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/relayer_tron/pools/generate-permission-tx" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
POST/relayer_tron/pools/validate-address
Auth requiredrelayer_tron.pools

Validate a staking address — checks on-chain staking state

Requires features: relayer_tron.pools

Responses

200Validation result returned
Content-Type: application/json
{}
422Invalid payload
Content-Type: application/json
{}

Example

curl -X POST "https://apiv2.tronergy.io/api/relayer_tron/pools/validate-address" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/relayer_tron/providers
Auth requiredrelayer_tron.view

Return all registered marketplace energy providers with cached price and health status

Requires features: relayer_tron.view

Responses

200Provider list returned
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/relayer_tron/providers" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
GET/relayer_tron/stats
Auth requiredrelayer_tron.view

Return aggregated pool, delegation, and provider stats for the tenant dashboard

Requires features: relayer_tron.view

Responses

200Summary statistics returned
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/relayer_tron/stats" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"

Translations

3 endpoints
GET/translations/{entityType}/{entityId}
Auth requiredtranslations.view

Get entity translations

Returns the full translation record for a single entity. Requires features: translations.view

Parameters

NameInRequiredSchemaDescription
entityTypepathYesstring
entityIdpathYesstring

Responses

200Translation record found.
Content-Type: application/json
{}
404No translations found for this entity
Content-Type: application/json
{}

Example

curl -X GET "https://apiv2.tronergy.io/api/translations/string/string" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
PUT/translations/{entityType}/{entityId}
Auth requiredtranslations.manage

Create or update entity translations

Full replacement of translations JSONB for an entity. Requires features: translations.manage

Parameters

NameInRequiredSchemaDescription
entityTypepathYesstring
entityIdpathYesstring

Responses

200Translations saved.
Content-Type: application/json
{}
400Validation failed
Content-Type: application/json
{}

Example

curl -X PUT "https://apiv2.tronergy.io/api/translations/string/string" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
DELETE/translations/{entityType}/{entityId}
Auth requiredtranslations.manage

Delete entity translations

Removes all translations for an entity. Requires features: translations.manage

Parameters

NameInRequiredSchemaDescription
entityTypepathYesstring
entityIdpathYesstring

Responses

204Translations deleted.

No response body.

Example

curl -X DELETE "https://apiv2.tronergy.io/api/translations/string/string" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"