v3

latestSwagger 2.02026-08-067506752.0 MB
action

Create an action

post/v1/org/{orgId}/action

Path parameters

orgIdstring required

Org identifier (either id or slug)

Request body

Example request

{
  "action": {
    "cronSchedule": "5 4 * * *",
    "steps": [
      {
        "stepId": "588f7ee98f138b19220041a7",
        "formId": "588f7ee98f138b19220041a7",
        "templateId": "588f7ee98f138b19220041a7",
        "aiAgentUserId": "588f7ee98f138b19220041a7",
        "aiApprovedPolicyRules": [
          {
            "departmentIds": [
              "588f7ee98f138b19220041a7"
            ],
            "filter": "department:engineering and under:me",
            "targets": [
              {
                "personId": "588f7ee98f138b19220041a7"
              }
            ]
          }
        ]
      }
    ],
    "runUserId": "588f7ee98f138b19220041a7",
    "categoryId": "588f7ee98f138b19220041a7",
    "assessmentId": "588f7ee98f138b19220041a7",
    "formId": "588f7ee98f138b19220041a7"
  },
  "stepTaskConfigs": [
    {
      "id": "588f7ee98f138b19220041a7",
      "orgId": "588f7ee98f138b19220041a7",
      "assessmentId": "588f7ee98f138b19220041a7",
      "parentEntityId": "588f7ee98f138b19220041a7",
      "entityId": "588f7ee98f138b19220041a7",
      "createId": "588f7ee98f138b19220041a7",
      "createBehalfId": "588f7ee98f138b19220041a7",
      "createAttribution": {
        "principalUserId": "588f7ee98f138b19220041a7",
        "agentUserIds": [
          "588f7ee98f138b19220041a7"
        ],
        "eventId": "588f7ee98f138b19220041a7",
        "aiChatId": "588f7ee98f138b19220041a7"
      },
      "createAt": "2017-01-24T13:57:52Z",
      "updateId": "588f7ee98f138b19220041a7",
      "updateBehalfId": "588f7ee98f138b19220041a7",
      "updateAttribution": {
        "principalUserId": "588f7ee98f138b19220041a7",
        "agentUserIds": [
          "588f7ee98f138b19220041a7"
        ],
        "eventId": "588f7ee98f138b19220041a7",
        "aiChatId": "588f7ee98f138b19220041a7"
      },
      "updateAt": "2017-01-24T13:57:52Z",
      "deleteId": "588f7ee98f138b19220041a7",
      "deleteBehalfId": "588f7ee98f138b19220041a7",
      "deleteAttribution": {
        "principalUserId": "588f7ee98f138b19220041a7",
        "agentUserIds": [
          "588f7ee98f138b19220041a7"
        ],
        "eventId": "588f7ee98f138b19220041a7",
        "aiChatId": "588f7ee98f138b19220041a7"
      },
      "deleteAt": "2017-01-24T13:57:52Z"
    }
  ]
}

Response

successful operation

idstring required

globally unique id

orgIdstring required

parent organization id

eventstring

event pattern to match on, such as change.create.*

cronSchedulestring

cron schedule to run on, in crontab format

filterstring

only run when matching a particular filter

descriptionstring

description of the action

status'ACTIVE' | 'INACTIVE' required

status of the action

runUserIdstring required

the user to run the action as - normally the same as the user who created the action

sensitiveboolean required

whether to run with access to sensitive events or not

categoryIdstring

data category of the action, such as onboarding or offboarding

assessmentIdstring

assessment that this action is associated with

formIdstring

form that this action is associated with

createIdstring

created by user id

createBehalfIdstring

created on behalf of user id

createAtstring

created timestamp

updateIdstring

last updated by user id

updateBehalfIdstring

last updated on behalf of user id

updateAtstring

last updated timestamp

deleteIdstring

deleted by user id

deleteBehalfIdstring

deleted on behalf of user id

deleteAtstring

deleted timestamp

Example response

{
  "id": "588f7ee98f138b19220041a7",
  "orgId": "588f7ee98f138b19220041a7",
  "cronSchedule": "5 4 * * *",
  "steps": [
    {
      "stepId": "588f7ee98f138b19220041a7",
      "formId": "588f7ee98f138b19220041a7",
      "templateId": "588f7ee98f138b19220041a7",
      "aiAgentUserId": "588f7ee98f138b19220041a7",
      "aiApprovedPolicyRules": [
        {
          "departmentIds": [
            "588f7ee98f138b19220041a7"
          ],
          "filter": "department:engineering and under:me",
          "targets": [
            {
              "personId": "588f7ee98f138b19220041a7"
            }
          ]
        }
      ]
    }
  ],
  "runUserId": "588f7ee98f138b19220041a7",
  "categoryId": "588f7ee98f138b19220041a7",
  "assessmentId": "588f7ee98f138b19220041a7",
  "formId": "588f7ee98f138b19220041a7",
  "createId": "588f7ee98f138b19220041a7",
  "createBehalfId": "588f7ee98f138b19220041a7",
  "createAttribution": {
    "principalUserId": "588f7ee98f138b19220041a7",
    "agentUserIds": [
      "588f7ee98f138b19220041a7"
    ],
    "eventId": "588f7ee98f138b19220041a7",
    "aiChatId": "588f7ee98f138b19220041a7"
  },
  "createAt": "2017-01-24T13:57:52Z",
  "updateId": "588f7ee98f138b19220041a7",
  "updateBehalfId": "588f7ee98f138b19220041a7",
  "updateAttribution": {
    "principalUserId": "588f7ee98f138b19220041a7",
    "agentUserIds": [
      "588f7ee98f138b19220041a7"
    ],
    "eventId": "588f7ee98f138b19220041a7",
    "aiChatId": "588f7ee98f138b19220041a7"
  },
  "updateAt": "2017-01-24T13:57:52Z",
  "deleteId": "588f7ee98f138b19220041a7",
  "deleteBehalfId": "588f7ee98f138b19220041a7",
  "deleteAttribution": {
    "principalUserId": "588f7ee98f138b19220041a7",
    "agentUserIds": [
      "588f7ee98f138b19220041a7"
    ],
    "eventId": "588f7ee98f138b19220041a7",
    "aiChatId": "588f7ee98f138b19220041a7"
  },
  "deleteAt": "2017-01-24T13:57:52Z"
}