v1

latestOpenAPI 3.0.22026-08-045831103.6 KB
Activities

Create activity

Create an activity on a deal. Requires the ACTIVITIES_API feature flag and an API key with the activities:write scope. stage_id must be a stage belonging to the deal's origin — when omitted, it defaults to the deal's current stage.

post/v2/activities

Headers

api-tokenstring required

API Token

Request body

deal_idstring uuid required

UUID of the deal this activity belongs to. Must belong to the authenticated owner.

titlestring required

Title of the activity.

type'CALL' | 'MAIL' | 'SCHEDULE' | 'TASK' | 'MEETING' | 'WHATSAPP' | 'INSTAGRAM' required
due_atstring date-time nullable

Due date/time (ISO 8601).

contentstring nullable

Free-text body of the activity. For WHATSAPP and INSTAGRAM this is the message text (stored so it renders in the Clint UI message view); for CALL/MAIL/TASK it is the notes field.

template_idstring uuid

Optional WhatsApp Official message template to attach. Only supported when type is WHATSAPP; must reference a template belonging to the authenticated owner.

stage_idstring uuid

Stage of the deal's origin to associate the activity with. Defaults to the deal's current stage when omitted.

Example request

{
  "deal_id": "550e8400-e29b-41d4-a716-446655440000",
  "title": "Call the customer back",
  "type": "CALL",
  "due_at": "2024-01-20T14:00:00.000Z",
  "content": "Discuss the renewal proposal.",
  "template_id": "b3c2d1e0-1234-4abc-9def-0123456789ab",
  "stage_id": "8feade82-d77b-4e8b-9d35-fd43e972b5c8"
}

Response

The created activity object

statusinteger

Response status

Example response

{
  "status": 201,
  "data": {
    "id": "8feade82-d77b-4e8b-9d35-fd43e972b5c8",
    "title": "Call the customer back",
    "type": "CALL",
    "content": "Discuss the renewal proposal.",
    "due_at": "2024-01-20T14:00:00.000Z",
    "custom": true,
    "stage_id": "8feade82-d77b-4e8b-9d35-fd43e972b5c8",
    "created_at": "2020-01-01T14:15:00.000000+00:00",
    "deal": {
      "id": "8feade82-d77b-4e8b-9d35-fd43e972b5c8",
      "status": "OPEN",
      "origin_id": "8feade82-d77b-4e8b-9d35-fd43e972b5c8",
      "stage_id": "8feade82-d77b-4e8b-9d35-fd43e972b5c8",
      "contact": {
        "id": "8feade82-d77b-4e8b-9d35-fd43e972b5c8",
        "name": "Jane Doe"
      }
    }
  }
}