# Create An Activity Source: https://docs.zixflow.com/api-reference/activity-list/create POST https://api.zixflow.com/api/v1/collection-records/activity-list This endpoint creates an activity or task within a collection. #### Description This API endpoint facilitates the creation of an activity or task within a specified collection. The activity can be associated with a collection record and is defined by various parameters provided in the request body. #### Body Specifies the type of icon associated with the activity. Possible values include 'emoji', 'interaction', 'messaging\_app', etc. Defines the specific value of the icon based on the iconType. * For 'emoji', provide any emoji. * For 'interaction', valid values include 'call', 'meeting', 'message', 'coffee', 'lunch', 'event', 'drink', etc. * For 'messaging\_app', valid values include 'whatsapp', 'twitter', 'linkedin', 'hangout', 'skype', 'slack', 'imessage', 'facebook\_messenger', 'signal', 'discord', 'wechat', 'telegram', 'viber', etc. The name or title of the activity. Specifies the scheduled time for the activity in the format "YYYY-MM-DDTHH:mm:ss.SSSZ". A description providing additional details about the activity. The ID of the collection record associated with the activity. The ID of the status attribute indicating the current status of the activity. #### Response Indicates the success or failure of the activity creation. In this case, true signifies a successful operation. Provides a human-readable message accompanying the response. In this instance, it confirms the successful creation of the activity with the message "Record created successfully!" The unique identifier for the created activity. An object containing details of the created activity. The unique identifier for the activity. The name or title of the activity. The scheduled time for the activity in the format "YYYY-MM-DDTHH:mm:ss.SSSZ". Additional details or description of the activity. The ID of the associated collection record, if any. Details of the assignee for the activity. The unique identifier for the assignee. The name of the assignee. The avatar or profile picture of the assignee. The email address of the assignee. Details of the status attribute associated with the activity. ```json 200-Success theme={null} { "status": true, "message": "Record created successfully!", "_id": "655c081eb3b96854c04e621a", "data": { "_id": "655c081eb3b96854c04e621a", "name": "Test Activity", "scheduleAt": "2023-12-01T00:00:00.000Z", "description": "Testing", "associated": null, "assignee": null, "status": { "_id": "65338d9cf781c59be3859c62", "color": "#9898fa", "name": "Open", "celebrationEnabled": false, "isArchived": false, "order": 1, "statusType": "normal", "timeInStatus": 0 }, "sourceDetails": "", "source": { "_id": "65338d9cf781c59be3859c6b", "name": "API", "color": "#dbeddb", "isArchived": false, "order": 2 }, "createdBy": { "_id": "65338d9a4d3b7a624a8d63ab", "name": "Test user", "avatar": "", "email": "user@zixflow.com" }, "completedTime": false, "activityLostReason": null, "createdAt": "2023-11-21T01:30:06.242Z" } } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "No token provided" } ``` # Delete Activity By ID Source: https://docs.zixflow.com/api-reference/activity-list/delete DELETE https://api.zixflow.com/api/v1/collection-records/activity-list/{activityId} This endpoint allows the deletion of selected activity details. #### Description This API endpoint facilitates the removal of a specific activity by providing its unique identifier. #### Path A unique identifier for the activity to be deleted. #### Response Indicates the success or failure of the activity deletion. In this case, true signifies a successful operation. Provides a human-readable message accompanying the response. In this instance, it confirms the successful deletion of the activity with the message "Record deleted successfully." ```json 200-Success theme={null} { "status": true, "message": "Record Deleted Successfully!" } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "No token provided" } ``` # Update An Activity Source: https://docs.zixflow.com/api-reference/activity-list/edit PATCH https://api.zixflow.com/api/v1/collection-records/activity-list/{activityId} This endpoint updates an existing activity or task within a collection. #### Description This API endpoint allows for the update of an existing activity or task within a specified collection. The activity to be updated is identified by the unique identifier (activityId) provided in the path parameter. #### Path The unique identifier for the activity to be updated. #### Body Specifies the type of icon associated with the activity. Possible values include 'emoji', 'interaction', 'messaging\_app', etc. Defines the specific value of the icon based on the iconType. * For 'emoji', provide any emoji. * For 'interaction', valid values include 'call', 'meeting', 'message', 'coffee', 'lunch', 'event', 'drink', etc. * For 'messaging\_app', valid values include 'whatsapp', 'twitter', 'linkedin', 'hangout', 'skype', 'slack', 'imessage', 'facebook\_messenger', 'signal', 'discord', 'wechat', 'telegram', 'viber', etc. The updated name or title of the activity. Specifies the updated scheduled time for the activity in the format "YYYY-MM-DDTHH:mm:ss.SSSZ". The updated description providing additional details about the activity. The updated ID of the collection record associated with the activity. The updated ID of the status attribute indicating the current status of the activity. #### Response Indicates the success or failure of the activity update. In this case, true signifies a successful operation. Provides a human-readable message accompanying the response. In this instance, it confirms the successful update of the activity with the message "Record updated successfully!" ```json 200-Success theme={null} { "status": true, "message": "Record updated successfully!" } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "No token provided" } ``` # Get List of Activities Source: https://docs.zixflow.com/api-reference/activity-list/get POST https://api.zixflow.com/api/v1/collection-records/activity-list/query This endpoint returns all activity data #### Body An array that will eventually allow users to define specific criteria for filtering data. Currently, it is an empty array, indicating that no filtering is applied at this time. An array that will eventually enable users to specify sorting criteria for the data. Like the filter array, it is currently empty, implying that no sorting is applied in the current context. he number of records to be returned, set to 10 in this instance. This parameter restricts the response to a specific quantity of records. The starting point from which the records are to be fetched within the entire dataset. In this case, it is set to 0, indicating that retrieval should commence from the beginning of the dataset. #### Response Indicates the success or failure of the record retrieval. In this case, true signifies a successful operation. Provides a human-readable message accompanying the response. In this instance, it confirms the successful retrieval of records with the message "Records fetched successfully." An array containing details of the fetched records. For each record in the data array: A unique identifier for the record, allowing for precise referencing. The name associated with the record. The scheduled time for the record in ISO 8601 format. Additional information or details about the record. Details about any associated entity, if applicable. Details about the assignee of the record: Unique identifier for the assignee. The name of the assignee. URL or information about the assignee's avatar. Email address of the assignee. Details about the status of the record: Unique identifier for the status. Hex color code representing the status color. The name of the status. Additional details about the source of the record. Details about the source of the record: Unique identifier for the source. The name of the source. Hex color code representing the source color. Details about the creator of the record: Unique identifier for the creator. The name of the creator. URL or information about the creator's avatar. Email address of the creator. The timestamp when the record was completed in ISO 8601 format. Reason for any lost activity, if applicable. The timestamp when the record was created in ISO 8601 format. ```json 200-Success theme={null} { "status": true, "message": "Records fetched successfully", "data": [ { "_id": "654b3231448888ff7d161a59", "name": "Call HOH", "scheduleAt": "2023-11-08T07:01:00.000Z", "description": "", "associated": null, "assignee": { "_id": "65338d9a4d3b7a624a8d63ab", "name": "Test User", "avatar": "", "email": "user@zixflow.com" }, "status": { "_id": "65338d9cf781c59be3859c63", "color": "#99ff93", "name": "Completed", "celebrationEnabled": false, "isArchived": false, "order": 2, "statusType": "normal", "timeInStatus": 0 }, "sourceDetails": "", "source": { "_id": "65338d9cf781c59be3859c6a", "name": "Manually created", "color": "#efe0da", "isArchived": false, "order": 1 }, "createdBy": { "_id": "65338d9a4d3b7a624a8d63ab", "name": "Test User", "avatar": "", "email": "user@zixflow.com" }, "completedTime": "2023-11-08T07:01:30.450Z", "activityLostReason": null, "createdAt": "2023-11-08T07:01:05.770Z" } ] } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "No token provided" } ``` # Get Activity By Id Source: https://docs.zixflow.com/api-reference/activity-list/get-by-id GET https://api.zixflow.com/api/v1/collection-records/activity-list/{activityId} This endpoint returns all activity data #### Path A unique identifier for the activity data. #### Response Indicates the success or failure of the record retrieval. In this case, true signifies a successful operation. Provides a human-readable message accompanying the response. In this instance, it confirms the successful retrieval of records with the message "Records fetched successfully." An array containing details of the fetched records. For each record in the data array: A unique identifier for the record, allowing for precise referencing. The name associated with the record. The scheduled time for the record in ISO 8601 format. Additional information or details about the record. Details about any associated entity, if applicable. Details about the assignee of the record: Unique identifier for the assignee. The name of the assignee. URL or information about the assignee's avatar. Email address of the assignee. Details about the status of the record: Unique identifier for the status. Hex color code representing the status color. The name of the status. Additional details about the source of the record. Details about the source of the record: Unique identifier for the source. The name of the source. Hex color code representing the source color. Details about the creator of the record: Unique identifier for the creator. The name of the creator. URL or information about the creator's avatar. Email address of the creator. The timestamp when the record was completed in ISO 8601 format. Reason for any lost activity, if applicable. The timestamp when the record was created in ISO 8601 format. ```json 200-Success theme={null} { "status": true, "message": "Records fetched successfully", "data": { "_id": "654b3231448888ff7d161a59", "name": "Call HOH", "scheduleAt": "2023-11-08T07:01:00.000Z", "description": "", "associated": null, "assignee": { "_id": "65338d9a4d3b7a624a8d63ab", "name": "Test User", "avatar": "", "email": "user@zixflow.com" }, "status": { "_id": "65338d9cf781c59be3859c63", "color": "#99ff93", "name": "Completed", "celebrationEnabled": false, "isArchived": false, "order": 2, "statusType": "normal", "timeInStatus": 0 }, "sourceDetails": "", "source": { "_id": "65338d9cf781c59be3859c6a", "name": "Manually created", "color": "#efe0da", "isArchived": false, "order": 1 }, "createdBy": { "_id": "65338d9a4d3b7a624a8d63ab", "name": "Test User", "avatar": "", "email": "user@zixflow.com" }, "completedTime": "2023-11-08T07:01:30.450Z", "activityLostReason": null, "createdAt": "2023-11-08T07:01:05.770Z" } } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "No token provided" } ``` # Create Custom Attribute Source: https://docs.zixflow.com/api-reference/attributes/create POST https://api.zixflow.com/api/v1/attributes/{target}/{targetId} This endpoint creates a new attribute for a specified target (collection or list). #### Description This API endpoint allows the creation of a new attribute within a specified target, either a collection or a list. Attributes define the nature and characteristics of the data stored within the target. #### Path Specifies the target type, which can be either "collection" or "list." A unique identifier for the target, either a collection ID or a list ID, depending on the target type. #### Body The API key name used to store data in the collection or list for this field. Defines the input type or nature of the field. Possible values include text, number, checkbox, currency, date, timestamp, rating, status, select, multiselect, record-reference, actor-reference, domain, file, ai-wizard, email-address, phone-number. The human-readable name of the field. Configuration settings for the attribute, including currency display type, currency code, record reference, AI wizard, and date display type. Accepted values: "code," "name," "narrowSymbol," "symbol." Specifies how currency should be displayed. The currency code (e.g., "EUR," "GBP," "USD," "CAD," "AUD"). An array of collection IDs connected to this attribute. The AI wizard field prompt. Defines how to display the date field. The default value for the attribute. A description providing additional information about the attribute. Indicates whether the attribute is editable (true/false). Indicates whether the attribute supports multiple selections (true/false). Indicates whether the attribute is required (true/false). Indicates whether the attribute values must be unique (true/false). The validation type for the attribute. Possible values include "none," "email," "url," "phone," "customRegex." #### Response Indicates the success or failure of the attribute creation. In this case, true signifies a successful operation. Provides a human-readable message accompanying the response. In this instance, it confirms the successful creation of the attribute. An object containing details of the newly created attribute: A unique identifier for the attribute, allowing for precise referencing. The API key name used to store data in the collection or list for this field. Defines the input type or nature of the field. The human-readable name of the field. Configuration settings for the attribute. The default value for the attribute. A description providing additional information about the attribute. Indicates whether the attribute is editable. Indicates whether the attribute supports multiple selections. Indicates whether the attribute is required. Indicates whether the attribute values must be unique. The validation type for the attribute. ```json 200-Success theme={null} { "status": true, "message": "success", "data": { "_id": "64ad815b273e66dae1afe10f", "apiKeyName": "name", "inputType": "text", "name": "Name", "config": { "currencyDisplayType": null, "currencyCode": null, "recordReference": [], "aiWizard": null, "dateDisplayType": null }, "defaultValue": null, "description": "", "isEditable": true, "isMultiSelect": false, "isRequired": false, "isUnique": false, "validation": "none" } } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "No token provided" } ``` # Delete Custom Attribute Source: https://docs.zixflow.com/api-reference/attributes/delete DELETE https://api.zixflow.com/api/v1/attributes/{target}/{targetId}/{attributeId} This endpoint allows the deletion of a custom attribute. #### Description This API endpoint facilitates the removal of a specific custom attribute by providing the necessary identifiers based on the target, whether it's a collection or a list. #### Path Specifies the target entity as either "collection" or "list." The unique identifier for the target entity (collection or list), allowing for precise referencing. (e.g Collection Id / List Id) The unique identifier for the attribute to be deleted. #### Response Indicates the success or failure of the attribute deletion. In this case, true signifies a successful operation. Provides a human-readable message accompanying the response. In this instance, it confirms the successful deletion of the attribute with the message "Attribute deleted successfully." ```json 200-Success theme={null} { "status": true, "message": "Attribute deleted successfully." } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "No token provided" } ``` # Get Attribute By ID Source: https://docs.zixflow.com/api-reference/attributes/get GET https://api.zixflow.com/api/v1/attributes/{target}/{targetId}/{attributeId} This endpoint retrieves the details of a specific attribute by ID. #### Description This API endpoint allows the retrieval of details for a specific attribute identified by its unique ID. The attribute provides information about the nature and characteristics of data stored within a collection or list. #### Path Specifies the target type, which can be either "collection" or "list." A unique identifier for the target, either a collection ID or a list ID, depending on the target type. The unique identifier for the attribute, allowing for precise referencing. #### Response Indicates the success or failure of the attribute retrieval. In this case, true signifies a successful operation. Provides a human-readable message accompanying the response. In this instance, it confirms the successful retrieval of the attribute details. An object containing details of the retrieved attribute: A unique identifier for the attribute, allowing for precise referencing. The API key name used to store data in the collection or list for this field. Defines the input type or nature of the field. Possible values include text, number, checkbox, currency, date, timestamp, rating, status, select, multiselect, record-reference, actor-reference, domain, file, ai-wizard, email-address, phone-number. The human-readable name of the field. Configuration settings for the attribute, including currency display type, currency code, record reference, AI wizard, and date display type. Accepted values: "code," "name," "narrowSymbol," "symbol." Specifies how currency should be displayed. The currency code (e.g., "EUR," "GBP," "USD," "CAD," "AUD"). An array of collection ids connected to this attribute. The AI wizard field prompt. Defines how to display the date field. The default value for the attribute. A description providing additional information about the attribute. Indicates whether the attribute is archived (true/false). Indicates whether the default value is enabled for the attribute (true/false). Indicates whether the attribute is editable (true/false). Indicates whether the attribute supports multiple selections (true/false). Indicates whether the attribute is required (true/false). Indicates whether the attribute is a system attribute (true/false). Indicates whether the attribute values must be unique (true/false). The validation type for the attribute. Possible values include "none," "email," "url," "phone," "customRegex." ```json 200-Success theme={null} { "status": true, "message": "success", "data": { "_id": "64ad815b273e66dae1afe10f", "apiKeyName": "name", "inputType": "text", "name": "Name", "config": { "currencyDisplayType": null, "currencyCode": null, "recordReference": [], "aiWizard": null, "dateDisplayType": null }, "defaultValue": null, "description": "", "isArchived": false, "isDefaultValueEnabled": false, "isEditable": true, "isMultiSelect": false, "isRequired": false, "isSystemAttribute": true, "isUniuqe": false, "validation": "none", "isUnique": false } } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "No token provided" } ``` # Get List Of Attributes Source: https://docs.zixflow.com/api-reference/attributes/get-list-of-attributes GET https://api.zixflow.com/api/v1/attributes/{target}/{targetId} This endpoint retrieves the list of attributes associated with a collection or list. #### Description This API endpoint allows the retrieval of attributes associated with a specified target, which can be either a "collection" or "list." Attributes provide information about the nature and characteristics of data stored within a collection or list. #### Path Specifies the target type, which can be either "collection" or "list." A unique identifier for the target, either a collection ID or a list ID, depending on the target type. #### Response Indicates the success or failure of the attribute retrieval. In this case, true signifies a successful operation. Provides a human-readable message accompanying the response. In this instance, it confirms the successful retrieval of attributes with the message "success." An array containing details of the retrieved attributes. For each attribute in the data array: A unique identifier for the attribute, allowing for precise referencing. The API key name used to store data in the collection or list for this field. Defines the input type or nature of the field. Possible values include text, number, checkbox, currency, date, timestamp, rating, status, select, multiselect, record-reference, actor-reference, domain, file, ai-wizard, email-address, phone-number. The human-readable name of the field. Configuration settings for the attribute, including currency display type, currency code, record reference, AI wizard, and date display type. Accepted values: "code," "name," "narrowSymbol," "symbol." Specifies how currency should be displayed. The currency code (e.g., "EUR," "GBP," "USD," "CAD," "AUD"). An array of collection ids connected to this attribute. The AI wizard field prompt. Defines how to display the date field. The default value for the attribute. A description providing additional information about the attribute. Indicates whether the attribute is archived (true/false). Indicates whether the default value is enabled for the attribute (true/false). Indicates whether the attribute is editable (true/false). Indicates whether the attribute supports multiple selections (true/false). Indicates whether the attribute is required (true/false). Indicates whether the attribute is a system attribute (true/false). Indicates whether the attribute values must be unique (true/false). The validation type for the attribute. Possible values include "none," "email," "url," "phone," "customRegex." ```json 200-Success theme={null} { "status": true, "message": "success", "data": [ { "_id": "64ad815b273e66dae1afe10f", "apiKeyName": "name", "inputType": "text", "name": "Name", "config": { "currencyDisplayType": null, "currencyCode": null, "recordReference": [], "aiWizard": null, "dateDisplayType": null }, "defaultValue": null, "description": "", "isArchived": false, "isDefaultValueEnabled": false, "isEditable": true, "isMultiSelect": false, "isRequired": false, "isSystemAttribute": true, "isUniuqe": false, "validation": "none", "isUnique": false }, // Additional attributes... ] } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "No token provided" } ``` # Delete Attribute Option Source: https://docs.zixflow.com/api-reference/attributes/options/delete DELETE https://api.zixflow.com/api/v1/attributes/{target}/{targetId}/{attributeId}/options/{optionId} This endpoint allows the deletion of a option within a select/multiselect attribute. #### Description This API endpoint facilitates the removal of a specific option within a select/multiselect attribute by providing the necessary identifiers based on the target, whether it's a collection or a list. #### Path Specifies the target entity as either "collection" or "list." The unique identifier for the target entity (collection or list), allowing for precise referencing. The unique identifier for the select/multiselect attribute containing the option to be deleted. The unique identifier for the option to be deleted. #### Response Indicates the success or failure of the option deletion. In this case, true signifies a successful operation. Provides a human-readable message accompanying the response. In this instance, it confirms the successful deletion of the option with the message "Attribute option deleted successfully." ```json 200-Success theme={null} { "status": true, "message": "Attribute option deleted successfully." } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "No token provided" } ``` # Get List Of Attribute Options Source: https://docs.zixflow.com/api-reference/attributes/options/get GET https://api.zixflow.com/api/v1/attributes/{target}/{targetId}/{attributeId}/options This endpoint retrieves the list of options for select/multiselect attributes. #### Description This API endpoint allows the retrieval of options associated with select or multiselect attributes. The options provide additional information or categorization for the specified attribute. #### Path Specifies the target type, which can be either "collection" or "list." A unique identifier for the target, either a collection ID or a list ID, depending on the target type. The ID of the select or multiselect attribute for which options are to be fetched. #### Response Indicates the success or failure of the option retrieval. In this case, true signifies a successful operation. Provides a human-readable message accompanying the response. In this instance, it confirms the successful retrieval of attribute options with the message "Attribute option list fetched successfully." An array containing details of the fetched attribute options. For each option in the data array: A unique identifier for the attribute option, allowing for precise referencing. The ID of the associated attribute to which the option belongs. Hex color code representing the color associated with the option. The name of the attribute option. Indicates whether the option is archived (true/false). The order or ranking of the option. ```json 200-Success theme={null} { "status": true, "message": "Attribute option list fetched successfully", "data": [ { "_id": "64ad815b273e66dae1afe124", "attributeId": "64ad815b273e66dae1afe121", "color": "#dbeddb", "name": "Deliverable", "isArchived": false, "order": 2 }, { "_id": "64ad815b273e66dae1afe125", "attributeId": "64ad815b273e66dae1afe121", "color": "#ffe2dd", "name": "Invalid", "isArchived": false, "order": 3 }, { "_id": "64ad815b273e66dae1afe126", "attributeId": "64ad815b273e66dae1afe121", "color": "#fdecc8", "name": "Risky", "isArchived": false, "order": 4 } ] } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "No token provided" } ``` # Update Attribute Option Source: https://docs.zixflow.com/api-reference/attributes/options/update PATCH https://api.zixflow.com/api/v1/attributes/{target}/{targetId}/{attributeId}/options/{optionId} This endpoint updates a select/multiselect attribute option. #### Description This API endpoint allows the update of a select/multiselect attribute option. Select/multiselect attribute options are used to define various choices available for a select/multiselect attribute associated with a collection or list. #### Path Specifies the target type, which can be either "collection" or "list." A unique identifier for the target, either a collection ID or a list ID, depending on the target type. The ID of the select/multiselect attribute to which the option belongs. The ID of the select/multiselect attribute option to be updated. #### Request Body The name of the select/multiselect option. Hex color code representing the color associated with the option. Indicates whether the option is archived (true/false). The order or ranking of the option. #### Response Indicates the success or failure of the select/multiselect option update. In this case, true signifies a successful operation. Provides a human-readable message accompanying the response. In this instance, it confirms the successful update of the attribute select/multiselect option with the message "Attribute option updated successfully." ```json 200-Success theme={null} { "status": true, "message": "Attribute option updated successfully" } ``` ``` { "status": false, "message": "No token provided" } ``` # Delete Attribute Status Option Source: https://docs.zixflow.com/api-reference/attributes/statuses/delete DELETE https://api.zixflow.com/api/v1/attributes/{target}/{targetId}/{attributeId}/status/{statusId} This endpoint allows the deletion of a status option within a status attribute. #### Description This API endpoint facilitates the removal of a specific status option within a status attribute by providing the necessary identifiers based on the target, whether it's a collection or a list. #### Path Specifies the target entity as either "collection" or "list." The unique identifier for the target entity (collection or list), allowing for precise referencing. The unique identifier for the status attribute containing the status option to be deleted. The unique identifier for the status option to be deleted. #### Response Indicates the success or failure of the status option deletion. In this case, true signifies a successful operation. Provides a human-readable message accompanying the response. In this instance, it confirms the successful deletion of the status option with the message "Attribute status deleted successfully." ```json 200-Success theme={null} { "status": true, "message": "Attribute status deleted successfully." } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "No token provided" } ``` # Get List Of Attribute Status Options Source: https://docs.zixflow.com/api-reference/attributes/statuses/get GET https://api.zixflow.com/api/v1/attributes/{target}/{targetId}/{attributeId}/status This endpoint retrieves the list of options for status attributes. #### Description This API endpoint allows the retrieval of options associated with status attributes. Status attributes are used to define different stages or states that an item can go through in a collection or list. #### Path Specifies the target type, which can be either "collection" or "list." A unique identifier for the target, either a collection ID or a list ID, depending on the target type. The ID of the status attribute for which options are to be fetched. #### Response Indicates the success or failure of the status option retrieval. In this case, true signifies a successful operation. Provides a human-readable message accompanying the response. In this instance, it confirms the successful retrieval of attribute status options with the message "Attribute status list fetched successfully." An array containing details of the fetched attribute status options. For each option in the data array: A unique identifier for the attribute status option, allowing for precise referencing. The ID of the associated status attribute to which the option belongs. The name of the attribute status option. Hex color code representing the color associated with the status option. Indicates whether the status option is archived (true/false). The time, in seconds, that items spend in this status option. Indicates whether celebration is enabled for this status option (true/false). Specifies the type of status. It can be "normal" or other applicable types. The order or ranking of the status option. ```json 200-Success theme={null} { "status": true, "message": "Attribute status list fetched successfully", "data": [ { "_id": "64ae57b3a3325d9749556eee", "attributeId": "64ae57b3a3325d9749556eeb", "name": "Stage 1", "color": "#e57b00", "isArchived": false, "timeInStatus": 0, "celebrationEnabled": false, "statusType": "normal", "__v": 0, "order": 1 }, { "_id": "6520b88e4f7b6dea01cf9b7b", "attributeId": "64ae57b3a3325d9749556eeb", "name": "Stage 2", "color": "#02b55c", "order": 2, "isArchived": false, "timeInStatus": null, "celebrationEnabled": false, "statusType": "normal", "__v": 0 } ] } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "No token provided" } ``` # Update Attribute Status Option Source: https://docs.zixflow.com/api-reference/attributes/statuses/update PATCH https://api.zixflow.com/api/v1/attributes/{target}/{targetId}/{attributeId}/status/{optionId} This endpoint updates a status attribute option. #### Description This API endpoint allows the update of a status attribute option. Status attribute options are used to define different stages or states that an item can go through in a collection or list. #### Path Specifies the target type, which can be either "collection" or "list." A unique identifier for the target, either a collection ID or a list ID, depending on the target type. The ID of the status attribute to which the option belongs. The ID of the status attribute option to be updated. #### Request Body The name of the status option. Hex color code representing the color associated with the option. Indicates whether the option is archived (true/false). Indicates whether celebration is enabled for the option (true/false). #### Response Indicates the success or failure of the status option update. In this case, true signifies a successful operation. Provides a human-readable message accompanying the response. In this instance, it confirms the successful update of the attribute status option with the message "Attribute status updated successfully." ```json 200-Success theme={null} { "status": true, "message": "Attribute status updated successfully" } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "No token provided" } ``` # Update Custom Attribute Source: https://docs.zixflow.com/api-reference/attributes/update PATCH https://api.zixflow.com/api/v1/attributes/{target}/{targetId}/{attributeId} This endpoint updates an existing attribute for a specified target (collection or list). #### Description This API endpoint allows the update of an existing attribute within a specified target, either a collection or a list. Attributes define the nature and characteristics of the data stored within the target. #### Path Specifies the target type, which can be either "collection" or "list." A unique identifier for the target, either a collection ID or a list ID, depending on the target type. A unique identifier for the attribute to be updated. #### Body The updated API key name used to store data in the collection or list for this field. The updated input type or nature of the field. Possible values include text, number, checkbox, currency, date, timestamp, rating, status, select, multiselect, record-reference, actor-reference, domain, file, ai-wizard, email-address, phone-number. The updated human-readable name of the field. Updated configuration settings for the attribute, including currency display type, currency code, record reference, AI wizard, and date display type. Accepted values: "code," "name," "narrowSymbol," "symbol." Specifies how currency should be displayed. The updated currency code (e.g., "EUR," "GBP," "USD," "CAD," "AUD"). An updated array of collection IDs connected to this attribute. The updated AI wizard field prompt. Defines how to display the updated date field. The updated default value for the attribute. An updated description providing additional information about the attribute. Indicates whether the attribute is editable (true/false). Indicates whether the attribute supports multiple selections (true/false). Indicates whether the attribute is required (true/false). Indicates whether the attribute values must be unique (true/false). The updated validation type for the attribute. Possible values include "none," "email," "url," "phone," "customRegex." #### Response Indicates the success or failure of the attribute update. In this case, true signifies a successful operation. Provides a human-readable message accompanying the response. In this instance, it confirms the successful update of the attribute. An object containing details of the updated attribute: A unique identifier for the updated attribute, allowing for precise referencing. The API key name used to store data in the collection or list for this field. Defines the updated input type or nature of the field. The updated human-readable name of the field. Updated configuration settings for the attribute. The updated default value for the attribute. An updated description providing additional information about the attribute. Indicates whether the updated attribute is editable. Indicates whether the updated attribute supports multiple selections. Indicates whether the updated attribute is required. Indicates whether the updated attribute values must be unique. The updated validation type for the attribute. ```json 200-Success theme={null} { "status": true, "message": "success", "data": { "_id": "64ad815b273e66dae1afe10f", "apiKeyName": "name", "inputType": "text", "name": "Name", "config": { "currencyDisplayType": null, "currencyCode": null, "recordReference": [], "aiWizard": null, "dateDisplayType": null }, "defaultValue": null, "description": "", "isEditable": true, "isMultiSelect": false, "isRequired": false, "isUnique": false, "validation": "none" } } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "No token provided" } ``` # API Key Authentication Source: https://docs.zixflow.com/api-reference/authentication API Key Authentication is a straightforward method for securing access to the Zixflow API's. You can generate an API key through Zixflow's dashboard, allowing you to define permissions, set expiration dates, and specify IP restrictions if necessary. #### Obtaining an API Key To obtain an API key for accessing the Zixflow API's, follow these steps: 1. **Access the Dashboard:** * Log in to your Zixflow dashboard. 2. **Generate an API Key:** * Navigate to **Settings** > **Workspace Settings** > **Developer** > **API Key**. 3. **Configure API Key Settings:** * When generating an API key, you can configure the following settings: * **Permissions:** * Specify the level of access you want to grant to the API key. You can define which API endpoints and actions the key is allowed to perform. * **Expiry (Optional):** * Optionally, set an expiration date for the API key. If set, the key will no longer be valid after the specified date. * **IP Restriction (Optional):** * Optionally, restrict API key usage to specific IP addresses. This enhances security by only allowing requests from designated IPs. 4. **Generate the API Key:** * After configuring your desired settings, click the "Generate" or "Create" button to generate the API key. 5. **Receive the API Key:** * Once generated, you will receive your API key, which you will use to authenticate your API requests. #### Using the API Key as a Bearer Token To authenticate your API requests using the API key as a Bearer token, include it in the `Authorization` header as follows: ```js theme={null} Authorization: Bearer your_api_key ``` Replace `your_api_key` with the actual API key you generated. #### Managing API Key Access You can manage and monitor API key access through your Zixflow dashboard. This includes revoking access and configuring permissions, but keep in mind that the API key will be treated as a Bearer token for authorization. # Introduction Source: https://docs.zixflow.com/api-reference/campaign/email/introduction Campaign - Send Email #### The Leading Email API Every business requires an email service to handle essential transactional emails and marketing messages, but not all need the extensive marketing features that Zixflow offers. For businesses seeking a more technically-focused email solution at scale, there's the Zixflow API. #### To Send Messages, Generate the API Key 1. Go to Developers under Admin settings at Zixflow Platform - [https://app.zixflow.com/settings/workspace/developer](https://app.zixflow.com/settings/workspace/developer) 2. Now assign the respective permissions to the channel which you want to give specific or all channels (all channels recommended so you don't have to change the API in the future if you want to use other channels) #### Setting Up on Zixflow Platform To send emails via API, verify your domain and add your footer address details at [https://app.zixflow.com/campaign/settings/email](https://app.zixflow.com/campaign/settings/email). Once setup is complete, you can begin testing the email API. # Send Email Source: https://docs.zixflow.com/api-reference/campaign/email/send-email POST https://api.zixflow.com/api/v1/campaign/email/send This endpoint allows you to send an email. #### Body This is to contain email ids where you need to send emails. you can add multiple email ids where you need to send emails. Max 10 emails at one api. This contains email subject This is a from email id. you can assigned only verified email id. you can verify from email id from zixflow dashboard by below-specified section. dashboard - campaign -> settings -> email -> domain Display name for from email address This field used to send html content in email either bodyHtml or bodyText is required This field used to send normal text content in email either bodyHtml or bodyText is required Should the click be tracked? If no value has been provided, Account's default setting will be used. Should the opens be tracked? If no value has been provided, Account's default setting will be used Email address to reply to Name to use when replying to the email. An array of ID's of attachments. Note: you can get attachment id from uploading attachment by upload attachment API (Optional) Specify the URL where the user's report and deliveries should be delivered. #### Response Indicates whether the call was successful. true if successful, false if not. success or error response message ```bash cUrl theme={null} curl --location --request POST 'https://api.zixflow.com/api/v1/campaign/email/send' \ --header 'Authorization: Bearer 56616641ee123b80a36b99fedc2bfa4f0d7f63072d97ddb1578c7a5aa970e7edde6618c7f750beb921aee3eebc9cc48899ee992fa4eb95a663d0e0b2eaa35b73f3b2344c' \ --header 'Content-Type: application/json' \ --data-raw '{ "to": [ "sample@gmail.com" ], "subject": "API test 1", "from": "test@domain.com", "fromName": "sahil", "bodyHtml": "

