Skip to main content
GET
/
activities
JavaScript
import Moonbase from '@moonbaseai/sdk';

const client = new Moonbase({
  apiKey: process.env['MOONBASE_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const activity of client.activities.list()) {
  console.log(activity.id);
}
{
  "type": "list",
  "data": [
    {
      "id": "1CLJt2w7b16xDBkd7VizmE",
      "type": "activity/program_message_unsubscribed",
      "occurred_at": "2025-02-13T16:00:00.000Z",
      "constituents": [
        {
          "type": "constituent",
          "relation": "actor",
          "entity": {
            "id": "1CLJt2vDGEqKSFbLXN2t7X",
            "type": "item",
            "collection": {
              "id": "1CLJt2ubZ7zAZFBxUxeBHo",
              "type": "collection",
              "ref": "people"
            }
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vwAvgx39Ddw8QHre",
            "type": "program_template"
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vwRJtZwrhzdRUsyR",
            "type": "program"
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vxQqh3aifRQboESX",
            "type": "program_message"
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2w7LcuLJUGGRCeQeT",
            "type": "unsubscribe"
          }
        }
      ]
    },
    {
      "id": "1CLJt2w66huEktpUwjFU4a",
      "type": "activity/program_message_shielded",
      "occurred_at": "2025-02-12T16:00:00.000Z",
      "constituents": [
        {
          "type": "constituent",
          "relation": "actor",
          "entity": {
            "id": "1CLJt2vDGEqKSFbLXN2t7X",
            "type": "item",
            "collection": {
              "id": "1CLJt2ubZ7zAZFBxUxeBHo",
              "type": "collection",
              "ref": "people"
            }
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vwAvgx39Ddw8QHre",
            "type": "program_template"
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vwRJtZwrhzdRUsyR",
            "type": "program"
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vxQqh3aifRQboESX",
            "type": "program_message"
          }
        }
      ]
    },
    {
      "id": "1CLJt2w4rnu9DKNhUFrXUh",
      "type": "activity/program_message_failed",
      "occurred_at": "2025-02-11T16:00:00.000Z",
      "constituents": [
        {
          "type": "constituent",
          "relation": "actor",
          "entity": {
            "id": "1CLJt2vDGEqKSFbLXN2t7X",
            "type": "item",
            "collection": {
              "id": "1CLJt2ubZ7zAZFBxUxeBHo",
              "type": "collection",
              "ref": "people"
            }
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vwAvgx39Ddw8QHre",
            "type": "program_template"
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vwRJtZwrhzdRUsyR",
            "type": "program"
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vxQqh3aifRQboESX",
            "type": "program_message"
          }
        }
      ]
    },
    {
      "id": "1CLJt2w3csu3fjvuznTatp",
      "type": "activity/program_message_complained",
      "occurred_at": "2025-02-10T16:00:00.000Z",
      "constituents": [
        {
          "type": "constituent",
          "relation": "actor",
          "entity": {
            "id": "1CLJt2vDGEqKSFbLXN2t7X",
            "type": "item",
            "collection": {
              "id": "1CLJt2ubZ7zAZFBxUxeBHo",
              "type": "collection",
              "ref": "people"
            }
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vwAvgx39Ddw8QHre",
            "type": "program_template"
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vwRJtZwrhzdRUsyR",
            "type": "program"
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vxQqh3aifRQboESX",
            "type": "program_message"
          }
        }
      ]
    },
    {
      "id": "1CLJt2w2Nxtx8AV8XK4eJw",
      "type": "activity/program_message_bounced",
      "occurred_at": "2025-02-09T16:00:00.000Z",
      "constituents": [
        {
          "type": "constituent",
          "relation": "actor",
          "entity": {
            "id": "1CLJt2vDGEqKSFbLXN2t7X",
            "type": "item",
            "collection": {
              "id": "1CLJt2ubZ7zAZFBxUxeBHo",
              "type": "collection",
              "ref": "people"
            }
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vwAvgx39Ddw8QHre",
            "type": "program_template"
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vwRJtZwrhzdRUsyR",
            "type": "program"
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vxQqh3aifRQboESX",
            "type": "program_message"
          }
        }
      ]
    },
    {
      "id": "1CLJt2w193trab3M3qfhj4",
      "type": "activity/program_message_clicked",
      "occurred_at": "2025-02-08T16:00:00.000Z",
      "constituents": [
        {
          "type": "constituent",
          "relation": "actor",
          "entity": {
            "id": "1CLJt2vDGEqKSFbLXN2t7X",
            "type": "item",
            "collection": {
              "id": "1CLJt2ubZ7zAZFBxUxeBHo",
              "type": "collection",
              "ref": "people"
            }
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vwAvgx39Ddw8QHre",
            "type": "program_template"
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vwRJtZwrhzdRUsyR",
            "type": "program"
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vxQqh3aifRQboESX",
            "type": "program_message"
          }
        }
      ]
    },
    {
      "id": "1CLJt2vyu8tm31bZaNGm9B",
      "type": "activity/program_message_opened",
      "occurred_at": "2025-02-07T16:00:00.000Z",
      "constituents": [
        {
          "type": "constituent",
          "relation": "actor",
          "entity": {
            "id": "1CLJt2vDGEqKSFbLXN2t7X",
            "type": "item",
            "collection": {
              "id": "1CLJt2ubZ7zAZFBxUxeBHo",
              "type": "collection",
              "ref": "people"
            }
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vwAvgx39Ddw8QHre",
            "type": "program_template"
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vwRJtZwrhzdRUsyR",
            "type": "program"
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vxQqh3aifRQboESX",
            "type": "program_message"
          }
        }
      ]
    },
    {
      "id": "1CLJt2vxfDtfVS9n6tspZJ",
      "type": "activity/program_message_sent",
      "occurred_at": "2025-02-06T16:00:00.000Z",
      "constituents": [
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vwAvgx39Ddw8QHre",
            "type": "program_template"
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vwRJtZwrhzdRUsyR",
            "type": "program"
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vxQqh3aifRQboESX",
            "type": "program_message"
          }
        },
        {
          "type": "constituent",
          "relation": "target",
          "entity": {
            "id": "1CLJt2vDGEqKSFbLXN2t7X",
            "type": "item",
            "collection": {
              "id": "1CLJt2ubZ7zAZFBxUxeBHo",
              "type": "collection",
              "ref": "people"
            }
          }
        }
      ]
    },
    {
      "id": "1CLJt2vtCLHX8ZMMbbTETL",
      "type": "activity/call_occurred",
      "occurred_at": "2025-02-04T15:00:00.000Z",
      "constituents": [
        {
          "type": "constituent",
          "relation": "actor",
          "entity": {
            "id": "1CLJt2vojSgNmgYw6J2eMN",
            "type": "item",
            "collection": {
              "id": "1CLJt2ubZ7zAZFBxUxeBHo",
              "type": "collection",
              "ref": "people"
            }
          }
        },
        {
          "type": "constituent",
          "relation": "actor",
          "entity": {
            "id": "1CLJt2vqxtUwx7x9LwjwQM",
            "type": "item",
            "collection": {
              "id": "1CLJt2ubZ7zAZFBxUxeBHo",
              "type": "collection",
              "ref": "people"
            }
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vnjusu8pbWK7iHtG",
            "type": "call"
          }
        }
      ]
    },
    {
      "id": "1CLJt2vsCoV3VhPvpR8szE",
      "type": "activity/item_created",
      "occurred_at": "2025-02-04T15:59:55.000Z",
      "constituents": [
        {
          "type": "constituent",
          "relation": "actor",
          "entity": {
            "id": "1CLJt2v271pTY4bHG7UQrc",
            "type": "item",
            "collection": {
              "id": "1CLJt2ubZ7zAZFBxUxeBHo",
              "type": "collection",
              "ref": "people"
            }
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vqxtUwx7x9LwjwQM",
            "type": "item",
            "collection": {
              "id": "1CLJt2ubZ7zAZFBxUxeBHo",
              "type": "collection",
              "ref": "people"
            }
          }
        },
        {
          "type": "constituent",
          "relation": "target",
          "entity": {
            "id": "1CLJt2ubZ7zAZFBxUxeBHo",
            "type": "collection",
            "ref": "people"
          }
        }
      ]
    },
    {
      "id": "1CLJt2vpyMgUKFziZmRawF",
      "type": "activity/item_created",
      "occurred_at": "2025-02-04T15:59:55.000Z",
      "constituents": [
        {
          "type": "constituent",
          "relation": "actor",
          "entity": {
            "id": "1CLJt2v271pTY4bHG7UQrc",
            "type": "item",
            "collection": {
              "id": "1CLJt2ubZ7zAZFBxUxeBHo",
              "type": "collection",
              "ref": "people"
            }
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vojSgNmgYw6J2eMN",
            "type": "item",
            "collection": {
              "id": "1CLJt2ubZ7zAZFBxUxeBHo",
              "type": "collection",
              "ref": "people"
            }
          }
        },
        {
          "type": "constituent",
          "relation": "target",
          "entity": {
            "id": "1CLJt2ubZ7zAZFBxUxeBHo",
            "type": "collection",
            "ref": "people"
          }
        }
      ]
    },
    {
      "id": "1CLJt2vmkP5RVxe5XwPwRA",
      "type": "activity/note_created",
      "occurred_at": "2025-02-03T16:00:00.000Z",
      "constituents": [
        {
          "type": "constituent",
          "relation": "actor",
          "entity": {
            "id": "1CLJt2v271pTY4bHG7UQrc",
            "type": "item",
            "collection": {
              "id": "1CLJt2ubZ7zAZFBxUxeBHo",
              "type": "collection",
              "ref": "people"
            }
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vmVzsobF9iqeKMJP",
            "type": "note"
          }
        },
        {
          "type": "constituent",
          "relation": "target",
          "entity": {
            "id": "1CLJt2vDGEqKSFbLXN2t7X",
            "type": "item",
            "collection": {
              "id": "1CLJt2ubZ7zAZFBxUxeBHo",
              "type": "collection",
              "ref": "people"
            }
          }
        }
      ]
    },
    {
      "id": "1CLJt2vj2AscW6G9thXU8d",
      "type": "activity/inbox_message_sent",
      "occurred_at": "2025-02-02T16:00:00.000Z",
      "constituents": [
        {
          "type": "constituent",
          "relation": "actor",
          "entity": {
            "id": "1CLJt2v7opRhSWqVEtHwYT",
            "type": "item",
            "collection": {
              "id": "1CLJt2ubZ7zAZFBxUxeBHo",
              "type": "collection",
              "ref": "people"
            }
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vhXsfu3oL1iw3wRy",
            "type": "email_message"
          }
        },
        {
          "type": "constituent",
          "relation": "target",
          "entity": {
            "id": "1CLJt2vDGEqKSFbLXN2t7X",
            "type": "item",
            "collection": {
              "id": "1CLJt2ubZ7zAZFBxUxeBHo",
              "type": "collection",
              "ref": "people"
            }
          }
        }
      ]
    },
    {
      "id": "1CLJt2vdp8fcR4zfJWs7gL",
      "type": "activity/inbox_message_sent",
      "occurred_at": "2025-02-01T16:00:00.000Z",
      "constituents": [
        {
          "type": "constituent",
          "relation": "actor",
          "entity": {
            "id": "1CLJt2vDGEqKSFbLXN2t7X",
            "type": "item",
            "collection": {
              "id": "1CLJt2ubZ7zAZFBxUxeBHo",
              "type": "collection",
              "ref": "people"
            }
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vcKqTtxn4X8kPayg",
            "type": "email_message"
          }
        }
      ]
    },
    {
      "id": "1CLJt2vZMF4U4CCEoDSXaN",
      "type": "activity/meeting_held",
      "occurred_at": "2025-02-01T16:00:00.000Z",
      "constituents": [
        {
          "type": "constituent",
          "relation": "actor",
          "entity": {
            "id": "1CLJt2vDGEqKSFbLXN2t7X",
            "type": "item",
            "collection": {
              "id": "1CLJt2ubZ7zAZFBxUxeBHo",
              "type": "collection",
              "ref": "people"
            }
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vSeuekWszc3GJeRR",
            "type": "meeting"
          }
        }
      ]
    },
    {
      "id": "1CLJt2vY7L4NWckTKk3azV",
      "type": "activity/meeting_scheduled",
      "occurred_at": "2025-01-31T16:00:00.000Z",
      "constituents": [
        {
          "type": "constituent",
          "relation": "actor",
          "entity": {
            "id": "1CLJt2vUdyFhnbuTbcwMMd",
            "type": "item",
            "collection": {
              "id": "1CLJt2ubZ7zAZFBxUxeBHo",
              "type": "collection",
              "ref": "people"
            }
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vSeuekWszc3GJeRR",
            "type": "meeting"
          }
        },
        {
          "type": "constituent",
          "relation": "target",
          "entity": {
            "id": "1CLJt2vDGEqKSFbLXN2t7X",
            "type": "item",
            "collection": {
              "id": "1CLJt2ubZ7zAZFBxUxeBHo",
              "type": "collection",
              "ref": "people"
            }
          }
        },
        {
          "type": "constituent",
          "relation": "target",
          "entity": {
            "id": "1CLJt2vTeSTE9jx2pScztX",
            "type": "item",
            "collection": {
              "id": "1CLJt2uco2zG6pdjxS37sg",
              "type": "collection",
              "ref": "organizations"
            }
          }
        }
      ]
    },
    {
      "id": "1CLJt2vX7oFtsko2YZjEXP",
      "type": "activity/item_created",
      "occurred_at": "2025-01-31T15:59:55.000Z",
      "constituents": [
        {
          "type": "constituent",
          "relation": "actor",
          "entity": {
            "id": "1CLJt2v271pTY4bHG7UQrc",
            "type": "item",
            "collection": {
              "id": "1CLJt2ubZ7zAZFBxUxeBHo",
              "type": "collection",
              "ref": "people"
            }
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vUdyFhnbuTbcwMMd",
            "type": "item",
            "collection": {
              "id": "1CLJt2ubZ7zAZFBxUxeBHo",
              "type": "collection",
              "ref": "people"
            }
          }
        },
        {
          "type": "constituent",
          "relation": "target",
          "entity": {
            "id": "1CLJt2ubZ7zAZFBxUxeBHo",
            "type": "collection",
            "ref": "people"
          }
        }
      ]
    },
    {
      "id": "1CLJt2vW8GTREtqbmPQt4H",
      "type": "activity/item_created",
      "occurred_at": "2025-01-31T15:59:55.000Z",
      "constituents": [
        {
          "type": "constituent",
          "relation": "actor",
          "entity": {
            "id": "1CLJt2v271pTY4bHG7UQrc",
            "type": "item",
            "collection": {
              "id": "1CLJt2ubZ7zAZFBxUxeBHo",
              "type": "collection",
              "ref": "people"
            }
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vTeSTE9jx2pScztX",
            "type": "item",
            "collection": {
              "id": "1CLJt2uco2zG6pdjxS37sg",
              "type": "collection",
              "ref": "organizations"
            }
          }
        },
        {
          "type": "constituent",
          "relation": "target",
          "entity": {
            "id": "1CLJt2uco2zG6pdjxS37sg",
            "type": "collection",
            "ref": "organizations"
          }
        }
      ]
    },
    {
      "id": "1CLJt2vQfr3oFA5kUufwVD",
      "type": "activity/form_submitted",
      "occurred_at": "2025-01-30T16:00:00.000Z",
      "constituents": [
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vMSsSkRrj7T5eHy8",
            "type": "item",
            "collection": {
              "id": "1CLJt2vMhFeNLaDU9Nit5u",
              "type": "collection",
              "ref": "test_collection_166"
            }
          }
        },
        {
          "type": "constituent",
          "relation": "target",
          "entity": {
            "id": "1CLJt2vMhFeNLaDU9Nit5u",
            "type": "collection",
            "ref": "test_collection_166"
          }
        }
      ]
    },
    {
      "id": "1CLJt2vPgKFKcJ8KhjMb27",
      "type": "activity/item_created",
      "occurred_at": "2025-01-30T15:59:55.000Z",
      "constituents": [
        {
          "type": "constituent",
          "relation": "actor",
          "entity": {
            "id": "1CLJt2v271pTY4bHG7UQrc",
            "type": "item",
            "collection": {
              "id": "1CLJt2ubZ7zAZFBxUxeBHo",
              "type": "collection",
              "ref": "people"
            }
          }
        },
        {
          "type": "constituent",
          "relation": "object",
          "entity": {
            "id": "1CLJt2vMSsSkRrj7T5eHy8",
            "type": "item",
            "collection": {
              "id": "1CLJt2vMhFeNLaDU9Nit5u",
              "type": "collection",
              "ref": "test_collection_166"
            }
          }
        },
        {
          "type": "constituent",
          "relation": "target",
          "entity": {
            "id": "1CLJt2vMhFeNLaDU9Nit5u",
            "type": "collection",
            "ref": "test_collection_166"
          }
        }
      ]
    }
  ],
  "meta": {
    "cursors": {
      "next": "eyJpZCI6IjFDTEp0MnZQZ0tGS2NKOEtoak1iMjciLCJkaXJlY3Rpb24iOiJmb3J3YXJkIn0"
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.moonbase.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Your Moonbase API key.

Query Parameters

before
string

When specified, returns results starting immediately before the item identified by this cursor. Use the cursor value from the response's metadata to fetch the previous page of results.

after
string

When specified, returns results starting immediately after the item identified by this cursor. Use the cursor value from the previous response's metadata to fetch the next page of results.

limit
integer
default:20

Maximum number of items to return per page. Must be between 1 and 100. Defaults to 20 if not specified.

Required range: 1 <= x <= 100
type
object

Filter activities by type.

occurred_at
object

Filter activities by when they occurred.

constituent_entity_type
object

Filter activities by which entities were involved. Must be paired with constituent_entity_id.

constituent_entity_id
object

Filter activities by which entities were involved. Must be paired with constituent_entity_type.

constituent_relation
object

Filter activities by which entities were involved via specific relations. Must be paired with constituent_entity_type and constituent_entity_id.

Response

Successful response.

A set of results using cursor-based pagination.

type
string
required
Allowed value: "list"
data
Activity · object[]
required

An array of Activity items.

meta
object
required

Metadata about the pagination, including the cursors pointing to the previous and next pages.