Get Started with Webhooks

You can add webhooks by going to the Integrations page and then scrolling down to the Webhook endpoints section.

You can add an endpoint URL by clicking the Add endpoint button located in the webhook endpoint section.

You can customize which events you want your webhook endpoint to receive. You can select to receive a notification whenever the following events occur:

  • When a brief is claimed
  • When a content item's workflow status changed
  • When a deadline is missed
  • When a deadline changed
  • When a user is assigned to an item
  • When an item is marked as completed

You can add as many endpoint URLs as you wish and all of them will receive notifications whenever any of the supported events occur.

An endpoint will receive notifications from all active projects under the account where it was added. The same endpoint can also be added to as many accounts as possible, so, if for some reason, you have multiple accounts in EasyContent, you can use a single endpoint to receive notifications from all of them.

The following section will give you more details about the events that trigger our webhook.

Events

When an event is triggered, the following data is sent to your endpoint. They all follow a similar structure and consist of three main fields:

  • type (string) - human-readable event identifier i.e. the type of event that occurred
    • Example: user_assigned_to_an_assignmentdeadline_changed
  • timeFired (integer) - Unix timestamp of when the event occurred
    • Example: 1601346649 (equivalent to 09/29/2020 @ 2:30am [UTC])
  • data (object) - the event's data
    • JSON object containing all necessary information about the event

Task Claimed

This event is fired immediately whenever a task is claimed by a user via the Tasks page.

This event will have a type of task_claimed.

Data

  • account (object) - the account that triggered the event
    • id (integer) - account's ID
    • name (string) - account's name (accountname.easycontent.io)
  • project (object) - the project that triggered the event
    • id (integer) - project's ID
    • name (string) - project's name
  • claimedBy (object) - the user who claimed the task
    • id (integer) - said user's ID
    • name (string) - said user's name
  • id (integer) - claimed task's ID
  • template (object) - claimed task's template information
    • id (integer) - said template's ID
    • name (string) - said template's name
  • categories (empty array or array of categories) - tasks' categories, can be empty, each category is a single object with its own properties (ID and name)
    • category (object) - a single category
      • id (integer) - category's ID
      • name (string) - category's name
  • title (string) - claimed task's title
  • keywords (empty array or array of strings) - claimed task's keywords, can be empty
  • notes (string) - claimed task's notes, can be empty

Workflow Status Changed

This event is fired immediately when an assignment's workflow status has changed.

This event will have a type of workflow_status_changed.

This will be triggered when:

  • An assignment's (or a number of them) workflow status is updated through the Assignments page via Actions Change status modal or through the edit article page via the workflow status (current status) widget.
  • An assignment is submitted to the next workflow status via the submit button or is sent back to a previous workflow stage for a revision.
  • An assignment's workflow status is updated in WordPress through the official plugin.

Data

  • account (object)
    • id (integer)
    • name (string)
  • project (object)
    • id (integer)
    • name (string)
  • changedBy (object)
    • id (integer)
    • name (string)
  • status (object) - New workflow status assigned
    • id (integer)
    • name (string)
  • assignments (array of assignments)
    • assignment (object)
      • id (integer)
      • taskName (string)
      • title (string)
      • categories (empty array or array of categories)
        • category (object)
          • id (integer)
          • name (string)
      • keywords (empty array or array of strings)
      • notes (string)
      • template (object)
        • id (integer)
        • name (string)
      • oldStatus (object)
        • id (integer)
        • name (string)
      • fields (array of fields)
        • field (object)
          • id (integer)
          • type (integer)
          • label (string)
          • value (string)

Assignment Completed

This event is fired immediately when an assignment is marked as Completed.

This event will have a type of assignment_completed.

Triggers when:

  • An assignment's (or a number of them) workflow status is marked as completed through the Assignments page via Actions Change status modal or through the edit article page via the workflow status (current status) widget.
  • An assignment is marked as completed via the Approve button on the edit assignment page.
  • An assignment is marked as completed in WordPress through the official plugin.

