Skip to content
Get started

List all tasks

GET/api/promptly/tasks

Retrieve all tasks for the authenticated user's organization

Query ParametersExpand Collapse
organizationId: string

Organization ID to filter tasks

formatuuid
ReturnsExpand Collapse
id: string
formatuuid
createdAt: string
formatdate-time
model: string

AI model identifier (e.g., 'gpt-4o-mini')

name: string

Human-readable task name

prompt: string

The AI prompt to execute

schedule: "once" or "hourly" or "daily" or "weekly"

Task execution frequency

Accepts one of the following:
"once"
"hourly"
"daily"
"weekly"
status: "active" or "paused" or "completed"
Accepts one of the following:
"active"
"paused"
"completed"
cronExpression: optional string

Custom cron expression (overrides schedule settings)

deliveryEmail: optional boolean

Email delivery enabled

deliveryEmailAddress: optional string

Email address for delivery

formatemail
deliveryPhoneNumber: optional string

Phone number for SMS delivery

deliverySms: optional boolean

SMS delivery enabled

destinations: optional array of Destination { type, value, label }

Where to deliver task results

type: "email" or "sms" or "webhook"
Accepts one of the following:
"email"
"sms"
"webhook"
value: string

Email address, phone number, or webhook URL

label: optional string

Optional human-readable label

lastRunAt: optional string
formatdate-time
nextRunAt: optional string
formatdate-time
organizationId: optional string
formatuuid
scheduleDays: optional array of "monday" or "tuesday" or "wednesday" or 4 more

Days of week to run (for weekly schedule)

Accepts one of the following:
"monday"
"tuesday"
"wednesday"
"thursday"
"friday"
"saturday"
"sunday"
scheduleTime: optional string

Time of day to run (HH:MM format)

skillIds: optional array of string

IDs of attached skills

skills: optional array of Skill { id, content, name, 11 more }

Attached skills (when expanded)

id: string
formatuuid
content: string

Markdown instructions that guide task execution

name: string
category: optional string
createdAt: optional string
formatdate-time
description: optional string
frontmatter: optional object { author, requiredSources, tags }

Skill metadata

author: optional string
requiredSources: optional array of string

Source slugs this skill depends on

tags: optional array of string
iconUrl: optional string
formaturi
isPublic: optional boolean

Whether the skill is shared publicly

isUserInvocable: optional boolean

Whether users can manually attach this skill

organizationId: optional string
formatuuid
slug: optional string

URL-friendly identifier

updatedAt: optional string
formatdate-time
version: optional number
sourceIds: optional array of string

IDs of attached sources

sources: optional array of Source { id, config, name, 14 more }

Attached data sources (when expanded)

id: string
formatuuid
config: object { args, baseUrl, command, 3 more }

Source-specific configuration

args: optional array of string

Command arguments

baseUrl: optional string

Base URL for API sources

formaturi
command: optional string

Command to run for stdio transport

env: optional map[string]

Environment variables

transport: optional "stdio" or "http" or "websocket"

MCP transport type

Accepts one of the following:
"stdio"
"http"
"websocket"
url: optional string

URL for http/websocket transport

formaturi
name: string
type: "mcp" or "api" or "local"

Source connection type

Accepts one of the following:
"mcp"
"api"
"local"
authConfig: optional object { headerName, prefix, provider }

Authentication configuration

headerName: optional string
prefix: optional string
provider: optional string
authType: optional "none" or "oauth" or "bearer" or 5 more
Accepts one of the following:
"none"
"oauth"
"bearer"
"basic"
"header"
"query"
"api_key"
"composio"
composioConnected: optional boolean

Whether Composio OAuth is completed

composioToolkit: optional string

Composio toolkit name (e.g., 'todoist', 'github')

createdAt: optional string
formatdate-time
description: optional string
iconUrl: optional string
formaturi
isActive: optional boolean

Whether the source is connected and ready

lastConnectedAt: optional string
formatdate-time
organizationId: optional string
formatuuid
slug: optional string

URL-friendly identifier

tools: optional array of Tool { description, inputSchema, name }

Available tools from this source

description: optional string
inputSchema: optional unknown

JSON Schema for tool parameters

name: optional string
updatedAt: optional string
formatdate-time
timezone: optional string

IANA timezone (e.g., 'America/New_York')

updatedAt: optional string
formatdate-time
userId: optional string

Owner user ID

List all tasks

curl https://0ct.com/api/promptly/tasks \
    -H "Authorization: Bearer $0CT_API_KEY"
