Skip to main content
POST
/
agents
/
{agentId}
/
schedules
JavaScript
import Cerca from '@cerca-dev/sdk';

const client = new Cerca({
  apiKey: process.env['CERCA_API_KEY'], // This is the default and can be omitted
});

const schedule = await client.schedules.create('agent_abc123', {
  message: 'message',
  name: 'name',
});

console.log(schedule.id);
{
  "createdAt": "<string>",
  "enabled": true,
  "id": "<string>",
  "name": "<string>",
  "nextAt": "<string>",
  "message": "<string>",
  "timezone": "<string>",
  "updatedAt": "<string>",
  "cron": "<string>",
  "instructions": "<string>",
  "model": "<string>",
  "runAt": "2023-11-07T05:31:56Z",
  "tools": [
    "<string>"
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.cerca.dev/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

agentId
string
required
Minimum string length: 1
Example:

"agent_abc123"

Body

application/json
message
string
required
name
string
required
cron
string
instructions
string
model
string
runAt
string<date-time>
timezone
string
tools
string[]

Per-schedule tool subset. When the schedule starts a thread, these tools can only narrow the agent's effective tools.

Configurable runtime tool name, configurable namespace wildcard such as sandbox., or external namespace wildcard such as google.. At thread and turn scope, entries can only narrow the agent's effective tools.

Minimum string length: 1

Response

Schedule created.

createdAt
string
required
enabled
boolean
required
id
string
required
name
string
required
nextAt
string | null
required
message
string
required
timezone
string
required
updatedAt
string
required
cron
string
instructions
string
model
string
runAt
string<date-time>
tools
string[]

Per-schedule tool subset. Scheduled threads inherit the agent's effective tools when omitted and can only narrow them when provided.

Configurable runtime tool name, configurable namespace wildcard such as sandbox., or external namespace wildcard such as google.. At thread and turn scope, entries can only narrow the agent's effective tools.

Minimum string length: 1