Skip to main content
PUT
/
v1
/
update-schedule
/
{schedule_id}
Update Schedule
curl --request PUT \
  --url https://api.getbluejay.ai/v1/update-schedule/{schedule_id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <x-api-key>' \
  --data '
{
  "schedule": {
    "frequency": "<string>",
    "interval": 58
  },
  "enabled": true
}
'
{
  "id": "<string>",
  "simulation_id": "<string>",
  "cron_expression": "<string>",
  "created_at": "<string>",
  "enabled": true
}
Integration Prompt for AI Agents
# Bluejay — Testing & Monitoring Platform for Conversational AI Agents

You are a senior backend engineer integrating the Bluejay API. Think step-by-step: first understand the endpoint, then plan the integration, then implement with minimal changes.

## Update Schedule — PUT /v1/update-schedule/{schedule_id}

**Endpoint:** PUT `https://api.getbluejay.ai/v1/update-schedule/{schedule_id}`
**Auth:** `X-API-Key` header
**Content-Type:** application/json

### Required Parameters
| Name | Type | Description |
|------|------|-------------|
| schedule_id | string |  |
| X-API-Key | string | API key required to authenticate requests. |

Review the full parameter list at https://docs.getbluejay.ai/api-reference/endpoint/update-schedule and include any optional parameters (e.g., `schedule`, `enabled`) that serve your integration's use case and align with Bluejay's testing and monitoring capabilities.

### Request Body
```json
{
  "schedule": {
    "frequency": "string",
    "interval": 123
  },
  "enabled": true
}
```

### Example
**PUT with body:**
```python
import requests

def update_schedule(schedule_id: str, payload: dict, api_key: str) -> dict:
    url = f"https://api.getbluejay.ai/v1/update-schedule/{schedule_id}"
    headers = {"X-API-Key": api_key}
    response = requests.put(url, headers=headers, json=payload)
    response.raise_for_status()
    return response.json()
```

### Constraints
- Minimal changes — only add/change files needed for this integration.
- Match existing codebase patterns (naming, file structure, error handling).
- Include error handling for 422: Validation Error.

### Integration Checklist
Before writing code, verify:
1. Which module/service owns this API domain in the codebase?
2. What HTTP client and error-handling patterns does the project use?
3. Are there existing types/interfaces to extend?

Then implement the integration, export it, and confirm it compiles/passes lint.
Given the schedule ID and updated configuration, this endpoint updates your schedule and returns the updated schedule.

Headers

X-API-Key
string
required

API key required to authenticate requests.

Path Parameters

schedule_id
string
required

Body

application/json
schedule
EveryNMinutesSchedule · object

The new schedule for the cron job.

enabled
boolean | null

Whether to enable or disable the cron job.

Response

Successful Response

id
string
required

The unique identifier for the updated cron job.

simulation_id
string
required

The unique identifier for the associated simulation.

cron_expression
string
required

The cron expression defining the job schedule.

created_at
string
required

The timestamp when the cron job was created.

enabled
boolean | null

Whether the cron job is enabled.