<!-- Source: https://docs.vinsi.ai/api-docs/crm-activity-task-create -->
# Create Activity Task

Add a task to a CRM activity. activityId and title are required. The task is created with status Open, placed last in the activity's task order, and createdById set to the user who owns the API key. Responds 201.

```http
POST https://dashboard.vinsi.ai/api/crm/activity-tasks
```

## Authentication

Send your API key in the `x-api-key` header. Create keys in the VINSI dashboard under Settings → API Keys.

## Headers

| Name | Type | Required |
|---|---|---|
| Content-Type | string | yes (application/json) |
| x-api-key | string | yes |

## Example request body

```json
{
  "activityId": 5120,
  "title": "Email the annual plan quote",
  "description": "Use the standard pricing template.",
  "assignedToId": "cmexampleuser0000000000002",
  "dueBy": "2026-09-17T17:00:00.000Z"
}
```

## Example request

```bash
curl -X POST 'https://dashboard.vinsi.ai/api/crm/activity-tasks' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"activityId":5120,"title":"Email the annual plan quote","description":"Use the standard pricing template.","assignedToId":"cmexampleuser0000000000002","dueBy":"2026-09-17T17:00:00.000Z"}'
```

## Example response

```json
{
  "id": 901,
  "activityId": 5120,
  "title": "Email the annual plan quote",
  "description": "Use the standard pricing template.",
  "status": "Open",
  "assignedToId": "cmexampleuser0000000000002",
  "dueBy": "2026-09-17T17:00:00.000Z",
  "createdById": "cmexampleuser0000000000001",
  "completedAt": null,
  "sortOrder": 1,
  "lastDueReminderAt": null,
  "createdAt": "2026-09-15T20:15:00.000Z",
  "updatedAt": "2026-09-15T20:15:00.000Z",
  "AssignedTo": {
    "id": "cmexampleuser0000000000002",
    "firstName": "Sam",
    "lastName": "Rivera",
    "email": "sam.rivera@example.com"
  },
  "CreatedBy": {
    "id": "cmexampleuser0000000000001",
    "firstName": "Jane",
    "lastName": "Doe",
    "email": "jane.doe@example.com"
  }
}
```

