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": "1CLJt2v5pkpkAnvdgXfEcF",
  "occurred_at": "2025-02-10T16:00:00.000Z",
  "type": "activity/inbox_message_sent",
  "message": {
    "id": "1CLJt2v4LTd2iVzVWmBhub",
    "type": "email_message"
  }
}

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.

Activities are polymorphic; the type field indicates the specific activity that occurred, and the object will contain a property with a matching name that holds the details of that event. For example, an activity/meeting_held activity will contain a meeting property.

id
string
required

Unique identifier for the object.

occurred_at
string<date-time>
required

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

type
string
required

The type of activity. Always activity/call_occurred.

Allowed value: "activity/call_occurred"
call
Pointer · object
required

The Call object associated with this event.