Add Entity Activity

​

Create a new activity associated with an entity.

Adds an activity (call, email, meeting, note, etc.) linked to the specified entity. If the entity is a person, the person is automatically added to the activity's people_ids list.

Args: entity_id: Unique identifier of the parent entity activity_data: Activity data including: - type: Activity type (call, email, text, meeting, etc.) - notes: Type-specific notes content - peopleIds: List of associated person IDs - companyId: Associated company ID (optional when partnerId is set or when creating on a Partner's timeline) - partnerId: Optional associated partner ID (inferred from entity_id when the parent entity is a partner) - leadId: Optional associated lead ID - dealId: Optional associated deal ID - tags: Optional list of tag IDs user: Authenticated user information

Returns: EntityResponseModel containing: - id: Unique identifier of the newly created activity

Raises: HTTPException: - 400: Activity has neither a company nor a partner association - 401: Authentication required - 404: Parent entity not found - 422: Validation error in activity data - 500: Internal server error

Path Parameters

Body·

required
application/json
  • Properties: 1
  • Type of activity performed with a contact or company.

    Attributes: CALL: Phone call with a contact (1) EMAIL: Email correspondence (2) TEXT: Text message or SMS (3) IN_PERSON_MEETING: Face-to-face meeting (4) ONLINE_MEETING: Virtual meeting (e.g., Zoom, Teams) (5) QUOTE_SENT: Quotation or proposal sent to client (6) NDA_SENT: Non-Disclosure Agreement sent for signature (7) NDA_COMPLETED: Non-Disclosure Agreement signed and completed (8) SLACK_MESSAGE: Slack channel message summary (10)

    values
    • 1 = CALL

      Phone call with a contact

    • 2 = EMAIL

      Email correspondence

    • 3 = TEXT

      Text message or SMS

    • 4 = IN_PERSON_MEETING

      Face-to-face meeting

    • 5 = ONLINE_MEETING

      Virtual meeting (e.g., Zoom, Teams)

    • 6 = QUOTE_SENT

      Quotation or proposal sent to client

    • 7 = NDA_SENT

      Non-Disclosure Agreement sent for signature

    • 8 = NDA_COMPLETED

      Non-Disclosure Agreement signed and completed

    • 9 = NOTE

      Free-form note

    • 10 = SLACK_MESSAGE

      Slack channel message summary

Responses

  • application/json
  • application/json
Request Example for post/{entity_id}/activities
curl 'https://crm.dreamhub.ai/api/v1/deals/{entity_id}/activities' \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "type": 1,
  "notes": {
    "additionalProperty": "anything"
  },
  "peopleIds": [
    ""
  ],
  "leadId": "",
  "dealId": "",
  "partnerId": "",
  "companyId": "",
  "companyIds": [
    ""
  ],
  "tags": [
    ""
  ]
}'
{
  "id": "string",
  "matched": false
}