[
  {
    "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "createdAt": "2019-12-27T18:11:19.117Z",
    "model": "model",
    "name": "name",
    "prompt": "prompt",
    "schedule": "once",
    "status": "active",
    "cronExpression": "cronExpression",
    "deliveryEmail": true,
    "deliveryEmailAddress": "dev@stainless.com",
    "deliveryPhoneNumber": "deliveryPhoneNumber",
    "deliverySms": true,
    "destinations": [
      {
        "type": "email",
        "value": "value",
        "label": "label"
      }
    ],
    "lastRunAt": "2019-12-27T18:11:19.117Z",
    "nextRunAt": "2019-12-27T18:11:19.117Z",
    "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "scheduleDays": [
      "monday"
    ],
    "scheduleTime": "06:56",
    "skillIds": [
      "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
    ],
    "skills": [
      {
        "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "content": "content",
        "name": "name",
        "category": "category",
        "createdAt": "2019-12-27T18:11:19.117Z",
        "description": "description",
        "frontmatter": {
          "author": "author",
          "requiredSources": [
            "string"
          ],
          "tags": [
            "string"
          ]
        },
        "iconUrl": "https://example.com",
        "isPublic": true,
        "isUserInvocable": true,
        "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "slug": "slug",
        "updatedAt": "2019-12-27T18:11:19.117Z",
        "version": 0
      }
    ],
    "sourceIds": [
      "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
    ],
    "sources": [
      {
        "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "config": {
          "args": [
            "string"
          ],
          "baseUrl": "https://example.com",
          "command": "command",
          "env": {
            "foo": "string"
          },
          "transport": "stdio",
          "url": "https://example.com"
        },
        "name": "name",
        "type": "mcp",
        "authConfig": {
          "headerName": "headerName",
          "prefix": "prefix",
          "provider": "provider"
        },
        "authType": "none",
        "composioConnected": true,
        "composioToolkit": "composioToolkit",
        "createdAt": "2019-12-27T18:11:19.117Z",
        "description": "description",
        "iconUrl": "https://example.com",
        "isActive": true,
        "lastConnectedAt": "2019-12-27T18:11:19.117Z",
        "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "slug": "slug",
        "tools": [
          {
            "description": "description",
            "inputSchema": {},
            "name": "name"
          }
        ],
        "updatedAt": "2019-12-27T18:11:19.117Z"
      }
    ],
    "timezone": "timezone",
    "updatedAt": "2019-12-27T18:11:19.117Z",
    "userId": "userId"
  }
]
Returns Examples
[
  {
    "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "createdAt": "2019-12-27T18:11:19.117Z",
    "model": "model",
    "name": "name",
    "prompt": "prompt",
    "schedule": "once",
    "status": "active",
    "cronExpression": "cronExpression",
    "deliveryEmail": true,
    "deliveryEmailAddress": "dev@stainless.com",
    "deliveryPhoneNumber": "deliveryPhoneNumber",
    "deliverySms": true,
    "destinations": [
      {
        "type": "email",
        "value": "value",
        "label": "label"
      }
    ],
    "lastRunAt": "2019-12-27T18:11:19.117Z",
    "nextRunAt": "2019-12-27T18:11:19.117Z",
    "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "scheduleDays": [
      "monday"
    ],
    "scheduleTime": "06:56",
    "skillIds": [
      "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
    ],
    "skills": [
      {
        "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "content": "content",
        "name": "name",
        "category": "category",
        "createdAt": "2019-12-27T18:11:19.117Z",
        "description": "description",
        "frontmatter": {
          "author": "author",
          "requiredSources": [
            "string"
          ],
          "tags": [
            "string"
          ]
        },
        "iconUrl": "https://example.com",
        "isPublic": true,
        "isUserInvocable": true,
        "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "slug": "slug",
        "updatedAt": "2019-12-27T18:11:19.117Z",
        "version": 0
      }
    ],
    "sourceIds": [
      "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
    ],
    "sources": [
      {
        "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "config": {
          "args": [
            "string"
          ],
          "baseUrl": "https://example.com",
          "command": "command",
          "env": {
            "foo": "string"
          },
          "transport": "stdio",
          "url": "https://example.com"
        },
        "name": "name",
        "type": "mcp",
        "authConfig": {
          "headerName": "headerName",
          "prefix": "prefix",
          "provider": "provider"
        },
        "authType": "none",
        "composioConnected": true,
        "composioToolkit": "composioToolkit",
        "createdAt": "2019-12-27T18:11:19.117Z",
        "description": "description",
        "iconUrl": "https://example.com",
        "isActive": true,
        "lastConnectedAt": "2019-12-27T18:11:19.117Z",
        "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "slug": "slug",
        "tools": [
          {
            "description": "description",
            "inputSchema": {},
            "name": "name"
          }
        ],
        "updatedAt": "2019-12-27T18:11:19.117Z"
      }
    ],
    "timezone": "timezone",
    "updatedAt": "2019-12-27T18:11:19.117Z",
    "userId": "userId"
  }
]