Deals
Create a new deal
Creates a new deal in the authenticated workspace. If `pipeline_id` is omitted, the workspace default pipeline is used. If `stage_id` is omitted, the first open stage of the pipeline is used. `currency` defaults to `EUR`. The `contact_id` and `company_id` (if provided) must reference existing resources 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
curl -X POST "https://api.nodestash.io/v1/deals" \ -H "Content-Type: application/json" \ -d '{ "title": "Enterprise Contract", "value": 50000, "currency": "EUR", "pipeline_id": "pp_8rT4mK9pQsVwXyZaB2cD4", "stage_id": "ps_4kT9mN2qRsYvAzCeB2cD4", "contact_id": "ct_5hJ3kM9pQrVwXyZaB2cD4", "company_id": "co_7rT4mK9pQsVwXyZaB2cD4", "expected_close_date": "2026-06-30", "custom_fields": { "priority": "high" }, "tags": [ "enterprise", "q2-target" ] }'{
"data": {
"id": "dl_3xK8nM2qTsYvAzCeB2cD4",
"type": "deal",
"attributes": {
"id": "dl_3xK8nM2qTsYvAzCeB2cD4",
"title": "Enterprise Contract",
"value": "50000.00",
"currency": "EUR",
"pipeline_id": "pp_8rT4mK9pQsVwXyZaB2cD4",
"stage_id": "ps_4kT9mN2qRsYvAzCeB2cD4",
"contact_id": "ct_5hJ3kM9pQrVwXyZaB2cD4",
"company_id": "co_7rT4mK9pQsVwXyZaB2cD4",
"owner_id": null,
"expected_close_date": "2026-06-30",
"closed_at": null,
"custom_fields": {
"priority": "high"
},
"tags": [
"enterprise",
"q2-target"
],
"created_at": "2026-02-01T14:00:00Z",
"updated_at": "2026-02-01T14:00:00Z"
}
},
"meta": {
"request_id": "req_6fG7hI8jK9lM1nO2pQ3r"
}
}{
"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": "RATE_LIMITED",
"message": "Rate limit exceeded"
},
"meta": {
"request_id": "req_abc123def456"
}
}