AurionAI Docs

Teams & Routing

Manage support teams, members, and ticket routing via the Aurion API.

⚠️ Preview — not yet in the public API

The endpoints on this page are part of the AurionAI helpdesk and are currently accessible only through an authenticated dashboard session. They are not yet exposed through public API keys — a request authenticated with X-API-Key returns 403. Public API-key access is planned. The reference below documents the intended contract.

Teams & Routing

The Teams API (v2) lets you organize support agents into teams, configure routing rules, and manage team membership.

List Teams

cURL
curl "https://apps.aurionai.net/api/v2/teams?limit=50&offset=0" \
  -H "X-API-Key: itsm_sk_live_xxxx"

Query parameters:

ParameterTypeDefaultNotes
limitinteger50Page size, 1100
offsetinteger0Result offset
searchstringFilter by team name
departmentstringFilter by department
locationstringFilter by location

Response:

{
  "items": [
    {
      "id": "team_789",
      "name": "Network Support",
      "description": "Handles VPN, firewall, and connectivity issues",
      "department": "Infrastructure",
      "location": "Brussels",
      "email": "network@example.com",
      "routing_method": "round_robin",
      "business_hours_id": "bh_001",
      "escalate_to_user_id": "user_345",
      "unassigned_timeout_minutes": 30,
      "member_count": 5,
      "created_at": "2026-01-10T10:00:00Z"
    }
  ],
  "total": 4,
  "limit": 50,
  "offset": 0
}

Get Team

curl "https://apps.aurionai.net/api/v2/teams/team_789" \
  -H "X-API-Key: itsm_sk_live_xxxx"

Returns a single TeamV2 object, or 404 {"detail": "Team not found"} if the team does not exist.

Create Team

curl -X POST "https://apps.aurionai.net/api/v2/teams" \
  -H "X-API-Key: itsm_sk_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "VIP Support",
    "description": "Dedicated team for enterprise customers",
    "department": "Customer Success",
    "location": "Brussels",
    "email": "vip@example.com",
    "routing_method": "balanced",
    "business_hours_id": "bh_001",
    "escalate_to_user_id": "user_345",
    "unassigned_timeout_minutes": 30
  }'

Returns the created TeamV2 object with 201 Created. Only name (1–100 chars) is required; all other fields are optional. An invalid routing_method returns 400 {"detail": "Invalid routing_method. Allowed: ['balanced', 'manual', 'priority', 'round_robin']"}.

Routing Methods:

MethodDescription
balancedDefault. Distribute work to keep agent load balanced
round_robinDistribute evenly across available agents in rotation
priorityAssign by team-member priority order
manualNo auto-assignment — team lead assigns manually

Update Team

curl -X PATCH "https://apps.aurionai.net/api/v2/teams/team_789" \
  -H "X-API-Key: itsm_sk_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "routing_method": "round_robin"
  }'

All fields are optional; only the fields you send are updated. Returns the updated TeamV2 object, or 404 {"detail": "Team not found"}.

Delete Team

curl -X DELETE "https://apps.aurionai.net/api/v2/teams/team_789" \
  -H "X-API-Key: itsm_sk_live_xxxx"

Returns 204 No Content on success, or 404 {"detail": "Team not found"}.

Team Members

List Members

curl "https://apps.aurionai.net/api/v2/teams/team_789/members" \
  -H "X-API-Key: itsm_sk_live_xxxx"

Returns an array of team-member objects:

[
  {
    "team_id": "team_789",
    "user_id": "user_012",
    "role": "member",
    "max_capacity": 0,
    "is_default": false,
    "priority": 0,
    "user_email": "agent@example.com",
    "user_name": "Alex Agent"
  }
]

Add / Update Member

curl -X PUT "https://apps.aurionai.net/api/v2/teams/team_789/members/user_012" \
  -H "X-API-Key: itsm_sk_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "role": "member",
    "max_capacity": 10,
    "is_default": false,
    "priority": 0
  }'

This upserts the member (adds them if absent, updates them if present). All body fields are optional and default as shown below.

Upsert body:

FieldTypeDefaultNotes
rolestringmemberOne of member or lead. Any other value returns 422.
max_capacityinteger0Max concurrent conversations (0 = unlimited)
is_defaultbooleanfalseMark this team as the user's default team
priorityinteger0Ordering weight for the priority routing method

Team Roles:

RoleNotes
leadTeam lead
memberRegular team member

Error responses:

StatusBodyWhen
422{"detail": "Invalid team member role. Allowed: ['lead', 'member']"}role is not member/lead
404{"detail": "Team not found"}Team does not exist
404{"detail": "User not found"}Referenced user does not exist
409{"detail": "This user is already the default member of another team. ..."}is_default=true conflicts with another default team for the same user

Remove Member

curl -X DELETE "https://apps.aurionai.net/api/v2/teams/team_789/members/user_012" \
  -H "X-API-Key: itsm_sk_live_xxxx"

Returns 204 No Content, or 404 {"detail": "Team member not found"}.

Business Hours

Teams can be linked to business-hour schedules via business_hours_id. Conversations arriving outside business hours are queued until the team is available. Schedules are a collection — a tenant can define multiple named schedules and mark one as the default.

List Schedules

