ai_tasks
Ai Tasks

Create Ai Task

post/ai_tasks

Request

  • Base URL
    https://app.files.com/api/rest/v1
  • URL
    https://app.files.com/api/rest/v1/ai_tasks
  • Auth
    none declared

Request body multipart/form-data

descriptionstring

AI Task description.

disabledboolean

If true, this AI Task will not run.

holiday_regionstring

Optional holiday region used by the AI Task schedule.

intervalstring

If trigger is daily, this specifies how often to run the AI Task.

namestring required

AI Task name.

pathstring

Path scope used for action-triggered AI Tasks.

permission_set'full' | 'files_only'

Permissions used by the internal API key for this AI Task. Valid values are full and files_only.

promptstring required

Prompt sent when this AI Task is invoked.

recurring_dayinteger

If trigger is daily, this selects the day number inside the chosen interval.

recurring_daysinteger[]

If trigger is daily, this selects one or more day numbers inside a week, month, quarter, or year interval.

schedule_idinteger

If trigger is custom_schedule, the reusable Schedule used instead of the AI Task's schedule fields.

schedule_days_of_weekinteger[]

If trigger is custom_schedule, the 0-based weekdays used by the schedule.

schedule_time_zonestring

Time zone used by the AI Task schedule.

schedule_times_of_daystring[]

Times of day in HH:MM format for the AI Task schedule.

sourcestring

Source glob used with path for action-triggered AI Tasks.

trigger'manual' | 'daily' | 'custom_schedule' | 'action'

How this AI Task is triggered.

trigger_actionsstring[]

If trigger is action, the file action types that invoke this AI Task. Valid actions are create, copy, move, archived_delete, update, read, destroy.

workspace_idinteger

Workspace ID. 0 means the default workspace.

Example request

{
  "description": "Summarizes files uploaded by the accounting team.",
  "disabled": true,
  "holiday_region": "us",
  "interval": "day",
  "name": "Summarize daily reports",
  "path": "incoming/reports",
  "permission_set": "files_only",
  "prompt": "Summarize the uploaded file and identify follow-up actions.",
  "recurring_day": 1,
  "recurring_days": [
    1,
    15
  ],
  "schedule_id": 1,
  "schedule_days_of_week": [
    1,
    3,
    5
  ],
  "schedule_time_zone": "Eastern Time (US & Canada)",
  "schedule_times_of_day": [
    "06:30"
  ],
  "source": "*.pdf",
  "trigger": "daily",
  "trigger_actions": [
    "create"
  ]
}

Response

The AiTasks object.

idinteger

AI Task ID.

workspace_idinteger

Workspace ID. 0 means the default workspace.

namestring

AI Task name.

descriptionstring

AI Task description.

promptstring

Prompt sent when this AI Task is invoked.

permission_set'full' | 'files_only'

Permissions used by the internal API key for this AI Task. Valid values are full and files_only.

pathstring

Path scope used for action-triggered AI Tasks.

sourcestring

Source glob used with path for action-triggered AI Tasks.

disabledboolean

If true, this AI Task will not run.

trigger'manual' | 'daily' | 'custom_schedule' | 'action'

How this AI Task is triggered.

trigger_actionsstring[]

If trigger is action, the file action types that invoke this AI Task. Valid actions are create, copy, move, archived_delete, update, read, destroy.

intervalstring

If trigger is daily, this specifies how often to run the AI Task.

recurring_dayinteger

If trigger is daily, this selects the day number inside the chosen interval.

recurring_daysinteger[]

If trigger is daily, this selects one or more day numbers inside a week, month, quarter, or year interval.

schedule_idinteger

If trigger is custom_schedule, the reusable Schedule used instead of the AI Task's schedule fields.

schedule_days_of_weekinteger[]

If trigger is custom_schedule, the 0-based weekdays used by the schedule.

schedule_times_of_daystring[]

Times of day in HH:MM format for the AI Task schedule.

schedule_time_zonestring

Time zone used by the AI Task schedule.

holiday_regionstring

Optional holiday region used by the AI Task schedule.

human_readable_schedulestring

Human-readable schedule description.

last_run_atstring date-time

Most recent successful invocation time.

master_admin_user_idinteger

Master User ID used for AI Task invocations.

created_atstring date-time

Creation time.

updated_atstring date-time

Last update time.

Example response

{
  "id": 1,
  "name": "Summarize daily reports",
  "description": "Summarizes files uploaded by the accounting team.",
  "prompt": "Summarize the uploaded file and identify follow-up actions.",
  "permission_set": "files_only",
  "path": "incoming/reports",
  "source": "*.pdf",
  "disabled": true,
  "trigger": "daily",
  "trigger_actions": [
    "create"
  ],
  "interval": "day",
  "recurring_day": 1,
  "recurring_days": [
    1,
    15
  ],
  "schedule_id": 1,
  "schedule_days_of_week": [
    1,
    3,
    5
  ],
  "schedule_times_of_day": [
    "06:30"
  ],
  "schedule_time_zone": "Eastern Time (US & Canada)",
  "holiday_region": "us",
  "human_readable_schedule": "Runs every day at 06:30 AM UTC TZ.",
  "last_run_at": "2000-01-01T01:00:00Z",
  "master_admin_user_id": 1,
  "created_at": "2000-01-01T01:00:00Z",
  "updated_at": "2000-01-01T01:00:00Z"
}

Changes