---
title: "Create an action"
method: POST
path: "/v1/org/{orgId}/action"
tags: ["action"]
---

# Create an action

`POST /v1/org/{orgId}/action`

## Path parameters

- `orgId` string, required

## Request body

- CreateActionBody
  - `action` CreateAction, required
    - `event` string — event pattern to match on, such as change.create.*
    - `cronSchedule` string — cron schedule to run on, in crontab format
    - `filter` string — only run when matching a particular filter
    - `steps` ActionStep[], required — list of steps to run when matching the event, schedule, and filter
      - `stepId` string — unique id for action step
      - `type` 'FORM' | 'MESSAGE' | 'HTTP' | 'TASK' | 'SIGNATURE' | 'AI', required — The type of action to run
      - `formId` string — If the action is FORM, the id of the form to fill out
      - `target` string — If the action is MESSAGE, the target to send the message to. If the action is FORM/TASK, the person who should have the form filled out on/complete the task
      - `assignee` string — If the action is FORM/TASK, the user who should fill out the form/complete the task (default is, same as target)
      - `notifyTarget` string — If the action is SIGNATURE, an additional target expression resolving to users who should receive notifications about signature events
      - `templateId` string — If the action is SIGNATURE, the id of the template to generate a document for signature
      - `aiAgentUserId` string — If the action is AI, the agent id to use, otherwise defaults to org default
      - `aiEnableMemory` boolean — If the action is AI, whether or not a per-action memory storage is supported
      - `aiApprovedPolicyRules` PolicyRule[] — If the action is AI, the policy rules that the AI agent should follow. If not provided, will use the default policy rules for the AI agent.
        - `allow` string[] — allow rules
        - `deny` string[] — deny rules
        - `categories` string[] — categories the rule is limited to
        - `fields` string[] — fields the rule is limited to
        - `departmentIds` string[] — departments the rule is limited to
        - `filter` string — custom filter the rule is limited to
        - `directions` string[] — directions that the rule applies to -- either self or under
        - `types` string[] — types that the rule applies to
        - `targets` PolicyRuleTarget[] — targets allowed for messaging (email addresses, chat channels, user ids)
          - `userId` string
          - `personId` string
          - `channel` string
          - `email` string
        - `visibleSensitive` string[] — if specified, controls visibility of sensitive entities -- for example, ['Manager Shared', 'Manager Only']
        - `fieldsSensitive` string[] — if specified, controls applicability of fields by sensitivity -- for example, ['Manager Shared', 'Manager Only']
      - `modelTier` 'HIGH' | 'MEDIUM' | 'LOW' — If the action is AI, the requested model tier; defaults to LOW when not set
      - `message` string — The message that will be sent -- supports CQLT templates
      - `messageChannel` MessageChannelConfig
        - `channels` string[], required
        - `alwaysEmail` boolean, required
      - `emailSubject` string — The email subject line that will be used -- supports CQLT templates. If not provided, will use 'Notification'
      - `taskLabel` string — If the action is FORM, the task label that will be displayed to the user -- supports CQLT templates
      - `sensitive` boolean — whether to run with access to sensitive events or not - if this is left blank, will default to the sensitive setting of the Action
      - `httpUrl` string, uri — If the action is HTTP, the url that will receive the HTTP request
      - `httpMethod` string — If the action is HTTP, the method used by the HTTP request (defaults to POST)
      - `httpHeaders` object — If the action is HTTP, the headers to add to the HTTP request
      - `httpContent` object — If the action is HTTP, the payload contained in the HTTP request
    - `description` string — description of the action
    - `status` 'ACTIVE' | 'INACTIVE' — status of the action
    - `runUserId` string — the user to run the action as - normally the same as the user who created the action
    - `sensitive` boolean, required — whether to run with access to sensitive events or not
    - `categoryId` string — data category of the action, such as onboarding or offboarding
    - `assessmentId` string — assessment that this action is associated with
    - `formId` string — form that this action is associated with
  - `stepTaskConfigs` PartialTaskConfig[]
    - `id` string — unique id of task config
    - `orgId` string — parent organization id
    - `assessmentId` string — parent assessment id that this task config belongs to
    - `parentEntityId` string — parent entity id that this task config belongs to, should be used with entityId
    - `entityId` string — the primary entity being referenced by the task config
    - `slug` string — System generated identifying name so that actions can be triggered as a result of task completion
    - `type` 'FORM_SUBMIT' | 'FORM_RESPONSE_APPROVE' | 'FORM_RESPONSE_RESUBMIT' | 'CHANGE_APPROVE' | 'TIMEOFF_APPROVE' | 'SCENARIO_CHANGES_APPROVE' | 'SCENARIO_CHANGES_CREATE' | 'ORG_IMPORT' | 'COMP_REVIEW_APPROVAL_SUBMIT' | 'SCENARIO_APPROVAL_SUBMIT' | 'APPROVAL_CHAIN_UPDATE_FALLBACK_APPROVER' | 'ACTION' | 'SIGNATURE' | 'GOAL_PROGRESS' | 'TODO' — type of task generated by the task config
    - `dueDate` DueDate
      - `type` 'EXACT' | 'RELATIVE', required
      - `dueDay` string, required — due day, in either relative (-7d) or exact (YYYY-MM-DD) format
      - `dueTime` string, required — due time, which is a LocalTime
    - `pastDueAction` 'NONE' | 'SET_EXPIRED' — sets pastDueAction on the task when it's generated
    - `isSkippable` boolean — sets isSkippable on the task
    - `label` string — human-readable label that should be used for all tasks associated with the config as the task name
    - `description` string — description for all tasks associated with the config that should be used in notifications
    - `createId` string — created by user id
    - `createBehalfId` string — created on behalf of user id
    - `createAttribution` Attribution
      - `principalUserId` string
      - `agentUserIds` string[]
      - `eventId` string
      - `aiChatId` string
      - `aiToolUseId` string
      - `channel` 'WEB' | 'MOBILE' | 'SLACK' | 'TEAMS' | 'MCP'
    - `createAt` string — created timestamp
    - `updateId` string — last updated by user id
    - `updateBehalfId` string — last updated on behalf of user id
    - `updateAttribution` Attribution
      - `principalUserId` string
      - `agentUserIds` string[]
      - `eventId` string
      - `aiChatId` string
      - `aiToolUseId` string
      - `channel` 'WEB' | 'MOBILE' | 'SLACK' | 'TEAMS' | 'MCP'
    - `updateAt` string — last updated timestamp
    - `deleteId` string — deleted by user id
    - `deleteBehalfId` string — deleted on behalf of user id
    - `deleteAttribution` Attribution
      - `principalUserId` string
      - `agentUserIds` string[]
      - `eventId` string
      - `aiChatId` string
      - `aiToolUseId` string
      - `channel` 'WEB' | 'MOBILE' | 'SLACK' | 'TEAMS' | 'MCP'
    - `deleteAt` string — deleted timestamp

