Deals API
The Deals API lets you manage your sales pipeline programmatically. Create deals, move them through stages, track values and probabilities, upsert by name and pipeline, and use BANT qualification scoring to prioritize your opportunities.
Endpoints
/api/v1/dealsList deals/api/v1/dealsCreate a deal/api/v1/deals/{id}Get deal by ID/api/v1/deals/{id}Update a deal/api/v1/deals/{id}Delete a deal/api/v1/deals/{id}/stageMove deal to stage/api/v1/deals/upsertCreate or update by name + pipeline/api/v1/deals/bulkBulk create/api/v1/deals/{id}/bantGet BANT qualification/api/v1/deals/{id}/bantUpdate BANT qualificationList endpoints support ?limit, ?offset, ?updatedSince, and ?fields query parameters. See the API Overview for details.
Create Deal Request
Request body for POST /api/v1/deals and PUT /api/v1/deals/upsert.
CreateDealRequest
| Property | Type | Required | Description |
|---|---|---|---|
pipelineId | Guid | ✓ | Pipeline ID |
stageId | Guid | ✓ | Stage ID |
name | string | ✓ | Deal name |
contactId | Guid? | — | Associated contact |
companyId | Guid? | — | Associated company |
value | decimal? | — | Deal value |
currency | string? | — | Currency code (default: "USD") |
probability | int? | — | Win probability % |
expectedCloseDate | DateTime? | — | Expected close date |
notes | string? | — | Notes |
ownerId | Guid? | — | Owner |
Deal Response
Returned by all GET, POST, and PUT endpoints.
DealResponse
| Property | Type | Required | Description |
|---|---|---|---|
id | Guid | ✓ | Unique identifier |
tenantId | Guid | ✓ | Tenant identifier |
pipelineId | Guid | ✓ | Pipeline ID |
stageId | Guid | ✓ | Current stage ID |
stageName | string | ✓ | Current stage name |
contactId | Guid? | — | Associated contact ID |
contactName | string? | — | Associated contact name |
companyId | Guid? | — | Associated company ID |
companyName | string? | — | Associated company name |
name | string | ✓ | Deal name |
value | decimal? | — | Deal value |
currency | string? | — | Currency code |
probability | int? | — | Win probability % |
expectedCloseDate | DateTime? | — | Expected close date |
actualCloseDate | DateTime? | — | Actual close date |
status | string | ✓ | Deal status (default: "open") |
notes | string? | — | Notes |
ownerId | Guid? | — | Owner ID |
ownerName | string? | — | Owner name |
lastActivityAt | DateTime? | — | Last activity date |
bantScore | int? | — | BANT qualification score (0-100) |
isBantQualified | bool | ✓ | Whether deal passes BANT threshold |
createdAt | DateTime | ✓ | Creation timestamp |
updatedAt | DateTime | ✓ | Last update timestamp |
Move Deal to Stage
Use the PATCH /api/v1/deals/{id}/stage endpoint to advance or move a deal to a different pipeline stage without updating other fields.
MoveDealStageRequest
| Property | Type | Required | Description |
|---|---|---|---|
stageId | Guid | ✓ | Target stage ID |
BANT Qualification
BANT (Budget, Authority, Need, Timeline) qualification helps you prioritize deals based on structured criteria. Use the BANT endpoints to read and update qualification data for any deal.
BantQualification
| Property | Type | Required | Description |
|---|---|---|---|
budget | int? | — | Budget score (0-25) |
authority | int? | — | Authority score (0-25) |
need | int? | — | Need score (0-25) |
timeline | int? | — | Timeline score (0-25) |
budgetNotes | string? | — | Budget qualification notes |
authorityNotes | string? | — | Authority qualification notes |
needNotes | string? | — | Need qualification notes |
timelineNotes | string? | — | Timeline qualification notes |
totalScore | int | ✓ | Computed total score (0-100) |
isQualified | bool | ✓ | Whether total meets qualification threshold |
Code Examples
Create a Deal
curl -X POST "https://your-tenant.rallycrm.io/api/v1/deals" \
-H "X-Api-Key: rk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"pipelineId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"stageId": "1a2b3c4d-5e6f-7890-abcd-ef1234567890",
"name": "Acme Corp - Enterprise License",
"contactId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"companyId": "b5c7e1a2-3d4f-5678-9abc-def012345678",
"value": 75000,
"currency": "USD",
"probability": 60,
"expectedCloseDate": "2025-09-30T00:00:00Z"
}'Move Deal to Stage
curl -X PATCH "https://your-tenant.rallycrm.io/api/v1/deals/c8f9a0b1-2d3e-4f56-7890-abcdef123456/stage" \
-H "X-Api-Key: rk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"stageId": "9e8d7c6b-5a4f-3210-fedc-ba9876543210"
}'Update BANT Qualification
curl -X PUT "https://your-tenant.rallycrm.io/api/v1/deals/c8f9a0b1-2d3e-4f56-7890-abcdef123456/bant" \
-H "X-Api-Key: rk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"budget": 20,
"authority": 25,
"need": 22,
"timeline": 18,
"budgetNotes": "Approved Q3 budget of $80k",
"authorityNotes": "Decision maker confirmed (VP Eng)"
}'Example Responses
Get Deal
{
"id": "c8f9a0b1-2d3e-4f56-7890-abcdef123456",
"tenantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"pipelineId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"stageId": "1a2b3c4d-5e6f-7890-abcd-ef1234567890",
"stageName": "Proposal",
"contactId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"contactName": "Sarah Chen",
"companyId": "b5c7e1a2-3d4f-5678-9abc-def012345678",
"companyName": "Acme Corporation",
"name": "Acme Corp - Enterprise License",
"value": 75000,
"currency": "USD",
"probability": 60,
"expectedCloseDate": "2025-09-30T00:00:00Z",
"actualCloseDate": null,
"status": "open",
"notes": "Proposal sent, awaiting feedback",
"ownerId": "e4d909c2-90d0-4b2b-88c5-8e9a0fa1e4b1",
"ownerName": "James Miller",
"lastActivityAt": "2025-06-14T11:00:00Z",
"bantScore": 85,
"isBantQualified": true,
"createdAt": "2025-04-01T09:00:00Z",
"updatedAt": "2025-06-14T11:00:00Z"
}BANT Qualification
{
"budget": 20,
"authority": 25,
"need": 22,
"timeline": 18,
"budgetNotes": "Approved Q3 budget of $80k",
"authorityNotes": "Decision maker confirmed (VP Eng)",
"needNotes": null,
"timelineNotes": null,
"totalScore": 85,
"isQualified": true
}Upsert Response
{
"action": "created",
"id": "c8f9a0b1-2d3e-4f56-7890-abcdef123456"
}Bulk Create Response
{
"created": 5,
"updated": 0,
"failed": 0,
"createdIds": [
"c8f9a0b1-2d3e-4f56-7890-abcdef123456",
"d9e0f1a2-3b4c-5d6e-7f80-91a2b3c4d5e6",
"e0f1a2b3-4c5d-6e7f-8091-a2b3c4d5e6f7",
"f1a2b3c4-5d6e-7f80-9102-b3c4d5e6f7a8",
"a2b3c4d5-6e7f-8091-0213-c4d5e6f7a8b9"
],
"errors": []
}