Activities
Create a new activity
Creates a new activity in the authenticated workspace. The `type` field is required. Activities can optionally be linked to a contact, company, or deal. If `contact_id`, `company_id`, or `deal_id` is provided, the referenced resource must exist in the workspace.
Authorization
apiKey AuthorizationBearer <token>
API key from your nodestash dashboard. Pass as a Bearer token in the Authorization header.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.nodestash.io/v1/activities" \ -H "Content-Type: application/json" \ -d '{ "type": "task", "subject": "Follow up on proposal", "body": "Discuss pricing and timeline with the client", "contact_id": "ct_5hJ3kM9pQrVwXyZaB2cD4", "company_id": "co_7rT4mK9pQsVwXyZaB2cD4", "deal_id": "dl_3xK8nM2qTsYvAzCeB2cD4", "due_date": "2026-03-01T09:00:00Z", "metadata": { "priority": "high" }, "tags": [ "follow-up", "important" ] }'{
"data": {
"id": "act_5hJ3kM9pQrVwXyZaB2cD4",
"type": "activity",
"attributes": {
"id": "act_5hJ3kM9pQrVwXyZaB2cD4",
"type": "task",
"subject": "Follow up on proposal",
"body": "Discuss pricing and timeline with the client",
"contact_id": "ct_5hJ3kM9pQrVwXyZaB2cD4",
"company_id": "co_7rT4mK9pQsVwXyZaB2cD4",
"deal_id": "dl_3xK8nM2qTsYvAzCeB2cD4",
"owner_id": null,
"is_done": false,
"due_date": "2026-03-01T09:00:00Z",
"completed_at": null,
"metadata": {
"priority": "high"
},
"tags": [
"follow-up",
"important"
],
"created_at": "2026-02-15T10:00:00Z",
"updated_at": "2026-02-15T10:00:00Z"
}
},
"meta": {
"request_id": "req_8hI9jK1lM2nO3pQ4rS5t"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"details": [
{
"field": "email",
"message": "Invalid email"
}
]
},
"meta": {
"request_id": "req_abc123def456"
}
}{
"error": {
"code": "INVALID_API_KEY",
"message": "Missing or invalid Authorization header"
},
"meta": {
"request_id": "req_abc123def456"
}
}{
"error": {
"code": "UNPROCESSABLE_ENTITY",
"message": "Referenced contact 'ct_invalid123' does not exist in this workspace"
},
"meta": {
"request_id": "req_abc123def456"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded"
},
"meta": {
"request_id": "req_abc123def456"
}
}