curl "https://apps.aurionai.net/api/v2/business-hours?limit=50&offset=0" \
  -H "X-API-Key: itsm_sk_live_xxxx"

Query parameters: limit (default 50, 1100), offset (default 0).

Response:

{
  "items": [
    {
      "id": "bh_001",
      "name": "Standard Hours",
      "timezone": "Europe/Brussels",
      "is_default": true,
      "schedule": [],
      "holiday_count": 2,
      "created_at": "2026-01-10T10:00:00Z",
      "updated_at": "2026-01-10T10:00:00Z"
    }
  ],
  "total": 1,
  "limit": 50,
  "offset": 0
}

Get Schedule

curl "https://apps.aurionai.net/api/v2/business-hours/bh_001" \
  -H "X-API-Key: itsm_sk_live_xxxx"

Returns the full schedule including its embedded holidays array, or 404 {"detail": "Business-hours schedule not found"}.

Create Schedule

The schedule is a list of per-weekday entries. Each entry has day_of_week (0=Monday … 6=Sunday), start_time / end_time (HH:MM strings, or null), and is_closed. name is required; timezone defaults to Europe/Paris.

curl -X POST "https://apps.aurionai.net/api/v2/business-hours" \
  -H "X-API-Key: itsm_sk_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Standard Hours",
    "timezone": "Europe/Brussels",
    "is_default": true,
    "schedule": [
      {"day_of_week": 0, "start_time": "09:00", "end_time": "17:30", "is_closed": false},
      {"day_of_week": 1, "start_time": "09:00", "end_time": "17:30", "is_closed": false},
      {"day_of_week": 2, "start_time": "09:00", "end_time": "17:30", "is_closed": false},
      {"day_of_week": 3, "start_time": "09:00", "end_time": "17:30", "is_closed": false},
      {"day_of_week": 4, "start_time": "09:00", "end_time": "16:00", "is_closed": false},
      {"day_of_week": 5, "start_time": null, "end_time": null, "is_closed": true},
      {"day_of_week": 6, "start_time": null, "end_time": null, "is_closed": true}
    ]
  }'

Returns the created schedule with 201 Created. Setting is_default: true when another default already exists returns 409 {"detail": "..."}.

Update Schedule

curl -X PATCH "https://apps.aurionai.net/api/v2/business-hours/bh_001" \
  -H "X-API-Key: itsm_sk_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "timezone": "Europe/Brussels"
  }'

All fields are optional; only the fields you send are updated. Returns the updated schedule, or 404 {"detail": "Business-hours schedule not found"}.

Holidays

Holidays are nested under a schedule. Add a holiday exception with POST /api/v2/business-hours/{business_hours_id}/holidays:

curl -X POST "https://apps.aurionai.net/api/v2/business-hours/bh_001/holidays" \
  -H "X-API-Key: itsm_sk_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Christmas Day",
    "date": "2026-12-25",
    "all_day": true,
    "recurring": false
  }'

Holiday body:

FieldTypeDefaultNotes
namestringrequiredHoliday name (1–200 chars)
datestringrequiredHoliday date (YYYY-MM-DD)
all_daybooleantrueWhen false, supply start_time/end_time for a partial closure
start_timestring | nullnullHH:MM start for a partial-day holiday
end_timestring | nullnullHH:MM end for a partial-day holiday
recurringbooleanfalseRepeat annually

Response (201 Created):

{
  "id": "hol_123",
  "name": "Christmas Day",
  "date": "2026-12-25",
  "all_day": true,
  "start_time": null,
  "end_time": null,
  "recurring": false,
  "created_at": "2026-06-09T10:00:00Z"
}

Holidays are returned embedded in the schedule's holidays array when you GET /api/v2/business-hours/{id} — there is no standalone holiday list endpoint.

Delete Holiday

curl -X DELETE "https://apps.aurionai.net/api/v2/business-hours/bh_001/holidays/hol_123" \
  -H "X-API-Key: itsm_sk_live_xxxx"

Returns 204 No Content, or 404 {"detail": "Holiday not found"}.

Pagination

List endpoints (GET /api/v2/teams, GET /api/v2/business-hours) use offset-based pagination via ?limit=&offset= and return a resource-named envelope { "items": [...], "total": N, "limit": L, "offset": O }. Default limit is 50, max 100.

Rate Limits

The API enforces a default of 300 requests/minute per API key in both production and staging. A 429 response carries Retry-After, X-RateLimit-Limit, and X-RateLimit-Remaining headers plus the body { "detail": "API key rate limit exceeded", "limit": 300 }.

Errors

All 4xx/5xx responses return { "detail": "<message>" }. Branch on the HTTP status and the detail string — for example 404 {"detail": "Team not found"}, 400 {"detail": "Invalid routing_method. ..."}, 422 {"detail": "Invalid team member role. ..."}, 409 on a default-team conflict. Pydantic validation errors return a 422 whose detail is a list of {loc, msg, type} entries.

Authorization

These endpoints are authorized by your dashboard session role, not by an API-key scope — there is no teams:* API-key scope. They also require the CS / platform product profile. A tenant role of tenant_owner, tenant_admin, agent, supervisor, tenant_user, or super_admin may create, update, delete, and manage members; the read-only role tenant_readonly may additionally list and get teams and schedules.

On this page