# Deal Endpoints {#deal-endpoints}


Manage sales deals within pipeline stages.


## Base Path {#base-path}


```
/api/deals
```


## Endpoints {#endpoints}



### List Deals {#list-deals}


```
GET /api/deals
Authorization: Bearer {token}
```

**Query Parameters:**

| Parameter   | Type   | Description       |
| ----------- | ------ | ----------------- |
| `stageId`   | UUID   | Filter by stage   |
| `page`      | number | Page number       |
| `limit`     | number | Items per page    |
| `relations` | string | Include relations |


### Get Deal by ID {#get-deal-by-id}


```
GET /api/deals/:id
Authorization: Bearer {token}
```


### Create Deal {#create-deal}


```
POST /api/deals
Authorization: Bearer {token}
```

**Request Body:**

```json
{
  "title": "Enterprise License — Acme Corp",
  "probability": 75,
  "stageId": "stage-uuid",
  "clientId": "contact-uuid"
}
```


### Update Deal {#update-deal}


```
PUT /api/deals/:id
Authorization: Bearer {token}
```


### Delete Deal {#delete-deal}


```
DELETE /api/deals/:id
Authorization: Bearer {token}
```


## Data Model {#data-model}


```typescript
interface IDeal {
  id: string;
  title: string;
  probability?: number;
  stageId: string;
  stage?: IPipelineStage;
  clientId?: string;
  client?: IOrganizationContact;
  createdByUserId?: string;
  organizationId: string;
  tenantId: string;
}
```


## Related Pages {#related-pages}


- [Pipeline & Deal Endpoints](https://sourcey-gauzy.pages.dev/api/pipeline-deal-endpoints/index.md) — pipeline management
- [Contact Endpoints](https://sourcey-gauzy.pages.dev/api/contact-endpoints/index.md) — CRM contacts
- [Sales Pipelines](https://sourcey-gauzy.pages.dev/features/sales-pipelines/index.md) — feature guide
