---
title: "create"
method: POST
path: "/api/agent_schedules"
tags: ["AgentSchedule"]
---

# create

`POST /api/agent_schedules`

## Request body

- object
  - `data` object, required
    - `type` string, required
    - `attributes` object, required
      - `projectId` string, required
      - `agentId` string, required
      - `formInterfaceId` string
      - `name` string, required
      - `repeatUnit` string, required
      - `repeatFrequency` integer, required
      - `repeatSubFrequency` integer[]
      - `timezone` string, required
      - `startAt` string, required
      - `description` string
      - `parameterValues` object, required
        - `param2` string
        - `param1` string
        - `image_param` object[]
          - `binaryBase64` string, required
          - `contentType` string, required
        - `regular_param` string
        - `array_param` string[]
        - `attachment_param` object[]
          - `binaryBase64` string, required
          - `contentType` string, required
        - `mixed_param` string[]
        - `button_id` string
        - `input` string
        - `test` string
        - `report_description` string
        - `report_title` string
      - `sendEmailNotification` boolean
      - `endAt` string
      - `textResourceId` string
      - `chatInterfaceId` string

## Response `201`

Agent schedule successfully created

## Other responses

- `400` — rejects emailRecipients in request payload with validation error
- `401` — Rejected by 401
- `403` — returns 403 Forbidden when trying to use chat_interface and agent from different account
- `422` — rejects neither form_interface nor chat_interface

---

[API](https://skmtc.net/treasure/apis/llm-api.md) · [All operations](https://skmtc.net/treasure/apis/llm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/treasure/llm-api/revisions/56f275763358/schema)
