Sales CRM API for deals
The Node.js SDK has clients for CRM deals and pipelines, companies, tasks and notes, and a new deal can link to contacts and companies.

How it works
# Add attributes.pipeline and attributes.deal_stage (IDs) to place the deal in a stage.
curl --request POST \
--url https://api.brevo.com/v3/crm/deals \
--header 'accept: application/json' \
--header 'api-key: YOUR_API_KEY' \
--header 'content-type: application/json' \
--data '{
"name": "Deal: Connect with company"
}'
List the contacts on my Leads list created since yesterday and create a deal for each one in the Qualifying stage.
curl --request GET \
--url https://api.brevo.com/v3/crm/deals \
--header 'accept: application/json' \
--header 'api-key: YOUR_API_KEY'
Show my open deals by stage and flag the ones with no activity in 14 days.
curl --request GET \
--url https://api.brevo.com/v3/crm/pipeline/details/all \
--header 'accept: application/json' \
--header 'api-key: YOUR_API_KEY'
List my Brevo pipelines and the stage names and IDs in each one.
Replace YOUR_API_KEY with your API key.
Pipelines, deals and webhooks
Read your pipelines
Call GET /v3/crm/pipeline/details/all. You get each pipeline with its stages and their IDs. A default pipeline is created if you have none.
Create the deal
POST to /v3/crm/deals with a name and optional attributes. Pass pipeline and deal_stage IDs from the pipeline details endpoint to place it in a stage, and linkedContactsIds or linkedCompaniesIds to link contacts and companies.
Update or move it
PATCH the deal. To change stage, pass both pipeline and deal_stage. Passing linked IDs replaces the whole list of associations.
Listen for changes
Sales CRM webhooks include Deal created, Deal stage updated and Deal attributes updated.