Data

  • account (object)
    • id (integer)
    • name (string)
  • project (object)
    • id (integer)
    • name (string)
  • assignments (array of assignments)
    • assignment (object)
      • id (integer)
      • taskName (string)
      • title (string)
      • categories (empty array || array of categories)
        • category (object)
          • id (integer)
          • name (string)
    • keywords (empty array || array of strings)
    • notes (string)
    • template (object)
      • id (integer)
      • name (string)
    • fields (array of fields )
      • field (object)
        • id (integer)
        • type (integer)
        • label (string)
        • value (string)

Deadline Missed

Fires once a day. Sends a list of projects that contains an overdue assignment(s) and a list of said assignments.

The script returns data about overdue assignments "yesterday". For example, when the script runs on August 22nd, it will check if there are assignments due on August 21st. If there are, this will fire and return a list of projects containing overdue assignments and what assignments are overdue.

Data

  • dueDate (string) - Date in Ymd format
  • account (object)
    • id (integer)
    • name (string)
    • projects (array of projects)
      • project (object)
        • id (integer)
        • name (string)
        • assignments (array of assignments)
          • assignment (object)
            • id (integer)
            • taskName (string)
            • title (string)
            • categories (empty array || array of categories)
              • category (object)
                • id (integer)
                • name (string)
            • keywords (empty array || array of strings)
            • notes (string)
            • template ( object)
              • id (integer)
              • name (string)
            • status (object) - Current workflow status
              • id (integer)
              • name (string)
            • overdueStatuses (array of statuses)
              • status (object)
                • id (integer)
                • name (string)

Deadline Changed

Fires whenever an assignment's deadline is changed through the Assigned people and due dates interface. This can be accessed via the assignments page, in the workflow status widget, or through the content calendar.

This event will have a type of deadline_changed.

Data

  • account (object)
    • id (integer)
    • name (string)
  • project (object)
    • id (integer)
    • name (string)
  • assignments (array of assignments)
    • assignment (object)
      • id (integer)
      • taskName (string)
      • title (string)
      • categories (empty array || array of categories)
        • category (object)
          • id (integer)
          • name (string)
      • keywords (empty array || array of strings)
      • notes (string)
      • template (object)
        • id (integer)
        • name (string)
      • status (object) - Current workflow stage
        • id (integer)
        • name (string)
      • dates (array of dates)
        • date (object)
          • oldDate (string) - Can be empty string
          • newDate (string) - Can be empty string
          • status (object) - Workflow stage
            • id (integer)
            • name (string)

User Assigned To An Assignment

Fires whenever a user is assigned to an assignment through the Assigned people and due dates interface. This can be accessed via the assignments page, in the workflow status widget, or through the content calendar.

This event will have a type of user_assigned_to_an_assignment.

Data

  • account (object)
    • id (integer)
    • name (string)
  • project (object)
    • id (integer)
    • name (string)
  • assignments (array of assignments)
    • assignment (object)
      • id (integer)
      • taskName (string)
      • title (string)
      • categories (empty array || array of categories)
        • category (object)
          • id (integer)
          • name (string)
      • keywords (empty array || array of strings)
      • notes (string)
      • template (object)
        • id (integer)
        • name (string)
      • status (object) - Current workflow stage
        • id (integer)
        • name (string)
      • users (array of users)
        • user (object)
          • id (integer)
          • name (string)
          • status (object) - Workflow stage
            • id (integer)
            • name (string)

Deleting an Endpoint

If you no longer use an endpoint or if you want to change what type of events it receives, simply click on it and you will be taken to its configuration page.

You can also disable an endpoint by deactivating the checkbox next to Enabled. Doing this stops EasyContent from sending events to the endpoint URL.

A disabled webhook will be marked as disabled.

To reenable it, simply activate the checkbox again.