Kartra API: Inbound > Actions. This article is for developers.

The API system will search in your account for the lead subscribed under that specific email, and it will cancel the subscription from the calendar.

TypeParametersValues
POSTcmd*calendar_cancel
POSTcalendar_name*string
POSTclass_name*string

* Required fields

Example

'lead' => [
    'email' => 'example@email.com'
],
'actions' => [
    '0' => [
        'cmd' => 'calendar_cancel',
        'calendar_name' => 'First calendar',
        'class_name' => 'First class'
    ]
]

Success message

{
  "status": "Success",
  "message": "Lead unsubscribed from class",
  "type": "113"
}

Error cases

Type NumberMessageCause
255Calendar cannot be empty
  • The 'calendar_name' parameter is mandatory and needs to contain data
256Class cannot be empty
  • The 'class_name' parameter is mandatory and needs to contain data.
257Calendar does not exist
  • The calendar does not exist in the database or is not completed.
258Class does not exist
  • The class does not exist in the database or does not belong to the calendar.
259No active/pending calendar subscription for this lead
  • There is no lead subscribed to the class, so there is nothing to cancel.
Error message example:
{
  "status": "Error",
  "message": "Class does not exist",
  "type": "258"
}