Of course! For those of you interested, firstly, here’s a list of the events that trigger webhooks within Content Snare:
- Client Created
- Client Updated
- Request Created
- Request Published
- Request Completed
- All Fields Completed
- Field Completed
- Field Approved
- Field Rejected
For each webhook, there is a specific JSON (JavaScript Object Notation) payload. These are as follows:
Client Created
When the webhook indicating that a new client has been created triggers, the JSON payload is:
{ id: 0, event_name: 'client_created', company_name: 'Example Company', email: '[email protected]', full_name: 'Example Client', phone: '123-456-7890', avatar: 'https://www.gravatar.com/avatar/93942e96f5acd83e2e047ad8fe03114d?s=100&d=robohash', }
Client Updated
When the webhook indicating that a client has been updated triggers, the JSON payload is:
{ id: 0, event_name: 'client_updated', company_name: 'Example Company', email: '[email protected]', full_name: 'Example Client', phone: '123-456-7890', avatar: 'https://www.gravatar.com/avatar/93942e96f5acd83e2e047ad8fe03114d?s=100&d=robohash', }
Request Created
When the webhook indicating that a new request has been created triggers, the JSON payload is:
{ id: 0, event_name: 'request_created', name: 'Example Request', url: 'https://app.contentsnare.com/requests/EXAMPLE_ONLY', status: 'draft', due_date: '2020-10-20', folder_name: 'Default Folder', request_template_name: 'Example Template', communications_template_name: 'Default', completion_percentage: 0, owner_name: "Example Owner", author_name: "Example Author", client: { id: 0, company_name: 'Example Company', email: '[email protected]', full_name: 'Example Client', phone: '123-456-7890', avatar: 'https://www.gravatar.com/avatar/93942e96f5acd83e2e047ad8fe03114d?s=100&d=robohash', } }
Request Published
When the webhook indicating that a request has been published triggers, the JSON payload is:
{ id: 0, event_name: 'request_published', name: 'Example Request', status: 'published', due_date: '2020-10-20', folder_name: 'Default Folder', url: 'https://app.contentsnare.com/requests/EXAMPLE_ONLY', pin_code_enabled: true, pin_code: '1234', request_template_name: 'Example Template', communications_template_name: 'Default', completion_percentage: 0, share_link: 'https://app.contentsnare.com/requests/EXAMPLE_ONLY', owner_name: "Example Owner", author_name: "Example Author", client: { id: 0, company_name: 'Example Company', email: '[email protected]', full_name: 'Example Client', phone: '123-456-7890', avatar: 'https://www.gravatar.com/avatar/93942e96f5acd83e2e047ad8fe03114d?s=100&d=robohash', } }
Request Completed
When the webhook indicating that a request has been completed triggers, the JSON payload is:
{ id: 0, event_name: 'request_completed', name: 'Example Request', status: 'completed', due_date: '2020-10-20', folder_name: 'Default Folder', url: 'https://app.contentsnare.com/requests/EXAMPLE_ONLY', pin_code_enabled: true, pin_code: '1234', request_template_name: 'Example Template', communications_template_name: 'Default', completion_percentage: 0, share_link: 'https://app.contentsnare.com/requests/EXAMPLE_ONLY', owner_name: "Example Owner", author_name: "Example Author", client: { company_name: 'Example Company', email: '[email protected]', full_name: 'Example Client', phone: '123-456-7890', avatar: 'https://www.gravatar.com/avatar/93942e96f5acd83e2e047ad8fe03114d?s=100&d=robohash', }, pages: [{ name: 'Example Page 1', instruction_text: 'Example Page 1 Instructions', sections: [{ name: 'Example Section 1', instruction_text: 'Example Section 1 Instructions', fields: [{ name: 'Example Field 1', instruction_text: 'Example Field 1 Instructions', type: 'text', status: 'approved', values: [], values_flat: '' }], fields_count: 1 }], fields_count: 1 }] }
All Fields Completed
When the webhook indicating that a client has completed all fields within a request triggers, the JSON payload is:
{ event_name: 'all_fields_completed', request: { id: 0, name: 'Example Request', status: 'published', due_date: '2020-10-20', folder_name: 'Default Folder', url: 'https://app.contentsnare.com/requests/EXAMPLE_ONLY', pin_code_enabled: true, pin_code: '1234', request_template_name: 'Example Template', communications_template_name: 'Default', completion_percentage: 0, share_link: 'https://app.contentsnare.com/requests/EXAMPLE_ONLY', owner_name: "Example Owner", author_name: "Example Author", client: { id: 0, company_name: 'Example Company', email: '[email protected]', full_name: 'Example Client', phone: '123-456-7890', avatar: 'https://www.gravatar.com/avatar/93942e96f5acd83e2e047ad8fe03114d?s=100&d=robohash', } } }
Field Completed
When the webhook indicating that a client has completed a field within a request triggers, the JSON payload is:
{ id: 0, event_name: 'field_completed', name: 'Example completed field name', instruction_text: 'Example completed field instructions', status: 'done', type: 'text', values: ['Example completed field answer'], values_flat: 'Example approved field answer', request: { id: 0, name: 'Example Request', status: 'published', due_date: '2020-10-20', folder_name: 'Default Folder', url: 'https://app.contentsnare.com/requests/EXAMPLE_ONLY', pin_code_enabled: true, pin_code: '1234', request_template_name: 'Example Template', communications_template_name: 'Default', completion_percentage: 0, share_link: 'https://app.contentsnare.com/requests/EXAMPLE_ONLY', owner_name: "Example Owner", author_name: "Example Author", client: { id: 0, company_name: 'Example Company', email: '[email protected]', full_name: 'Example Client', phone: '123-456-7890', avatar: 'https://www.gravatar.com/avatar/93942e96f5acd83e2e047ad8fe03114d?s=100&d=robohash', } } }
Field Approved
When the webhook indicating that a team member has approved a field triggers, the JSON payload is:
{ id: 0, event_name: 'field_approved', name: 'Example approved field name', instruction_text: 'Example approved field instructions', status: 'approved', type: 'text', values: ['Example approved field answer'], values_flat: 'Example approved field answer', request: { id: 0, name: 'Example Request', status: 'published', due_date: '2020-10-20', folder_name: 'Default Folder', url: 'https://app.contentsnare.com/requests/EXAMPLE_ONLY', pin_code_enabled: true, pin_code: '1234', request_template_name: 'Example Template', communications_template_name: 'Default', completion_percentage: 0, share_link: 'https://app.contentsnare.com/requests/EXAMPLE_ONLY', owner_name: "Example Owner", author_name: "Example Author", client: { id: 0, company_name: 'Example Company', email: '[email protected]', full_name: 'Example Client', phone: '123-456-7890', avatar: 'https://www.gravatar.com/avatar/93942e96f5acd83e2e047ad8fe03114d?s=100&d=robohash', } } }
Field Rejected
When the webhook indicating that a team member has rejected a field triggers, the JSON payload is:
{ id: 0, event_name: 'field_rejected', message: 'Example recjection message', name: 'Example rejected field name', instruction_text: 'Example rejected field instructions', status: 'redo', type: 'text', values: ['Example rejected field answer'], values_flat: 'Example rejected field answer', request: { id: 0, name: 'Example Request', status: 'published', due_date: '2020-10-20', folder_name: 'Default Folder', url: 'https://app.contentsnare.com/requests/EXAMPLE_ONLY', pin_code_enabled: true, pin_code: '1234', request_template_name: 'Example Template', communications_template_name: 'Default', completion_percentage: 0, share_link: 'https://app.contentsnare.com/requests/EXAMPLE_ONLY', owner_name: "Example Owner", author_name: "Example Author", client: { id: 0, company_name: 'Example Company', email: '[email protected]', full_name: 'Example Client', phone: '123-456-7890', avatar: 'https://www.gravatar.com/avatar/93942e96f5acd83e2e047ad8fe03114d?s=100&d=robohash', } } }