## Response `201`

successful operation

- Action
  - `id` string, required — globally unique id
  - `orgId` string, required — parent organization id
  - `event` string — event pattern to match on, such as change.create.*
  - `cronSchedule` string — cron schedule to run on, in crontab format
  - `filter` string — only run when matching a particular filter
  - `steps` ActionStep[], required — list of steps to run when matching the event, schedule, and filter
    - `stepId` string — unique id for action step
    - `type` 'FORM' | 'MESSAGE' | 'HTTP' | 'TASK' | 'SIGNATURE' | 'AI', required — The type of action to run
    - `formId` string — If the action is FORM, the id of the form to fill out
    - `target` string — If the action is MESSAGE, the target to send the message to. If the action is FORM/TASK, the person who should have the form filled out on/complete the task
    - `assignee` string — If the action is FORM/TASK, the user who should fill out the form/complete the task (default is, same as target)
    - `notifyTarget` string — If the action is SIGNATURE, an additional target expression resolving to users who should receive notifications about signature events
    - `templateId` string — If the action is SIGNATURE, the id of the template to generate a document for signature
    - `aiAgentUserId` string — If the action is AI, the agent id to use, otherwise defaults to org default
    - `aiEnableMemory` boolean — If the action is AI, whether or not a per-action memory storage is supported
    - `aiApprovedPolicyRules` PolicyRule[] — If the action is AI, the policy rules that the AI agent should follow. If not provided, will use the default policy rules for the AI agent.
      - `allow` string[] — allow rules
      - `deny` string[] — deny rules
      - `categories` string[] — categories the rule is limited to
      - `fields` string[] — fields the rule is limited to
      - `departmentIds` string[] — departments the rule is limited to
      - `filter` string — custom filter the rule is limited to
      - `directions` string[] — directions that the rule applies to -- either self or under
      - `types` string[] — types that the rule applies to
      - `targets` PolicyRuleTarget[] — targets allowed for messaging (email addresses, chat channels, user ids)
        - `userId` string
        - `personId` string
        - `channel` string
        - `email` string
      - `visibleSensitive` string[] — if specified, controls visibility of sensitive entities -- for example, ['Manager Shared', 'Manager Only']
      - `fieldsSensitive` string[] — if specified, controls applicability of fields by sensitivity -- for example, ['Manager Shared', 'Manager Only']
    - `modelTier` 'HIGH' | 'MEDIUM' | 'LOW' — If the action is AI, the requested model tier; defaults to LOW when not set
    - `message` string — The message that will be sent -- supports CQLT templates
    - `messageChannel` MessageChannelConfig
      - `channels` string[], required
      - `alwaysEmail` boolean, required
    - `emailSubject` string — The email subject line that will be used -- supports CQLT templates. If not provided, will use 'Notification'
    - `taskLabel` string — If the action is FORM, the task label that will be displayed to the user -- supports CQLT templates
    - `sensitive` boolean — whether to run with access to sensitive events or not - if this is left blank, will default to the sensitive setting of the Action
    - `httpUrl` string, uri — If the action is HTTP, the url that will receive the HTTP request
    - `httpMethod` string — If the action is HTTP, the method used by the HTTP request (defaults to POST)
    - `httpHeaders` object — If the action is HTTP, the headers to add to the HTTP request
    - `httpContent` object — If the action is HTTP, the payload contained in the HTTP request
  - `description` string — description of the action
  - `status` 'ACTIVE' | 'INACTIVE', required — status of the action
  - `runUserId` string, required — the user to run the action as - normally the same as the user who created the action
  - `sensitive` boolean, required — whether to run with access to sensitive events or not
  - `categoryId` string — data category of the action, such as onboarding or offboarding
  - `assessmentId` string — assessment that this action is associated with
  - `formId` string — form that this action is associated with
  - `createId` string — created by user id
  - `createBehalfId` string — created on behalf of user id
  - `createAttribution` Attribution
    - `principalUserId` string
    - `agentUserIds` string[]
    - `eventId` string
    - `aiChatId` string
    - `aiToolUseId` string
    - `channel` 'WEB' | 'MOBILE' | 'SLACK' | 'TEAMS' | 'MCP'
  - `createAt` string — created timestamp
  - `updateId` string — last updated by user id
  - `updateBehalfId` string — last updated on behalf of user id
  - `updateAttribution` Attribution
    - `principalUserId` string
    - `agentUserIds` string[]
    - `eventId` string
    - `aiChatId` string
    - `aiToolUseId` string
    - `channel` 'WEB' | 'MOBILE' | 'SLACK' | 'TEAMS' | 'MCP'
  - `updateAt` string — last updated timestamp
  - `deleteId` string — deleted by user id
  - `deleteBehalfId` string — deleted on behalf of user id
  - `deleteAttribution` Attribution
    - `principalUserId` string
    - `agentUserIds` string[]
    - `eventId` string
    - `aiChatId` string
    - `aiToolUseId` string
    - `channel` 'WEB' | 'MOBILE' | 'SLACK' | 'TEAMS' | 'MCP'
  - `deleteAt` string — deleted timestamp

## Other responses

- `400` — invalid data
- `401` — not authorized
- `403` — permission denied
- `404` — org not found

---

[API](https://skmtc.net/charthop/apis/charthop-api.md) · [All operations](https://skmtc.net/charthop/apis/charthop-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/charthop/charthop-api/versions/50a1edd6b27e/schema)
