> ## 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.

# Retrieve an Activity

> Retrieves the details of an existing activity.



## OpenAPI

````yaml GET /activities/{id}
openapi: 3.1.0
info:
  title: Moonbase REST API
  version: v0
servers:
  - url: https://api.moonbase.ai/v0
security:
  - bearer: []
tags:
  - name: Inboxes
    description: Manage your inboxes, conversations, and messages
  - name: Collections
    description: Manage your collections and items
  - name: Marketing
    description: Manage your marketing campaigns and forms
  - name: Activities
    description: View activities and capture calls
  - name: Library
    description: Manage your meetings, files, and notes
paths:
  /activities/{id}:
    get:
      tags:
        - Activities
      summary: Retrieve an activity
      description: Retrieves the details of an existing activity.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: The ID of the Activity to retrieve.
          explode: true
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Activity'
              examples:
                Find an activity by its ID:
                  summary: Find an activity by its ID
                  value:
                    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: message
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                Default:
                  summary: Default
                  value:
                    type: errors
                    errors:
                      - type: error
                        status: '400'
                        title: Bad Request
                        detail: >-
                          The request could not be understood due to malformed
                          syntax or invalid parameters.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                Default:
                  summary: Default
                  value:
                    type: errors
                    errors:
                      - type: error
                        status: '401'
                        title: Unauthorized
                        detail: >-
                          Invalid or missing API key or JWT. You should provide
                          your Moonbase API Key or JWT in the authorization
                          header, in the format: "Authorization: Bearer
                          MOONBASE_API_KEY"
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                Default:
                  summary: Default
                  value:
                    type: errors
                    errors:
                      - type: error
                        status: '403'
                        title: Forbidden
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                Activity not found:
                  summary: Activity not found
                  value:
                    type: errors
                    errors:
                      - type: error
                        status: '404'
                        title: Not Found
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                Default:
                  summary: Default
                  value:
                    type: errors
                    errors:
                      - type: error
                        status: '429'
                        title: Too Many Requests
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                Default:
                  summary: Default
                  value:
                    type: errors
                    errors:
                      - type: error
                        status: '500'
                        title: Internal Server Error
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                Default:
                  summary: Default
                  value:
                    type: errors
                    errors:
                      - type: error
                        status: '503'
                        title: Service Unavailable
                        detail: >-
                          The service is temporarily unavailable, please try
                          again later.
      x-codeSamples:
        - lang: JavaScript
          source: |-
            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);
        - lang: Python
          source: |-
            import os
            from moonbase import Moonbase

            client = Moonbase(
                api_key=os.environ.get("MOONBASE_API_KEY"),  # This is the default and can be omitted
            )
            activity = client.activities.retrieve(
                "id",
            )
            print(activity.id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/moonbaseai/moonbase-sdk-go\"\n\t\"github.com/moonbaseai/moonbase-sdk-go/option\"\n)\n\nfunc main() {\n\tclient := moonbase.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tactivity, err := client.Activities.Get(context.TODO(), \"id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", activity.ID)\n}\n"
        - lang: Ruby
          source: |-
            require "moonbase"

            moonbase = Moonbase::Client.new(api_key: "My API Key")

            activity = moonbase.activities.retrieve("id")

            puts(activity)