Test 1

", "trackClicks": true, "trackOpens": true, "replyToEmail": "test2@domain2.com", "attachments": ["63a98c9c2b6df936ac930c17"], "replyToName": "sam", "bodyText": "Just Text Email", "reportUrl": "https://webhook.site/0a276bc5-f0e4-4235-9006-b58b7d224ad5" }' ``` ```js Nodejs theme={null} var axios = require("axios"); var data = JSON.stringify({ to: ["sample@gmail.com"], subject: "API test 1", from: "test@domain.com", fromName: "sahil", bodyHtml: "

Test 1

", trackClicks: true, trackOpens: true, replyToEmail: "test2@domain2.com", attachments: ["63a98c9c2b6df936ac930c17"], replyToName: "sam", bodyText: "Just Text Email", reportUrl: "https://webhook.site/0a276bc5-f0e4-4235-9006-b58b7d224ad5", }); var config = { method: "post", url: "https://api.zixflow.com/api/v1/campaign/email/send", headers: { Authorization: "Bearer 56616641ee123b80a36b99fedc2bfa4f0d7f63072d97ddb1578c7a5aa970e7edde6618c7f750beb921aee3eebc9cc48899ee992fa4eb95a663d0e0b2eaa35b73f3b2344c", "Content-Type": "application/json", }, data: data, }; axios(config) .then(function (response) { console.log(JSON.stringify(response.data)); }) .catch(function (error) { console.log(error); }); ``` ```php PHP theme={null} setUrl('https://api.zixflow.com/api/v1/campaign/email/send'); $request->setMethod(HTTP_Request2::METHOD_POST); $request->setConfig(array( 'follow_redirects' => TRUE )); $request->setHeader(array( 'Authorization' => 'Bearer 56616641ee123b80a36b99fedc2bfa4f0d7f63072d97ddb1578c7a5aa970e7edde6618c7f750beb921aee3eebc9cc48899ee992fa4eb95a663d0e0b2eaa35b73f3b2344c', 'Content-Type' => 'application/json' )); $request->setBody('{\n "to": [\n "sample@gmail.com"\n ],\n "subject": "API test 1",\n "from": "test@domain.com",\n "fromName": "sahil",\n "bodyHtml": "

