Skip to main content

Scheduled Events API

The Scheduled Events API allows you to create and manage automated recurring or one-time events that execute agents, tools, or database operations on a schedule. All events created via the client API are automatically shared company-wide with ADMIN permissions.

All Scheduled Events API requests require an Authorization header with your API key. Events created through this API are automatically set to COMPANY-WIDE access with ADMIN permissions.


Base URL

REST API: https://api.autessa.com/clients/scheduled-events

Authentication

Pass your API key in the Authorization header (no "Bearer" prefix):

Authorization: your_api_key_here

The API key must have permissions to access the target resources (agents, tools, or tables) that the scheduled event will interact with.

REST
curl https://api.autessa.com/clients/scheduled-events/all \
-H "Authorization: your_api_key" \
-H "Content-Type: application/json" \
-d '{}'

Schedule Expressions

Scheduled events support three types of timing expressions:

Cron Expressions

For recurring events at specific times:

cron(0 9 * * ? *) # Every day at 9:00 AM
cron(0 12 ? * MON-FRI *) # Weekdays at noon
cron(0 0 1 * ? *) # First day of every month

Rate Expressions

For simple recurring intervals:

rate(5 minutes) # Every 5 minutes
rate(1 hour) # Every hour
rate(1 day) # Every day

At Expressions

For one-time execution:

at(2025-12-31T23:59:59) # Single execution at specific time

Action Types

Scheduled events can perform three types of actions:

  • Name
    INVOKE_AGENT
    Description

    Execute an agent with predefined input. The agent runs in single-turn mode with no conversation context.

  • Name
    INVOKE_TOOL
    Description

    Execute a tool with static parameters defined at schedule creation time.

  • Name
    UPDATE_AUTESSADB
    Description

    Perform INSERT or UPDATE operations on AutessaDB tables with predefined values.


REST API Endpoints

List All Events POST/all

Retrieves all scheduled events for your company. Returns all active (non-deleted) scheduled events that belong to your company.

Request Body

  • Name
    (empty)
    Type
    object
    Description

    Send an empty JSON object {}.

Response

  • Name
    ownedEvents
    Type
    array<ScheduledEventTriggerDto>
    Description

    All scheduled events owned by your company.

  • Name
    companySharedEvents
    Type
    array<ScheduledEventTriggerDto>
    Description

    Always empty for client API (all events are in ownedEvents).

  • Name
    sharedWithMeEvents
    Type
    array<ScheduledEventTriggerDto>
    Description

    Always empty for client API.

  • Name
    errors
    Type
    array<string>
    Description

    Array of error messages if any occurred.

curl -X POST https://api.autessa.com/clients/scheduled-events/all \
-H "Authorization: your_api_key" \
-H "Content-Type: application/json" \
-d '{}'
Response
{
"ownedEvents": [
{
"eventId": "evt_abc123",
"eventName": "Daily Summary Agent",
"description": "Runs every day at 9 AM",
"cronExpression": "cron(0 9 * * ? *)",
"timezone": "America/New_York",
"enabled": true,
"actionType": "INVOKE_AGENT",
"sharingLevel": "COMPANY",
"companyPermissionLevel": "ADMIN"
}
],
"companySharedEvents": [],
"sharedWithMeEvents": []
}

Get Single Event POST/get

Retrieves a specific scheduled event by its ID.

Request Body

  • Name
    scheduledEventId
    Type
    string
    Description

    The unique ID of the scheduled event.

Response

  • Name
    scheduledEvent
    Type
    ScheduledEventTriggerDto
    Description

    The scheduled event details.

  • Name
    permission
    Type
    EAccessLevel
    Description

    Your access level (always ADMIN for client API).

  • Name
    errors
    Type
    array<string>
    Description

    Array of error messages if any occurred.

