Easymailing

Opportunity stage changed

Webhook event crm_opportunity_stage_changed

Sent when an opportunity moves to another stage or pipeline, also when its stage is deleted. pipeline is the pipeline it is in after the change. previous_stage is null when the opportunity had no stage, and new_stage is null when it is left without one because its stage was deleted. A stage type is open, won or lost. actor.kind is who made the change: user, contact, automation, integration, system or external; actor.id is null when there is no identifiable actor.

Sent to crm webhooks (account-wide, without audience) subscribed to this event.

Easymailing sends the events in batches: the body is a JSON array of up to 100 events of the same webhook. Process them idempotently: an event can arrive more than once.

Header Parameters

Easymailing-Webhook-Id*string

Identifier of this delivery (UUID). Retries of the same batch keep it: use it to discard duplicates.

Formatuuid
Easymailing-Webhook-Signature*string

Signature of the request: sha256= followed by the hexadecimal HMAC-SHA256 of the raw request body, computed with the secret of the webhook. Compute it over the body exactly as received and compare it in constant time.

Match^sha256=[0-9a-f]{64}$

Request Body

application/json

Batch of events.

TypeScript Definitions

Use the request body type in TypeScript.

Items1 <= items <= 100
[index: integer]?

Response Body

Example delivery

Easymailing sends this request to the URL of your webhook. Values are placeholders.

POST /easymailing/webhooks HTTP/1.1Host: your-app.example.comContent-Type: application/jsonEasymailing-Webhook-Id: 497f6eca-6276-4993-bfeb-53cbbbba6f08Easymailing-Webhook-Signature: sha256=5d41402abc4b2a76b9719d911017c592ae2f8f0c6e4a7d5b9c1e3f2a4b6c8d0e[  {    "id": "string",    "date": "2019-08-24T14:15:22Z",    "event_type": "crm_opportunity_stage_changed",    "event_data": {      "app_id": 0,      "contract_version": 1,      "opportunity": {        "id": "string",        "title": "string",        "pipeline_id": "string",        "stage_id": "string",        "amount": "string",        "currency": "string",        "company_id": "string",        "primary_contact_id": "string",        "owner_id": "string",        "attributes": {},        "created_at": "string",        "updated_at": "string"      },      "pipeline": {        "id": "string",        "name": "string"      },      "previous_stage": {        "pipeline_id": "string",        "id": "string",        "name": "string",        "type": "string"      },      "new_stage": {        "pipeline_id": "string",        "id": "string",        "name": "string",        "type": "string"      },      "actor": {        "kind": "string",        "id": "string"      },      "occurred_at": "string"    }  }]