API Reference
Backoffice APIs
Bauri

Bauri API Reference

Overview

The Bauri API provides endpoints for managing scheduled events and tasks in the TKM AI Agency Platform. It handles event creation, updates, deletion, and execution.

Base URL

/scheduler

Endpoints

Create Scheduled Event

POST /scheduler/events

Creates a new scheduled event.

Request Body

{
    "event_type": "string",
    "schedule_time": "2024-01-20T12:00:00Z",
    "user_id": "string",
    "organization_id": "string",
    "metadata": {
        "additional": "data"
    }
}

Response

{
    "success": true,
    "event_id": "string",
    "schedule_time": "2024-01-20T12:00:00Z"
}

List Scheduled Events

GET /scheduler/events

Lists scheduled events with optional filters.

Query Parameters

NameTypeRequiredDescription
auth0_idstringNoFilter by user ID
organization_idstringNoFilter by organization ID

Response

{
    "success": true,
    "events": [
        {
            "event_id": "string",
            "event_type": "string",
            "schedule_time": "2024-01-20T12:00:00Z",
            "user_id": "string",
            "organization_id": "string",
            "metadata": {
                "additional": "data"
            }
        }
    ]
}

Update Scheduled Event

PUT /scheduler/events/{event_id}

Updates an existing scheduled event.

Path Parameters

NameTypeRequiredDescription
event_idstringYesThe ID of the event to update

Request Body

{
    "event_type": "string",
    "schedule_time": "2024-01-20T12:00:00Z",
    "metadata": {
        "additional": "data"
    }
}

Response

{
    "success": true,
    "event_id": "string",
    "schedule_time": "2024-01-20T12:00:00Z"
}

Delete Scheduled Event

DELETE /scheduler/events/{event_id}

Deletes a scheduled event.

Path Parameters

NameTypeRequiredDescription
event_idstringYesThe ID of the event to delete

Response

{
    "success": true,
    "message": "Event deleted successfully"
}

Execute Event Now

POST /scheduler/events/{event_id}/execute

Executes a scheduled event immediately.

Path Parameters

NameTypeRequiredDescription
event_idstringYesThe ID of the event to execute

Response

{
    "success": true,
    "execution_time": "2024-01-20T12:00:00Z"
}

Error Responses

404 Not Found

{
    "detail": "Event not found"
}

500 Internal Server Error

{
    "detail": "Error message"
}

Integration Notes

Event Management

  • Events are organization and user-specific
  • Events can be scheduled for future execution
  • Events support metadata for additional information
  • Immediate execution is supported

Scheduling Features

  • Timezone-aware scheduling
  • Recurring events support
  • Event history tracking
  • Execution status monitoring