{
  "openapi": "3.1.0",
  "info": {
    "title": "push-notifications",
    "version": "1.1"
  },
  "servers": [
    {
      "url": "https://api.aimtell.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "X-Authorization-Api-Key",
        "in": "header",
        "x-default": ""
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/prod/push/": {
      "post": {
        "summary": "Send Push Notification",
        "description": "Send a Push Notification\n\nTarget the notification with one of `subscriber_uids`, `segmentId` or `alias`. Aliases must already be tracked against the subscriber with [`_at.track(\"alias\", ...)`](/javascript-api/tracking-functions#alias-tracking).\n\nA `success` response means the request was queued, not that it was delivered. The audience is resolved when the push is processed, so a send that cannot be processed, such as one with an alias in the wrong format, still returns an `objectId` but is not sent and does not appear in [Get All API Push Campaigns](/api-reference/api-campaigns/get-all-api-push-campaigns).",
        "operationId": "api-send-push-notification",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "idSite",
                  "title",
                  "body",
                  "link"
                ],
                "properties": {
                  "idSite": {
                    "type": "integer",
                    "description": "Site ID"
                  },
                  "title": {
                    "type": "string",
                    "description": "Notification Title"
                  },
                  "body": {
                    "type": "string",
                    "description": "Notification Body"
                  },
                  "link": {
                    "type": "string",
                    "description": "Notification Link"
                  },
                  "subscriber_uids": {
                    "type": "array",
                    "description": "Subscriber UIDS",
                    "items": {
                      "type": "string"
                    }
                  },
                  "segmentId": {
                    "type": "integer",
                    "description": "Segment ID"
                  },
                  "alias": {
                    "type": "string",
                    "description": "A subscriber alias in the form `type==value`, where type is `user` or `email` (e.g. `user==jack17` or `email==jack@example.com`). An email value can also be its MD5 hash. A value without `==` is not valid"
                  },
                  "customIcon": {
                    "type": "string",
                    "description": "url of custom icon to use (recommended size: 250x250)"
                  },
                  "customImage": {
                    "type": "string",
                    "description": "url of custom image to use (recommended size: 300x500)"
                  },
                  "push_ttl": {
                    "type": "integer",
                    "description": "Time till a push should expire in seconds. Default is 1 week.",
                    "default": 604800
                  },
                  "auto_hide": {
                    "type": "integer",
                    "description": "Number of seconds (255 max) until the notification will hide automatically. Default is 0, which is persistent (requires interaction)"
                  },
                  "collapse_key": {
                    "type": "string",
                    "description": "replace visible notifications on a subscribers device (e.g. breaking_news)"
                  },
                  "actions": {
                    "type": "object",
                    "description": "Action Buttons",
                    "properties": {
                      "a01": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "description": "Text of action button"
                          },
                          "link": {
                            "type": "string",
                            "description": "Link/URL of action when clicked"
                          }
                        }
                      },
                      "a02": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "description": "Text of action button"
                          },
                          "link": {
                            "type": "string",
                            "description": "Link/URL of action when clicked"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "success",
                      "message": "Request received. Push sending shortly.",
                      "objectId": "exampleObjectId"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Error #136."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Invalid token.",
                      "error_code": 71831
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "One-Off Notifications"
        ]
      }
    },
    "/prod/campaigns/": {
      "post": {
        "summary": "Create Campaign",
        "description": "Create a Campaign",
        "operationId": "create-campaign",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "idSite"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Campaign Name"
                  },
                  "idSite": {
                    "type": "string",
                    "description": "Site ID"
                  },
                  "title": {
                    "type": "string",
                    "description": "Push Title"
                  },
                  "body": {
                    "type": "string",
                    "description": "Push Body"
                  },
                  "link": {
                    "type": "string",
                    "description": "Link"
                  },
                  "schedule_date": {
                    "type": "string",
                    "description": "DateTime (e.g. 2017-08-25 21:16:50)",
                    "format": "date"
                  },
                  "segments": {
                    "type": "string",
                    "description": "Segments"
                  },
                  "automation": {
                    "type": "string",
                    "description": "Automation (d = daily, w = weekly, m = monthly, n = none)"
                  },
                  "push_ttl": {
                    "type": "integer",
                    "description": "expiration time (in seconds)"
                  },
                  "collapse_key": {
                    "type": "string",
                    "description": "replace visible notifications on a subscribers device (e.g. breaking_news)"
                  },
                  "auto_hide": {
                    "type": "integer",
                    "description": "Auto Hide (in seconds)"
                  },
                  "tz_delivery": {
                    "type": "integer",
                    "description": "deliver based on user's timezone (set 0 for false, 1 for true)"
                  },
                  "status": {
                    "type": "string",
                    "description": "1 = draft, 2 = scheduled",
                    "default": "1"
                  },
                  "customIcon": {
                    "type": "string",
                    "description": "url of custom icon to use (recommended size: 250x250)"
                  },
                  "customImage": {
                    "type": "string",
                    "description": "url of custom image to use (recommended size: 300x500)"
                  },
                  "conversion_trigger": {
                    "type": "object",
                    "properties": {
                      "eventCategory": {
                        "type": "string",
                        "description": "Category of event"
                      },
                      "eventAction": {
                        "type": "string",
                        "description": "Action of event"
                      }
                    }
                  },
                  "actions": {
                    "type": "object",
                    "description": "action buttons",
                    "properties": {
                      "a01": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "description": "Text of action button"
                          },
                          "link": {
                            "type": "string",
                            "description": "Link/URL of action when clicked"
                          }
                        }
                      },
                      "a02": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "description": "Text of action button"
                          },
                          "link": {
                            "type": "string",
                            "description": "Link/URL of action when clicked"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "success",
                      "campaignId": 72129
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Error #139."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Manual Campaigns"
        ]
      }
    },
    "/prod/campaign/{id}": {
      "get": {
        "summary": "Get Manual Campaign",
        "description": "Fetches a specific MANUAL Campaign",
        "operationId": "get-campaign",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Campaign ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "load",
            "in": "query",
            "description": "Load Additional Information (i.e. Segments)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "id": 259,
                      "uid": "76cedd11b19e",
                      "idSite": 179,
                      "name": "Sample Campaign #1",
                      "title": "Welcome to Aimtell!",
                      "body": "Got questions? Check out our knowledge base.",
                      "link": "https://kb.aimtell.com",
                      "customIcon": null,
                      "customImage": null,
                      "segments": "245",
                      "conversion_trigger": null,
                      "push_ttl": 0,
                      "auto_hide": null,
                      "collapse_key": null,
                      "schedule_date": "2024-12-11 12:12:00",
                      "ab_version": null,
                      "ab_linked_campaign": null,
                      "push_src": null,
                      "push_src_values": null,
                      "tz_delivery": 0,
                      "sent_date": null,
                      "createdAt": "2015-12-28 17:54:42",
                      "updatedAt": "2015-12-28 17:54:42",
                      "automation": null,
                      "automation_end": null,
                      "actions": null,
                      "status": 4,
                      "shared_id": null,
                      "clicked_a01": null,
                      "clicked_a02": null,
                      "schedule_pretty_time": "06:55 AM",
                      "schedule_pretty_date": "12/28/2015",
                      "campaign_results": {
                        "sent": 27,
                        "delivered": 27,
                        "bounced": 0,
                        "clicked": 2,
                        "clicked_a01": 0,
                        "clicked_a02": 0,
                        "conversions": 0
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Invalid token.",
                      "error_code": 71831
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Manual Campaigns"
        ]
      },
      "put": {
        "summary": "Update Campaign",
        "description": "Updates a Specific Campaign\n\nNOTE: When updating a campaign with A/B testing enabled,  the version_b status param (1 or 2) must be included to ensure that parameters shared by A and B  versions are updated in both campaigns (schedule_date, segments, automation, automation_end, push_ttl, auto_hide, tz_delivery, status). When updating the status of a campaign with A/B testing enabled, both the status param and the version_b status param must be set.",
        "operationId": "update-campaign",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Campaign ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name of Campaign"
                  },
                  "title": {
                    "type": "string",
                    "description": "Push Title"
                  },
                  "body": {
                    "type": "string",
                    "description": "Push Body"
                  },
                  "link": {
                    "type": "string",
                    "description": "Push Link"
                  },
                  "schedule_date": {
                    "type": "string",
                    "description": "DateTime (i.e. 2017-08-25 21:16:50)",
                    "format": "date"
                  },
                  "segments": {
                    "type": "string",
                    "description": "Segments"
                  },
                  "automation": {
                    "type": "string",
                    "description": "Automation (d = daily, w = weekly, m = monthly, n = none)"
                  },
                  "automation_end": {
                    "type": "string",
                    "description": "Automation End Date (e.g. 2017-08-25 17:00:00)",
                    "format": "date"
                  },
                  "push_ttl": {
                    "type": "integer",
                    "description": "Expiration Time (in seconds)"
                  },
                  "auto_hide": {
                    "type": "integer",
                    "description": "Auto Hide (in seconds)"
                  },
                  "collapse_key": {
                    "type": "string",
                    "description": "replace visible notifications on a subscribers device replace visible notifications on a subscribers device (e.g. breaking_news)"
                  },
                  "tz_delivery": {
                    "type": "integer",
                    "description": "deliver based on user's timezone (set 0 for false, 1 for true)"
                  },
                  "customIcon": {
                    "type": "string",
                    "description": "url of custom icon to use (recommended size: 250x250)"
                  },
                  "customImage": {
                    "type": "string",
                    "description": "url of custom image to use (recommended size: 300x500)"
                  },
                  "status": {
                    "type": "integer",
                    "description": "set 1 for draft, 2 for scheduled",
                    "default": 1
                  },
                  "version_b": {
                    "type": "object",
                    "description": "(optional) Version B for A/B test campaign",
                    "properties": {
                      "status": {
                        "type": "integer",
                        "description": "set 1 for draft, 2 for scheduled (must match version a)"
                      },
                      "title": {
                        "type": "string",
                        "description": "(version b) push title"
                      },
                      "body": {
                        "type": "string",
                        "description": "(version b) push body"
                      },
                      "link": {
                        "type": "string",
                        "description": "(version b) push link"
                      },
                      "customIcon": {
                        "type": "string",
                        "description": "(version b)  string url of custom icon to use (recommended size: 250x250)"
                      },
                      "customImage": {
                        "type": "string",
                        "description": "(version b) url of custom image to use (recommended size: 300x500)"
                      },
                      "actions": {
                        "type": "object",
                        "description": "action buttons",
                        "properties": {
                          "a01": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "string",
                                "description": "Text of action button"
                              },
                              "link": {
                                "type": "string",
                                "description": "Link/URL of action when clicked"
                              }
                            }
                          },
                          "a02": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "string",
                                "description": "Text of action button"
                              },
                              "link": {
                                "type": "string",
                                "description": "Link/URL of action when clicked"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "conversion_trigger": {
                    "type": "object",
                    "properties": {
                      "eventCategory": {
                        "type": "string",
                        "description": "Category of event"
                      },
                      "eventAction": {
                        "type": "string",
                        "description": "Action of event"
                      }
                    }
                  },
                  "actions": {
                    "type": "object",
                    "description": "action buttons",
                    "properties": {
                      "a01": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "description": "Text of action button"
                          },
                          "link": {
                            "type": "string",
                            "description": "Link/URL of action when clicked"
                          }
                        }
                      },
                      "a02": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "description": "Text of action button"
                          },
                          "link": {
                            "type": "string",
                            "description": "Link/URL of action when clicked"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "success",
                      "campaignId": "133321"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Error #136."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Please specify a valid auth_token."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Manual Campaigns"
        ]
      },
      "delete": {
        "summary": "Delete Campaign",
        "description": "Delete a specific Campaign.",
        "operationId": "delete-campaign",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Campaign ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "success",
                      "message": "campaign deleted",
                      "campaignId": "80"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Please specify a valid auth_token."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Manual Campaigns"
        ]
      }
    },
    "/prod/campaigns/{id}": {
      "get": {
        "summary": "Get All Manual Campaigns",
        "description": "Enables you to fetch all MANUAL campaigns",
        "operationId": "get-all-campaigns",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Site ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of results to return per page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Number of results to skip for pagination (offset).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": [
                      {
                        "idSite": 179,
                        "uid": "76cedd11b19e",
                        "name": "Campaign 1",
                        "title": "Title",
                        "body": "Body",
                        "link": "https://weblink.com",
                        "id": 1,
                        "segments": "",
                        "ab_linked_campaign": null,
                        "push_src": null,
                        "push_src_values": null,
                        "sent_date": null,
                        "schedule_date": "2024-09-03 12:30",
                        "status": 1,
                        "customIcon": "https://cdn.aimtell.io/user/uploads/siteicons.aimtell.com/icon_40_1443032714..jpg",
                        "customImage": "",
                        "actions": {
                          "a01": {
                            "title": "",
                            "link": ""
                          },
                          "a02": {
                            "title": "",
                            "link": ""
                          }
                        },
                        "collapse_key": null,
                        "createdAt": "2024-09-02 19:18:55",
                        "updatedAt": "2024-09-02 19:18:55"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Invalid token.",
                      "error_code": 71831
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Manual Campaigns"
        ]
      }
    },
    "/prod/campaign/{id}/clicks": {
      "get": {
        "summary": "Get Manual Campaign Clicks",
        "description": "Enables you to fetch all clicks from a MANUAL campaign, broken down on a subscriber level.",
        "operationId": "get-campaign-clicks",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Campaign ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": [
                      {
                        "subscriber_uid": "63779e18-6c2c-4dd0-da76-ace61926fc53",
                        "created_at": "2017-02-16 18:13:54"
                      },
                      {
                        "subscriber_uid": "514870c5-665e-effb-34d9-b8bbd9dd3467",
                        "created_at": "2017-02-16 13:11:21"
                      },
                      {
                        "subscriber_uid": "59bc3f07-915c-e1c3-8a81-6ad82ad783a0",
                        "created_at": "2017-02-15 21:01:58"
                      },
                      {
                        "subscriber_uid": "da554ad4-1f77-dde0-b598-d0a386883ab4",
                        "created_at": "2017-02-14 23:33:16"
                      },
                      {
                        "subscriber_uid": "958645fc-9e85-b3a8-2a15-35d278417be8",
                        "created_at": "2017-02-14 22:12:21"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Invalid token.",
                      "error_code": 71831
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Manual Campaigns"
        ]
      }
    },
    "/prod/campaign/{id}/results": {
      "get": {
        "summary": "Get Manual Campaign Results (By Day)",
        "description": "Fetches Manual Campaign Results (by Day)\nRevenue for Monetized Campaigns is Included in Results",
        "operationId": "get-manual-campaign-results-by-day",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Campaign ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Date",
            "required": true,
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Date",
            "required": true,
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "name": "includeShared",
            "in": "query",
            "description": "Set to 1 to roll the results of every shared copy of this campaign into a single set of totals. Omit to return results for this campaign's site only.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "sent": {
                        "03/05/2017": 9,
                        "03/06/2017": 8,
                        "03/07/2017": 3,
                        "03/08/2017": 4,
                        "03/09/2017": 10
                      },
                      "delivered": {
                        "03/05/2017": 9,
                        "03/06/2017": 8,
                        "03/07/2017": 3,
                        "03/08/2017": 4,
                        "03/09/2017": 10
                      },
                      "bounced": {
                        "03/05/2017": 0,
                        "03/06/2017": 0,
                        "03/07/2017": 0,
                        "03/08/2017": 0,
                        "03/09/2017": 0
                      },
                      "clicked": {
                        "03/05/2017": 6,
                        "03/06/2017": 8,
                        "03/07/2017": 2,
                        "03/08/2017": 4,
                        "03/09/2017": 5
                      },
                      "conversions": {
                        "03/05/2017": 2,
                        "03/06/2017": 8,
                        "03/07/2017": 2,
                        "03/08/2017": 3,
                        "03/09/2017": 5
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Invalid token.",
                      "error_code": 71831
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Manual Campaigns"
        ]
      }
    },
    "/prod/campaign/{id}/shared": {
      "get": {
        "summary": "Get Manual Campaign Shares",
        "description": "Returns every site the manual campaign is shared with, along with the copied campaign ID on each site. Returns an empty array if the campaign is not shared.",
        "operationId": "get-manual-campaign-shares",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Campaign ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": [
                      {
                        "id_site": 456,
                        "campaign_id": 123
                      },
                      {
                        "id_site": 457,
                        "campaign_id": 124
                      },
                      {
                        "id_site": 458,
                        "campaign_id": 125
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Error #139."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Manual Campaigns"
        ]
      },
      "post": {
        "summary": "Share Manual Campaign",
        "description": "Shares this manual campaign with one or more additional sites. The campaign must target exactly one segment, and that segment must already be shared with every site listed here (see Share Segment). Edits to this campaign automatically propagate to the shared copies. To stop sharing with a site, delete the copied campaign on that site.",
        "operationId": "share-manual-campaign",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Campaign ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "sites"
                ],
                "properties": {
                  "sites": {
                    "type": "array",
                    "description": "Site IDs to share with. Sites already in the shared group are ignored.",
                    "items": {
                      "type": "integer"
                    }
                  }
                }
              },
              "examples": {
                "Request": {
                  "value": {
                    "sites": [
                      456,
                      457,
                      458
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "success"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Shared campaigns must target one single shared segment"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Manual Campaigns"
        ]
      }
    },
    "/prod/event-campaigns/": {
      "post": {
        "summary": "Create Event Triggered Campaign",
        "description": "Create an Event Triggered Campaign",
        "operationId": "create-event-campaign",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "idSite"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Campaign Name"
                  },
                  "idSite": {
                    "type": "string",
                    "description": "Site ID"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "success",
                      "campaignId": 1991
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Error #139."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Triggered Campaigns"
        ]
      }
    },
    "/prod/event-campaign/{id}": {
      "get": {
        "summary": "Get Event Triggered Campaign",
        "description": "Fetches Event Triggered Campaign",
        "operationId": "get-event-campaign-1",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Campaign ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "id": 819,
                      "uid": "76cedd11b19e",
                      "idSite": 179,
                      "name": "Sample Triggered Notification # 1:  Abandoned Cart",
                      "title": "",
                      "body": "",
                      "link": "",
                      "customIcon": "https://s3.amazonaws.com/siteicons.aimtell.com/icon_40_1443032714..jpg",
                      "delay": 0,
                      "eventCategory": "cart",
                      "eventAction": "abandoned",
                      "eventLabel": "",
                      "conversion_trigger": null,
                      "collapse_key": null,
                      "createdAt": "2016-10-24 23:26:06",
                      "updatedAt": "2017-02-18 01:11:34",
                      "status": 1,
                      "bounced": null,
                      "campaign_results": {
                        "sent": 0,
                        "delivered": 0,
                        "bounced": 0,
                        "clicked": 0,
                        "conversions": 0
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Invalid token.",
                      "error_code": 71831
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Triggered Campaigns"
        ]
      },
      "put": {
        "summary": "Update Event Triggered Campaign",
        "description": "Update an Event Triggered Campaign",
        "operationId": "update-event-campaign",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Campaign ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name of Campaign"
                  },
                  "title": {
                    "type": "string",
                    "description": "Push Title"
                  },
                  "body": {
                    "type": "string",
                    "description": "Push Body Message"
                  },
                  "link": {
                    "type": "string",
                    "description": "Push Notification Link"
                  },
                  "status": {
                    "type": "integer",
                    "description": "set 1 for draft, 5 for active"
                  },
                  "eventAction": {
                    "type": "string"
                  },
                  "eventCategory": {
                    "type": "string"
                  },
                  "eventLabel": {
                    "type": "string"
                  },
                  "delay": {
                    "type": "integer",
                    "description": "Time in seconds after event when push should be sent"
                  },
                  "drip": {
                    "type": "string",
                    "description": "Comma separated integer values representing delays as seconds from event. Example: 60, 300, 3600"
                  },
                  "customIcon": {
                    "type": "string",
                    "description": "url of custom icon to use (recommended size: 250x250)"
                  },
                  "customImage": {
                    "type": "string",
                    "description": "url of custom image to use (recommended size: 300x500))"
                  },
                  "target_device": {
                    "type": "string",
                    "description": "device type to target (optional). can be either: \"any\", \"mobile\" or \"desktop\""
                  },
                  "actions": {
                    "type": "object",
                    "description": "action buttons",
                    "properties": {
                      "a01": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "description": "Text of action button"
                          },
                          "link": {
                            "type": "string",
                            "description": "Link/URL of action when clicked"
                          }
                        }
                      },
                      "a02": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "description": "Text of action button"
                          },
                          "link": {
                            "type": "string",
                            "description": "Link/URL of action when clicked"
                          }
                        }
                      }
                    }
                  },
                  "collapse_key": {
                    "type": "string",
                    "description": "replace visible notifications on a subscribers device (e.g. breaking_news)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "success",
                      "campaignId": "329"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Error #136."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Please specify a valid auth_token."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Triggered Campaigns"
        ]
      },
      "delete": {
        "summary": "Delete Event Triggered Campaign",
        "description": "Delete a specific Event Triggered Campaign",
        "operationId": "delete-event-campaign",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Campaign ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "success",
                      "message": "campaign deleted",
                      "campaignId": "80"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Please specify a valid auth_token."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Triggered Campaigns"
        ]
      }
    },
    "/prod/event-campaigns/{id}": {
      "get": {
        "summary": "Get All Event Triggered Campaigns",
        "description": "Fetches All Event Triggered Campaigns",
        "operationId": "get-all-event-campaigns",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Site ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of results to return per page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Number of results to skip for pagination (offset).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": [
                      {
                        "id": 819,
                        "uid": "76cedd11b19e",
                        "idSite": 179,
                        "name": "Sample Triggered Notification # 1:  Abandoned Cart",
                        "title": "",
                        "body": "",
                        "link": "",
                        "customIcon": "https://s3.amazonaws.com/siteicons.aimtell.com/icon_40_1443032714..jpg",
                        "delay": 0,
                        "eventCategory": "cart",
                        "eventAction": "abandoned",
                        "eventLabel": "",
                        "conversion_trigger": null,
                        "collapse_key": null,
                        "createdAt": "2016-10-24 23:26:06",
                        "updatedAt": "2017-02-18 01:11:34",
                        "status": 1,
                        "sentcount": null,
                        "clickcount": null,
                        "conversions": null,
                        "bounced": null,
                        "draft": true,
                        "campaign_results": {
                          "sent": 0,
                          "delivered": 0,
                          "bounced": 0,
                          "clicked": 0,
                          "conversions": 0
                        }
                      },
                      {
                        "id": 1659,
                        "uid": "76cedd11b19e",
                        "idSite": 179,
                        "name": "Sample Triggered Notification # 2: Item Shipped",
                        "title": "Your order has been shipped!",
                        "body": "All items from order have now been shipped.  Click to view tracking information.",
                        "link": "https://demo.aimtell.com",
                        "customIcon": "https://s3.amazonaws.com/siteicons.aimtell.com/icon_40_1443032714..jpg",
                        "delay": 30,
                        "eventCategory": "Item",
                        "eventAction": "Shipped",
                        "eventLabel": "",
                        "conversion_trigger": null,
                        "collapse_key": null,
                        "createdAt": "2016-12-23 17:33:19",
                        "updatedAt": "2017-02-18 01:12:03",
                        "status": 5,
                        "sentcount": null,
                        "clickcount": null,
                        "conversions": null,
                        "bounced": null,
                        "campaign_results": {
                          "sent": 0,
                          "delivered": 0,
                          "bounced": 0,
                          "clicked": 0,
                          "conversions": 0
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Invalid token.",
                      "error_code": 71831
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Triggered Campaigns"
        ]
      }
    },
    "/prod/event-campaign/{id}/results": {
      "get": {
        "summary": "Get Event Campaign Results (By Day)",
        "description": "Fetches Event Campaign Results (by Day)\nRevenue for Monetized Campaigns is Included in Results",
        "operationId": "get-event-campaign-results-by-day",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Campaign ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Date",
            "required": true,
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Date",
            "required": true,
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "name": "includeShared",
            "in": "query",
            "description": "Set to 1 to roll the results of every shared copy of this campaign into a single set of totals. Omit to return results for this campaign's site only.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "sent": {
                        "03/05/2017": 0,
                        "03/06/2017": 0,
                        "03/07/2017": 0,
                        "03/08/2017": 0,
                        "03/09/2017": 0
                      },
                      "delivered": {
                        "03/05/2017": 0,
                        "03/06/2017": 0,
                        "03/07/2017": 0,
                        "03/08/2017": 0,
                        "03/09/2017": 0
                      },
                      "bounced": {
                        "03/05/2017": 0,
                        "03/06/2017": 0,
                        "03/07/2017": 0,
                        "03/08/2017": 0,
                        "03/09/2017": 0
                      },
                      "clicked": {
                        "03/05/2017": 0,
                        "03/06/2017": 0,
                        "03/07/2017": 0,
                        "03/08/2017": 0,
                        "03/09/2017": 0
                      },
                      "conversions": {
                        "03/05/2017": 0,
                        "03/06/2017": 0,
                        "03/07/2017": 0,
                        "03/08/2017": 0,
                        "03/09/2017": 0
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Invalid token.",
                      "error_code": 71831
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Triggered Campaigns"
        ]
      }
    },
    "/prod/event-campaign/{id}/shared": {
      "get": {
        "summary": "Get Triggered Campaign Shares",
        "description": "Returns every site the triggered campaign is shared with, along with the copied campaign ID on each site. Returns an empty array if the campaign is not shared.",
        "operationId": "get-triggered-campaign-shares",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Campaign ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": [
                      {
                        "id_site": 456,
                        "campaign_id": 123
                      },
                      {
                        "id_site": 457,
                        "campaign_id": 124
                      },
                      {
                        "id_site": 458,
                        "campaign_id": 125
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Error #139."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Triggered Campaigns"
        ]
      },
      "post": {
        "summary": "Share Triggered Campaign",
        "description": "Shares this triggered campaign with one or more additional sites. The campaign must target exactly one segment, and that segment must already be shared with every site listed here (see Share Segment). Edits to this campaign automatically propagate to the shared copies. To stop sharing with a site, delete the copied campaign on that site.",
        "operationId": "share-triggered-campaign",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Campaign ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "sites"
                ],
                "properties": {
                  "sites": {
                    "type": "array",
                    "description": "Site IDs to share with. Sites already in the shared group are ignored.",
                    "items": {
                      "type": "integer"
                    }
                  }
                }
              },
              "examples": {
                "Request": {
                  "value": {
                    "sites": [
                      456,
                      457,
                      458
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "success"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Shared campaigns must target one single shared segment"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Triggered Campaigns"
        ]
      }
    },
    "/prod/rss-notifications/": {
      "post": {
        "summary": "Create RSS Campaign",
        "description": "Create a RSS Campaign",
        "operationId": "api-create-rss-campaign",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "idSite"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Campaign Name"
                  },
                  "idSite": {
                    "type": "string",
                    "description": "Site ID"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "success",
                      "campaignId": 128
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Error #139."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "RSS Campaigns"
        ]
      }
    },
    "/prod/rss-notification/{id}": {
      "get": {
        "summary": "Get RSS Campaign",
        "description": "Fetches a Specific RSS Campaign",
        "operationId": "api-get-event-triggered-campaign",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Campaign ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "id": 128,
                      "idSite": 179,
                      "name": "Sample RSS Notification # 1",
                      "feed_url": "https://demo.aimtell.com/rss.xml",
                      "title": "{rss_title}",
                      "body": "{rss_body}",
                      "link": "{rss_link}",
                      "segments": "12345",
                      "status": 1,
                      "uid": "aBc1234567980",
                      "customIcon": "https://s3.amazonaws.com/siteicons.aimtell.com/icon_40_1443032714..jpg",
                      "customImage": "",
                      "actions": {
                        "a01": {
                          "title": "Read More",
                          "link": "{rss_link}"
                        }
                      },
                      "collapse_key": null,
                      "max_enabled": 0,
                      "max_type": "hourly",
                      "max_value": 0,
                      "createdAt": "2020-08-18 20:04:19",
                      "updatedAt": "2020-12-01 17:41:37",
                      "campaign_results": {
                        "sent": 64,
                        "delivered": 64,
                        "bounced": 0,
                        "clicked": 6,
                        "conversions": 0,
                        "conversions_value": 0,
                        "clicked_a01": 0,
                        "clicked_a02": 1
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Invalid token.",
                      "error_code": 71831
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "RSS Campaigns"
        ]
      },
      "put": {
        "summary": "Update RSS Campaign",
        "description": "Update a RSS Campaign",
        "operationId": "api-update-rss-campaign",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Campaign ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name of Campaign"
                  },
                  "feed_url": {
                    "type": "string",
                    "description": "URL of RSS feed"
                  },
                  "title": {
                    "type": "string",
                    "description": "Push Title"
                  },
                  "body": {
                    "type": "string",
                    "description": "Push Body Message"
                  },
                  "link": {
                    "type": "string",
                    "description": "Push Notification Link"
                  },
                  "customIcon": {
                    "type": "string",
                    "description": "url of custom icon to use (recommended size: 250x250)"
                  },
                  "customImage": {
                    "type": "string",
                    "description": "url of custom image to use (recommended size: 300x500))"
                  },
                  "status": {
                    "type": "integer",
                    "description": "set 1 for draft, 2 for active"
                  },
                  "segments": {
                    "type": "string",
                    "description": "Segments \u2014 comma separated list with no spaces e.g. 12345,12346,12347"
                  },
                  "max_enabled": {
                    "type": "integer",
                    "description": "enable maximum number of sends \u2014 set 0 for false,  1 for true"
                  },
                  "max_type": {
                    "type": "string",
                    "description": "hourly or daily"
                  },
                  "max_value": {
                    "type": "integer",
                    "description": "maximum number of sends e.g. 5 or 20"
                  },
                  "actions": {
                    "type": "object",
                    "properties": {
                      "a01": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "description": "Text of action button"
                          },
                          "link": {
                            "type": "string",
                            "description": "Link/URL of action when clicked"
                          }
                        }
                      },
                      "a02": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "description": "Text of action button"
                          },
                          "link": {
                            "type": "string",
                            "description": "Link/URL of action when clicked"
                          }
                        }
                      }
                    }
                  },
                  "collapse_key": {
                    "type": "string",
                    "description": "replace visible notifications on a subscribers device (e.g. breaking_news)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "success",
                      "campaignId": "128"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Error #136."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Please specify a valid auth_token."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "RSS Campaigns"
        ]
      },
      "delete": {
        "summary": "Delete RSS Campaign",
        "description": "Delete a specific RSS Campaign",
        "operationId": "api-delete-rss-campaign",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Campaign ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "success",
                      "message": "rss campaign deleted",
                      "campaignId": "1991"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Please specify a valid auth_token."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "RSS Campaigns"
        ]
      }
    },
    "/prod/rss-notifications/{id}": {
      "get": {
        "summary": "Get All RSS Campaigns",
        "description": "Fetches All RSS Campaigns",
        "operationId": "api-get-all-rss-campaigns",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Site ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of results to return per page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Number of results to skip for pagination (offset).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": [
                      {
                        "id": 128,
                        "idSite": 179,
                        "name": "Sample RSS Notification # 1",
                        "feed_url": "https://demo.aimtell.com/rss.xml",
                        "title": "{rss_title}",
                        "body": "{rss_body}",
                        "link": "{rss_link}",
                        "segments": "12345",
                        "status": 1,
                        "uid": "aBc1234567980",
                        "customIcon": "https://s3.amazonaws.com/siteicons.aimtell.com/icon_40_1443032714..jpg",
                        "customImage": "",
                        "actions": "{\"a01\":{\"title\":\"Read More\",\"link\":\"{rss_link}\"}}",
                        "collapse_key": null,
                        "max_enabled": 0,
                        "max_type": "hourly",
                        "max_value": 0,
                        "createdAt": "2020-08-18 20:04:19",
                        "updatedAt": "2020-12-01 17:41:37",
                        "campaign_results": {
                          "sent": 64,
                          "delivered": 64,
                          "bounced": 0,
                          "clicked": 6,
                          "conversions": 0,
                          "conversions_value": 0,
                          "clicked_a01": 0,
                          "clicked_a02": 1
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Invalid token.",
                      "error_code": 71831
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "RSS Campaigns"
        ]
      }
    },
    "/prod/rss-notifications/{id}/results": {
      "get": {
        "summary": "Get RSS Campaign Results (By Day)",
        "description": "Fetches RSS Campaign Results (by Day)",
        "operationId": "api-get-rss-campaign-results-by-day",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Campaign ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Date",
            "required": true,
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Date",
            "required": true,
            "schema": {
              "type": "string",
              "default": ""
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "sent": {
                        "03/05/2017": 0,
                        "03/06/2017": 0,
                        "03/07/2017": 0,
                        "03/08/2017": 0,
                        "03/09/2017": 0
                      },
                      "delivered": {
                        "03/05/2017": 0,
                        "03/06/2017": 0,
                        "03/07/2017": 0,
                        "03/08/2017": 0,
                        "03/09/2017": 0
                      },
                      "bounced": {
                        "03/05/2017": 0,
                        "03/06/2017": 0,
                        "03/07/2017": 0,
                        "03/08/2017": 0,
                        "03/09/2017": 0
                      },
                      "clicked": {
                        "03/05/2017": 0,
                        "03/06/2017": 0,
                        "03/07/2017": 0,
                        "03/08/2017": 0,
                        "03/09/2017": 0
                      },
                      "conversions": {
                        "03/05/2017": 0,
                        "03/06/2017": 0,
                        "03/07/2017": 0,
                        "03/08/2017": 0,
                        "03/09/2017": 0
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Invalid token.",
                      "error_code": 71831
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "RSS Campaigns"
        ]
      }
    },
    "/prod/rss-notifications/{id}/shared": {
      "get": {
        "summary": "Get RSS Campaign Shares",
        "description": "Returns every site the RSS campaign is shared with, along with the copied campaign ID on each site. Returns an empty array if the campaign is not shared.",
        "operationId": "get-rss-campaign-shares",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Campaign ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": [
                      {
                        "id_site": 456,
                        "campaign_id": 123
                      },
                      {
                        "id_site": 457,
                        "campaign_id": 124
                      },
                      {
                        "id_site": 458,
                        "campaign_id": 125
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Error #139."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "RSS Campaigns"
        ]
      },
      "post": {
        "summary": "Share RSS Campaign",
        "description": "Shares this RSS campaign with one or more additional sites. The campaign must target exactly one segment, and that segment must already be shared with every site listed here (see Share Segment). Edits to this campaign automatically propagate to the shared copies. To stop sharing with a site, delete the copied campaign on that site.",
        "operationId": "share-rss-campaign",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Campaign ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "sites"
                ],
                "properties": {
                  "sites": {
                    "type": "array",
                    "description": "Site IDs to share with. Sites already in the shared group are ignored.",
                    "items": {
                      "type": "integer"
                    }
                  }
                }
              },
              "examples": {
                "Request": {
                  "value": {
                    "sites": [
                      456,
                      457,
                      458
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "success"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Shared campaigns must target one single shared segment"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "RSS Campaigns"
        ]
      }
    },
    "/prod/site/{idSite}/welcome": {
      "get": {
        "summary": "Get Welcome Campaign",
        "description": "Fetches the Welcome Campaign for a specific website",
        "operationId": "api-get-welcome-campaign",
        "parameters": [
          {
            "name": "idSite",
            "in": "path",
            "description": "Website ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "id": 1234,
                      "title": "Sample Welcome Campaign",
                      "body": "Thanks for joining us!",
                      "link": "{website_url}",
                      "customImage": "",
                      "customIcon": "https://cdn.aimtell.io/user/uploads/12345-1588183932.png",
                      "idSite": 20599,
                      "status": 1,
                      "conversion_trigger": {
                        "eventCategory": "Page",
                        "eventAction": "Visited",
                        "eventLabel": ""
                      },
                      "actions": {
                        "a01": {
                          "title": "Get the best deals!",
                          "link": "{website_url}"
                        },
                        "a02": {
                          "title": "Check out our blog!",
                          "link": "{website_url}/blog"
                        }
                      },
                      "createdAt": "2020-04-29 18:12:57",
                      "updatedAt": "2020-12-18 16:15:40",
                      "campaign_results": {
                        "sent": 13,
                        "delivered": 13,
                        "bounced": 0,
                        "clicked": 5,
                        "clicked_a01": 0,
                        "clicked_a02": 0,
                        "conversions": 1
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Invalid token.",
                      "error_code": 71831
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Welcome Notifications"
        ]
      }
    },
    "/prod/site/{idSite}/welcome/upsert": {
      "post": {
        "summary": "Update Welcome Campaign",
        "description": "Update a Welcome Campaign for a Specific Website",
        "operationId": "api-upsert-welcome-campaign",
        "parameters": [
          {
            "name": "idSite",
            "in": "path",
            "description": "Site ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "title",
                  "body",
                  "link",
                  "status"
                ],
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "Push Title"
                  },
                  "body": {
                    "type": "string",
                    "description": "Push Body"
                  },
                  "link": {
                    "type": "string",
                    "description": "Link"
                  },
                  "status": {
                    "type": "string",
                    "description": "0 = draft, 1 = active",
                    "default": "0"
                  },
                  "customIcon": {
                    "type": "string",
                    "description": "url of custom icon to use (recommended size: 250x250)"
                  },
                  "customImage": {
                    "type": "string",
                    "description": "url of custom image to use (recommended size: 300x500)"
                  },
                  "conversion_trigger": {
                    "type": "object",
                    "properties": {
                      "eventCategory": {
                        "type": "string",
                        "description": "Category of event"
                      },
                      "eventAction": {
                        "type": "string",
                        "description": "Action of event"
                      }
                    }
                  },
                  "actions": {
                    "type": "object",
                    "description": "action buttons",
                    "properties": {
                      "a01": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "description": "Text of action button"
                          },
                          "link": {
                            "type": "string",
                            "description": "Link/URL of action when clicked"
                          }
                        }
                      },
                      "a02": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "description": "Text of action button"
                          },
                          "link": {
                            "type": "string",
                            "description": "Link/URL of action when clicked"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "success",
                      "message": "Updated welcome message succesfully."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Error #139."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Welcome Notifications"
        ]
      }
    },
    "/prod/welcome-notifications/{id}/results": {
      "get": {
        "summary": "Get Welcome Campaign Results (By Day)",
        "description": "Fetches Welcome Campaign Results (by Day)",
        "operationId": "api-get-welcome-campaign-results-by-day",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Campaign ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Date",
            "required": true,
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Date",
            "required": true,
            "schema": {
              "type": "string",
              "default": ""
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "sent": {
                        "03/05/2017": 0,
                        "03/06/2017": 0,
                        "03/07/2017": 0,
                        "03/08/2017": 0,
                        "03/09/2017": 0
                      },
                      "delivered": {
                        "03/05/2017": 0,
                        "03/06/2017": 0,
                        "03/07/2017": 0,
                        "03/08/2017": 0,
                        "03/09/2017": 0
                      },
                      "bounced": {
                        "03/05/2017": 0,
                        "03/06/2017": 0,
                        "03/07/2017": 0,
                        "03/08/2017": 0,
                        "03/09/2017": 0
                      },
                      "clicked": {
                        "03/05/2017": 0,
                        "03/06/2017": 0,
                        "03/07/2017": 0,
                        "03/08/2017": 0,
                        "03/09/2017": 0
                      },
                      "conversions": {
                        "03/05/2017": 0,
                        "03/06/2017": 0,
                        "03/07/2017": 0,
                        "03/08/2017": 0,
                        "03/09/2017": 0
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Invalid token.",
                      "error_code": 71831
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Welcome Notifications"
        ]
      }
    },
    "/prod/api-campaigns/{id}": {
      "get": {
        "summary": "Get All API Push Campaigns",
        "description": "Fetches the most recent API push campaigns for a site, newest first. A campaign is listed once [Send Push Notification](/api-reference/one-off-notifications/send-push-notification) has processed it successfully. Requests that fail during processing are not listed. Up to the most recent 120,000 campaigns per site are retained.",
        "operationId": "get-all-api-campaigns",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Site ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of results to return per page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Number of results to skip for pagination (offset).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": [
                      {
                        "id": 33677790,
                        "objectId": "5baa724fd38f2",
                        "owner_uid": "76cedd11b19e",
                        "campaignId": null,
                        "title": "Hey there",
                        "body": "Nice push",
                        "link": "google.com",
                        "idSite": 2459,
                        "customIcon": "https://s3.amazonaws.com/siteicons.aimtell.com/icon_2459_1532715035.jpg",
                        "customImage": "",
                        "segmentId": null,
                        "alias": null,
                        "uids": "03a131fb-ca3e-0147-d846-c986c8d1bdb8",
                        "processed": 1,
                        "response": "{\"result\":\"success\",\"count\":1,\"bounced\":0}",
                        "createdAt": "2018-09-25 17:37:19",
                        "updatedAt": "2018-09-25 17:37:21"
                      },
                      {
                        "id": 33677791,
                        "objectId": "5baa72502ea9d",
                        "owner_uid": "76cedd11b19e",
                        "campaignId": null,
                        "title": "Wow",
                        "body": "That's awesome man",
                        "link": "google.com",
                        "idSite": 2459,
                        "customIcon": "https://s3.amazonaws.com/siteicons.aimtell.com/icon_2459_1532715035.jpg",
                        "customImage": "",
                        "segmentId": null,
                        "alias": null,
                        "uids": "03a131fb-ca3e-0147-d846-c986c8d1bdb8",
                        "processed": 1,
                        "response": "{\"result\":\"success\",\"count\":1,\"bounced\":0}",
                        "createdAt": "2018-09-25 17:37:20",
                        "updatedAt": "2018-09-25 17:37:21"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Invalid token.",
                      "error_code": 71831
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "API Campaigns"
        ]
      }
    },
    "/prod/api-campaigns/{idSite}/results": {
      "get": {
        "summary": "Get API Campaign Results (By Day)",
        "description": "Fetches API Campaign Results (by Day)",
        "operationId": "api-get-api-campaign-results-by-day",
        "parameters": [
          {
            "name": "idSite",
            "in": "path",
            "description": "Website ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Date",
            "required": true,
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Date",
            "required": true,
            "schema": {
              "type": "string",
              "default": ""
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "sent": {
                        "03/05/2017": 9,
                        "03/06/2017": 8,
                        "03/07/2017": 3,
                        "03/08/2017": 4,
                        "03/09/2017": 10
                      },
                      "delivered": {
                        "03/05/2017": 9,
                        "03/06/2017": 8,
                        "03/07/2017": 3,
                        "03/08/2017": 4,
                        "03/09/2017": 10
                      },
                      "bounced": {
                        "03/05/2017": 0,
                        "03/06/2017": 0,
                        "03/07/2017": 0,
                        "03/08/2017": 0,
                        "03/09/2017": 0
                      },
                      "clicked": {
                        "03/05/2017": 6,
                        "03/06/2017": 8,
                        "03/07/2017": 2,
                        "03/08/2017": 4,
                        "03/09/2017": 5
                      },
                      "conversions": {
                        "03/05/2017": 2,
                        "03/06/2017": 8,
                        "03/07/2017": 2,
                        "03/08/2017": 3,
                        "03/09/2017": 5
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Invalid token.",
                      "error_code": 71831
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "API Campaigns"
        ]
      }
    }
  },
  "tags": [
    {
      "name": "One-Off Notifications",
      "description": "Send individual push notifications"
    },
    {
      "name": "Manual Campaigns",
      "description": "Manually created push notification campaigns"
    },
    {
      "name": "Triggered Campaigns",
      "description": "Event-triggered push notification campaigns"
    },
    {
      "name": "RSS Campaigns",
      "description": "RSS feed-based push notification campaigns"
    },
    {
      "name": "Welcome Notifications",
      "description": "Welcome notification campaigns"
    },
    {
      "name": "API Campaigns",
      "description": "API-triggered push notification campaigns"
    }
  ]
}