curl -X POST https://api.autessa.com/clients/scheduled-events/get \
-H "Authorization: your_api_key" \
-H "Content-Type: application/json" \
-d '{"scheduledEventId": "evt_abc123"}'
Response
{
"scheduledEvent": {
"eventId": "evt_abc123",
"eventName": "Daily Summary Agent",
"enabled": true,
"sharingLevel": "COMPANY",
"companyPermissionLevel": "ADMIN"
},
"permission": "ADMIN"
}

Create Event POST/create

Creates a new scheduled event. The event is automatically set to COMPANY-WIDE access with ADMIN permissions.

Your API key must have permission to access the target resource (agent, tool, or table) that will be executed by this scheduled event.

Request Body - Common Fields

  • Name
    eventName
    Type
    string
    Description

    User-friendly name for the scheduled event.

  • Name
    description
    Type
    string
    Description

    Optional description of what this event does.

  • Name
    cronExpression
    Type
    string
    Description

    Schedule expression (cron, rate, or at format).

  • Name
    timezone
    Type
    string
    Description

    IANA timezone (e.g., "America/New_York", "UTC"). Defaults to UTC.

  • Name
    enabled
    Type
    boolean
    Description

    Whether the event should be enabled. Defaults to true.

  • Name
    actionType
    Type
    EScheduledEventActionType
    Description

    Type of action: INVOKE_AGENT, INVOKE_TOOL, or UPDATE_AUTESSADB.

For INVOKE_AGENT

  • Name
    agentConfig
    Type
    object
    Description

    Configuration for agent invocation.

    • agentExecutionRequest.agentId (integer, required): The agent ID
    • agentExecutionRequest.input (string, required): Input message
    • agentExecutionRequest.environmentVariables (object): Key-value pairs
    • continueOnError (boolean): Whether to continue if execution fails

For INVOKE_TOOL

  • Name
    toolConfig
    Type
    object
    Description

    Configuration for tool execution.

    • toolExecutionRequest.toolId (integer, required): The tool ID
    • toolExecutionRequest.variables (object): Tool input variables
    • toolExecutionRequest.environmentVariables (object): Key-value pairs
    • continueOnError (boolean): Whether to continue if execution fails

For UPDATE_AUTESSADB

  • Name
    autessaDbConfig
    Type
    object
    Description

    Configuration for database operation.

    • operation (DbOperation, required): INSERT or UPDATE
    • targetTableId (integer, required): The table ID
    • values (object, required): Column name to value mappings
    • dbRecordId (integer): Specific record ID to update
    • whereConditions (string): JSON WHERE conditions for batch updates

Response

  • Name
    scheduledEvent
    Type
    ScheduledEventTriggerDto
    Description

    The created scheduled event details.

  • Name
    eventId
    Type
    string
    Description

    The unique ID of the created event.

  • Name
    scheduleArn
    Type
    string
    Description

    AWS EventBridge schedule ARN.

  • Name
    errors
    Type
    array<string>
    Description

    Array of error messages if any occurred.

curl -X POST https://api.autessa.com/clients/scheduled-events/create \
-H "Authorization: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"eventName": "Daily Summary Agent",
"description": "Runs every day at 9 AM",
"cronExpression": "cron(0 9 * * ? *)",
"timezone": "America/New_York",
"enabled": true,
"actionType": "INVOKE_AGENT",
"agentConfig": {
"agentExecutionRequest": {
"agentId": 123,
"input": "Generate daily summary",
"environmentVariables": {}
},
"continueOnError": false
}
}'
Response
{
"scheduledEvent": {
"eventId": "evt_abc123",
"eventName": "Daily Summary Agent",
"enabled": true,
"sharingLevel": "COMPANY",
"companyPermissionLevel": "ADMIN"
},
"eventId": "evt_abc123",
"scheduleArn": "arn:aws:scheduler:..."
}

Update Event POST/update

Updates an existing scheduled event. You can modify the schedule, configuration, or any other field.

