# CRM Endpoint

This notification will be sent when an opportunity has been modified.

* Opportunity is updated
* Opportunity is added
* Opportunity is deleted
* Tasks is updated
* Task is created
* Task is deleted
* Activity is updated
* Activity is created
* Activity is deleted
* Lead Note is updated
* Lead Note is created
* Lead Note is deleted

## Opportunity is created.

### Subject

OpportunityAdded

### Body

```json
{
    "data": {... JSON Response from getOpportunityList API }
}
```

## Opportunity is updated.

### Subject

OpportunityUpdated

### Body

```json
{
    "data": {... JSON Response from getOpportunityList API },
    "previousData": {... Previous Data in JSON which has been just updated }
}
```

## Opportunity is deleted.

### Subject

OpportunityDeleted

### Body

```json
{
    "venueId": 123,
    "opportunityId": 234
}
```

## Task is created

### Subject

CrmEventTaskAdded

### Body

```json
{
    "data": {... JSON Response from getTaskList API }
}
```

## Task is updated

### Subject

CrmEventTaskUpdated

### Body

```json
{
    "data": {... JSON Response from getTaskList API },
    "previousData": {... Previous Data in JSON which has been just updated }
}
```

## Task is deleted

### Subject

CrmEventTaskDeleted

### Body

```json
{
    "taskId": 123,
}
```

## Activity is created

### Subject

CrmEventActivityAdded

### Body

```json
{
    "data": {... JSON Response from getActivityList API }
}
```

## Activity is updated

### Subject

CrmEventActivityUpdated

### Body

```json
{
    "data": {... JSON Response from getActivityList API },
    "previousData": {... Previous Data in JSON which has been just updated }
}
```

## Activity is deleted

### Subject

CrmEventActivityDeleted

### Body

```json
{
    "activityId": 123,
}
```

## Lead Note is created

### Subject

CrmLeadNoteAdded

### Body

```json
{
    "data": {... JSON Response from getLeadNoteList API }
}
```

## Lead Note is updated

### Subject

CrmLeadNoteUpdated

### Body

```json
{
    "data": {... JSON Response from getLeadNoteList API },
    "previousData": {... Previous Data in JSON which has been just updated }
}
```

## Lead Note is deleted

### Subject

CrmLeadNoteDeleted

### Body

```json
{
    "noteId": 123,
}
```
