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 Specs​

The schedule is described by the scheduleSpec object — a tagged union over the pattern field. There are exactly three patterns; only the nested object matching the pattern is present:

EVERY​

For recurring events at a fixed interval. every.value is a positive integer and every.unit is one of MINUTES, HOURS, or DAYS. Timezone-independent.

{ "pattern": "EVERY", "every": { "value": 6, "unit": "HOURS" } }

CRON​

For recurring events at specific times, evaluated in an IANA timezone. cron.expression is a 6-field AWS cron expression (minute hour day-of-month month day-of-week year) without the cron(...) wrapper; use ? in exactly one of day-of-month or day-of-week. cron.timezone is required.

{ "pattern": "CRON", "cron": { "expression": "0 9 * * ? *", "timezone": "America/New_York" } }

ONCE​

For one-time execution at a local wall-clock time in an IANA timezone. once.at is a local ISO-8601 datetime without offset and must be in the future.

{ "pattern": "ONCE", "once": { "at": "2026-12-31T23:59:59", "timezone": "UTC" } }

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": "8f14e45f-ceea-4e07-8c65-9d2f9a1b3c4d",
"eventName": "Daily Summary Agent",
"description": "Runs every day at 9 AM",
"scheduleSpec": {
"pattern": "CRON",
"cron": {
"expression": "0 9 * * ? *",
"timezone": "America/New_York"
}
},
"enabled": true,
"actionType": "INVOKE_AGENT",
"sharingLevel": "COMPANY",
"companyPermissionLevel": "ADMIN",
"userPermission": "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": "8f14e45f-ceea-4e07-8c65-9d2f9a1b3c4d"}'
Response
{
"scheduledEvent": {
"eventId": "8f14e45f-ceea-4e07-8c65-9d2f9a1b3c4d",
"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
    scheduleSpec
    Type
    object
    Description

    Schedule specification — see Schedule Specs. One of the EVERY, CRON, or ONCE shapes.

  • 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 (string, required): The agent's ID
    • agentExecutionRequest.input (array, required): Multimodal input items, e.g. [{"inputType": "TEXT", "content": "Generate daily summary"}]
    • agentExecutionRequest.environmentVariables (object): String key-value pairs
    • continueOnError (boolean): Whether to continue if execution fails. Defaults to false
    • description (string): Optional description of this scheduled execution

For INVOKE_TOOL​

  • Name
    toolConfig
    Type
    object
    Description

    Configuration for tool execution.

    • toolExecutionRequest.toolId (string, required): The tool's ID
    • toolExecutionRequest.variables (object): Tool input variables. String key-value pairs
    • toolExecutionRequest.environmentVariables (object): String key-value pairs
    • continueOnError (boolean): Whether to continue if execution fails. Defaults to false
    • description (string): Optional description of this scheduled execution

For UPDATE_AUTESSADB​

  • Name
    autessaDbConfig
    Type
    object
    Description

    Configuration for database operation.

    • operation (DbOperation, required): INSERT or UPDATE
    • targetTableId (string, required): The AutessaDB table's ID
    • values (object, required): Column name to typed column value mappings, e.g. {"status": {"columnType": "SHORT_TEXT", "textValue": "inactive"}}
    • recordId (integer): For single-row UPDATE — the specific record ID to update. Mutually exclusive with whereGroups
    • whereGroups (array): For batch UPDATE — groups of WHERE conditions. Each group has a logicalOperator ("AND"/"OR") and conditions (array of {columnName, operator, value}). Mutually exclusive with recordId
    • groupsLogicalOperator (string): "AND" or "OR" — how to combine multiple WHERE groups
    • skipIfTargetTableMissing (boolean): If true, skip execution when the target table doesn't exist instead of failing. Defaults to false
    • description (string): Optional description of this scheduled operation

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

    The 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.