Webhook endpoints
CAD ROOMS sends webhook events to your registered HTTPS endpoint whenever an event you have subscribed to occurs.
Each event is delivered as an HTTP POST request containing a JSON payload. All events share a common structure, with the event-specific resource included in data.object.
Webhook endpoints are configured at the workspace level and managed by workspace owners and admins. When creating a webhook endpoint, you select which events to receive. To modify an existing endpoint, create a new one and delete the old one.
For information about delivery behavior, retries, and signature verification, see the Webhooks guide.
Event structure
Every webhook event follows the same JSON structure:
id(string): Unique identifier for the event. Remains unchanged across all delivery attempts, including retries.type(enum): Type of event that occurred.createdAt(datetime): Timestamp at which the event occurred.data(object): Container for the resource associated with the event.data.object(object): Resource associated with the event. Its structure depends on the eventtype.
Important: Use the event id to identify duplicate deliveries. An event may be delivered more than once, but its ID remains unchanged.
Supported event types
CAD ROOMS supports seven webhook event types in API v1. Five additional event types are available in preview: eco.opened, eco.reviewed, annotation.resolved, member.added, and member.removed.
contribution.created- Description: A user contributes changes to a project. This event is also triggered by a release.
- Resource: Contribution
revision.released- Description: Files are released, either manually or through an ECO. A single event is triggered per release.
- Resource: Released revisions, a list of up to 100 Revision objects
eco.created- Description: A new ECO is created.
- Resource: ECO
eco.released- Description: An ECO is released.
- Resource: ECO
eco.closed- Description: An ECO is closed.
- Resource: ECO
annotation.created- Description: A user creates an annotation.
- Resource: Annotation
annotation.replied- Description: A user replies to an annotation.
- Resource: Annotation reply
annotation.resolved(preview)- Description: A user marks an annotation as resolved.
- Resource: Annotation
eco.opened(preview)- Description: An ECO transitions from draft to open and is ready for review.
- Resource: ECO
eco.reviewed(preview)- Description: A reviewer approves or rejects an ECO.
- Resource: ECO, including the reviewer who made the decision
member.added(preview)- Description: A user joins a workspace or project.
- Resource: Membership
member.removed(preview)- Description: A member leaves or is removed from a workspace or project.
- Resource: Membership
Event payloads
contribution.created
The data.object field contains a Contribution object, including the project ID, contribution details, author, and affected files.
The files array contains FileReference objects that identify the files included in the contribution.
Resource: Contribution
Example payload:
revision.released
A single event is triggered per release, regardless of the number of files released. The data.object field contains the following:
projectId(string): ID of the project containing the released files.contribution(object): Contribution created by the release.revisions(array): Up to 100 released Revision objects, sorted by path.hasMore(boolean):trueif the release created more than 100 revisions.
To retrieve all released files, call List contribution files with contribution.id. Each file’s revisionId identifies its released revision.
Resource: Released revisions
Example payload:
eco.created
The data.object field contains an ECO object.
Resource: ECO
Status: draft
Example payload:
eco.released
The data.object field contains an ECO object.
Resource: ECO
Status: released
Example payload:
eco.closed
The data.object field contains an ECO object.
Resource: ECO
Status: closed
Example payload:
annotation.created
The data.object field contains an Annotation object.
Example payload:
annotation.replied
The data.object field contains the annotation reply, including projectId, path, revisionId, and annotationNumber.
Example payload:
annotation.resolved
The data.object field contains an Annotation object with resolvedAt set. No event is triggered when an annotation is marked as unresolved.
eco.opened
The data.object field contains an ECO object.
Status: open
eco.reviewed
The data.object field contains an ECO object with an additional reviewer field identifying the reviewer who made the decision.
For brevity, the example includes only a subset of ECO fields.
member.added and member.removed
The data.object field contains the membership details: workspaceId, projectId, user, and role.
For workspace memberships, projectId is null. For member.removed events, role represents the role held by the member before removal.
Handling webhook events
When processing incoming webhook events:
- Verify the signature. Use your endpoint’s signing secret to validate the
CadRooms-Signatureheader before processing the payload. - Identify the event type. Read the
typefield to determine the resource and action associated with the event. - Process the resource. Access
data.objectto retrieve the resource details associated with the event. - Handle duplicate deliveries. Track processed event IDs to prevent the same event from being processed more than once.
- Acknowledge the delivery. Follow the acknowledgment and retry behavior described in the Webhooks guide.