Action Items

Action item in Monolist

Action items are the fundamental object in Monolist. They represent tasks that a user needs to accomplish.

Attributes

Name Description
gid The id of the action item.
content The name or title of the action item.
description The description of the action item. This field supports markdown.

Endpoints

Create POST /action_items/new

Create an action item. Action items will be created in the user's inbox, inside the Tasks bundle.

Arguments

Name Description
api_key The user's write API key.
action_item Nested field, see below.
action_item.content The name or title of the action item.
action_item.description The description of the action item. This field supports markdown.
action_item.subtasks[] Array, see below.
action_item.subtasks[].content Name or title of subtask
action_item.actions[] Array, see below. See Actions for more details.
action_item.actions[].name Name of custom action.
action_item.actions[].url Monolist will send a POST request to this url upon action click.
action_item.actions[].payload JSON payload that will be included in POST request.
action_item.actions[].headers The HTTP headers that will be sent in POST request.

Returns

The created Action Item object.

Example

Request
curl \
  -X POST \
  -H "Content-Type: application/json" \
  "https://api.monolist.co/v1/action_items/new" \
  -d \
  "
  {
    \"api_key\": \"YOUR_API_KEY\",
    \"action_item\": {
      \"content\": \"Hello World!\",
      \"description\": \"Task from api!\"
    },
    \"subtasks\": [
      { \"content\": \"Hello World!\" }
    ],
    \"actions\": [
      {
        \"name\": \"Custom Action\",
        \"url\": \"https://my-webhook-site.com\",
        \"payload\": { \"some\": \"data\" }
      }
    ],
  }"
Response
{
  "success": true,
  "data": {
    "gid": "01ec863e-f582-4e94-b67a-010ca6643ea7",
    "content": "Hello World!",
    "description": "Task from api!"
  }
}

Update PUT /action_items/:gid

Updates an action item.

Arguments

Name Description
api_key The user's write API key.
action_item Nested field, see below.
action_item.content The name or title of the action item.
action_item.description The description of the action item. This field supports markdown.

Returns

The updated Action Item object.

Example

Request
curl \
  -X PUT \
  -H "Content-Type: application/json" \
  "https://api.monolist.co/v1/action_items/ITEM-GID" \
  -d \
  "
  {
    \"api_key\": \"YOUR_API_KEY\",
    \"action_item\": {
      \"content\": \"Updated Content\",
      \"description\": \"Updated Description\"
    }
  }"
Response
{
  "success": true,
  "data": {
    "gid": "01ec863e-f582-4e94-b67a-010ca6643ea7",
    "content": "Updated Content",
    "description": "Updated Description"
  }
}