Orgs / Teams / Workflows

Create organization team workflow for event-types

post/v2/organizations/{orgId}/teams/{teamId}/workflows

Request

  • The document declares no server URL.
  • Auth: none declared

Path parameters

teamIdnumber required
orgIdnumber required

Headers

Authorizationstring

For non-platform customers - value must be Bearer <token> where <token> is api key prefixed with cal_

x-cal-secret-keystring

For platform customers - OAuth client secret key

x-cal-client-idstring

For platform customers - OAuth client ID

Request body

namestring required

Name of the workflow

Example request

{
  "name": "Platform Test Workflow",
  "activation": {
    "activeOnEventTypeIds": [
      698191
    ]
  },
  "trigger": {
    "offset": {
      "value": 24
    },
    "type": "beforeEvent"
  },
  "steps": [
    {
      "action": "email_address",
      "stepNumber": 1,
      "recipient": "attendee",
      "template": "reminder",
      "message": {
        "subject": "Reminder: Your Meeting {EVENT_NAME} - {EVENT_DATE_ddd, MMM D, YYYY h:mma} with Cal.com",
        "html": "<p>This is a reminder from {ORGANIZER} of {EVENT_NAME} to {ATTENDEE} starting here  {LOCATION} {MEETING_URL} at {START_TIME_h:mma} {TIMEZONE}.</p>"
      }
    }
  ]
}

Response

status'success' | 'error' required

Indicates the status of the response

Example response

{
  "status": "success",
  "data": [
    {
      "id": 101,
      "name": "Platform Test Workflow",
      "userId": 2313,
      "teamId": 4214321,
      "type": "event-type",
      "activation": {
        "activeOnEventTypeIds": [
          698191,
          698192
        ]
      },
      "trigger": {
        "type": "beforeEvent",
        "offset": {
          "value": 24,
          "unit": "hour"
        }
      },
      "steps": [
        {
          "id": 67244,
          "stepNumber": 1,
          "recipient": "const",
          "phoneRequired": true,
          "template": "reminder",
          "sender": "Cal.com Notifications",
          "message": {
            "subject": "Reminder: Your Meeting {EVENT_NAME} - {EVENT_DATE_ddd, MMM D, YYYY h:mma} with Cal.com",
            "html": "<p>Reminder for {EVENT_NAME}.</p>",
            "text": "Reminder for {EVENT_NAME}."
          },
          "action": "email_host"
        }
      ]
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.