Request Body

  • Name
    scheduledEventId
    Type
    string
    Description

    The ID of the event to update.

  • Name
    eventName
    Type
    string
    Description

    Updated event name.

  • Name
    description
    Type
    string
    Description

    Updated description.

  • Name
    cronExpression
    Type
    string
    Description

    Updated schedule expression.

  • Name
    timezone
    Type
    string
    Description

    Updated timezone.

  • Name
    actionType
    Type
    EScheduledEventActionType
    Description

    Updated action type (requires corresponding config).

  • Name
    agentConfig / toolConfig / autessaDbConfig
    Type
    object
    Description

    Updated configuration (based on action type).

If you change the action type or target resource, your API key must have permission to access the new target resource.

Response

  • Name
    scheduledEvent
    Type
    ScheduledEventTriggerDto
    Description

    The updated scheduled event details.

  • Name
    errors
    Type
    array<string>
    Description

    Array of error messages if any occurred.

curl -X POST https://api.autessa.com/clients/scheduled-events/update \
-H "Authorization: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"scheduledEventId": "evt_abc123",
"eventName": "Updated Event Name",
"cronExpression": "rate(2 hours)"
}'
Response
{
"scheduledEvent": {
"eventId": "evt_abc123",
"eventName": "Updated Event Name",
"cronExpression": "rate(2 hours)"
}
}

Toggle Event POST/toggle

Enables or disables a scheduled event. Disabled events will not execute until re-enabled.

Request Body

  • Name
    scheduledEventId
    Type
    string
    Description

    The ID of the event to toggle.

  • Name
    enabled
    Type
    boolean
    Description

    true to enable, false to disable.

Response

  • Name
    eventId
    Type
    string
    Description

    The ID of the toggled event.

  • Name
    enabled
    Type
    boolean
    Description

    The new enabled state.

  • Name
    errors
    Type
    array<string>
    Description

    Array of error messages if any occurred.

curl -X POST https://api.autessa.com/clients/scheduled-events/toggle \
-H "Authorization: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"scheduledEventId": "evt_abc123",
"enabled": false
}'
Response
{
"eventId": "evt_abc123",
"enabled": false
}

Delete Event POST/delete

Soft-deletes a scheduled event. The event will be marked as deleted and will no longer execute.

Request Body

  • Name
    scheduledEventId
    Type
    string
    Description

    The ID of the event to delete.

Response

  • Name
    eventId
    Type
    string
    Description

    The ID of the deleted event.

  • Name
    deletedAt
    Type
    string
    Description

    ISO timestamp of when the event was deleted.

  • Name
    errors
    Type
    array<string>
    Description

    Array of error messages if any occurred.

curl -X POST https://api.autessa.com/clients/scheduled-events/delete \
-H "Authorization: your_api_key" \
-H "Content-Type: application/json" \
-d '{"scheduledEventId": "evt_abc123"}'
Response
{
"eventId": "evt_abc123",
"deletedAt": "2025-11-04T12:00:00Z"
}

Error Handling

All endpoints return errors in a consistent format:

{
"errors": [
"API key does not have permission to access the target agent (ID: 123)",
"Event name is required"
]
}

Common Error Messages

  • Name
    Event name is required
    Description

    The eventName field is missing or empty.

  • Name
    API key does not have permission to access the target X (ID: Y)
    Description

    Your API key doesn't have permission to the specified agent, tool, or table.

  • Name
    Target resource does not belong to your company
    Description

    The specified resource doesn't exist or belongs to a different company.

  • Name
    Agent/Tool/Table ID is required for X action
    Description

    The configuration for the specified action type is missing required fields.

  • Name
    Scheduled event not found
    Description

    The specified event ID doesn't exist or doesn't belong to your company.

  • Name
    Scheduled event does not belong to your company
    Description

    You're trying to access an event from a different company.


Important Notes

Company-Wide Access: All scheduled events created via the client API are automatically set to COMPANY-WIDE sharing with ADMIN permissions. This means all members of your company can view, edit, and manage these scheduled events.

Permission Validation: Your API key must have explicit permission to access the target resources (agents, tools, or tables) that the scheduled event will interact with. The API will reject creation/updates if you don't have access.

Owner Assignment: Scheduled events created via the client API are owned by your company's primary admin user, not by the API key itself.