Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Get template

Get one template by slug: full prompt, default schedule, model level, output channels, and required integrations. Clients that support creating automations can pass the slug as sourceDefaultTaskSlug to link the new automation to its template.

GET/automation-templates/{slug}
Authorization
AuthorizationBearer token · headerrequired

Organization API key (modem_…).

Path parameters
slugstringrequired
matches ^[a-z0-9-]+$
Responses
200

OK

descriptionstring | nullrequired
Show properties
Any of:
string
string
null
null
modelLevelstringrequired

Model quality/speed tier persisted for automation execution.

Allowed:highlowmed
namestringrequired
outputChannelsobject[] | nullrequired
Show properties
Any of:
object[]
Array of object
channelstringrequired
Allowed:discordemailmsteamsslack
destinationsstring[] | nullrequired
Show properties
Any of:
string[]
Array of string
string
null
null
modestringrequired
Allowed:any-internalanyspecific
null
null
promptstringrequired
relatedTemplatesstring[]required
requiredIntegrationsstring[]required
scheduleobjectrequired

Defines when an automation should run.

Show properties
Any of:
object
exprstringrequired

Standard cron expression string.

min length 1
typeanyrequired
object
rrulestringrequired

iCalendar recurrence rule (RFC 5545) string.

min length 1
typeanyrequired
object
atstringrequired

ISO 8601 timestamp for one-time execution.

min length 1
typeanyrequired
object
nintegerrequired

Number of time units between executions.

typeanyrequired
unitstringrequired

Time unit for interval scheduling.

Allowed:hoursminutes
object
channelIdsstring<uuid>[]

Optional channel scope: message channel UUIDs this automation is limited to. Omit for all channels (global). Only valid when every selected event supports channel scoping (see EVENT_CHANNEL_SCOPING).

min items 1
delaySecondsinteger

Optional delay, in seconds, before running the automation after its trigger event fires (e.g. 1800 = 30 minutes after the event). Omit for immediate execution. Maximum 604800 (7 days).

min 1 · max 604800
eventstring

Legacy single-event trigger (e.g., github.pr.created). Still accepted on read/write for backwards compatibility; prefer events for new writes. When both are present, events is canonical.

min length 1
eventsstring[]

Trigger events for this automation (e.g., ["github.pr.created", "github.pr.dismissed"]). The automation fires once per matching event occurrence. Canonical form — prefer this over the legacy event field.

min items 1 · max items 20
productIdsstring<uuid>[]

Optional product scope: the products this automation is limited to. Omit for all products (global); an empty array is rejected so 'global' has one representation. Acts as a channel preset — at dispatch time the scoped products' currently linked message channels (product_channels) are resolved and the automation fires when the triggering event's channels intersect ANY of them. It additionally instructs the agent to scope the run's output to those products. May be combined with channelIds — both scopes must pass (AND semantics).

min items 1
targetBranchesstring[]

Optional case-sensitive allowlist of GitHub PR base_ref branches. Names match exactly; * matches zero or more characters, including slashes. Only valid for GitHub PR triggers. Omit for all target branches; channel and product scopes must also pass. Nonmatching events are skipped before launching a workflow or agent.

min items 1
typeanyrequired
slugstringrequired
matches ^[a-z0-9-]+$
subtitlestring | nullrequired
Show properties
Any of:
string
string
null
null
400

Invalid request (validation failed).

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

401

Missing or invalid API key.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

403

The API key does not have access to this resource.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

404

The requested resource was not found.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

429

Rate limit exceeded.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

500

Internal server error.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

Try it
Server
Authorization
Parameters
Request
curl -X GET 'https://api.modem.dev/v1/automation-templates/string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "description": "string",
  "modelLevel": "high",
  "name": "string",
  "outputChannels": [
    {
      "channel": "discord",
      "destinations": [
        "string"
      ],
      "mode": "any-internal"
    }
  ],
  "prompt": "string",
  "relatedTemplates": [
    "string"
  ],
  "requiredIntegrations": [
    "string"
  ],
  "schedule": {
    "expr": "string",
    "type": "cron"
  },
  "slug": "string",
  "subtitle": "string"
}

Was this page helpful?