components:
  schemas:
    Activity:
      title: Activity
      description: >-
        The Activity object represents a specific event that has occurred, such
        as a meeting being scheduled or a form being submitted.
      type: object
      properties:
        id:
          description: Unique identifier for the object.
          type: string
        type:
          description: The type of activity.
          type: string
          enum:
            - 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:
          description: >-
            The time at which the event occurred, as an ISO 8601 timestamp in
            UTC.
          type: string
          format: date-time
        constituents:
          description: >-
            An array of entities involved along with each entity's relation to
            the activity.
          type: array
          items:
            $ref: '#/components/schemas/Constituent'
      required:
        - occurred_at
        - id
        - type
        - constituents
    Errors:
      title: Errors
      description: >-
        The Errors object is a container that holds multiple Error objects when
        an API request encounters several validation or processing issues. This
        allows the API to return comprehensive feedback about all problems
        encountered in a single response.
      type: object
      properties:
        type:
          type: string
          const: errors
        errors:
          description: A list of `Error` objects.
          type: array
          items:
            $ref: '#/components/schemas/Error'
      required:
        - type
    Constituent:
      title: Constituent
      description: >-
        The Constituent object represents information about something that was
        involved in a particular activity.
      type: object
      properties:
        type:
          type: string
          const: constituent
        relation:
          type: string
          enum:
            - actor
            - object
            - target
        entity:
          $ref: '#/components/schemas/ConstituentEntityPointer'
      required:
        - entity
        - type
        - relation
    Error:
      title: Error
      description: >-
        The Error object represents a single error that occurred during API
        request processing. It provides detailed information about what went
        wrong, including a unique identifier, status code, and human-readable
        descriptions to help developers understand and resolve the issue.
      type: object
      properties:
        type:
          type: string
          const: error
        id:
          description: A unique identifier for this specific error instance.
          type: string
        status:
          description: The HTTP status code for this problem, as a string.
          type: string
        code:
          description: An application-specific error code string.
          type: string
        title:
          description: A short, human-readable summary of the problem.
          type: string
        detail:
          description: A human-readable explanation of this specific error.
          type: string
        source:
          $ref: '#/components/schemas/ErrorSource'
          description: >-
            An object containing more specific information about the part of the
            request that caused the error.
        meta:
          type: object
          additionalProperties: true
      required:
        - type
    ConstituentEntityPointer:
      title: ConstituentEntityPointer
      description: >-
        A lightweight reference to the entity of `Constituent`, containing
        information about what type of entity it is as well as the entity's id.
      oneOf:
        - $ref: '#/components/schemas/CallPointer'
        - $ref: '#/components/schemas/CollectionPointer'
        - $ref: '#/components/schemas/ItemPointer'
        - $ref: '#/components/schemas/FilePointer'
        - $ref: '#/components/schemas/MeetingPointer'
        - $ref: '#/components/schemas/MessagePointer'
        - $ref: '#/components/schemas/NotePointer'
        - $ref: '#/components/schemas/ProgramPointer'
        - $ref: '#/components/schemas/ProgramMessagePointer'
        - $ref: '#/components/schemas/ProgramTemplatePointer'
        - $ref: '#/components/schemas/UnsubscribePointer'
      discriminator:
        propertyName: type
        mapping:
          call:
            $ref: '#/components/schemas/CallPointer'
          collection:
            $ref: '#/components/schemas/CollectionPointer'
          item:
            $ref: '#/components/schemas/ItemPointer'
          file:
            $ref: '#/components/schemas/FilePointer'
          meeting:
            $ref: '#/components/schemas/MeetingPointer'
          message:
            $ref: '#/components/schemas/MessagePointer'
          note:
            $ref: '#/components/schemas/NotePointer'
          program:
            $ref: '#/components/schemas/ProgramPointer'
          program_message:
            $ref: '#/components/schemas/ProgramMessagePointer'
          program_template:
            $ref: '#/components/schemas/ProgramTemplatePointer'
          unsubscribe:
            $ref: '#/components/schemas/UnsubscribePointer'
    ErrorSource:
      title: ErrorSource
      description: >-
        The ErrorSource object provides additional context about the specific
        part of an API request that caused an error. It can point to either a
        field in the request document or a query parameter that contains invalid
        data.
      type: object
      properties:
        pointer:
          description: >-
            A JSON Pointer [RFC6901] to the associated entity in the request
            document.
          type: string
        parameter:
          description: A string indicating which URI query parameter caused the error.
          type: string
      required: []
    CallPointer:
      title: CallPointer
      type: object
      properties:
        type:
          type: string
          const: call
        id:
          type: string
      required:
        - type
        - id
    CollectionPointer:
      title: CollectionPointer
      description: >-
        A lightweight reference to a `Collection`, containing the minimal
        information needed to identify it.
      type: object
      properties:
        type:
          description: >-
            String representing the object’s type. Always `collection` for this
            object.
          type: string
          const: collection
        id:
          description: Unique identifier of the collection.
          type: string
        ref:
          description: The stable, machine-readable reference identifier of the collection.
          type: string
      required:
        - type
        - id
        - ref
    ItemPointer:
      title: ItemPointer
      description: >-
        A reference to an `Item` within a specific `Collection`, providing the
        context needed to locate the item.
      type: object
      properties:
        type:
          description: >-
            String representing the object’s type. Always `item` for this
            object.
          type: string
          const: item
        id:
          description: Unique identifier of the item.
          type: string
        collection:
          $ref: '#/components/schemas/CollectionPointer'
          description: A reference to the `Collection` containing this item.
      required:
        - collection
        - type
        - id
    FilePointer:
      title: FilePointer
      type: object
      properties:
        type:
          type: string
          const: file
        id:
          type: string
      required:
        - type
        - id
    MeetingPointer:
      title: MeetingPointer
      type: object
      properties:
        type:
          type: string
          const: meeting
        id:
          type: string
      required:
        - type
        - id
    MessagePointer:
      title: MessagePointer
      type: object
      properties:
        type:
          type: string
          const: message
        id:
          type: string
      required:
        - type
        - id
    NotePointer:
      title: NotePointer
      type: object
      properties:
        type:
          type: string
          const: note
        id:
          type: string
      required:
        - type
        - id
    ProgramPointer:
      title: ProgramPointer
      type: object
      properties:
        type:
          type: string
          const: program
        id:
          type: string
      required:
        - type
        - id
    ProgramMessagePointer:
      title: ProgramMessagePointer
      type: object
      properties:
        type:
          type: string
          const: program_message
        id:
          type: string
      required:
        - type
        - id
    ProgramTemplatePointer:
      title: ProgramTemplatePointer
      type: object
      properties:
        type:
          type: string
          const: program_template
        id:
          type: string
      required:
        - type
        - id
    UnsubscribePointer:
      title: UnsubscribePointer
      type: object
      properties:
        type:
          type: string
          const: unsubscribe
        id:
          type: string
      required:
        - type
        - id
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: Your Moonbase API key.

````