Download OpenAPI specification:Download
This is a documentation that covers all of BayEngage's Custom APIs
Use this API to generate an access token, essential for authenticating and authorizing requests. Log in to BayEngage with your credentials. Navigate to the "App" section, then select "Custom Integration" "Settings". Ensure that the version is set to 2.0. Generate the Client ID and Client Secret Key for API integration. Ensure that the bearer token obtained is used for authorization in all APIs.
Obtain an access token using client credentials.
| client_id required | string INSERT_YOUR_CLIENT_ID_HERE |
| client_secret required | string INSERT_YOUR_CLIENT_SECRET_HERE. |
| grant_type required | string client_credentials |
| scope required | string Provide necessary scope Eg. read_campaign write_campaign |
{- "access_token": "ACCESS TOKEN",
- "expires_in": 3599,
- "scope": "read_campaign write_campaign",
- "token_type": "bearer"
}Fetching the details of the tenant, including their subscription, settings, and other metadata.
Authorization: This endpoint requires a bearer token with the read_tenant scope.
{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "tenant": {
- "uuid": "f660xxxxb6xx",
- "title": "your_store_title",
- "legal_business_name": "your_store_legal_business_name",
- "platform": "shopify",
- "website": "your-store.myshopify.com",
- "timezone": "America/New_York",
- "customer_email": "your_mail@domain.com",
- "currency": "USD",
- "language": "en",
- "payment_method": "manual",
- "type": "paid",
- "moderation": "approved",
- "created_at": "2025-06-23T07:55:09.000000Z",
- "updated_at": "2025-08-26T12:07:09.000000Z",
- "deleted_at": null,
- "subscription": {
- "title": "Email Marketing Premium",
- "display_tier_id": 1,
- "stripe_subscription_id": null,
- "stripe_plan_id": null,
- "stripe_status": "active",
- "subscribers_limit": 1000,
- "active_subscribers_count": 457,
- "capped_amt": 30,
- "trial_ends_at": "2025-07-07 07:55:09",
- "ends_at": "2025-09-21 07:55:09",
- "created_at": "2025-06-23T07:55:09.000000Z",
- "updated_at": "2025-08-29T11:20:22.000000Z",
- "emails_limit": 10000,
- "sent_emails_count": 4112,
- "channel": 1
}, - "sms_subscription": {
- "title": "SMS",
- "display_tier_id": 3,
- "stripe_subscription_id": "0",
- "stripe_plan_id": "0",
- "stripe_status": "0",
- "subscribers_limit": 1000,
- "active_subscribers_count": 208,
- "capped_amt": 0,
- "trial_ends_at": "2025-07-24 14:28:23",
- "ends_at": "2025-09-23 14:28:31",
- "created_at": "2025-07-24T08:59:04.000000Z",
- "updated_at": "2025-08-28T07:22:40.000000Z",
- "emails_limit": 10000,
- "sent_emails_count": 4112,
- "channel": 2
}, - "setting": {
- "sender": {
- "from": "your_store_title",
- "from_email": "your_mail@domain.com",
- "reply_to_email": "your_mail@domain.com"
}, - "product_recommendation": {
- "most_viewed_products": "all",
- "most_purchased_products": "all"
}, - "brand_details": {
- "color": {
- "textColor": "#000000",
- "btnTextColor": "#350d91",
- "headingColor": "#000000",
- "btnBackgroundColor": "#37e173"
}, - "fontFamily": {
- "label": "Pacifico",
- "value": "'Pacifico',cursive"
}, - "headingStyle": "H1",
- "textFieldValue": {
- "fontSize": "16",
- "buttonWidth": "50",
- "buttonRadius": "4"
}, - "socialMediaList": [
- {
- "key": "vmhr94",
- "mediaUrl": "www.facebook.com",
- "socialMediaName": "Facebook"
}
]
}
}
}, - "domains": [
- {
- "tenant_id": 41120,
- "provider": "targetbay.com",
- "email": "john.doe@targetbay.com",
- "verified": 1
}
]
}
}This endpoint allows you to save a new email template.
Authorization : This endpoint requires an bearer token with the write_email_template scope
Request body to create a new template.
| source required | string The source of the template creation (e.g., 'api'). |
| title required | string The title of the template. |
| content required | string The HTML content of the template. |
{- "source": "api",
- "title": "store offer template",
- "content": "<html> </html>"
}{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "template": {
- "id": 28940,
- "title": "store offer template"
}
}
}Send a test email to the provided customer email's using a given template ID or custom HTML content.
You must provide either a template_id or html content. If both are missing, a 422 error is returned.
Authorization : This endpoint requires a bearer token with the write_email_template scope.
| preview_customer_id | string Insert your preview customer ID |
| html required | string HTML content or template_id is mandatory |
| template_id | string HTML content or template_id is mandatory |
| subject | string Subject of your test email template |
| preview | string Preview text of your test email template |
| emails required | Array of strings <email> Insert your email ID |
| from_name | string From name of your test email |
| from_email | string From email of your test email |
{- "preview_customer_id": "726876742",
- "html": "<p>Hello, this is a your custom html.</p>",
- "template_id": "4112",
- "subject": "Save your Money: 3 for $99.99 or 5 for $159.99",
- "preview": "LIMITED STOCK! Shop fast to avial it while supplies last.",
- "emails": [
- "your_mail_id@domain.com"
], - "from_name": "John Doe",
- "from_email": "john.doe@targetbay.com"
}{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "msg": "Email has been sent successfully"
}
}Retrieves details of a specific email template.
Authorization : This endpoint requires an bearer token with the read_email_template scope
| template_id required | integer The unique identifier of the template. |
{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "template": {
- "id": 4112,
- "thumbnail": null,
- "title": "Year end sale Template",
- "filtered_content": "<raw HTML Content>",
- "plain_text_content": "<HTML Content>",
- "source": "builder",
- "source_content": "<json Html Content>",
- "created_at": "2025-02-20T07:14:11.000000Z",
- "deleted_at": null,
- "updated_at": "2025-02-20T07:14:32.000000Z"
}
}
}Fetches a list of available templates with their metadata and associated campaigns.
Authorization : This endpoint requires a bearer token with the read_email_template scope
| search | string Example: search=Labour day sale Search templates by title |
| page | integer >= 1 Default: 1 The page number for pagination. |
| limit | integer <= 100 Default: 10 The number of items to return per page. |
| sort_by | string Enum: "created_at:desc" "created_at:asc" "id:desc" "id:asc" Example: sort_by=id:desc Sorting parameter. |
{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "template": [
- {
- "id": 38884,
- "title": "Welcome email - Exclusive member",
- "created_at": "2022-09-29T07:30:32.000000Z",
- "updated_at": "2024-09-19T09:51:28.000000Z",
- "source": "builder",
- "variants": [
- {
- "template_id": 38884,
- "campaign_id": 62238,
- "campaign_name": "Get ready for National Jerky Day on June 12! Celebrate early with 10% off orders of $55 or more",
- "campaign_status": "done"
}
]
}, - {
- "id": 38889,
- "title": "Exit cart with coupon",
- "created_at": "2022-09-29T07:33:42.000000Z",
- "updated_at": "2024-09-19T09:51:28.000000Z",
- "source": "builder",
- "variants": [ ]
}, - {
- "id": 40716,
- "title": "Replenishment Recipe",
- "created_at": "2022-10-18T10:41:33.000000Z",
- "updated_at": "2024-09-19T09:51:08.000000Z",
- "source": "builder",
- "variants": [
- {
- "template_id": 40716,
- "campaign_id": 73260,
- "campaign_name": "New year offers",
- "campaign_status": "draft"
}
]
}, - {
- "id": 40738,
- "title": "Hot selling template",
- "created_at": "2022-10-18T13:22:50.000000Z",
- "updated_at": "2024-09-19T09:51:08.000000Z",
- "source": "builder",
- "variants": [
- {
- "template_id": 40738,
- "campaign_id": 13526,
- "campaign_name": "November 1st weekend sale",
- "campaign_status": "done"
}, - {
- "template_id": 40738,
- "campaign_id": 73364,
- "campaign_name": "Enjoy your 15% offer",
- "campaign_status": "done"
}, - {
- "template_id": 41716,
- "campaign_id": 78260,
- "campaign_name": "laborday sale$",
- "campaign_status": "draft"
}
]
}
], - "total": 4,
- "per_page": 10,
- "page": 1,
- "last_page": 1
}
}Retrieves a list of SMS templates.
Authorization: This endpoint requires a bearer token with the read_sms_template scope
| search | string Example: search=Offer sale Title search. |
| page | integer >= 1 Default: 1 The page number for pagination. |
| limit | integer Example: limit=10 Number of records per page. |
{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "data": [
- {
- "template_id": 44594,
- "is_pinned": true,
- "name": "New product promotion",
- "content": "Welcome to {{store_name}}: Hello {{first_name}} we are thrilled to have you on board! Visit us at {{store_link}} to explore more. We will keep you up-to-date on the latest exciting offers. Text STOP to opt-out.",
- "category": "campaign",
- "pinned_at": "2025-06-24 13:21:51",
- "tenant_id": 14322
}, - {
- "template_id": 28039,
- "is_pinned": false,
- "name": "Welcome user flow message",
- "content": "Greetings from {{store_name}} : {{first_name}} we are thrilled to have you on board!. Text STOP to opt-out",
- "category": "flow",
- "tenant_id": 14322
}, - {
- "template_id": 27995,
- "is_pinned": false,
- "name": "July 26 offer sale",
- "content": "🎉 Hi {{first_name}} ! Welcome to {{store_name}} ! 🎉 Check out {{store_link}} to discover amazing deals and offers! 🤩 Text STOP to opt-out",
- "category": "campaign",
- "tenant_id": 14322
}
], - "current_page": 1,
- "total": 3,
- "per_page": "10",
- "last_page": 1
}
}Contact details can be included along with the Email contact. A new contact will be created for the provided email. If contact already exists, contact details will be updated.
Authorization : This endpoint requires a bearer token with the write_customer scope
Request body to create a new contact.
required | integer or string Unique ID of the customer in your platform. |
| email required | string This is the email address of the customer. Either email or phone is mandatory. |
| phone | string This is the phone number of the customer. |
| source required | string Default: "api" This is an identification for source of contact creation. The source is mandatory to create the contact. |
| email_subscription required | string Possible values are |
| phone_optin_trigger | boolean Enum: true false Indicates whether to trigger an SMS opt-in message to the provided phone number.
Set to |
| phone_subscription | string Possible values are
|
| phone_existing_subscription | string Possible values is "retain". By using this key user account phone status will not override. |
| tags | Array of strings Customer tags for grouping purposes |
| custom_fields | Array of objects Custom attributes for the customer with key-value pairs |
| first_name | string This is the customer's first name |
| last_name | string This is the customer's last name |
| address1 | string The customer's primary street address |
| address2 | string The customer's secondary street address (apartment, suite, etc.) |
| city | string The customer's city |
| province | string The customer's state or province |
| zip | string The customer's postal or zip code |
| country | string The customer's country |
| list_id | string This is the list UUID where your contact have been added to in BayEngage. You can find the List UUID is the list settings page. If this UUID misspelled or not provided your contact will be added into website contact default list. |
{- "platform_customer_id": 984112,
- "email": "johndoe@targetbay.com",
- "phone": "+1xxxxxxxxxx",
- "source": "api",
- "email_subscription": "active",
- "phone_optin_trigger": false,
- "phone_subscription": "unverified",
- "phone_existing_subscription": "retain",
- "tags": [
- "tag1",
- "tag2",
- "VIP"
], - "custom_fields": [
- {
- "favourite_color": "blue"
}, - {
- "age": "28"
}
], - "first_name": "John",
- "last_name": "Doe",
- "address1": "Melrose Avenue",
- "address2": "102",
- "city": "Los Angeles",
- "province": "Michigan",
- "zip": "30303",
- "country": "United States",
- "list_id": "58133f44864d"
}{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "message": "success"
}
}The API that should be used to fetch all contacts in BayEngage.
Authorization : This endpoint requires a bearer token with the read_customers scope
string <email> Example: email=john.dew@targetbay.com Filter by customer email address. | |
| phone | integer Example: phone=9147866311 Filter by customer phone number. |
| fields[address] | string Example: fields[address]=* Fetch customer address information. Use |
| fields[tags] | string Example: fields[tags]=* Fetch customer tags. Use |
| fields[lists] | string Example: fields[lists]=* Fetch customer list subscriptions. Use |
| fields[custom_fields] | string Example: fields[custom_fields]=* Fetch custom field values for customers. Use |
| filter_by[email] | string <email> Example: filter_by[email]=john.dew@targetbay.com Filter by customer email address. Only one filter can be used at a time. |
| filter_by[phone] | string Example: filter_by[phone]=9147866311 Filter by customer phone number. Only one filter can be used at a time. |
| filter_by[platform_customer_id] | string Example: filter_by[platform_customer_id]=2334 Filter by platform customer ID. Only one filter can be used at a time. |
| page | integer >= 1 Default: 1 The page number for pagination. |
| limit | integer [ 1 .. 100 ] Default: 25 The number of items to return per page. The default value is 25 items and the maximum is 100 per page. |
{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "customers": [
- {
- "customer_id": 10676841,
- "platform_customer_id": 18597756,
- "first_name": "john",
- "last_name": "dew",
- "email": "john.dew@targetbay.com",
- "email_status": "active",
- "phone": "+19147866311",
- "phone_status": "unsub",
- "created_at": "2025-07-02T13:01:39.000000Z",
- "updated_at": "2025-07-02T13:01:39.000000Z",
- "address": [
- {
- "type": "billing",
- "customer_id": 10676841,
- "address_street_1": "123 Main St",
- "address_street_2": "Apt 4B",
- "city": "New York",
- "state": "NY",
- "country": "United States",
- "country_code": "US",
- "zip_code": "10001"
}, - {
- "type": "shipping",
- "customer_id": 10676841,
- "address_street_1": "456 Oak Ave",
- "address_street_2": null,
- "city": "Brooklyn",
- "state": "NY",
- "country": "United States",
- "country_code": "US",
- "zip_code": "11201"
}
], - "tags": [
- "VIP",
- "Returning Customer"
], - "lists": null,
- "custom_fields": {
- "loyalty_points": "500",
- "membership_tier": "Gold",
- "preferred_contact": "email"
}
}
], - "current_page": 1,
- "last_page": 1,
- "per_page": 10,
- "total": 1
}
}Create multiple contacts in a single request.
Authorization : This endpoint requires a bearer token with the write_customer scope
Request body to create multiple contacts.
Array of objects The array that contains the list of subscribers |
{- "subscribers": [
- {
- "platform_customer_id": 1004112,
- "email": "johndoe@targetbay.com",
- "phone": "+1xxxxxxxxxx",
- "source": "api",
- "email_subscription": "active",
- "phone_optin_trigger": false,
- "phone_subscription": "unverified",
- "phone_existing_subscription": "retain",
- "tags": [
- "tag1",
- "tag2",
- "VIP"
], - "custom_fields": [
- {
- "favourite_color": "blue"
}, - {
- "age": "28"
}
], - "first_name": "John",
- "last_name": "Doe",
- "address1": "Melrose Avenue",
- "address2": "102",
- "city": "Los Angeles",
- "province": "Michigan",
- "zip": "30303",
- "country": "United States",
- "list_id": "58133f44864"
}
]
}{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "message": "accepted"
}
}Delete an Email contact in BayEngage.
Authorization : This endpoint requires a bearer token with the write_customer scope
required | integer or string The customer ID that you wish to delete, use platform customer id to perform delete operation. |
{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "message": "Customer deleted successfully"
}
}Fetches a list of categories with pagination.
Authorization : This endpoint requires an bearer token with the read_category scope
| search | string Example: search=Hoodies Category search, will works only based on categories handle. |
| page | integer Example: page=1 Page number for pagination |
| limit | integer Example: limit=10 Number of records per page |
| sort_by | string Enum: "id:asc" "id:desc" Example: sort_by=id:desc Sort category by id (ascending or descending). |
{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "categories": [
- {
- "category_id": 201,
- "title": "Home Appliances",
- "handle": "home-appliances",
- "platform_category_id": 84736291,
- "created_at": "2025-07-12T09:44:20.000000Z"
}, - {
- "category_id": 202,
- "title": "Mobile Phones",
- "handle": "mobile-phones",
- "platform_category_id": 19283746,
- "created_at": "2025-07-18T11:15:30.000000Z"
}, - {
- "category_id": 203,
- "title": "Laptops",
- "handle": "laptops",
- "platform_category_id": 56473829,
- "created_at": "2025-07-20T10:05:11.000000Z"
}, - {
- "category_id": 204,
- "title": "Fashion",
- "handle": "fashion",
- "platform_category_id": 91827364,
- "created_at": "2025-07-22T08:11:05.000000Z"
}, - {
- "category_id": 205,
- "title": "Beauty & Health",
- "handle": "beauty-health",
- "platform_category_id": 82736495,
- "created_at": "2025-07-25T12:01:00.000000Z"
}, - {
- "category_id": 206,
- "title": "Sports",
- "handle": "sports",
- "platform_category_id": 73628194,
- "created_at": "2025-07-28T09:20:14.000000Z"
}, - {
- "category_id": 207,
- "title": "Books",
- "handle": "books",
- "platform_category_id": 56473820,
- "created_at": "2025-07-29T07:50:55.000000Z"
}, - {
- "category_id": 208,
- "title": "Toys",
- "handle": "toys",
- "platform_category_id": 38475629,
- "created_at": "2025-07-30T06:25:42.000000Z"
}, - {
- "category_id": 209,
- "title": "Furniture",
- "handle": "furniture",
- "platform_category_id": 19283745,
- "created_at": "2025-08-01T05:40:33.000000Z"
}, - {
- "category_id": 210,
- "title": "Grocery",
- "handle": "grocery",
- "platform_category_id": 91827365,
- "created_at": "2025-08-02T04:45:22.000000Z"
}
], - "total": 100,
- "per_page": 10,
- "current_page": 1,
- "last_page": 10
}
}Create or update a category..
Authorization : This endpoint requires an bearer token with the write_category scope
required | integer or string Unique identifier for the category. Can be an integer or a string. |
| parent_id | number Identifier of the parent category. |
| name required | string Name of the category. |
| code required | string Code for the category Eg - shirts-men. |
{- "platform_category_id": "2545aa",
- "parent_id": 1,
- "name": "shirts-men",
- "code": "shirts-men"
}{- "success": true,
- "locale": "en",
- "data": {
- "message": "accepted"
}
}Deletes a category identified by its platform_category_id.
Authorization : This endpoint requires an bearer token with the write_category scope
required | integer or string The platform_category_id of the category to delete. Can be passed as a string or an integer. |
{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "message": "Category deleted successfully"
}
}This API helps manage products by allowing users to add, update, and delete products, as well as fetch a list of existing products.
Fetch products based on various filters such as type, date range, and stock availability.
Authorization : This endpoint requires an bearer token with the read_product scope
| page | integer >= 1 Default: 1 The page number for pagination. |
| limit | integer <= 100 Default: 10 The number of items to return per page. |
| type | string Enum: "title" "product" "sku" "recently_added_products" "most_purchased_products" "most_viewed_products" Example: type=most_purchased_products Type of products to filter. |
| search | string Examples:
Search for products by title, platform product ID. |
| stock_filter | string Enum: "all" "in_stock" "out_of_stock" Example: stock_filter=all Filter products by stock availability. |
| product_id | integer Example: product_id=214318 Fetch details of a specific product from bayengage. |
| category_id | integer Example: category_id=4112 Fetch details of a specific category id from bayengage. |
integer or string Fetch details of a specific platform product. | |
integer or string Fetch details of a specific platform category id. | |
| custom_attribute1 | Array of strings Example: custom_attribute1=Basketball Sport associated with the products. e.g sport=[Basketball, Golf] |
| custom_attribute2 | Array of strings Example: custom_attribute2=NBA league associated with the products. e.g league=[NBA, NCAA] |
| price[less_than] | number Example: price[less_than]=500 Filter products with price less than the specified value. |
| price[greater_than] | number Example: price[greater_than]=100 Filter products with price greater than the specified value. |
| price[equals] | number Example: price[equals]=250 Filter products with price equals to the specified value. |
| price[between] | string Example: price[between]=300,700 or price[between]=[300,700] Filter products with price between two values (comma-separated or array). |
| review_date_range | string Enum: "today" "yesterday" "7days" "30days" "90days" "lastmonth" "custom" The time range for filtering products by review date. |
| review_start_date | string Example: review_start_date=28-09-2024 15:20:30 Start date and time in dd-mm-yyyy H:i:s format (e.g., 28-09-2024 15:20:30). Required if |
| review_end_date | string Example: review_end_date=28-09-2024 22:20:30 End date and time in dd-mm-yyyy H:i:s format (e.g., 28-09-2024 22:20:30). Required if |
| sort_by | string Enum: "review_rating:asc" "review_rating:desc" Example: sort_by=review_rating:desc Sort products by review rating (ascending or descending). |
{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "products": [
- {
- "id": 20411201,
- "platform_product_id": "18644112501",
- "title": "Nike Air Zoom Basketball Shoes",
- "description": "High performance basketball shoes designed for comfort and agility.",
- "type": "physical",
- "product_bought_status": 1,
- "created_at": "2025-03-20T07:01:05.000000Z",
- "updated_at": "2025-04-23T07:59:46.000000Z",
- "review_updated_at": "2025-12-08T11:16:25.000000Z",
- "review_rating": "4.5",
- "review_count": "647",
- "variants": [
- {
- "id": 3010,
- "product_id": 20411201,
- "platform_variant_id": "2041120101",
- "image_id": 9001,
- "currency_code": "USD",
- "title": "Size 10",
- "price": "120.00",
- "compare_price": "150.00",
- "sku": "NIKE-BASKET-10",
- "position": 1,
- "product_bought_status": 1,
- "created_at": "2025-03-20T07:01:05.000000Z",
- "updated_at": "2025-04-23T07:59:49.000000Z",
- "image": {
- "id": 9001,
- "platform_image_id": "679",
- "product_id": 20411201,
- "src": {
}, - "alt": "Nike Air Zoom Basketball Shoes",
- "position": 0,
- "width": 500,
- "height": 500,
- "created_at": "2025-03-20T07:01:05.000000Z",
- "updated_at": "2025-04-23T07:59:49.000000Z"
}, - "inventory_quantity": {
- "id": 6001,
- "variant_id": 3010,
- "field": "inventory_quantity",
- "value": "15",
- "created_at": "2025-03-20T07:01:05.000000Z",
- "updated_at": "2025-04-23T07:59:49.000000Z"
}
}
], - "categories": [
- {
- "id": 450,
- "platform_category_id": "90",
- "title": "Shoes",
- "handle": "shoes",
- "created_at": "2025-03-20T07:01:05.000000Z",
- "updated_at": "2025-04-23T07:59:49.000000Z"
}
], - "field_values": [
- {
- "meta_field_id": 81,
- "value": "NBA"
}, - {
- "meta_field_id": 82,
- "value": "Nike"
}, - {
- "meta_field_id": 83,
- "value": "Lakers"
}
]
}, - {
- "id": 41128030,
- "platform_product_id": "502104112",
- "title": "Titleist Pro V1 Golf Balls",
- "description": "Premium golf balls with maximum distance and control.",
- "type": "physical",
- "product_bought_status": 0,
- "created_at": "2025-03-20T09:04:32.000000Z",
- "updated_at": "2025-03-20T09:04:32.000000Z",
- "review_updated_at": "2025-12-11T11:16:25.000000Z",
- "review_rating": "4.8",
- "review_count": "145",
- "variants": [
- {
- "id": 3011,
- "product_id": 41128030,
- "platform_variant_id": "4112803001",
- "image_id": 9002,
- "currency_code": "USD",
- "title": "Pack of 12",
- "price": "49.99",
- "compare_price": "59.99",
- "sku": "TITL-GOLF-12",
- "position": 1,
- "product_bought_status": 0,
- "created_at": "2025-03-20T09:04:32.000000Z",
- "updated_at": "2025-03-20T09:04:36.000000Z",
- "image": {
- "id": 9002,
- "platform_image_id": "519",
- "product_id": 41128030,
- "alt": "Titleist Pro V1 Golf Balls",
- "position": 0,
- "width": 400,
- "height": 400,
- "created_at": "2025-03-20T09:04:32.000000Z",
- "updated_at": "2025-03-20T09:04:36.000000Z"
}, - "inventory_quantity": {
- "id": 6002,
- "variant_id": 3011,
- "field": "inventory_quantity",
- "value": "40",
- "created_at": "2025-03-20T09:04:32.000000Z",
- "updated_at": "2025-03-20T09:04:36.000000Z"
}
}
], - "categories": [
- {
- "id": 451,
- "platform_category_id": "91",
- "title": "Accessories",
- "handle": "accessories",
- "created_at": "2025-03-20T09:04:32.000000Z",
- "updated_at": "2025-03-20T09:04:36.000000Z"
}
], - "field_values": [
- {
- "meta_field_id": 81,
- "value": "Golf"
}, - {
- "meta_field_id": 82,
- "value": "PGA"
}, - {
- "meta_field_id": 83,
- "value": "NCAA"
}
]
}
], - "total": 2,
- "per_page": 10,
- "page": 1,
- "last_page": 1
}
}Create or update a product. This endpoint accepts a payload containing product details.
Authorization : This endpoint requires an bearer token with the write_product scope
required | integer or string Unique identifier for the product. Can be passed as a string or an integer. |
| product_title required | string Title of the product. |
| description | string Product description. |
| vendor | string Vendor or brand of the product. |
| product_type required | string Type of the product (e.g., simple or variant). |
| product_url | string URL of the product. |
| product_status | string Status of the product (e.g., "1" for active and "0" for inactive). |
Array of objects List of product categories. | |
| tags | string Comma-separated product tags. |
required | Array of objects List of product variants. |
Array of objects List of product images. | |
| custom | object Custom attributes for the product. |
{- "platform_product_id": "44422aa",
- "product_title": "Iphone 16 1TB",
- "description": "Iphone 16 1TB comes with many colour option, More offers on credit card purchase",
- "vendor": "Apple",
- "product_type": "simple",
- "product_status": "1",
- "product_category": [
- {
- "platform_category_id": 33,
- "category_title": "Electronics"
}
], - "tags": "electronics,phone,iphone",
- "variants": [
- {
- "platform_variant_id": 4112001,
- "variant_title": "Iphone 16 1TB Black",
- "price": 579.99,
- "sku": "BE-001",
- "position": 1,
- "compare_at_price": 569.99,
- "created_at": "2024-08-04T15:13:40.000Z",
- "updated_at": "2025-02-02T13:25:20.000Z",
- "inventory_quantity": 19
}, - {
- "platform_variant_id": 4112002,
- "variant_title": "Iphone 16 1TB Blue",
- "price": 579.99,
- "sku": "BE-002",
- "position": 2,
- "compare_at_price": 569.99,
- "created_at": "2024-08-04T15:13:40.000Z",
- "updated_at": "2025-02-02T13:25:20.000Z",
- "inventory_quantity": 26
}
], - "images": [
- {
- "is_featured": true,
- "platform_product_id": 4112,
- "image_id": 450492,
- "alt": "ppg-defthane-021-01-polyurethane-paint-gloss-liquid-amber-1-gal-can",
- "width": 0,
- "height": 0,
- "platform_variant_id": 4112001
}
], - "custom": {
- "screen_size": "6.7 inches",
- "chip": "A18 Pro"
}
}{- "success": true,
- "locale": "en",
- "data": {
- "message": "accepted"
}
}Delete a product by its platform_product_id.
Authorization : This endpoint requires an bearer token with the write_product scope
required | integer or string The platform_product_id of the product to delete. This value can be passed either as a string or an integer. |
{- "success": true,
- "message": "Product deleted successfully"
}Create or update an order.
Authorization : This endpoint requires an bearer token with the write_order scope
required | integer or string Unique identifier for the order on the platform. This value can be passed either as a string or an integer. |
| email required | string Customer's email address. |
| cart_token required | string Cart token associated with the order Eg - '83d188b46c3396d880c20c187f56e679' |
| phone | number Customer's phone number Eg - '8990998999'. |
| created_at required | string <date-time> Order creation timestamp. (format - YYYY-MM-DD HH:MM:SS). |
| completed_at | string <date-time> Order completion timestamp. (format - YYYY-MM-DD HH:MM:SS). |
| currency | string Currency code Eg - 'USD' |
| current_subtotal_price required | number Subtotal price of the order. |
| current_total_discounts | number Total discounts applied. |
| current_total_price required | number Total price of the order. |
| current_total_tax | number Total tax for the order. |
Array of objects List of discount codes applied. | |
| refunds | object or null Refund details if any. |
| status required | string Enum: "open" "closed" "cancelled" Order status. |
| financial_status | string Enum: "authorized" "pending" "paid" "partially_paid" "refunded" "voided" "partially_refunded" "unpaid" "expired" Financial status of the order. |
| fulfillment_status | string Enum: "shipped" "partial" "unshipped" "unfulfilled" "pending" "fulfilled" Fulfillment status of the order. |
| fulfilled_at | string <date-time> Order fulfillment timestamp. (format - YYYY-MM-DD HH:MM:SS). |
integer or string Order number can be 1004112 or 'TGB004112' | |
required | Array of objects Billing address details. |
required | Array of objects List of order items. |
required | Array of objects Shipping address details. |
{- "platform_order_id": "4112bb",
- "email": "user_mail_id@domain.com",
- "cart_token": "83d188b46c3396d880c20c187f56e679",
- "phone": 8990998999,
- "created_at": "2021-08-04T15:13:40.000Z",
- "completed_at": "2022-02-02T13:25:20.000Z",
- "currency": "USD",
- "current_subtotal_price": 950,
- "current_total_discounts": 0,
- "current_total_price": 950,
- "current_total_tax": 0,
- "discount_codes": [
- {
- "code": "CHECKOUTNOW",
- "amount": 50,
- "type": "percentage"
}
], - "refunds": null,
- "status": "open",
- "financial_status": "paid",
- "fulfillment_status": "pending",
- "fulfilled_at": "2022-02-06T13:25:20.000Z",
- "order_number": 5674898,
- "billing_address": [
- {
- "name": "George",
- "company": "",
- "address1": "4300 Hwy 365 Port Arthur Texas",
- "address2": null,
- "city": "Los Angeles",
- "province": "Michigan",
- "zip": 30303,
- "country": "US",
- "province_code": "LA",
- "country_code": 1
}
], - "line_items": [
- {
- "platform_product_id": 4112002,
- "platform_variant_id": 1,
- "title": "Air purifier smart XL",
- "price": 1000,
- "quantity": 1,
- "sku": "411202gd"
}
], - "shipping_address": [
- {
- "name": "George",
- "company": "",
- "address1": "4300 Hwy 365 Port Arthur Texas",
- "address2": null,
- "city": "Los Angeles",
- "province": "Michigan",
- "zip": 30303,
- "country": "US",
- "province_code": "LA",
- "country_code": 1
}
]
}{- "success": true,
- "locale": "en",
- "data": {
- "message": "accepted"
}
}Deletes an order by its platform_id. Pass the platform_order_id as a path parameter.
Authorization : This endpoint requires an bearer token with the write_order scope
required | integer or string The unique platform_order_id of the order to delete. This value can be passed either as a string or an integer. |
{- "success": true,
- "message": "Order deleted successfully"
}Fetch orders with optional date range and platform order ID filtering, with pagination support.
Authorization : This endpoint requires a bearer token with the read_order scope
| page | integer >= 1 Default: 1 Example: page=2 Page number for pagination. |
| limit | integer >= 1 Default: 25 Example: limit=50 Number of records per page. |
| filter_by[date_range] | string Enum: "today" "yesterday" "7days" "30days" "90days" "lastmonth" "custom" Example: filter_by[date_range]=7days Filter orders by predefined or custom date ranges. |
| filter_by[start_date] | string <date> Example: filter_by[start_date]=01-01-2024 Start date for custom date range filtering. Required when |
| filter_by[end_date] | string <date> Example: filter_by[end_date]=31-01-2024 End date for custom date range filtering. Required when |
| filter_by[platform_order_id] | string Example: filter_by[platform_order_id]=ORDER12345 Filter by specific platform order ID. Must be a single ID (no comma-separated values). |
{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "orders": [
- {
- "id": 19,
- "platform_order_id": 114,
- "order_number": "114",
- "customer_id": 10676841,
- "status": "open",
- "state": 1,
- "financial_status": "paid",
- "fulfillment_status": "unfulfilled",
- "ordered_at": "2024-08-06 07:46:32",
- "completed_at": "2024-08-06 07:46:32",
- "quantity": 1,
- "price": "225.00",
- "shipping_price": "0.00",
- "tax_amount": "0.00",
- "items": [
- {
- "sku": "ABS-007",
- "price": "225.00",
- "title": "Coffee Brewing System",
- "quantity": 1,
- "platform_product_id": 86,
- "platform_variant_id": 66
}
], - "contact_info": {
- "email": "john.dew@targetbay.com",
- "phone": ""
}, - "created_at": "2025-12-08 18:08:28",
- "updated_at": "2024-09-16 16:07:45"
}
], - "current_page": 1,
- "last_page": 1,
- "per_page": 10,
- "total": 1
}
}This API allows users to fetch product reviews/ QnAs and manage moderation and admin reply for both.
Fetch all the product reviews with optional date range , search by title,content, consumer name, filter by rating, product id, status; sorting based on newest, oldest, highest_rating, lowest_rating., with pagination support.
Authorization : This endpoint requires a bearer token with the read_review scope
| page | integer >= 1 Default: 1 Example: page=2 Page number for pagination. |
| limit | integer >= 1 Default: 10 Example: limit=50 Number of records per page. |
| filter_by[status] | string Enum: "published" "pending" "unpublished" "spam" "trash" Example: filter_by[status]=unpublished Filter product reviews by moderation status. |
| filter_by[date_range] | string Enum: "today" "yesterday" "7days" "30days" "90days" "lastmonth" "custom" Example: filter_by[date_range]=7days Filter orders by predefined or custom date ranges. |
| filter_by[start_date] | string <date> Example: filter_by[start_date]=01-01-2024 Start date for custom date range filtering. Required when |
| filter_by[end_date] | string <date> Example: filter_by[end_date]=31-01-2024 End date for custom date range filtering. Required when |
| filter_by[platform_product_id] | string Example: filter_by[platform_product_id]=1001 Filter by specific product ID. Must be a single ID (no comma-separated values). |
| filter_by[rating] | integer Example: filter_by[rating]=3 Filter by specific review rating. Values ranges from 1 to 5. Must be single (no comma-separated values). |
| search | string Example: search=Good product Free text that searches in title or content or customer name or customer email. |
| sort_by | string Enum: "newest" "oldest" "highest_rating" "lowest_rating" Example: sort_by=highest_rating Sort the review order. Allowed values are newest, oldest, highest_rating, lowest_rating. |
{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "reviews": [
- {
- "review_id": "507f1f77bcf86cd799439011",
- "platform_product_id": "1001",
- "rating": 5,
- "title": "Great product!",
- "content": "Excellent quality and fast delivery.",
- "status": "published",
- "reviewer": {
- "name": "John Doe",
- "email": "john@example.com"
}, - "reviewed_at": "2024-01-15T10:30:00Z"
}, - {
- "review_id": "507f1f77bcf86cd799439012",
- "platform_product_id": "1001",
- "rating": 4,
- "title": "Great value for money",
- "content": "The product is good value for the price.",
- "status": "published",
- "reviewer": {
- "name": "Jane Doe",
- "email": "jane@example.com"
}, - "reviewed_at": "2024-01-14T15:45:00Z"
}
], - "current_page": 1,
- "last_page": 1,
- "per_page": 10,
- "total": 1
}
}Fetch a specific product review with all the details.
Authorization : This endpoint requires a bearer token with the read_review scope
| review_id required | string Example: 507f1f77bcf86cd799439011 Review ID of the product review to be fetched. |
{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "review_id": "507f1f77bcf86cd799439011",
- "platform_product_id": "1001",
- "rating": 5,
- "title": "Great product!",
- "content": "Excellent quality and fast delivery.",
- "status": "published",
- "incentivized": false,
- "verified": true,
- "reviewed_at": "2024-01-15T10:30:00Z",
- "reviewer": {
- "name": "John Doe",
- "email": "john@example.com",
- "address": {
- "country": "United States",
- "state": "California",
- "city": "Los Angeles"
}
}, - "replies": [
- {
- "reply": "Thank you for your feedback!",
- "status": "public",
- "created_at": "2024-01-18T10:30:00Z"
}
]
}
}Perform one of the 2 actions on a specific review, add admin comment and/or update moderation status.
Authorization : This endpoint requires a bearer token with the write_review scope
| review_id required | string Example: 507f1f77bcf86cd799439011 Review ID of the product review to be fetched. |
| reply | string Admin reply given to acknowledge the review posted by customer |
| is_reply_private | boolean When true, the reply given is not eligible to be shown in public widget |
| status | string Enum: "published" "unpublished" "spam" "trash" The moderation status. Required when reply is not provided. Allowed values are published, unpublished, trash. |
| reason | integer Enum: "1 (Unrelated to the Product or Service)" "2 (Inappropriate/Profanity)" "3 (Legal transgression)" "4 (Other Languages/ Unsupported Languages)" "5 (Contains Confidential information)" "6 (False or misleading)" "7 (Fake)" "8 (Low rating)" "9 (Previously approved review)" "10 (Review containing more than one link)" "11 (Reviews have email address)" The numeric code for unpublishing reason. Required when status is 'unpublished' |
{- "reply": "Thank you for your valuable feedback, we will ensure to maintain the same quality!",
- "is_reply_private": false,
- "status": "unpublished",
- "reason": 3
}{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "review_id": "507f1f77bcf86cd799439011",
- "reply": "Thank you for your valuable feedback, we will ensure to maintain the same quality!",
- "is_reply_private": true,
- "status": "unpublished"
}
}Fetch all the product questions with optional date range , search by question, consumer name or email, filter by product id, status, date; sorting based on newest, oldest., with pagination support.
Authorization : This endpoint requires a bearer token with the read_review scope
| page | integer >= 1 Default: 1 Example: page=2 Page number for pagination. |
| limit | integer >= 1 Default: 10 Example: limit=50 Number of records per page. |
| filter_by[status] | string Enum: "published" "unpublished" "trash" Example: filter_by[status]=unpublished Filter product questions by moderation status. |
| filter_by[date_range] | string Enum: "today" "yesterday" "7days" "30days" "90days" "lastmonth" "custom" Example: filter_by[date_range]=7days Filter orders by predefined or custom date ranges. |
| filter_by[start_date] | string <date> Example: filter_by[start_date]=01-01-2024 Start date for custom date range filtering. Required when |
| filter_by[end_date] | string <date> Example: filter_by[end_date]=31-01-2024 End date for custom date range filtering. Required when |
| filter_by[platform_product_id] | string Example: filter_by[platform_product_id]=1001 Filter by specific product ID. Must be a single ID (no comma-separated values). |
| search | string Example: search=How much is shipping? Free text that searches in question content or customer first/last name or customer email |
| sort_by | string Example: sort_by=newest Sort the product question order. Allowed values: newest, oldest |
{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "questions": [
- {
- "question_id": "507f1f77bcf86cd799439011",
- "platform_product_id": "1001",
- "question": "What is the material of this product?",
- "customer": {
- "first_name": "John",
- "last_name": "Doe",
- "email": "john@example.com"
}, - "status": "published",
- "answers": [
- {
- "answer_id": "abc123",
- "answer": "The product is made of high-quality cotton.",
- "answered_at": "2024-01-25T10:30:00Z",
- "status": "public"
}
], - "asked_at": "2024-01-15T10:30:00Z",
- "updated_at": "2024-01-15T10:30:00Z"
}, - {
- "question_id": "507f1f77bcf86cd799439011",
- "platform_product_id": "1001",
- "question": "What is the shipping duration?",
- "customer": {
- "first_name": "John",
- "last_name": "Doe",
- "email": "john@example.com"
}, - "status": "unpublished",
- "answers": [ ],
- "asked_at": "2024-01-17T10:30:00Z",
- "updated_at": "2024-01-17T10:30:00Z"
}
], - "current_page": 1,
- "last_page": 1,
- "per_page": 10,
- "total": 1
}
}Fetch a specific product question with all the details.
Authorization : This endpoint requires a bearer token with the read_review scope
| question_id required | string Example: 507f1f77bcf86cd799439011 Question ID of the product question to be fetched. |
{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "question_id": "507f1f77bcf86cd799439011",
- "platform_product_id": "1001",
- "question": "What is the material of this product?",
- "customer": {
- "first_name": "John",
- "last_name": "Doe",
- "email": "john@example.com"
}, - "status": "published",
- "answers": [
- {
- "answer_id": "824zfe52earfes",
- "answer": "The product is made of high-quality cotton.",
- "answered_at": "2024-01-25T10:30:00Z",
- "status": "public"
}
], - "asked_at": "2024-01-15T10:30:00Z",
- "updated_at": "2024-01-25T10:30:00Z"
}
}Perform one of the 2 actions on a specific question, add admin answers(upto 3 answers allowed) and/or update moderation status.
Authorization : This endpoint requires a bearer token with the write_review scope
| question_id required | string Example: 507f1f77bcf86cd799439011 Question ID of the product question to be fetched. |
| answer | string Admin answer given to question posted by customer |
| is_answer_private | boolean When true, the answer given is not eligible to be shown in public widget |
| status | string Enum: "published" "unpublished" "spam" "trash" The moderation status. Required when answer is not provided. Allowed values are published, unpublished, trash. |
{- "answer": "Thank you for your valuable feedback, we will ensure to maintain the same quality!",
- "is_answer_private": false,
- "status": "unpublished"
}{- "success": true,
- "message": "Product question moderated successfully",
- "locale": "en",
- "data": {
- "answer_id": "507f1f77bcf86cd799439011",
- "answer": "We provide shipping within 7 to 10 working days",
- "is_answer_private": false,
- "status": "published"
}
}Tracks user cart details including platform token, email, and items for tracking and follow-ups.
Authorization : This endpoint requires an bearer token with the write_cart scope
| platform_cart_token required | string Token identifying the cart from the platform. |
string <email> Email address of the customer. | |
Array of objects non-empty Array of product items in the cart. | |
| created_at | string <date-time> Timestamp when the cart was created. |
{- "platform_cart_token": "83d188b46c3396d880c20c187f56e6",
- "email": "your_mail_id@domain.com",
- "line_items": [
- {
- "platform_variant_id": 28694,
- "name": "Samsung Galaxy S23 FE 5G",
- "price": 349.99,
- "quantity": 1,
- "sku": "68591"
}
], - "created_at": "2024-03-28T13:28:28.939Z"
}{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "message": "success"
}
}Checkout details like items, customer info, shipping, and marketing consent to support abandoned cart recovery and conversion tracking.
Authorization : This endpoint requires an bearer token with the write_checkout scope
| platform_checkout_id required | integer Unique ID of the checkout process in your platform. |
| token required | string Unique token identifying the session or user. |
| status required | string Value: "process" Current status of the checkout process. Allowed value: |
| email required | string Email address of the customer. |
| buyer_accepts_email_marketing required | boolean Indicates if the buyer consents to receive email marketing. |
| currency required | string Currency code in "USD". |
required | Array of objects List of items included in the checkout. |
| abandoned_checkout_url required | string URL that allows the customer to return and complete the checkout. |
| buyer_accepts_sms_marketing required | boolean Indicates if the buyer consents to receive SMS marketing. |
| sms_marketing_phone required | string Phone number provided for SMS marketing. |
| total_price required | string Total price for the checkout. |
| total_tax required | string Total tax amount for the checkout. |
| subtotal_price required | string Subtotal price before taxes and discounts. |
required | object Shipping address details. |
required | object Customer details. |
{- "platform_checkout_id": 694476275,
- "token": "zumhf537g07q7fa38zuhfuahuf",
- "status": "process",
- "email": "your_mail_id@domain.com",
- "buyer_accepts_email_marketing": true,
- "currency": "USD",
- "line_items": [
- {
- "platform_variant_id": 28694,
- "name": "Samsung Galaxy S23 FE 5G",
- "quantity": 1,
- "price": 349.99
}
], - "buyer_accepts_sms_marketing": true,
- "sms_marketing_phone": "9147866655",
- "total_price": "349.99",
- "total_tax": "15",
- "subtotal_price": "364.99",
- "shipping_address": {
- "first_name": "Jon",
- "address1": "xxxx",
- "phone": "9147866655",
- "city": "New York",
- "zip": "10001",
- "province": "New York",
- "country": "USA",
- "last_name": "Deo",
- "address2": "Apt 101",
- "company": "TargetBay Inc.",
- "latitude": 40.7128,
- "longitude": -74.006,
- "name": "Jon",
- "country_code": "US",
- "province_code": "NY"
}, - "customer": {
- "platform_customer_id": 1004112,
- "email": "your_mail_id@domain.com",
- "buyer_accepts_email_marketing": true,
- "first_name": "Jon",
- "last_name": "Deo"
}
}{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "message": "success"
}
}API for managing contact lists and segments. These endpoints enable users to organize, filter, and target their audience effectively.
Creates a new list with the given title.
Authorization: This endpoint requires an bearer token with the write_list_segment scope
| title required | string The title of the list to be created. |
{- "title": "holidaylist"
}{- "success": true,
- "data": {
- "list_id": 32712,
- "list_uuid": "58c963f83389",
- "title": "holidaylist",
- "created_at": "2025-07-16T09:34:10.000000Z"
}
}Add one or more contacts to a list using their customer IDs.
Authorization: This endpoint requires an bearer token with the write_list_segment scope
| list_uuid required | string UUID of the list to which contacts will be added. |
required | Array of integers or strings <= 1000 items Array of platform customer identifiers to add to the list. Each identifier may be an integer or a string. Maximum 1000 items allowed. |
{- "list_uuid": "58c963f83389",
- "platform_customer_id": [
- 14709427,
- 14709428
]
}{- "success": true
}Remove one or more contacts from a list using their customer IDs.
Authorization: This endpoint requires an bearer token with the write_list_segment scope
| list_uuid required | string UUID of the list from which contacts will be removed. |
required | Array of integers or strings <= 1000 items Array of platform customer identifiers to remove from the list. Each identifier may be an integer or a string. Maximum 1000 items allowed. |
{- "list_uuid": "58c963f83389",
- "platform_customer_id": [
- 14709427,
- 14709428
]
}{- "success": true
}Fetches a list of all available lists and segments, with an optional search query.
Authorization : This endpoint requires an bearer token with the read_list_segment scope
| search | string Example: search=Summer Campaign Title search. |
| type | string Enum: "all" "list" "segment" Example: type=all Filter by type. Options - all, list, segment. |
| page | integer >= 1 Default: 1 The page number for pagination. |
| limit | integer <= 100 Default: 10 The number of items to return per page. |
{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "lists_segments": [
- {
- "id": 1001,
- "uuid": "abc123ef4567",
- "title": "Summer Campaign List",
- "is_master": 0,
- "created_at": "2025-07-01T09:00:00Z",
- "type": "list"
}, - {
- "id": 1002,
- "uuid": "def456gh7890",
- "title": "Engaged Users Segment",
- "is_master": 0,
- "created_at": "2025-06-25T10:30:00Z",
- "type": "segment"
}, - {
- "id": 0,
- "title": "Send to All Subscribers",
- "type": "contact"
}
], - "current_page_total": 3,
- "total": 3,
- "per_page": 10,
- "page": 1,
- "last_page": 1
}
}APIs for managing Email/SMS campaigns. This includes creating, updating, scheduling, pausing, cloning, and sending campaigns.
This endpoint retrieves details of a specific Email / SMS campaign by its ID.
| campaign_id required | integer Example: 5125 The unique identifier for the campaign. |
{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "campaign": {
- "title": "Black friday sale",
- "type": "regular",
- "send_to": {
- "lists": {
- "include": [ ],
- "exclude": [
- 5450
]
}, - "segments": {
- "include": [
- 4347
], - "exclude": [ ]
}
}, - "delivery_control": {
- "is_assigned": true,
- "type": "hours",
- "value": 14
}, - "utm_tracking": {
- "medium": "email",
- "source": "bayengage",
- "campaign": "campaign-name"
}, - "recipient_name": {
- "is_assigned": true,
- "format": "{{full_name}}",
- "fallback": "Guest"
}, - "variants": [
- {
- "id": 5745,
- "subject": "#3 New product promotion 2025",
- "preview_text": null,
- "template_id": 28939,
- "sender": {
- "from": "John",
- "from_email": "john@targetbay.com",
- "reply_to_email": "john@targetbay.com"
}
}
]
}
}
}Fetches a paginated list of Email/SMS campaigns with sorting, filtering, and status options.
Authorization : This endpoint requires an bearer token with the read_campaign scope
| channel required | string Enum: "email" "sms" Example: channel=email The campaign channel (email or SMS). |
| page | integer >= 1 Default: 1 The page number for pagination. |
| limit | integer <= 100 Default: 10 The number of items per page. |
| sort_by | string Enum: "created_at:asc" "created_at:desc" Sort campaigns by created_at (ascending or descending). |
| created_at[before] | string <date> Example: created_at[before]=26-03-2025 Filter campaigns created before the given date. |
| created_at[after] | string <date> Example: created_at[after]=26-03-2025 Filter campaigns created after the given date. |
| scheduled_at[before] | string <date> Example: scheduled_at[before]=26-03-2025 Filter campaigns scheduled before the given date. |
| scheduled_at[after] | string <date> Example: scheduled_at[after]=26-03-2025 Filter campaigns scheduled after the given date. |
| published_at[before] | string <date> Example: published_at[before]=26-03-2025 Filter campaigns published before the given date. |
| published_at[after] | string <date> Example: published_at[after]=26-03-2025 Filter campaigns published after the given date. |
| status[] | Array of strings Items Enum: "done" "draft" "scheduled" "published" "paused" "sending" "cancelled" "all" Filter campaigns by status. |
| fields[lists] | string Enum: "id" "title" "created_at" "updated_at" Example: fields[lists]=title (Optional) Select specific fields for lists. |
| fields[segments] | string Enum: "id" "title" "created_at" "updated_at" Example: fields[segments]=title (Optional) Select specific fields for segments. |
| fields[template] | string Enum: "id" "title" "created_at" "updated_at" Example: fields[template]=title (Optional) Select specific fields for templates. |
| fields[listsExclude] | string Enum: "id" "title" "created_at" "updated_at" Example: fields[listsExclude]=title (Optional) Exclude specific fields from lists. |
| fields[segmentsExclude] | string Enum: "id" "title" "created_at" "updated_at" Example: fields[segmentsExclude]=title (Optional) Exclude specific fields from segments. |
{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "campaigns": [
- {
- "id": 14507,
- "title": "August NFL and NCAA SMS Coupon",
- "type": "regular",
- "position": "draft",
- "recipients_count": 514,
- "created_at": "2025-01-31T08:02:00.000000Z",
- "updated_at": "2025-02-18T12:50:43.000000Z",
- "deleted_at": null,
- "variants": [
- {
- "id": 15962,
- "campaign_id": 14507,
- "subject": "August NFL and NCAA SMS Coupon",
- "template_id": 56616,
- "stats": {
- "total": 514
}, - "scheduled_at": null,
- "published_at": null,
- "timezone": null,
- "deleted_at": null
}
]
}
], - "total": 1,
- "current_page_total": 1,
- "per_page": 10,
- "page": 1,
- "last_page": 1
}
}This endpoint allows you to create a new email campaign.
Authorization : This endpoint requires an bearer token with the write_campaign scope
| title required | string The title of the campaign. |
| type required | string Enum: "regular" "ab_test" The type of the campaign. Options are "regular" or "ab_test". |
{- "title": "summer sale offer campaign",
- "type": "regular"
}{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "campaign": {
- "id": 5163,
- "title": "summer sale offer campaign",
- "position": "draft",
- "type": "regular",
- "created_at": "2025-02-16T17:17:24.000000Z",
- "delivery_control": null,
- "recipient_name": null,
- "utm_tracking": [ ],
- "recipients_count": null,
- "send_to": {
- "lists": {
- "include": [ ],
- "exclude": [ ]
}, - "segments": {
- "include": [ ],
- "exclude": [ ]
}
}, - "variants": [
- {
- "id": 5795,
- "subject": null,
- "preview_text": null,
- "template_id": null,
- "sender": [ ]
}
], - "follow_ups": null
}
}
}This endpoint allows you to create a new SMS campaign.
Authorization : This endpoint requires an bearer token with the write_campaign scope
| title required | string Campaign title. |
| type required | string Value: "sms_regular" Campaign type (must be 'sms_regular'). |
{- "title": "Product promotion offer campaign",
- "type": "sms_regular"
}{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "campaign": {
- "id": 5196,
- "title": "Product promotion offer campaign",
- "position": "draft",
- "type": "sms_regular",
- "created_at": "2025-02-18T19:14:49.000000Z",
- "delivery_control": null,
- "send_to": {
- "segments": {
- "include": [ ],
- "exclude": [ ]
}
}, - "sms_utm_tracking": null,
- "variants": [
- {
- "id": 5830,
- "preview_text": null,
- "template_id": 0
}
]
}
}
}Updates the details of an existing Email campaign, including recipients, delivery control, UTM tracking, and variants.
Authorization : This endpoint requires an bearer token with the write_campaign scope
| campaign_id required | integer Example: 5146 |
| title required | string |
| type required | string Enum: "regular" "ab_test" |
required | object Either |
object | |
required | object |
object | |
required | Array of objects |
object |
{- "title": "summer sale offer campaign",
- "type": "regular",
- "send_to": {
- "lists": {
- "include": [
- 5432
], - "exclude": [ ]
}, - "segments": {
- "include": [ ],
- "exclude": [ ]
}
}, - "delivery_control": {
- "is_assigned": false,
- "type": "hours",
- "value": 14
}, - "utm_tracking": {
- "medium": "campaign-email",
- "source": "bayengage",
- "campaign": "campaign-name"
}, - "recipient_name": {
- "is_assigned": false,
- "format": "{{full_name}}",
- "fallback": "Guest"
}, - "variants": [
- {
- "id": 5745,
- "subject": "sale is here",
- "preview_text": null,
- "template_id": 241128,
- "sender": {
- "from": "John",
- "from_email": "john@targetbay.com",
- "reply_to_email": "john@targetbay.com"
}
}
], - "follow_ups": {
- "enabled": false,
- "subject": "Need HELP to placing the order??",
- "preview_text": "here is your 15% coupon",
- "follow_up_event": "not_clicked",
- "campaign_scheduled_by": {
- "unit": "day",
- "value": 2
}
}
}{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "campaign": {
- "id": 5146,
- "title": "summer sale offer campaign",
- "position": "draft",
- "type": "regular",
- "created_at": "2025-02-16T15:44:25.000000Z",
- "delivery_control": {
- "is_assigned": false,
- "type": "hours",
- "value": 14
}, - "recipient_name": {
- "is_assigned": false,
- "format": "{{full_name}}",
- "fallback": "Guest"
}, - "utm_tracking": {
- "source": "campaign-email",
- "medium": "bayengage",
- "campaign": "campaign-name"
}, - "send_to": {
- "lists": {
- "include": [
- 5432
], - "exclude": [ ]
}, - "segments": {
- "include": [ ],
- "exclude": [ ]
}
}, - "variants": [
- {
- "id": 5745,
- "subject": "sale is here",
- "preview_text": null,
- "template_id": 241128,
- "sender": {
- "from": "John",
- "from_email": "john@targetbay.com",
- "reply_to_email": "john@targetbay.com"
}
}
]
}, - "follow_ups": {
- "enabled": false,
- "subject": "Need HELP to placing the order??",
- "preview_text": "here is your 15% coupon",
- "follow_up_event": "not_clicked",
- "campaign_scheduled_by": {
- "unit": "days",
- "value": 2
}
}
}
}Updates the details of an existing SMS campaign.
Authorization : This endpoint requires an bearer token with the write_campaign scope
| campaign_id required | integer Example: 5125 The unique identifier for the SMS campaign to update. |
| id required | integer The campaign ID. |
| title required | string The title of the SMS campaign. |
| type required | string The type of campaign. |
object Delivery control settings | |
required | object Either |
required | object SMS UTM tracking configuration |
required | Array of objects List of SMS campaign variants. |
{- "id": 145985,
- "title": "July 2026 SMS Campaign",
- "type": "sms_regular",
- "delivery_control": {
- "is_assigned": true,
- "type": "hours",
- "value": 1
}, - "send_to": {
- "lists": {
- "include": [
- 33090
], - "exclude": [ ]
}, - "segments": {
- "include": [ ],
- "exclude": [ ]
}
}, - "sms_utm_tracking": {
- "utm_enabled": true,
- "medium": [
- "sms"
], - "source": [
- "bayengage"
], - "campaign": [
- "campaign-name"
]
}, - "variants": [
- {
- "id": 153269,
- "preview_text": "July 2026 SMS Campaign from {{store_name}}: {{first_name}} we are thrilled to have you on board! Visit us at {{store_link}} to explore more. We will keep you up-to-date on the latest exciting offers. Text STOP to opt-out.",
- "template_id": 55282
}
]
}{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "campaign": {
- "id": 145985,
- "title": "July 2026 SMS Campaign",
- "position": "draft",
- "type": "sms_regular",
- "source": "api",
- "created_at": "2026-07-29T13:23:00.000000Z",
- "delivery_control": {
- "is_assigned": true,
- "type": "hours",
- "value": 1
}, - "send_to": {
- "lists": {
- "include": [ ],
- "exclude": [ ]
}, - "segments": {
- "include": [ ],
- "exclude": [ ]
}
}, - "sms_utm_tracking": null,
- "variants": [
- {
- "id": 153269,
- "template_id": 55282,
- "preview_text": "July 2026 SMS Campaign from {{store_name}}: {{first_name}} we are thrilled to have you on board! Visit us at {{store_link}} to explore more. We will keep you up-to-date on the latest exciting offers. Text STOP to opt-out."
}
]
}
}
}Schedules an email campaign for delivery.
Authorization : This endpoint requires an bearer token with the write_campaign scope
| campaign_id required | integer Example: 5145 Unique identifier of the campaign to be sent |
{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "campaign": {
- "id": 5145,
- "title": "Summer sale offer 2025",
- "type": "regular",
- "send_to": {
- "lists": {
- "include": [
- 4112
], - "exclude": [ ]
}, - "segments": {
- "include": [ ],
- "exclude": [ ]
}
}, - "delivery_control": {
- "is_assigned": false
}, - "utm_tracking": {
- "medium": "email",
- "source": "bayengage",
- "campaign": "campaign-name"
}, - "recipient_name": {
- "is_assigned": false,
- "format": "{{full_name}}",
- "fallback": "Guest"
}, - "variants": [
- {
- "id": 5777,
- "subject": "clearance sale 2025",
- "preview_text": null,
- "template_id": 28598,
- "sender": {
- "from": "John",
- "from_email": "john@targetbay.com",
- "reply_to_email": "john@targetbay.com"
}
}
], - "follow_ups": null
}
}
}Schedules an SMS campaign for delivery.
Authorization : This endpoint requires an bearer token with the write_campaign scope
| campaign_id required | integer Example: 5145 Unique identifier for the SMS campaign. |
{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "campaign": {
- "id": 5145,
- "title": "Newyear promotion 2025",
- "type": "sms_regular",
- "send_to": {
- "segments": {
- "include": [
- 345
], - "exclude": [ ]
}
}, - "delivery_control": {
- "is_assigned": false
}, - "sms_utm_tracking": {
- "medium": "bayengage",
- "source": "sms",
- "campaign": "campaign-name"
}, - "recipient_name": {
- "is_assigned": false,
- "format": "{{full_name}}",
- "fallback": "Guest"
}, - "variants": [
- {
- "id": 5777,
- "campaign_id": 5145,
- "preview_text": "sms content",
- "template_id": 28
}
]
}
}
}Schedules an Email/SMS campaign for a specific campaign using the provided scheduling details.
Authorization : This endpoint requires an bearer token with the write_campaign scope
| campaign_id required | integer Example: 5167 The unique identifier for the email campaign. |
| timezone required | string The timezone in which the campaign should be scheduled. |
| schedule_at required | string The date and time when the campaign should be scheduled (format - YYYY-MM-DD HH:MM AM/PM). |
| send_type required | string The sending type for the campaign. Eg - |
{- "timezone": "America/New_York",
- "schedule_at": "2025-02-17 06:00 PM",
- "send_type": "later"
}{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "campaign": {
- "id": 5167,
- "title": "#7 sale promotion campaign",
- "type": "regular",
- "send_to": {
- "lists": {
- "include": [ ],
- "exclude": [
- 5450
]
}, - "segments": {
- "include": [ ],
- "exclude": [ ]
}
}, - "delivery_control": {
- "is_assigned": false
}, - "utm_tracking": {
- "medium": "bayengage",
- "source": "sms",
- "campaign": "campaign-name"
}, - "recipient_name": {
- "is_assigned": false,
- "format": "{{full_name}}",
- "fallback": "Guest"
}, - "variants": [
- {
- "id": 5801,
- "subject": "New products arrived with awesome offers",
- "preview_text": "checkout immediately",
- "template_id": 241128,
- "sender": {
- "from": "John",
- "from_email": "john@targetbay.com",
- "reply_to_email": "john@targetbay.com"
}
}
], - "follow_ups": null
}
}
}Pauses an active email campaign.
Authorization : This endpoint requires an bearer token with the write_campaign scope
| campaign_id required | integer The unique identifier of the campaign to be paused. |
{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "Campaign": true
}
}Creates a duplicate of an existing email/SMS campaign with a new title.
Authorization : This endpoint requires an bearer token with the write_campaign scope
| campaign_id required | integer The unique identifier of the campaign to be cloned. |
| title required | string The title of the cloned campaign. |
{- "title": "champion offer updated promo code"
}{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "campaign": {
- "id": 5139,
- "title": "champion offer updated promo code",
- "position": "draft",
- "type": "regular",
- "created_at": "2025-02-14T02:47:01.000000Z",
- "variants": [
- {
- "id": 5760,
- "campaign_id": 5139,
- "subject": null,
- "preview_text": null,
- "template_id": null,
- "coupon_id": null,
- "published_at": null,
- "sender": [ ],
- "result": "testing",
- "stats": [ ],
- "scheduled_at": null,
- "timezone": null,
- "created_at": "2025-02-14T02:47:01.000000Z",
- "updated_at": "2025-02-14T02:47:01.000000Z",
- "deleted_at": null,
- "scheduled_type": null,
- "timezone_fallback": 2,
- "timezone_published_at": null
}
]
}
}
}This API provides detailed insights into the activity information of a specific email campaign and SMS campaign , offering a comprehensive view of its performance and engagement metrics.
The API provides performance statistics for a specific email campaign.
Authorization : This endpoint requires an bearer token with the read_campaign scope
| campaign_id required | integer The unique identifier for the email campaign. |
{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "stats": {
- "sent": 21,
- "delivered": 21,
- "opened": 16,
- "clicked": 1,
- "unique_opened": 5,
- "unique_clicked": 1,
- "bounced": 0,
- "complained": 0,
- "unsubscribed": 0,
- "delivered_rate": 100,
- "opened_rate": 23.81,
- "clicked_rate": 4.76,
- "bounced_rate": 0,
- "complained_rate": 0,
- "unsubscribed_rate": 0,
- "variants": [
- {
- "sent": 21,
- "opened": 16,
- "bounced": 0,
- "clicked": 1,
- "delivered": 21,
- "variant_id": 15574,
- "complained": 0,
- "delay_send": 0,
- "opened_rate": 23.81,
- "bounced_rate": 0,
- "clicked_rate": 4.76,
- "orders_count": 0,
- "orders_value": 0,
- "soft_bounced": 0,
- "unsubscribed": 0,
- "unique_opened": 5,
- "delivered_rate": 100,
- "unique_clicked": 1,
- "complained_rate": 0,
- "unsubscribed_rate": 0
}
]
}
}
}The API provides performance statistics for a specific SMS campaign.
Authorization : This endpoint requires an bearer token with the read_campaign scope
| campaign_id required | integer The unique identifier for SMS campaign. |
{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "msg_click": 70,
- "msg_click_percent": 0,
- "msg_delivered": 0,
- "msg_delivered_percent": 0,
- "msg_failed": 9,
- "msg_failed_percent": 1.42,
- "msg_unique_click": 58,
- "msg_unique_click_percent": 9.18,
- "msg_total_unsub": 13,
- "msg_unsub_percent": 2.06,
- "msg_recipient_count": 632,
- "msg_recipient_percent": 100,
- "msg_sent_recipient": 623,
- "msg_sent_recipient_percent": 98.58
}
}The API that should be used to fetch activity details for a specific email campaign
Authorization : This endpoint requires an bearer token with the read_campaign scope
| campaign_id required | integer The unique identifier for email campaign. |
| type[] required | Array of strings Items Enum: "opened" "delivered" "clicked" "unsubscribed" "complained" "bounced" "all" The type of activity to retrieve. |
| variant_id required | integer Example: variant_id=15701 The ID of the variant (Mandatory for A/B campaigns). |
| page | integer >= 1 Default: 1 The page number for pagination. |
| limit | integer <= 100 Default: 10 The number of items to return per page. |
| search_type | integer Default: 1 Pass any one (1- email, 2- first name, 3- last name). |
{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "activities": [
- {
- "id": 274075351,
- "first_name": null,
- "last_name": null,
- "email": "user1@yahoo.com",
- "created_at": "2025-10-08T08:37:08.000000Z",
- "source_timestamp": "2025-10-03 14:06:25",
- "status": "opened"
}, - {
- "id": 203913082,
- "first_name": null,
- "last_name": null,
- "email": "user2@icloud.com",
- "created_at": "2025-10-08T03:39:51.000000Z",
- "source_timestamp": "2025-10-03 14:03:25",
- "status": "clicked"
}, - {
- "id": 244457141,
- "first_name": null,
- "last_name": null,
- "email": "user3@icloud.com",
- "created_at": "2025-10-07T18:58:39.000000Z",
- "source_timestamp": "2025-10-03 14:01:46",
- "status": "delivered"
}, - {
- "id": 203912538,
- "first_name": null,
- "last_name": null,
- "email": "user4@seznam.cz",
- "created_at": "2025-10-07T15:32:42.000000Z",
- "source_timestamp": "2025-10-03 14:02:36",
- "status": "opened"
}, - {
- "id": 255790052,
- "first_name": "John",
- "last_name": "Hoffman",
- "email": "user5@yahoo.com",
- "created_at": "2025-10-07T13:46:29.000000Z",
- "source_timestamp": "2025-10-03 14:03:42",
- "status": "opened"
}, - {
- "id": 203915847,
- "first_name": "Chase",
- "last_name": "Shendok",
- "email": "user6@gmail.com",
- "created_at": "2025-10-07T13:34:03.000000Z",
- "source_timestamp": "2025-10-03 14:09:46",
- "status": "clicked"
}, - {
- "id": 203915847,
- "first_name": "Chase",
- "last_name": "Shendok",
- "email": "user6@gmail.com",
- "created_at": "2025-10-07T13:33:59.000000Z",
- "source_timestamp": "2025-10-03 14:09:46",
- "status": "opened"
}, - {
- "id": 237407684,
- "first_name": "Steve",
- "last_name": "Polyak",
- "email": "user7@yahoo.com",
- "created_at": "2025-10-07T12:16:09.000000Z",
- "source_timestamp": "2025-10-03 14:04:39",
- "status": "clicked"
}, - {
- "id": 218505791,
- "first_name": "Brett",
- "last_name": "Bennett",
- "email": "user8@yahoo.com",
- "created_at": "2025-10-07T09:04:43.000000Z",
- "source_timestamp": "2025-10-03 14:01:40",
- "status": "bounced"
}, - {
- "id": 203912074,
- "first_name": null,
- "last_name": null,
- "email": "user9@gmail.com",
- "created_at": "2025-10-07T07:48:13.000000Z",
- "source_timestamp": "2025-10-03 14:03:30",
- "status": "unsubscribed"
}
], - "total": 8523,
- "current_page_total": 10,
- "per_page": 10,
- "page": 1,
- "last_page": 853,
- "type": [
- "all"
]
}
}The API that should be used to fetch activity details for a specific SMS campaign.
Authorization : This endpoint requires an bearer token with the read_campaign scope
| campaign_id required | integer Example: campaign_id=4112 The unique identifier for SMS campaign. |
| type[] required | Array of strings Items Enum: "delivered" "sent" "clicked" "failed" "all" The type of activity to retrieve. |
| limit | integer <= 100 Default: 10 The number of items to return per page. |
| search | string Example: search=+1914786xxxx Search using mobile number |
| page | integer >= 1 Default: 1 The page number for pagination. |
{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "activities": [
- {
- "created_at": "2025-10-08T00:28:00.000000Z",
- "recipient_number": "+1914786xxxx",
- "status": "delivered",
- "platform_time": "",
- "customer_id": 256907914
}, - {
- "created_at": "2025-09-19T18:55:27.000000Z",
- "recipient_number": "+1914786xxxx",
- "status": "clicked",
- "platform_time": "",
- "customer_id": 267859565
}, - {
- "created_at": "2025-08-30T14:37:37.000000Z",
- "recipient_number": "+1914786xxxx",
- "status": "clicked",
- "platform_time": "",
- "customer_id": 247954592
}, - {
- "created_at": "2025-08-29T21:08:29.000000Z",
- "recipient_number": "+1914786xxxx",
- "status": "delivered",
- "platform_time": "",
- "customer_id": 256799107
}, - {
- "created_at": "2025-08-28T23:53:38.000000Z",
- "recipient_number": "+1914786xxxx",
- "status": "clicked",
- "platform_time": "",
- "customer_id": 269761162
}, - {
- "created_at": "2025-08-28T08:18:37.000000Z",
- "recipient_number": "+1914786xxxx",
- "status": "sent",
- "platform_time": "",
- "customer_id": 210719697
}, - {
- "created_at": "2025-08-27T14:09:10.000000Z",
- "recipient_number": "+1914786xxxx",
- "status": "clicked",
- "platform_time": "",
- "customer_id": 241123936
}, - {
- "created_at": "2025-08-27T13:58:53.000000Z",
- "recipient_number": "+1914786xxxx",
- "status": "clicked",
- "platform_time": "",
- "customer_id": 258236248
}, - {
- "created_at": "2025-08-26T05:56:13.000000Z",
- "recipient_number": "+1914786xxxx",
- "status": "failed",
- "platform_time": "",
- "customer_id": 203584853
}, - {
- "created_at": "2025-08-26T01:35:34.000000Z",
- "recipient_number": "+1914786xxxx",
- "status": "clicked",
- "platform_time": "",
- "customer_id": 260841601
}
], - "total": 689,
- "current_page_total": 10,
- "per_page": 10,
- "page": 1,
- "last_page": 69
}
}The API that should be used to fetch performance data for email/SMS campaigns.
Authorization : This endpoint requires an bearer token with the read_campaign scope
| date_range required | string Enum: "today" "yesterday" "7days" "30days" "90days" "lastmonth" "custom" The time range for campaign performance. |
| type[] required | Array of strings Items Enum: "regular" "ab_test" "sms_regular" "all" The type of campaign (e.g. "regular","ab_test","sms_regular","all"). |
| start_date required | string Example: start_date=28-09-2024 Start date in dd-mm-yyyy format. Required if |
| end_date required | string Example: end_date=28-09-2024 End date in dd-mm-yyyy format. Required if |
| page | integer >= 1 Default: 1 The page number for pagination. |
| limit | integer <= 100 Default: 10 The number of items to return per page. |
{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "campaigns": [
- {
- "campaign_id": 130001,
- "title": "October Promo: Fall Season SMS Blast",
- "published_at": "2025-10-06 14:00:00",
- "source_variant_id": 140200,
- "type": "sms_regular",
- "sent": 631,
- "delivered": 622,
- "delivered_rate": 98.57,
- "opened": null,
- "clicked": 70,
- "opened_rate": null,
- "clicked_rate": 9.32,
- "unique_opened": null,
- "unique_clicked": 58,
- "revenue": 235.76,
- "total_orders": 2,
- "unsubscribed": 0,
- "failed_or_bounced": 9
}, - {
- "campaign_id": 130002,
- "title": "August SMS Campaign - Back to School Offer",
- "published_at": "2025-08-16 16:30:00",
- "source_variant_id": 140201,
- "type": "sms_regular",
- "sent": 589,
- "delivered": 579,
- "delivered_rate": 98.3,
- "opened": null,
- "clicked": 78,
- "opened_rate": null,
- "clicked_rate": 11.23,
- "unique_opened": null,
- "unique_clicked": 65,
- "revenue": 100.29,
- "total_orders": 2,
- "unsubscribed": 0,
- "failed_or_bounced": 10
}, - {
- "campaign_id": 130003,
- "title": "Game Day Apparel Sale - 60% Off",
- "published_at": "2025-10-06 14:00:00",
- "source_variant_id": 140202,
- "type": "regular",
- "sent": 6525,
- "delivered": 6523,
- "delivered_rate": 99.97,
- "opened": 1959,
- "clicked": 1058,
- "opened_rate": 22.67,
- "clicked_rate": 3.05,
- "unique_opened": 1479,
- "unique_clicked": 199,
- "revenue": 110,
- "total_orders": 3,
- "unsubscribed": 4,
- "failed_or_bounced": 2
}, - {
- "campaign_id": 130004,
- "title": "Gym Wear Blowout - 50% Off Shorts and Tanks",
- "published_at": "2025-10-03 14:00:00",
- "source_variant_id": 140203,
- "type": "regular",
- "sent": 6656,
- "delivered": 6654,
- "delivered_rate": 99.97,
- "opened": 1849,
- "clicked": 630,
- "opened_rate": 20.45,
- "clicked_rate": 2.18,
- "unique_opened": 1361,
- "unique_clicked": 145,
- "revenue": 276,
- "total_orders": 5,
- "unsubscribed": 3,
- "failed_or_bounced": 2
}, - {
- "campaign_id": 130005,
- "title": "Compression Gear Sale - 30% Off",
- "published_at": "2025-09-26 14:00:00",
- "source_variant_id": 140204,
- "type": "ab_test",
- "sent": 7340,
- "delivered": 7337,
- "delivered_rate": 99.96,
- "opened": 2157,
- "clicked": 733,
- "opened_rate": 21.21,
- "clicked_rate": 2,
- "unique_opened": 1556,
- "unique_clicked": 147,
- "revenue": 1359,
- "total_orders": 5,
- "unsubscribed": 10,
- "failed_or_bounced": 3
}
], - "total": 5,
- "current_page_total": 5,
- "per_page": 10,
- "current_page": 1,
- "last_page": 1
}
}This API offers in-depth activity details for specific automations, providing a comprehensive overview of their performance and engagement data.
Fetches a list of automation flows based on various filters.
Authorization : This endpoint requires an bearer token with the read_automation scope
| page | integer >= 1 Default: 1 The page number for pagination. |
| limit | integer <= 100 Default: 10 The number of items to return per page. |
| sort_by | string Default: "created_at:desc" Enum: "created_at:asc" "created_at:desc" "id:asc" "id:desc" "title:asc" "title:desc" Sort results based on creation date, ID, or title. |
| status[] | string Default: "all" Enum: "all" "published" "draft" "offline" Filter flows based on status. |
| fields[event] | string Example: fields[event]=title Optional fields to include in the response. |
{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "flows": [
- {
- "id": 18850,
- "title": "#Winback Email",
- "status": "draft",
- "type": "regular",
- "created_at": "2025-01-16T10:16:51.000000Z",
- "updated_at": null,
- "deleted_at": null,
- "actions": [
- {
- "id": 88447,
- "actionable_type": "email",
- "status": "draft",
- "parent_id": 88446,
- "template": {
- "id": 168532
}, - "deleted_at": null
}
], - "trigger": {
- "title": "When a user places an order"
}
}, - {
- "id": 18847,
- "title": "#Post Purchase Email",
- "status": "draft",
- "type": "regular",
- "created_at": "2025-01-16T10:11:14.000000Z",
- "updated_at": null,
- "deleted_at": null,
- "actions": [
- {
- "id": 88441,
- "actionable_type": "email",
- "status": "draft",
- "parent_id": 88440,
- "template": {
- "id": 168529
}, - "deleted_at": null
}
], - "trigger": {
- "title": "When a user places an order"
}
}, - {
- "id": 18846,
- "title": "#Browse Abandoned Email",
- "status": "offline",
- "type": "regular",
- "created_at": "2025-01-16T10:06:32.000000Z",
- "updated_at": null,
- "deleted_at": null,
- "actions": [
- {
- "id": 88439,
- "actionable_type": "email",
- "status": "offline",
- "parent_id": 88438,
- "template": {
- "id": 168528
}, - "deleted_at": null
}
], - "trigger": {
- "title": "When a user viewed a product"
}
}, - {
- "id": 18845,
- "title": "#Abandoned Checkout Email",
- "status": "offline",
- "type": "regular",
- "created_at": "2025-01-16T10:00:20.000000Z",
- "updated_at": null,
- "deleted_at": null,
- "actions": [
- {
- "id": 88433,
- "actionable_type": "email",
- "status": "offline",
- "parent_id": 88432,
- "template": {
- "id": 168525
}, - "deleted_at": null
}
], - "trigger": {
- "title": "When a user starts checkout"
}
}, - {
- "id": 18844,
- "title": "#Abandoned Cart Email",
- "status": "offline",
- "type": "regular",
- "created_at": "2025-01-16T09:54:17.000000Z",
- "updated_at": null,
- "deleted_at": null,
- "actions": [
- {
- "id": 88427,
- "actionable_type": "email",
- "status": "offline",
- "parent_id": 88426,
- "template": {
- "id": 168521
}, - "deleted_at": null
}
], - "trigger": {
- "title": "When a user starts cart session"
}
}, - {
- "id": 18842,
- "title": "#Exit Popup",
- "status": "offline",
- "type": "regular",
- "created_at": "2025-01-16T09:37:33.000000Z",
- "updated_at": null,
- "deleted_at": null,
- "actions": [
- {
- "id": 88419,
- "actionable_type": "email",
- "status": "offline",
- "parent_id": null,
- "template": {
- "id": 168517
}, - "deleted_at": null
}
], - "trigger": {
- "title": "User signed via popup"
}
}, - {
- "id": 18841,
- "title": "#Welcome Popup",
- "status": "offline",
- "type": "regular",
- "created_at": "2025-01-16T07:12:45.000000Z",
- "updated_at": null,
- "deleted_at": null,
- "actions": [
- {
- "id": 88414,
- "actionable_type": "email",
- "status": "offline",
- "parent_id": 88413,
- "template": {
- "id": 168507
}, - "deleted_at": null
}
], - "trigger": {
- "title": "User signed via popup"
}
}
], - "total": 7,
- "per_page": 10,
- "page": 1,
- "last_page": 1
}
}The API to retrieve performance data for automation flows
Authorization : This endpoint requires an bearer token with the read_automation scope
| flow_id required | integer The unique identifier for the flow. |
| date_range required | string Enum: "today" "yesterday" "7days" "30days" "90days" "lastmonth" "custom" The time range for the flow performance. |
| start_date required | string Example: start_date=28-09-2024 Start date in dd-mm-yyyy format. Required if |
| end_date required | string Example: end_date=28-09-2024 End date in dd-mm-yyyy format. Required if |
| page | integer >= 1 Default: 1 The page number for pagination. |
| limit | integer <= 100 Default: 10 The number of items to return per page. |
{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "flow_performance": {
- "flow_id": "15905",
- "clicked_count": 0,
- "opened_count": 0,
- "delivered_count": 0,
- "revenue": 0,
- "order_count": 0
}, - "node_report": [
- {
- "flow_id": "15905",
- "flow_action_id": 70486,
- "channel": "email",
- "report": {
- "order_count": 0,
- "clicked_count": 0,
- "opened_count": 0,
- "delivered_count": 0,
- "revenue": 0
}
}
], - "total_revenue": 0
}
}The API to retrieve detailed activities for automation flows.
Authorization : This endpoint requires an bearer token with the read_automation scope
| flow_action_id required | integer The unique identifier for the flow action. |
| type[] required | Array of strings Items Enum: "all" "clicked" "opened" "delivered" "failed" The type of activities to retrieve (e.g. "all", "clicked", "opened"). |
| channel required | string The channel through which the activity occurred (e.g. sms or email). |
| date_range required | string Enum: "7days" "30days" "90days" "custom" The time range to filter activities (e.g., "7days"). |
| start_date required | string Example: start_date=28-09-2024 Start date in dd-mm-yyyy format. Required if |
| end_date required | string Example: end_date=28-09-2024 End date in dd-mm-yyyy format. Required if |
| page | integer >= 1 Default: 1 The page number for pagination (default is 1). |
| limit | integer <= 100 Default: 10 The number of items to return per page. |
{- "success": true,
- "locale": "en",
- "message": "OK",
- "data": {
- "activities": [
- {
- "id": 8366450,
- "first_name": "john",
- "last_name": "doe",
- "email": "johndoe@targetbay.com",
- "created_at": "2023-02-24T06:09:54.000000Z",
- "source_timestamp": "2023-02-24T06:09:54.000000Z",
- "status": "clicked"
}, - {
- "id": 8366451,
- "first_name": "emma",
- "last_name": "watson",
- "email": "emma.watson@targetbay.com",
- "created_at": "2023-02-25T07:15:22.000000Z",
- "source_timestamp": "2023-02-25T07:15:22.000000Z",
- "status": "opened"
}, - {
- "id": 8366452,
- "first_name": "harry",
- "last_name": "potter",
- "email": "harry@targetbay.com",
- "created_at": "2023-02-25T08:30:10.000000Z",
- "source_timestamp": "2023-02-25T08:30:10.000000Z",
- "status": "delivered"
}
], - "total": 3,
- "current_page_total": 3,
- "per_page": 10,
- "page": 1,
- "last_page": 1
}
}This API allows users to create custom activities within BayEngage. Activities can be used to track user actions and trigger automations.
Create a custom activity in BayEngage. Activities can be used to track user actions and trigger automations based on specific events.
Authorization : This endpoint requires an bearer token with the write_automation scope.
| activity_name required | string The name of the activity that you wish to create. |
object User properties can contain both System fields and Custom fields. System fields are readily available within BayEngage and the data types of such fields are predefined. Custom fields are customizable and can be used for the purpose of storing additional information about the user. The data type of such custom properties can be defined by the sender using the field_type object. | |
object Any additional data related to the activity can be included in the activity_properties object. This data can be made use in the email templates. The fields provided are part of the sample data related to the sample activity. The sender has to replace the sample fields with the actual fields as per the requirement. |
{- "activity_name": "Book rental",
- "user_properties": {
- "email": "johndoe@targetbay.com",
- "phone": "+1xxxxxxxxxx",
- "profile_lookup": "email_phone",
- "first_name": "John",
- "last_name": "Doe",
- "address_street_1": "No 150",
- "address_street_2": "East El Segundo Blvd",
- "city": "Los Angeles",
- "county": "Michigan",
- "state": "California",
- "zip": 90086,
- "country": "USA",
- "gender": "M",
- "list_uuid": "INSERT_YOUR_LIST_UUID",
- "age": 23,
- "be_birthday": "1998-02-26",
- "fav_color": "blue"
}, - "activity_properties": {
- "book_id": 5678,
- "book_title": "To Kill a Mockingbird",
- "book_author": "Harper Lee",
- "isbn": 9780061120084,
- "publisher": "Harper Perennial Modern Classics",
- "publication_date": "2006-10-11T00:00:00.000Z",
- "genre": "Fiction",
- "rental_date": "2023-04-10T00:00:00.000Z",
- "due_date": "2023-05-10T00:00:00.000Z",
- "order_id": 99128,
- "color": "blue",
- "purchased_products": [
- {
- "product": "Harper Perennial Book",
- "price": 50000,
- "qty": 2,
}, - {
- "product": "Harper Modern Classics Book",
- "price": 10000,
- "qty": 1,
}
]
}
}{- "success": true,
- "code": 200,
- "locale": "en",
- "message": "OK",
- "data": {
- "stream_id": 3012
}
}