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
- Type: stringentity
_id required
Body·
- Properties: 1Type: Notesnotesrequired
- Type: array of stringpeople
Ids required - Type: enumtyperequired
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 =
C A L L Phone call with a contact
- 2 =
E M A I L Email correspondence
- 3 =
T E X T Text message or SMS
- 4 =
I N _ P E R S O N _ M E E T I N G Face-to-face meeting
- 5 =
O N L I N E _ M E E T I N G Virtual meeting (e.g., Zoom, Teams)
- 6 =
Q U O T E _ S E N T Quotation or proposal sent to client
- 7 =
N D A _ S E N T Non-Disclosure Agreement sent for signature
- 8 =
N D A _ C O M P L E T E D Non-Disclosure Agreement signed and completed
- 9 =
N O T E Free-form note
- 10 =
S L A C K _ M E S S A G E Slack channel message summary
- 1 =
- Type: stringnullablecompany
Id - Type: array of stringnullablecompany
Ids - Type: stringnullabledeal
Id - Type: stringnullablelead
Id - Type: stringnullablepartner
Id - Type: array of stringnullable
Responses
- application/json
- application/json
curl 'https://crm.dreamhub.ai/api/v1/companies/{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
}