Test 1

",\n "trackClicks": true,\n "trackOpens": true,\n "replyToEmail": "test2@domain2.com",\n "attachments": ["63a98c9c2b6df936ac930c17"],\n "replyToName": "sam",\n "bodyText": "Just Text Email",\n "reportUrl": "https://webhook.site/0a276bc5-f0e4-4235-9006-b58b7d224ad5"\n}'); try { $response = $request->send(); if ($response->getStatus() == 200) { echo $response->getBody(); } else { echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' . $response->getReasonPhrase(); } } catch(HTTP_Request2_Exception $e) { echo 'Error: ' . $e->getMessage(); } ``` ```py Python theme={null} import requests import json url = "https://api.zixflow.com/api/v1/campaign/email/send" payload = json.dumps({ "to": [ "sample@gmail.com" ], "subject": "API test 1", "from": "test@domain.com", "fromName": "sahil", "bodyHtml": "

Test 1

", "trackClicks": True, "trackOpens": True, "replyToEmail": "test2@domain2.com", "attachments": [ "63a98c9c2b6df936ac930c17" ], "replyToName": "sam", "bodyText": "Just Text Email", "reportUrl": "https://webhook.site/0a276bc5-f0e4-4235-9006-b58b7d224ad5" }) headers = { 'Authorization': 'Bearer 56616641ee123b80a36b99fedc2bfa4f0d7f63072d97ddb1578c7a5aa970e7edde6618c7f750beb921aee3eebc9cc48899ee992fa4eb95a663d0e0b2eaa35b73f3b2344c', 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text) ``` ```java JAVA theme={null} OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\n \"to\": [\n \"sample@gmail.com\"\n ],\n \"subject\": \"API test 1\",\n \"from\": \"test@domain.com\",\n \"fromName\": \"sahil\",\n \"bodyHtml\": \"

