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

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

const activity = await client.activities.retrieve('id');

console.log(activity.id);
{
  "id": "1CLJt2vAY2dWSPDQt8AQpz",
  "type": "activity/inbox_message_sent",
  "occurred_at": "2025-02-10T16:00:00.000Z",
  "constituents": [
    {
      "type": "constituent",
      "relation": "actor",
      "entity": {
        "id": "1CLJt2v5aNd8G5SGzEaeVU",
        "type": "item",
        "collection": {
          "id": "1CLJt2ubZ7zAZFBxUxeBHo",
          "type": "collection",
          "ref": "people"
        }
      }
    },
    {
      "type": "constituent",
      "relation": "object",
      "entity": {
        "id": "1CLJt2v93jRnz6HGiMgt8L",
        "type": "email_message"
      }
    }
  ]
}

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.

Path Parameters

id
string
required

The ID of the Activity to retrieve.

Response

Successful response.

The Activity object represents a specific event that has occurred, such as a meeting being scheduled or a form being submitted.

id
string
required

Unique identifier for the object.

type
enum<string>
required

The type of activity.

Available options:
activity/call_occurred,
activity/file_created,
activity/form_submitted,
activity/inbox_message_sent,
activity/item_created,
activity/item_mentioned,
activity/item_merged,
activity/meeting_held,
activity/meeting_scheduled,
activity/note_created,
activity/program_message_bounced,
activity/program_message_clicked,
activity/program_message_complained,
activity/program_message_failed,
activity/program_message_opened,
activity/program_message_sent,
activity/program_message_shielded,
activity/program_message_unsubscribed
occurred_at
string<date-time>
required

The time at which the event occurred, as an ISO 8601 timestamp in UTC.

constituents
Constituent · object[]
required

An array of entities involved along with each entity's relation to the activity.