Test 1

\",\n \"trackClicks\": true,\n \"trackOpens\": true,\n \"replyToEmail\": \"test2@domain2.com\",\n \"attachments\": [\"63a98c9c2b6df936ac930c17\"],\n \"replyToName\": \"sam\",\n \"bodyText\": \"Just Text Email\",\n \"reportUrl\": \"https://webhook.site/0a276bc5-f0e4-4235-9006-b58b7d224ad5\"\n}"); Request request = new Request.Builder() .url("https://api.zixflow.com/api/v1/campaign/email/send") .method("POST", body) .addHeader("Authorization", "Bearer 56616641ee123b80a36b99fedc2bfa4f0d7f63072d97ddb1578c7a5aa970e7edde6618c7f750beb921aee3eebc9cc48899ee992fa4eb95a663d0e0b2eaa35b73f3b2344c") .addHeader("Content-Type", "application/json") .build(); Response response = client.newCall(request).execute(); ``` ```dart DART theme={null} var headers = { 'Authorization': 'Bearer 56616641ee123b80a36b99fedc2bfa4f0d7f63072d97ddb1578c7a5aa970e7edde6618c7f750beb921aee3eebc9cc48899ee992fa4eb95a663d0e0b2eaa35b73f3b2344c', 'Content-Type': 'application/json' }; var request = http.Request('POST', Uri.parse('https://api.zixflow.com/api/v1/campaign/email/send')); request.body = json.encode({ "to": [ "sample@gmail.com" ], "subject": "API test 1", "from": "test@domain.com", "fromName": "sahil", "bodyHtml": "

Test 1

", "trackClicks": true, "trackOpens": true, "replyToEmail": "test2@domain2.com", "attachments": [ "63a98c9c2b6df936ac930c17" ], "replyToName": "sam", "bodyText": "Just Text Email", "reportUrl": "https://webhook.site/0a276bc5-f0e4-4235-9006-b58b7d224ad5" }); request.headers.addAll(headers); http.StreamedResponse response = await request.send(); if (response.statusCode == 200) { print(await response.stream.bytesToString()); } else { print(response.reasonPhrase); } ```
```json 200-Success theme={null} { "status": true, "message": "Email sent successfully!" } ``` ```json 400-Bad Request theme={null} { "status": false, "message": "to[1] must be a valid email" } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "No token provided" } ``` # Upload Attachment Source: https://docs.zixflow.com/api-reference/campaign/email/upload-attachment POST https://api.zixflow.com/api/v1/campaign/email/upload This API used to upload attachments in zixflow platform. Purpose of API is whenever the user wants to send an attachment in the email. user need to upload attachment in zixflow platform first. zixflow will provide id represents to attachment. and the user can send this id in send email API's attachment field to send attachment along with the email #### Body The "File" field refers to an attachment file that must be included in an email campaign. The file can be in any format, and its size should not exceed 25 megabytes (MB). #### Response Indicates whether the call was successful. true if successful, false if not. success or error response message The contents of uploaded file The name of the file. The size of the file in bytes. The date and time the file was added. The expiration date of the file (if specified). The unique identifier of the file. The content type of the file. The path to the medium-sized screenshot. The path to the thumbnail. ```bash cUrl theme={null} curl --location --request POST 'https://api.zixflow.com/api/v1/campaign/email/upload' \ --header 'Authorization: Bearer 56616641ee123b80a36b99fedc2bfa4f0d7f63072d97ddb1578c7a5aa970e7edde6618c7f750beb921aee3eebc9cc48899ee992fa4eb95a663d0e0b2eaa35b73f3b2344c' \ --form 'file=@""' ``` ```js Nodejs theme={null} var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); var data = new FormData(); data.append('file', fs.createReadStream('/home/sahil/Downloads/welcome-screen.png')); var config = { method: 'post', url: 'https://api.zixflow.com/api/v1/campaign/email/upload', headers: { 'Authorization': 'Bearer 56616641ee123b80a36b99fedc2bfa4f0d7f63072d97ddb1578c7a5aa970e7edde6618c7f750beb921aee3eebc9cc48899ee992fa4eb95a663d0e0b2eaa35b73f3b2344c', ...data.getHeaders() }, data : data }; axios(config) .then(function (response) { console.log(JSON.stringify(response.data)); }) .catch(function (error) { console.log(error); }); ``` ```py Python theme={null} import requests url = "https://api.zixflow.com/api/v1/campaign/email/upload" payload={} files=[ ('file',('welcome-screen.png',open('/home/sahil/Downloads/welcome-screen.png','rb'),'image/png')) ] headers = { 'Authorization': 'Bearer 56616641ee123b80a36b99fedc2bfa4f0d7f63072d97ddb1578c7a5aa970e7edde6618c7f750beb921aee3eebc9cc48899ee992fa4eb95a663d0e0b2eaa35b73f3b2344c' } response = requests.request("POST", url, headers=headers, data=payload, files=files) print(response.text) ``` ```java JAVA theme={null} OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse("text/plain"); RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM) .addFormDataPart("file","welcome-screen.png", RequestBody.create(MediaType.parse("application/octet-stream"), new File("/home/sahil/Downloads/welcome-screen.png"))) .build(); Request request = new Request.Builder() .url("https://api.zixflow.com/api/v1/campaign/email/upload") .method("POST", body) .addHeader("Authorization", "Bearer 56616641ee123b80a36b99fedc2bfa4f0d7f63072d97ddb1578c7a5aa970e7edde6618c7f750beb921aee3eebc9cc48899ee992fa4eb95a663d0e0b2eaa35b73f3b2344c") .build(); Response response = client.newCall(request).execute(); ``` ```dart DART theme={null} var headers = { 'Authorization': 'Bearer 56616641ee123b80a36b99fedc2bfa4f0d7f63072d97ddb1578c7a5aa970e7edde6618c7f750beb921aee3eebc9cc48899ee992fa4eb95a663d0e0b2eaa35b73f3b2344c' }; var request = http.MultipartRequest('POST', Uri.parse('https://api.zixflow.com/api/v1/campaign/email/upload')); request.files.add(await http.MultipartFile.fromPath('file', '/home/sahil/Downloads/welcome-screen.png')); request.headers.addAll(headers); http.StreamedResponse response = await request.send(); if (response.statusCode == 200) { print(await response.stream.bytesToString()); } else { print(response.reasonPhrase); } ``` ```json 200-Success theme={null} { "status": true, "data": { "filename": "file-welcome-screen-1672054415115.png", "size": 7343, "dateadded": "2022-12-26T11:33:36.2633971Z", "expirationdate": null, "fileid": "63a98690b0ec6c81460f4f1d", "contenttype": "image/png", "mediumscreenshotpath": "93b7fbda-4306-4ab7-bb80-e4375750ea76/mediumscreenshots/file-welcome-screen-1672054415115.png", "thumbnailpath": "93b7fbda-4306-4ab7-bb80-e4375750ea76/thumbnails/file-welcome-screen-1672054415115.png" }, "message": "Successfully uploaded file" } ``` ```json 400-Bad Request theme={null} { "status": false, "message": "file size exceeded" } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "No token provided" } ``` # OTPflow API Source: https://docs.zixflow.com/api-reference/campaign/otp-flow/otp-flow-api POST https://api.zixflow.com/api/v1/campaign/otp-flow AI-powered OTPflow API designed to maximize message delivery success by automatically routing messages through multiple channels on autopilot. We’ve worked with hundreds of clients, and one common question is: **How can we achieve 100% message delivery?** Over the years, we’ve optimized every channel using AI-powered real-time dynamic routing and automated retries at Zixflow. While we outperform competitors in delivery rates, achieving 100% delivery isn’t always possible due to limitations in operator infrastructure, which is beyond our control. However, ensuring critical use cases like OTPs or mandatory messages reach users on time is essential, as missed messages can lead to lost business opportunities. To solve this, we’re introducing the **world’s first OTPflow API.** With this, we can achieve **99.99% delivery for valid numbers.** Here’s how it works: * The system uses AI to optimize delivery across all channels with priority routing, not just at Zixflow but also at the operator level. * If a message fails or isn’t delivered in time, it automatically switches to another channel. * You can pass potential messages to all activated channels in your account, and the system will handle delivery optimization on autopilot. This approach ensures faster and more reliable message delivery, reducing drop-offs and maximizing business impact. #### How does it work? 1. **Sequential Delivery**: Messages are sent in the defined order (e.g., SMS → WhatsApp → RCS). You can customize it on request. 2. **Timeout Handling**: * If a message is delivered within the timeout window, the next steps are skipped. * If a message fails, it will switch to the next channel (e.g., if the message fails within 2 seconds, it will move to the next channel immediately without waiting for the timeout). * If we don’t receive a delivery report (success or failure) within the timeout window, it will switch to the next channel. 3. **Multi-Channel Reliability**: Combining SMS, WhatsApp, and RCS ensures high delivery success. #### Example Flow * **Scenario**: Send via SMS (timeout 10s), then WhatsApp (timeout 10s), then RCS (timeout 10s). * **Process**: 1. SMS message sent first. 2. If delivered, stops. If failed or no response, moves to WhatsApp. 3. Same logic applies to RCS. #### Benefits: * **Higher Delivery Rates**: Ensures at least one channel succeeds. * **Efficient Use of Resources**: No redundant attempts and reduces wait-time for users. * **Customizable**: Control timeouts and delivery order. * **Save Costs**: Instead of retrying on the same channel multiple times or sending messages to all channels simultaneously, this approach triggers the second channel only if the first one fails, reducing unnecessary usage and cost. * **Real-time updates**: When a switch occurs to the next channel, we can trigger a webhook to your system. This allows you to optimize the user experience. For example, if SMS couldn’t be delivered, we’ll notify you that the message has been sent via the next channel ex. WhatsApp. #### Limitation: 1. **Timeout Limitation**: The maximum timeout window for all channels combined is 5 minutes (300 seconds). After this, the entire request is skipped. 2. **Total Messages**: In one request, you can send a minimum of 1 message and a maximum of 5 messages. You can use the same channel multiple times or use different channels as per your need (e.g., SMS → SMS → WhatsApp → RCS → Email). 3. **Fallback Channels**: In some cases, delivery reports may arrive late, even if the message was delivered on time. Despite optimizations, this may result in messages being sent on multiple channels if the report isn't received within the timeout window. **How to Test**: To check if all information or messages are being sent correctly, set the timeout to 0. This will trigger all messages at once, allowing you to verify if they’re received on the test number from all channels. Once confirmed, increase the timeout for the production environment. We recommend adding a 10-second delay between each message for optimal performance. **No Additional Cost**: There are no extra charges for this service. You’ll only be charged for the messages sent, based on the pricing of each channel. Number Verification: For OTP or number verification, use only SMS, WhatsApp, and RCS. Avoid using email, as users may receive the OTP via email, but it won’t verify the phone number. ### Request Body Parameters #### Root Fields | Field | Type | Description | Required | | ------------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | | messages | array | A list of `message` objects to be sent. It explained below. | Yes | | webhookurl | string | **Important:** Pass the webhook URL if you want to display a message to the user when a channel switch happens. eg. If a message switches from SMS to RCS, a webhook will be triggered. You can ignore if you don’t want it.

This is **not** a message delivery webhook. That you need to pass it only in the respective message body. The report URL is separate and used for reporting purposes like delivered. | No | | callbackData | string | Metadata or identifiers passed for callbacks. | No | #### Message Object Each message object in the `messages` array contains the following fields: | Field | Type | Description | Required | | ----------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | | channel | string | The channel through which the message is sent (e.g., `sms`/`whatsapp`/`rcs`/`email`). | Yes | | timeout | number | Timeout value for the message in seconds. it range from 0-300. | Yes | | messageType | string | Type of the message. Empty for email and sms channel. For rcs values can be `text`, `message`, `video`, `audio`, `document`, `template`. For whatsapp value can be `template`, `custom`. | Yes | | data | object | The message data containing detailed information with respective channel. | Yes | #### Message Data Object The `data` object contains the following api request body payload: | | Channel | Message Type | Payload | | ---------------------------- | ---------- | ------------ | ----------------------------------------------------------------------- | | Send SMS | `sms` | | [Data Payload](/api-reference/campaign/sms/send-sms-post) | | Send Whatsapp Template | `whatsapp` | `template` | [Data Payload](/api-reference/campaign/whatsapp/send-whatsapp-message) | | Send Direct Whatsapp Message | `whatsapp` | `custom` | [Data Payload](/api-reference/campaign/whatsapp/messages/text-messages) | | Send RCS Text Message | `rcs` | `text` | [Data Payload](/api-reference/campaign/rcs/messages/text-message) | | Send RCS Image Message | `rcs` | `image` | [Data Payload](/api-reference/campaign/rcs/messages/image-message) | | Send RCS Video Message | `rcs` | `video` | [Data Payload](/api-reference/campaign/rcs/messages/video-message) | | Send RCS Audio Message | `rcs` | `audio` | [Data Payload](/api-reference/campaign/rcs/messages/audio-message) | | Send RCS Document Message | `rcs` | `document` | [Data Payload](/api-reference/campaign/rcs/messages/document-message) | | Send RCS Template Message | `rcs` | `template` | [Data Payload](/api-reference/campaign/rcs/send-rcs-template) | | Send Email | `email` | | [Data Payload](/api-reference/campaign/email/send-email) | *** If you're using WhatsApp for authentication or OTP, we recommend using the [WhatsApp Authentication template](/api-reference/campaign/whatsapp/whatsapp-auth-template). ### Request Body Schema A list of `message` objects to be sent. It explained below. The channel through which the message is sent (e.g., `sms`/`whatsapp`/`rcs`/`email`). Timeout value for the message in seconds. it range from 0-300. Type of the message. Empty for email and sms channel. For rcs values can be `text`, `message`, `video`, `audio`, `document`, `template`. For whatsapp value can be `template`, `custom`. The message data containing detailed information with respective channel. The URL where message success or failed webhook will be sent with index. Metadata or identifiers passed for callbacks. ## Example Request ```bash theme={null} curl -X POST \ https://api.zixflow.com/api/v1/campaign/otp-flow \ -H 'Content-Type: application/json' \ -d '{ "webhookurl": "https://example.com/webhook", "callbackData": "order123", "messages": [ { "channel": "sms", "timeout": 0, "messageType": "", "data": { "senderId": "SAMPLE", "route": "promotional", "number": "919876543210", "message": "Boost efficiency with ZixFlow! 🚀 Streamline workflows & save time. Start now at www.zixflow.com or call 123-456-7890. Your success, simplified!", "dltTemplateId": "1234", "dltEntityId": "1234", "isFlash": false, "submissionStatus": true, "reportURL": "https://example.com/webhook" } }, { "channel": "whatsapp", "timeout": 0, "messageType": "template", "data": { "to": "919876543210", "phoneId": "test-phone-id", "templateName": "marketing_sample_2", "language": "en", "variables": { "":" }, "source": "OTPflow", "linkWithRecord": false, "reportURL": "https://example.com/webhook" } }, { "channel": "rcs", "timeout": 0, "messageType": "text", "data": { "to": "919876543210", "botId": "test-bot-id", "text": "Boost efficiency with ZixFlow! 🚀 Streamline workflows & save time. Start now at www.zixflow.com or call 123-456-7890. Your success, simplified!", "source": "OTPflow", "linkWithRecord": false, "reportURL": "https://example.com/webhook" } }, { "channel": "email", "timeout": 0, "messageType": "", "data": { "to": [ "text@sample.com" ], "subject": "Boost efficiency with ZixFlow!", "from": "mailer@sample.us", "fromName": "Zixflow Marketing", "bodyHtml": "

Boost efficiency with ZixFlow! 🚀 Streamline workflows & save time. Start now at www.zixflow.com or call 123-456-7890. Your success, simplified!

", "trackClicks": true, "trackOpens": true, "replyToEmail": "support@sample.com", "attachments": [], "replyToName": "Support", "bodyText": "Boost efficiency with ZixFlow! 🚀 Streamline workflows & save time. Start now at www.zixflow.com or call 123-456-7890. Your success, simplified!", "callbackUrl": "https://example.com/webhook" } } ] }' ``` *** ## Response ### Success Response **Status Code:** `200 OK` ```json theme={null} { "status": "success", "message": "Message sent successfully.", "eventId": "ca64ad45-937d-45b4-9c5d-9b1d93bf2302", "requestIds": [ "ca64ad45-937d-45b4-9c5d-9b1d93bf2303", "ca64ad45-937d-45b4-9c5d-9b1d93bf2304", "ca64ad45-937d-45b4-9c5d-9b1d93bf2305", "ca64ad45-937d-45b4-9c5d-9b1d93bf2306" ] } ``` ### Error Response **Status Code:** `400 Bad Request` ```json theme={null} { "status": "error", "message": "Invalid request payload." } ``` *** ## Notes * Ensure the webhook URL is accessible and capable of handling incoming responses. Our system makes only one attempt, and if your webhook URL is down, the request response cannot be recovered. * Timeout values should be set based on the use case to prevent excessive delays. # Get List of Template Variables Source: https://docs.zixflow.com/api-reference/campaign/rcs/get-template-variables GET https://api.zixflow.com/api/v1/campaign/rcs/variable-keys/{botId} Retrieve the variable details for a specific RCS template. # Get List of RCS Template Variables This API allows you to retrieve the list of variables for a specific RCS template associated with a bot. #### Path Parameters The unique identifier for the bot associated with the RCS template. Contact the Zixflow support team to configure or retrieve your bot ID. #### Query Parameters The name of the RCS template for which variable details are being requested. #### Response Indicates whether the call was successful. `true` if successful, `false` if not. Provides success or error message details. An array of key-value pairs representing the variables for the specified RCS template. The variable key in the template (e.g., "Customer\_Name"). The data type of the variable (e.g., "string", "date"). #### Response Examples ```json 200-Success theme={null} { "status": true, "message": "Success", "data": [ { "key": "Customer_Name", "type": "string" }, { "key": "Appointment_Date", "type": "date" } ] } ``` ```json 400-Bad Request theme={null} { "status": false, "message": "Invalid bot ID or template name" } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "No token provided" } ``` # Incoming Message Webhook Source: https://docs.zixflow.com/api-reference/campaign/rcs/incoming-message-webhook You can receive incoming messages on your webhook, enabling real-time integration with your systems. > Note: this is not for message delivery status — the webhook is triggered only for incoming messages. #### 🛠️ How to Create a Webhook To set up a webhook in Zixflow: 1. Navigate to the **Zixflow** application. 2. Go to the **Settings** section. 3. Open the **Developer** section. 4. Click on **Webhook**. 5. Click on the **➕ Add** button. ##### Below is a list of available events, including their structure and example payloads. #### 1. `incoming.rcs.message` Triggered when a new RCS message is received. ```json theme={null} { "event": "incoming.rcs.message", // Event Type "eventId": "3472dff5-7c06-40e6-be06-a28a335ac263", // UUID v4 - Event id to uniquilly identify event "timestamp": 1744346001738, // Message At 13 digit timestamp "botId": "xxxxxxxxxxxxxx79", // RCS Bot ID "messageId": "MxUMzTyF6kRBe7q5cPpwDufg", // RCS messsage id "sender": { "number": "919999999999" // End user phone number with country code }, "message": { // When Text Messages Receives "type": "text" "text": "Hi" // When user click on quick reply buttons "type": "reply" "reply": "More" // When Image Message Receives "type": "image", "image":{ "mimeType": "image/xxxx", // Image Mime type "fileSizeBytes": 86267, // Image Size in Bytes "fileName": "", // Image File Name "fileUri": "", // Image File URL } // When Video Message Receives "type": "video", "video":{ "mimeType": "video/xxxx", // Video Mime type "fileSizeBytes": 86267, // Video Size in Bytes "fileName": "", // Video File Name "fileUri": "", // Video File URL } // When Audio Message Receives "type": "audio", "audio":{ "mimeType": "audio/xxxx", // Audio Mime type "fileSizeBytes": 86267, // Audio Size in Bytes "fileName": "", // Audio File Name "fileUri": "", // Audio File URL } // When File Message Receives "type": "file", "file":{ "mimeType": "xxxx/xxxx", // File Mime type "fileSizeBytes": 86267, // File Size in Bytes "fileName": "", // File File Name "fileUri": "", // File File URL } // When Location Message Receives "type": "location", "location": { "latitude": 19.2232384 "longitude": 73.0798646 } }, "metaData": { "accountId": "xxxxxxxxxxxxxb8de24d95b59", // Zixflow Account Id "orgMsgId": "xxxxxxxxxxxx67f3cbd6b9d1" // Zixflow Org Message Id } } ``` # Introduction to RCS Messaging Source: https://docs.zixflow.com/api-reference/campaign/rcs/introduction Rich Communication Services (RCS) is an advanced messaging protocol that allows businesses to send interactive, media-rich messages to users. Currently, Zixflow supports RCS messaging for clients in **India only**. ### Getting Started with RCS To start using RCS, clients must contact the Zixflow support team. Our team will guide you through creating an RCS account. Once the account is set up, Zixflow will link it to your profile, activating it on your account. # Send Audio Message Source: https://docs.zixflow.com/api-reference/campaign/rcs/messages/audio-message POST https://api.zixflow.com/api/v1/campaign/rcs/message/audio #### Body Specifies the recipient's phone number in international format (e.g., "1xxxxxxxxxx"). This is the unique identifier associated with the RCS bot. Find the BOT ID on the Zixflow RCS Settings page. [RCS Settings](https://app.zixflow.com/campaign/settings/rcs) Audio url which need to send A Suggestions Object includes the following fields and formatting options: Suggestion Type Options: "reply", "open-url", "dialer", "location", "calendar-event" Displayed as button text to the end user. (Optional) Used to track user interactions. When clicked, a unique postback event is triggered on the webhook. Required if type is "open-url". Must be a valid URL. Example: [https://google.com](https://google.com) Required for "dialer" type. Must be a valid phone number with country code and "+" prefix. Example: +919876543210 Required for "location" type. Label for the location. Example: "Office Location" Required for "location" type. Latitude value in numeric format. Example: 12.9363301 Required for "location" type. Longitude value in numeric format. Example: 77.6084231 Required for "calendar-event" type. Event title. Example: "Zixflow Appointment" Required for "calendar-event" type. Event description. Example: "Appointment with Zixflow team to understand their application." Required for "calendar-event" type. Start date and time in ISO format. Example: "2024-11-30T14:00:00Z" Required for "calendar-event" type. End date and time in ISO format. Example: "2024-11-30T15:00:00Z" If the "linkWithRecord" is set to true, the source from which the WhatsApp message is sent should be mentioned; otherwise, it defaults to API. Specify whether to associate the current message with a record and display it in the inbox. Set it to "true" for linking with a record; otherwise, it defaults to "false." (Optional) Specify the URL where the user's report and deliveries should be delivered. (Optional) Indicates whether to wait for the submission status. Set it to "true" if you want to wait for the submission status; otherwise, it defaults to "false." #### Response Indicates whether the call was successful. true if successful, false if not. success or error response message ```json 200-Success theme={null} { "status": true, "message": "Message sent successfully" } ``` ```json 400-Bad Request theme={null} { "status": false, "message": "Invalid data Provided" } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "Unauthorised" } ``` # Send Document Message Source: https://docs.zixflow.com/api-reference/campaign/rcs/messages/document-message POST https://api.zixflow.com/api/v1/campaign/rcs/message/document #### Body Specifies the recipient's phone number in international format (e.g., "1xxxxxxxxxx"). This is the unique identifier associated with the RCS bot. Find the BOT ID on the Zixflow RCS Settings page. [RCS Settings](https://app.zixflow.com/campaign/settings/rcs) Document url which need to send A Suggestions Object includes the following fields and formatting options: Suggestion Type Options: "reply", "open-url", "dialer", "location", "calendar-event" Displayed as button text to the end user. (Optional) Used to track user interactions. When clicked, a unique postback event is triggered on the webhook. Required if type is "open-url". Must be a valid URL. Example: [https://google.com](https://google.com) Required for "dialer" type. Must be a valid phone number with country code and "+" prefix. Example: +919876543210 Required for "location" type. Label for the location. Example: "Office Location" Required for "location" type. Latitude value in numeric format. Example: 12.9363301 Required for "location" type. Longitude value in numeric format. Example: 77.6084231 Required for "calendar-event" type. Event title. Example: "Zixflow Appointment" Required for "calendar-event" type. Event description. Example: "Appointment with Zixflow team to understand their application." Required for "calendar-event" type. Start date and time in ISO format. Example: "2024-11-30T14:00:00Z" Required for "calendar-event" type. End date and time in ISO format. Example: "2024-11-30T15:00:00Z" If the "linkWithRecord" is set to true, the source from which the WhatsApp message is sent should be mentioned; otherwise, it defaults to API. Specify whether to associate the current message with a record and display it in the inbox. Set it to "true" for linking with a record; otherwise, it defaults to "false." (Optional) Specify the URL where the user's report and deliveries should be delivered. (Optional) Indicates whether to wait for the submission status. Set it to "true" if you want to wait for the submission status; otherwise, it defaults to "false." #### Response Indicates whether the call was successful. true if successful, false if not. success or error response message ```json 200-Success theme={null} { "status": true, "message": "Message sent successfully" } ``` ```json 400-Bad Request theme={null} { "status": false, "message": "Invalid data Provided" } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "Unauthorised" } ``` # Send Image Message Source: https://docs.zixflow.com/api-reference/campaign/rcs/messages/image-message POST https://api.zixflow.com/api/v1/campaign/rcs/message/image #### Body Specifies the recipient's phone number in international format (e.g., "1xxxxxxxxxx"). This is the unique identifier associated with the RCS bot. Find the BOT ID on the Zixflow RCS Settings page. [RCS Settings](https://app.zixflow.com/campaign/settings/rcs) Image url which need to send A Suggestions Object includes the following fields and formatting options: Suggestion Type Options: "reply", "open-url", "dialer", "location", "calendar-event" Displayed as button text to the end user. (Optional) Used to track user interactions. When clicked, a unique postback event is triggered on the webhook. Required if type is "open-url". Must be a valid URL. Example: [https://google.com](https://google.com) Required for "dialer" type. Must be a valid phone number with country code and "+" prefix. Example: +919876543210 Required for "location" type. Label for the location. Example: "Office Location" Required for "location" type. Latitude value in numeric format. Example: 12.9363301 Required for "location" type. Longitude value in numeric format. Example: 77.6084231 Required for "calendar-event" type. Event title. Example: "Zixflow Appointment" Required for "calendar-event" type. Event description. Example: "Appointment with Zixflow team to understand their application." Required for "calendar-event" type. Start date and time in ISO format. Example: "2024-11-30T14:00:00Z" Required for "calendar-event" type. End date and time in ISO format. Example: "2024-11-30T15:00:00Z" If the "linkWithRecord" is set to true, the source from which the WhatsApp message is sent should be mentioned; otherwise, it defaults to API. Specify whether to associate the current message with a record and display it in the inbox. Set it to "true" for linking with a record; otherwise, it defaults to "false." (Optional) Specify the URL where the user's report and deliveries should be delivered. (Optional) Indicates whether to wait for the submission status. Set it to "true" if you want to wait for the submission status; otherwise, it defaults to "false." #### Response Indicates whether the call was successful. true if successful, false if not. success or error response message ```json 200-Success theme={null} { "status": true, "message": "Message sent successfully" } ``` ```json 400-Bad Request theme={null} { "status": false, "message": "Invalid data Provided" } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "Unauthorised" } ``` # Send Text Message Source: https://docs.zixflow.com/api-reference/campaign/rcs/messages/text-message POST https://api.zixflow.com/api/v1/campaign/rcs/message/text #### Body Specifies the recipient's phone number in international format (e.g., "1xxxxxxxxxx"). This is the unique identifier associated with the RCS bot. Find the BOT ID on the Zixflow RCS Settings page. [RCS Settings](https://app.zixflow.com/campaign/settings/rcs) text messages which need to send. Maximum length: 4096 characters. A Suggestions Object includes the following fields and formatting options: Suggestion Type Options: "reply", "open-url", "dialer", "location", "calendar-event" Displayed as button text to the end user. (Optional) Used to track user interactions. When clicked, a unique postback event is triggered on the webhook. Required if type is "open-url". Must be a valid URL. Example: [https://google.com](https://google.com) Required for "dialer" type. Must be a valid phone number with country code and "+" prefix. Example: +919876543210 Required for "location" type. Label for the location. Example: "Office Location" Required for "location" type. Latitude value in numeric format. Example: 12.9363301 Required for "location" type. Longitude value in numeric format. Example: 77.6084231 Required for "calendar-event" type. Event title. Example: "Zixflow Appointment" Required for "calendar-event" type. Event description. Example: "Appointment with Zixflow team to understand their application." Required for "calendar-event" type. Start date and time in ISO format. Example: "2024-11-30T14:00:00Z" Required for "calendar-event" type. End date and time in ISO format. Example: "2024-11-30T15:00:00Z" If the "linkWithRecord" is set to true, the source from which the WhatsApp message is sent should be mentioned; otherwise, it defaults to API. Specify whether to associate the current message with a record and display it in the inbox. Set it to "true" for linking with a record; otherwise, it defaults to "false." (Optional) Specify the URL where the user's report and deliveries should be delivered. (Optional) Indicates whether to wait for the submission status. Set it to "true" if you want to wait for the submission status; otherwise, it defaults to "false." #### Response Indicates whether the call was successful. true if successful, false if not. success or error response message ```json 200-Success theme={null} { "status": true, "message": "Message sent successfully" } ``` ```json 400-Bad Request theme={null} { "status": false, "message": "Invalid data Provided" } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "Unauthorised" } ``` # Send Video Message Source: https://docs.zixflow.com/api-reference/campaign/rcs/messages/video-message POST https://api.zixflow.com/api/v1/campaign/rcs/message/video #### Body Specifies the recipient's phone number in international format (e.g., "1xxxxxxxxxx"). This is the unique identifier associated with the RCS bot. Find the BOT ID on the Zixflow RCS Settings page. [RCS Settings](https://app.zixflow.com/campaign/settings/rcs) Audio url which need to send A Suggestions Object includes the following fields and formatting options: Suggestion Type Options: "reply", "open-url", "dialer", "location", "calendar-event" Displayed as button text to the end user. (Optional) Used to track user interactions. When clicked, a unique postback event is triggered on the webhook. Required if type is "open-url". Must be a valid URL. Example: [https://google.com](https://google.com) Required for "dialer" type. Must be a valid phone number with country code and "+" prefix. Example: +919876543210 Required for "location" type. Label for the location. Example: "Office Location" Required for "location" type. Latitude value in numeric format. Example: 12.9363301 Required for "location" type. Longitude value in numeric format. Example: 77.6084231 Required for "calendar-event" type. Event title. Example: "Zixflow Appointment" Required for "calendar-event" type. Event description. Example: "Appointment with Zixflow team to understand their application." Required for "calendar-event" type. Start date and time in ISO format. Example: "2024-11-30T14:00:00Z" Required for "calendar-event" type. End date and time in ISO format. Example: "2024-11-30T15:00:00Z" If the "linkWithRecord" is set to true, the source from which the WhatsApp message is sent should be mentioned; otherwise, it defaults to API. Specify whether to associate the current message with a record and display it in the inbox. Set it to "true" for linking with a record; otherwise, it defaults to "false." (Optional) Specify the URL where the user's report and deliveries should be delivered. (Optional) Indicates whether to wait for the submission status. Set it to "true" if you want to wait for the submission status; otherwise, it defaults to "false." #### Response Indicates whether the call was successful. true if successful, false if not. success or error response message ```json 200-Success theme={null} { "status": true, "message": "Message sent successfully" } ``` ```json 400-Bad Request theme={null} { "status": false, "message": "Invalid data Provided" } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "Unauthorised" } ``` # Send Template Message Source: https://docs.zixflow.com/api-reference/campaign/rcs/send-rcs-template POST https://api.zixflow.com/api/v1/campaign/rcs/message/template # Send RCS Template Message This API enables you to send RCS template messages to users who have a live session. Only approved templates are supported for message sending. ### Request Body Parameters Specifies the recipient's phone number in international format (e.g., "1xxxxxxxxxx"). This is the unique identifier associated with the RCS bot. Find the BOT ID on the Zixflow RCS Settings page. [RCS Settings](https://app.zixflow.com/campaign/settings/rcs) The name of the approved template for sending RCS messages. (Optional) An object with key-value pairs to populate template placeholders. If the "linkWithRecord" is set to true, the source from which the WhatsApp message is sent should be mentioned; otherwise, it defaults to API. Specify whether to associate the current message with a record and display it in the inbox. Set it to "true" for linking with a record; otherwise, it defaults to "false." (Optional) Specify the URL where the user's report and deliveries should be delivered. (Optional) Indicates whether to wait for the submission status. Set it to "true" if you want to wait for the submission status; otherwise, it defaults to "false." ### Response Indicates if the API call was successful. Returns true if successful, false otherwise. Provides a message indicating success or details of any error. ### Response Examples ```json 200-Success theme={null} { "status": true, "message": "Message sent successfully" } ``` ```json 400-Bad Request theme={null} { "status": false, "message": "Invalid data Provided" } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "Unauthorised" } ``` # Get Email Message Report Source: https://docs.zixflow.com/api-reference/campaign/report/get-email-report GET https://api.zixflow.com/api/v1/campaign/report/email/{messageId} #### Path Params Enter the message ID that you received when sending the campaign. #### Response Indicates whether the call was successful. true if successful, false if not. success or error response message The contents of uploaded file It refers to your account ID or workspace ID. It refers to your message ID It refers to your campaign ID. It refers to report status (SENT, OPENED, CLICKED, BOUNCE, COMPLAINT, UNSUBSCRIBED) It refers to last status time It refers to the recipient's email where the message was sent. It refers to failed reason for message if it failed or undelivered. ```json 200-Success theme={null} { "status": true, "message": "Successfully fetched", "data": { "accountId": "652e5068c33fe15059e5s020", "messageId": "66e120d1b9ee33b6ba00fsd7", "campaignId": "66e120d1b9eht5059e5e01d", "status": "SENT", "statusAt": "2024-09-11T04:47:16.000Z", "destination": "test@gmail.com", "remark": "" } } ``` ```json 400-Bad Request theme={null} { "status": false, "message": "Report data not found" } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "No token provided" } ``` # Get SMS Message Report Source: https://docs.zixflow.com/api-reference/campaign/report/get-sms-report GET https://api.zixflow.com/api/v1/campaign/report/sms/{messageId} #### Path Params Enter the message ID that you received when sending the campaign. #### Response Indicates whether the call was successful. true if successful, false if not. success or error response message The contents of uploaded file It refers to your account ID or workspace ID. It refers to your message ID It refers to your campaign ID. It refers to report status (SENT, DELIVERED, UNDELIVERED) It refers to last status time It refers to the recipient's phone number where the message was sent. It refers to failed reason for message if it failed or undelivered. ```json 200-Success theme={null} { "status": true, "message": "Successfully fetched", "data": { "accountId": "652e5068c33fe15059e5s020", "messageId": "66e120d1b9ee33b6ba00fsd7", "campaignId": "66e120d1b9eht5059e5e01d", "status": "DELIVERED", "statusAt": "2024-09-11T04:47:16.000Z", "destination": "919090909090", "remark": "" } } ``` ```json 400-Bad Request theme={null} { "status": false, "message": "Report data not found" } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "No token provided" } ``` # Get Whatsapp Message Report Source: https://docs.zixflow.com/api-reference/campaign/report/get-whatsapp-report GET https://api.zixflow.com/api/v1/campaign/report/whatsapp/{messageId} #### Path Params Enter the message ID that you received when sending the campaign. #### Response Indicates whether the call was successful. true if successful, false if not. success or error response message The contents of uploaded file It refers to your account ID or workspace ID. It refers to your message ID It refers to your campaign ID. It refers to report status (SENT, DELIVERED, FAILED, READ) It refers to last status time It refers to the recipient's phone number where the message was sent. It refers to failed reason for message if it failed or undelivered. ```json 200-Success theme={null} { "status": true, "message": "Successfully fetched", "data": { "accountId": "652e5068c33fe15059e5s020", "messageId": "66e120d1b9ee33b6ba00fsd7", "campaignId": "66e120d1b9eht5059e5e01d", "status": "DELIVERED", "statusAt": "2024-09-11T04:47:16.000Z", "destination": "919090909090", "remark": "" } } ``` ```json 400-Bad Request theme={null} { "status": false, "message": "Report data not found" } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "No token provided" } ``` # Introduction Source: https://docs.zixflow.com/api-reference/campaign/sms/introduction Campaign - Send SMS Zixflow makes sending and receiving SMS easy. Find the documentation, sample codes and developer tools you need to build exactly what you want, fast & secure. We’ll handle all the complexity of mobile operators and global regulations. Let’s get building. Our SMS API allows you to send text messages to users around the globe through simple RESTful APIs. #### To Send Messages, Generate the API Key 1. Go to Developers under Admin settings at Zixflow Platform - [https://app.zixflow.com/settings/workspace/developer](https://app.zixflow.com/settings/workspace/developer) 2. Now assign the respective permissions to the channel which you want to give specific or all channels (all channels recommended so you don't have to change the API in the future if you want to use other channels) # Send SMS Source: https://docs.zixflow.com/api-reference/campaign/sms/send-sms-get GET https://api.zixflow.com/api/apis/campaign/sms/send To make it simple, We have designed a method which allows you to send SMS in a single line of the HTTP GET request [https://api.zixflow.com/api/apis/campaign/sms/send?apiKey=123424\&senderId=HELLOW\&route=transactional\&number=9112345678974\&message=your\_message\&submissionStatus=true](https://api.zixflow.com/api/apis/campaign/sms/send?apiKey=123424\&senderId=HELLOW\&route=transactional\&number=9112345678974\&message=your_message\&submissionStatus=true) [https://api.zixflow.com/api/apis/campaign/sms/send?apiKey=3456789\&senderId=IDENTY\&route=transactional\&number=919090909090\&message=your\_message\&isFlash=true\&dltTemplateId=1234\&dltEntityId=1234\&reportURL=https://webhook.site/0a276bc5-f0e4-4235-9006-b58b\&submissionStatus=true](https://api.zixflow.com/api/apis/campaign/sms/send?apiKey=3456789\&senderId=IDENTY\&route=transactional\&number=919090909090\&message=your_message\&isFlash=true\&dltTemplateId=1234\&dltEntityId=1234\&reportURL=https://webhook.site/0a276bc5-f0e4-4235-9006-b58b\&submissionStatus=true) #### Query This is a token used to validate requests coming from valid users. You can obtain this token from your Zixflow account's API keys section. The registered and approved Sender name to be used for the message. Type of connectivity for the message, such as promotional, transactional, or OTP. The phone number with a country prefix to which the message will be sent. The content of the message that you want to send. (Optional) Set this parameter to true if you want to send a flash SMS via the API; otherwise, set it to false. (Optional) Only applicable for India. If you want to pass a template ID directly via the API, you can do so with this parameter. (Optional) Only applicable for India. If you want to pass an entity ID directly via the API, you can do so with this parameter. (Optional) Specify the URL where the user's report and deliveries should be delivered. (Optional) When a user wants to wait for submission status from the API, they must set this key to true. It is false by default. #### Response Indicates whether the call was successful. true if successful, false if not. success or error response message #### Reports & Deliveries In order to get delivery reports directly into your system you need to take care of few simple things. 1. Please make sure that, the URL passed in the field reportUrl, must accept HTTP POST request with JSON request body. If you are sending an SMS using a GET URL, it is necessary to encode the message using the URL Encoding method before sending it. However, if you are using a POST API, there is no need to encode the message. For example, if the message is "Hi User 1 & User 2, Welcome to zixflow," it needs to be encoded as "Hi%20User%201%20%26%20User%202%2C%20Welcome%20to%20zixflow" using URL Encoding. You can use a tool like [https://www.urlencoder.org/](https://www.urlencoder.org/) for reference on how to properly encode your message. ```bash cUrl theme={null} curl --location --request GET 'https://api.zixflow.com/api/apis/campaign/sms/send?apiKey=123424&senderId=HELLOW&route=transactional&number=9112345678974&message=Your OTP is XXXX&submissionStatus=true' ``` ```js Nodejs theme={null} var axios = require("axios"); var config = { method: "get", url: "https://api.zixflow.com/api/apis/campaign/sms/send?apiKey=123424&senderId=HELLOW&route=transactional&number=9112345678974&message=Your OTP is XXXX&submissionStatus=true", headers: {}, }; axios(config) .then(function (response) { console.log(JSON.stringify(response.data)); }) .catch(function (error) { console.log(error); }); ``` ```py Python theme={null} import requests url = "https://api.zixflow.com/api/apis/campaign/sms/send?apiKey=123424&senderId=HELLOW&route=transactional&number=9112345678974&message=Your OTP is XXXX&submissionStatus=true" payload={} headers = {} response = requests.request("GET", url, headers=headers, data=payload) print(response.text) ``` ```java JAVA theme={null} OkHttpClient client = new OkHttpClient().newBuilder() .build(); Request request = new Request.Builder() .url("https://api.zixflow.com/api/apis/campaign/sms/send?apiKey=123424&senderId=HELLOW&route=transactional&number=9112345678974&message=Your OTP is XXXX&submissionStatus=true") .method("GET", null) .build(); Response response = client.newCall(request).execute(); ``` ```dart DART theme={null} var request = http.Request('GET', Uri.parse('https://api.zixflow.com/api/apis/campaign/sms/send?apiKey=123424&senderId=HELLOW&route=transactional&number=9112345678974&message=Your OTP is XXXX&submissionStatus=true')); http.StreamedResponse response = await request.send(); if (response.statusCode == 200) { print(await response.stream.bytesToString()); } else { print(response.reasonPhrase); } ``` ```json 200-Success theme={null} { "status": true, "message": "SMS sent successfully" } ``` ```json 400-Bad Request theme={null} { "status": false, "message": "Invalid data Provided" } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "Unauthorised" } ``` # Send SMS Source: https://docs.zixflow.com/api-reference/campaign/sms/send-sms-post POST https://api.zixflow.com/api/v1/campaign/sms/send #### Body The registered and approved Sender name to be used for the message. Type of connectivity for the message, such as promotional, transactional, or OTP. The phone number with a country prefix to which the message will be sent. The content of the message that you want to send. (Optional) Set this parameter to true if you want to send a flash SMS via the API; otherwise, set it to false. (Optional) Only applicable for India. If you want to pass a template ID directly via the API, you can do so with this parameter. (Optional) Only applicable for India. If you want to pass an entity ID directly via the API, you can do so with this parameter. (Optional) Specify the URL where the user's report and deliveries should be delivered. (Optional) When a user wants to wait for submission status from the API, they must set this key to true. It is false by default. #### Response Indicates whether the call was successful. true if successful, false if not. success or error response message #### Reports & Deliveries In order to get delivery reports directly into your system you need to take care of few simple things. 1. Please make sure that, the URL passed in the field reportUrl, must accept HTTP POST request with JSON request body. If you are sending an SMS using a GET URL, it is necessary to encode the message using the URL Encoding method before sending it. However, if you are using a POST API, there is no need to encode the message. For example, if the message is "Hi User 1 & User 2, Welcome to zixflow," it needs to be encoded as "Hi%20User%201%20%26%20User%202%2C%20Welcome%20to%20zixflow" using URL Encoding. You can use a tool like [https://www.urlencoder.org/](https://www.urlencoder.org/) for reference on how to properly encode your message. ```bash cUrl theme={null} curl --location --request POST 'https://api.zixflow.com/api/v1/campaign/sms/send' \ --header 'Authorization: Bearer 56616641ee123b80a36b99fedc2bfa4f0d7f63072d97ddb1578c7a5aa970e7edde6618c7f750beb921aee3eebc9cc48899ee992fa4eb95a663d0e0b2eaa35b73f3b2344c' \ --header 'Content-Type: application/json' \ --data-raw '{ "senderId": "IDENTY", "route": "transactional", "number": "919090909090", "message": "Your OTP is 0101", "isFlash": false, "dltTemplateId": "1234", "dltEntityId": "1234", "reportURL": "https://webhook.site/0a276bc5-f0e4-4235-9006-b58b7d224ad5", "submissionStatus": false }' ``` ```js Nodejs theme={null} var axios = require("axios"); var data = JSON.stringify({ senderId: "IDENTY", route: "transactional", number: "919090909090", message: "Your OTP is 0101", isFlash: false, dltTemplateId: "1234", dltEntityId: "1234", reportURL: "https://webhook.site/0a276bc5-f0e4-4235-9006-b58b7d224ad5", submissionStatus: false, }); var config = { method: "post", url: "https://api.zixflow.com/api/v1/campaign/sms/send", headers: { Authorization: "Bearer 56616641ee123b80a36b99fedc2bfa4f0d7f63072d97ddb1578c7a5aa970e7edde6618c7f750beb921aee3eebc9cc48899ee992fa4eb95a663d0e0b2eaa35b73f3b2344c", "Content-Type": "application/json", }, data: data, }; axios(config) .then(function (response) { console.log(JSON.stringify(response.data)); }) .catch(function (error) { console.log(error); }); ``` ```py Python theme={null} import requests import json url = "https://api.zixflow.com/api/v1/campaign/sms/send" payload = json.dumps({ "senderId": "IDENTY", "route": "transactional", "number": "919090909090", "message": "Your OTP is 0101", "isFlash": False, "dltTemplateId": "1234", "dltEntityId": "1234", "reportURL": "https://webhook.site/0a276bc5-f0e4-4235-9006-b58b7d224ad5", "submissionStatus": False }) headers = { 'Authorization': 'Bearer 56616641ee123b80a36b99fedc2bfa4f0d7f63072d97ddb1578c7a5aa970e7edde6618c7f750beb921aee3eebc9cc48899ee992fa4eb95a663d0e0b2eaa35b73f3b2344c', 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text) ``` ```java JAVA theme={null} OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\n \"senderId\": \"IDENTY\",\n \"route\": \"transactional\",\n \"number\": \"919090909090\",\n \"message\": \"Your OTP is 0101\",\n \"isFlash\": false,\n \"dltTemplateId\": \"1234\",\n \"dltEntityId\": \"1234\",\n \"reportURL\": \"https://webhook.site/0a276bc5-f0e4-4235-9006-b58b7d224ad5\",\n \"submissionStatus\": false\n}"); Request request = new Request.Builder() .url("https://api.zixflow.com/api/v1/campaign/sms/send") .method("POST", body) .addHeader("Authorization", "Bearer 56616641ee123b80a36b99fedc2bfa4f0d7f63072d97ddb1578c7a5aa970e7edde6618c7f750beb921aee3eebc9cc48899ee992fa4eb95a663d0e0b2eaa35b73f3b2344c") .addHeader("Content-Type", "application/json") .build(); Response response = client.newCall(request).execute(); ``` ```dart DART theme={null} var headers = { 'Authorization': 'Bearer 56616641ee123b80a36b99fedc2bfa4f0d7f63072d97ddb1578c7a5aa970e7edde6618c7f750beb921aee3eebc9cc48899ee992fa4eb95a663d0e0b2eaa35b73f3b2344c', 'Content-Type': 'application/json' }; var request = http.Request('POST', Uri.parse('https://api.zixflow.com/api/v1/campaign/sms/send')); request.body = json.encode({ "senderId": "IDENTY", "route": "transactional", "number": "919090909090", "message": "Your OTP is 0101", "isFlash": false, "dltTemplateId": "1234", "dltEntityId": "1234", "reportURL": "https://webhook.site/0a276bc5-f0e4-4235-9006-b58b7d224ad5", "submissionStatus": false }); request.headers.addAll(headers); http.StreamedResponse response = await request.send(); if (response.statusCode == 200) { print(await response.stream.bytesToString()); } else { print(response.reasonPhrase); } ``` ```json 200-Success theme={null} { "status": true, "message": "SMS sent successfully" } ``` ```json 400-Bad Request theme={null} { "status": false, "message": "Invalid data Provided" } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "Unauthorised" } ``` # Get List Of Templates Source: https://docs.zixflow.com/api-reference/campaign/whatsapp/get-template-list GET https://api.zixflow.com/api/v1/campaign/whatsapp/templates/{phoneId} #### Path Params This is the unique identifier associated with the sender's phone number given by WhatsApp. Find the Phone ID on the Zixflow WhatsApp Settings page next to the number. [Whatsapp Settings](https://app.zixflow.com/campaign/settings/whatsapp) #### Query Params The number of templates to be returned, set to 10 in this instance. This parameter restricts the response to a specific quantity of templates. The starting point from which the templates are to be fetched within the entire dataset. In this case, it is set to 0, indicating that retrieval should commence from the beginning of the dataset. #### Response Indicates whether the call was successful. true if successful, false if not. success or error response message The contents of uploaded file It defines template name It defines template language It defines template category It defines template status Whatsapp Template components structure defined [here](https://developers.facebook.com/docs/whatsapp/business-management-api/message-templates) ```json 200-Success theme={null} { "status": true, "message": "Success", "data": [ { "language": "en", "name": "unsubscribe_response", "category": "MARKETING", "components": [ { "type": "HEADER", "format": "TEXT", "text": "Unsubscribe" }, { "type": "BODY", "text": "We're sorry to see you go 💔\n\nYou've been unsubscribed from receiving messages from us.\n\nIf you'd like to again start getting messages, reply with *START*" } ], "status": "APPROVED" } ] } ``` ```json 400-Bad Request theme={null} { "status": false, "message": "file size exceeded" } ``` ```json 401-Unauthorised theme={null} { "status": false, "message": "No token provided" } ``` # Get List Of WA Accounts Source: https://docs.zixflow.com/api-reference/campaign/whatsapp/get-whatsapp-accounts GET https://api.zixflow.com/api/v1/campaign/whatsapp/accounts # Incoming Message Webhook Source: https://docs.zixflow.com/api-reference/campaign/whatsapp/incoming-message-webhook You can receive incoming messages on your webhook, enabling real-time integration with your systems. > Note: this is not for message delivery status — the webhook is triggered only for incoming messages. #### 🛠️ How to Create a Webhook To set up a webhook in Zixflow: 1. Navigate to the **Zixflow** application. 2. Go to the **Settings** section. 3. Open the **Developer** section. 4. Click on **Webhook**. 5. Click on the **➕ Add** button. ##### Below is a list of available events, including their structure and example payloads. #### 1. `incoming.whatsapp.message` Triggered whenever a new WhatsApp message is received in your Zixflow account. ```json theme={null} { "event": "incoming.whatsapp.message", // Event Type "eventId": "3472dff5-7c06-40e6-be06-a28a335ac263", // UUID v4 - Event id to uniquilly identify event "timestamp": 1744346001738, // Message At 13 digit timestamp "phoneId": "xxxxxxxxxxxxxx79", // Meta Phone ID "wabaId": "xxxxxxxxxxxx266", // Meta WABA ID "messageId": "wamid.xxxxxxxxxxxxxxxx", // Meta messsage id "sender": { "name": "John Doe", // End user name "number": "919999999999" // End user phone number with country code }, "message": { // When Text Message Receives "type": "text", "text": { "body": "Hi" } // When Emoji Message Recieves "type": "text", "text":{ "body": "😁😁" } // When Image Message Recieves "type": "image", "image":{ "caption": "", // Optional - image caption if there is any "mime_type": "image/xxxx", // Image Mime type "link": "https:://", // Image URL "name": "sample-image.png", // Image Name "size": 192699 // image size in bytes } // When Video Message Recieves "type": "video", "video":{ "caption": "", // Optional - video caption if there is any "mime_type": "video/xxxx", // Video Mime type "link": "https:://", // Video URL "name": "sample-video.mp4", // Video Name "size": 192699 // Video size in bytes } // When Audio Message Recieves "type": "audio", "video":{ "caption": "", // Optional - audio caption if there is any "mime_type": "audio/xxxx", // Audio Mime type "link": "https:://", // Audio URL "name": "sample-audio.mp3", // Audio Name "size": 192699 // Audio size in bytes }, // When Document Message Recieves "type": "document", "video":{ "caption": "", // Optional - Document caption if there is any "mime_type": "xxxxx/xxxx", // Document Mime type "link": "https:://", // Document URL "name": "sample-document.pdf", // Document Name "size": 192699 // Document size in bytes }, // When Location Message Recieves "type": "location", "location":{ "address": "Cecilia Chapman, Mankato Mississippi", // Optional - Address "latitude": 71.224418791205, // Location Latitude "longitude": 72.080068686951, // Location Longitude "name": "Cecilia Chapman", // Location Name "url": "https://" // Location URL }, // When Contact Message Recieves "type": "contacts", "contacts":[ // Its array, user can share multiple contacts { "name":{ "first_name": "Customer", // Conatct First Name "last_name": "Care", // Conatct Last Name "formatted_name": "Customer Care" // Formated Name }, "phones":[ { "phone": "+91 121", // Share phone number "type": "MOBILE" // Phone number type } ] } ], // * When User Click On Reply Button Message "type": "button", "button":{ "text": "FAQs" // Button Text }, // When User Respond to Flow Form In Whatsapp "type": "interactive", "interactive":{ "type": "nfm_reply", "nfm_reply":{ "response_json": "{"screen_1_source_0":"0","screen_0_firstName_0":"text","screen_0_lastName_1":"Kaha","screen_0_email_2":"testb@gmail.com"}", // User flow form response "body": "Sent", "name": "flow" } }, // When user add product in crate generte order from whatsapp "type": "order", "order": { "catalog_id": "7079831418799929", // Product Catalog Id "text": "", "product_items":[ { "product_retailer_id": "2lc203LtsY", // Selected product ID "quantity": 1, // Product quantity "item_price": 9876, // Product Unit Price "currency": "USD" // Product Currency } ] } }, "metaData": { "accountId": "xxxxxxxxxxxxxb8de24d95b59", // Zixflow Account Id "orgMsgId": "xxxxxxxxxxxx67f3cbd6b9d1" // Zixflow Org Message Id } } ``` # Introduction Source: https://docs.zixflow.com/api-reference/campaign/whatsapp/introduction Campaign - Send Whatsapp Welcome to the WhatsApp API documentation. This guide provides developers with information on two key APIs: *Get WhatsApp Variables* and *Send WhatsApp Message*. These APIs are designed to enable you to send WhatsApp messages with ease, ensuring that you follow WhatsApp template guidelines.