{
  "openapi": "3.0.0",
  "info": {
    "title": "Blastable API Info",
    "description": "Awesome Email Marketing Software",
    "version": "0.1.0"
  },
  "servers": [
    {
      "url": "/api",
      "description": ""
    }
  ],
  "tags": [
    {
      "name": "Lists",
      "description": "Operations about Lists"
    },
    {
      "name": "Subscribers",
      "description": "Operations about Subscribers"
    },
    {
      "name": "Templates",
      "description": "Operations about Templates"
    },
    {
      "name": "Segments",
      "description": "Operations about Segments"
    },
    {
      "name": "Senders",
      "description": "Operations about Senders"
    },
    {
      "name": "Sending Domains",
      "description": "Operations about Sending Domains"
    },
    {
      "name": "Groups",
      "description": "Operations about Autoresponder Groups"
    },
    {
      "name": "Campaigns",
      "description": "Operations about Campaigns"
    },
    {
      "name": "Campaign Statistics",
      "description": "Operations about Campaign Statistics"
    },
    {
      "name": "Global Suppression",
      "description": "Operations about Global Suppression"
    },
    {
      "name": "Optional Suppression",
      "description": "Operations about Optional Suppression"
    },
    {
      "name": "Custom Fields",
      "description": "Operations about Custom Fields"
    },
    {
      "name": "Tags",
      "description": "Operations about Tags"
    },
    {
      "name": "Sub Account",
      "description": "Operations about Sub Account"
    },
    {
      "name": "Send Email",
      "description": "Operations about Send Email API"
    }
  ],
  "paths": {
    "/lists": {
      "get": {
        "tags": [
          "Lists"
        ],
        "summary": "Get lists",
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of result on request.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/DataIndex"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "records": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/List"
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Lists"
        ],
        "summary": "Create a list",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListRequestData"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "list_uid": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Request data error",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorInput"
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/lists/{list_uid}": {
      "parameters": [
        {
          "name": "list_uid",
          "in": "path",
          "required": true,
          "description": "List uid",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Lists"
        ],
        "summary": "Get a list",
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "record": {
                          "$ref": "#/components/schemas/List"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The list does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Lists"
        ],
        "summary": "Update a list",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListRequestData"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The list does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request data error",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorInput"
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Lists"
        ],
        "summary": "Delete a list",
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The list does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/lists/{list_uid}/subscribers": {
      "parameters": [
        {
          "name": "list_uid",
          "in": "path",
          "required": true,
          "description": "List uid",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Subscribers"
        ],
        "summary": "Get subscribers",
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of result on request.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/DataIndex"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "records": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/Subscriber"
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resources does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Subscribers"
        ],
        "summary": "Create a subscriber",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubscriberRequestData"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "list_uid": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resources is not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request data error",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorInput"
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/lists/{list_uid}/subscribers/bulk": {
      "parameters": [
        {
          "name": "list_uid",
          "in": "path",
          "required": true,
          "description": "List uid",
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "Subscribers"
        ],
        "summary": "Create multiple subscribers",
        "description": "Maximum 10,000 subscribers per request",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subscribers": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/SubscriberRequestData"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "records": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "data": {
                                "type": "object"
                              },
                              "error": {
                                "type": "object"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resources is not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Invalid data when checking some rules",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid data",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorInput"
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/lists/{list_uid}/subscribers/{subscriber_uid}": {
      "parameters": [
        {
          "name": "list_uid",
          "in": "path",
          "required": true,
          "description": "List uid",
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "subscriber_uid",
          "in": "path",
          "required": true,
          "description": "Subscriber uid",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Subscribers"
        ],
        "summary": "Get a subscriber",
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "record": {
                          "$ref": "#/components/schemas/Subscriber"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The sources does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Subscribers"
        ],
        "summary": "Update a subscriber",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubscriberRequestData"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "record": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The limits have been reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Invalid data when checking some rules",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid data",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorInput"
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Subscribers"
        ],
        "summary": "Delete a subscriber",
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The sources does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Invalid data when checking some rules",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/lists/{list_uid}/subscribers/{subscriber_uid}/unsubscribe": {
      "parameters": [
        {
          "name": "list_uid",
          "in": "path",
          "required": true,
          "description": "List uid",
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "subscriber_uid",
          "in": "path",
          "required": true,
          "description": "Subscriber uid",
          "schema": {
            "type": "string"
          }
        }
      ],
      "put": {
        "tags": [
          "Subscribers"
        ],
        "summary": "Unsubscribe a subscriber from a list",
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Invalid data when checking some rules",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/lists/{list_uid}/subscribers/get-by-email": {
      "parameters": [
        {
          "name": "list_uid",
          "in": "path",
          "required": true,
          "description": "List uid",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Subscribers"
        ],
        "summary": "Get subscriber by email in a list",
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "required": true,
            "description": "Full Email Address",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "record": {
                          "$ref": "#/components/schemas/Subscriber"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The sources does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/lists/{list_uid}/subscribers/search-by-fields": {
      "parameters": [
        {
          "name": "list_uid",
          "in": "path",
          "required": true,
          "description": "List uid",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Subscribers"
        ],
        "summary": "Search subscribers in a list",
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "description": "Email",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fname",
            "in": "query",
            "description": "First Name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lname",
            "in": "query",
            "description": "Last Name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "full_name",
            "in": "query",
            "description": "Full Name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phone",
            "in": "query",
            "description": "Phone",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "street_second_line",
            "in": "query",
            "description": "Street second line",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "in": "query",
            "description": "City",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "State/Province",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "description": "Country",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "zip_code",
            "in": "query",
            "description": "Zip/Postal Code",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "comment",
            "in": "query",
            "description": "Comment",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/DataIndex"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "records": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/Subscriber"
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The sources does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/lists/subscribers/search-by-email-in-all-lists": {
      "get": {
        "tags": [
          "Subscribers"
        ],
        "summary": "Search by email in all lists",
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "required": true,
            "description": "Full Email Address",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": true,
            "description": "Status",
            "schema": {
              "$ref": "#/components/schemas/SubscriberAllStatus"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "records": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "subscriber_uid": {
                                "type": "string"
                              },
                              "email": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "source": {
                                "type": "string"
                              },
                              "ip_address": {
                                "type": "string"
                              },
                              "date_added": {
                                "type": "string"
                              },
                              "list": {
                                "type": "object",
                                "properties": {
                                  "list_uid": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "display_name": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/lists/subscribers/unsubscribe-by-email-from-all-lists": {
      "put": {
        "tags": [
          "Subscribers"
        ],
        "summary": "Unsubscribe by email in all lists",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "type": "integer",
                          "description": "Number of subscribers that successfully unsubscribed"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/templates": {
      "get": {
        "tags": [
          "Templates"
        ],
        "summary": "Get Templates",
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of result on request.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "Template name",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/DataIndex"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "records": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "template_uid": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Templates"
        ],
        "summary": "Create a Template",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "template": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "content": {
                        "type": "string",
                        "description": "HTML content that has been converted to base64"
                      }
                    }
                  }
                },
                "example": {
                  "template": {
                    "name": "Template name",
                    "content": "HTML content that has been converted to base64"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/DataIndex"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "records": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "template_uid": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/templates/{template_uid}": {
      "parameters": [
        {
          "name": "template_uid",
          "in": "path",
          "required": true,
          "description": "Template uid.",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Templates"
        ],
        "summary": "Get the Template",
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "record": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "content": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resources is not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Templates"
        ],
        "summary": "Update the Template",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "template": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "content": {
                        "type": "string",
                        "description": "HTML content that has been converted to base64"
                      }
                    }
                  }
                },
                "example": {
                  "template": {
                    "name": "Template name",
                    "content": "HTML content that has been converted to base64"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "record": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "content": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Templates"
        ],
        "summary": "Delete the Template",
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "record": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "content": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resources is not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/segments": {
      "get": {
        "tags": [
          "Segments"
        ],
        "summary": "Get Segments",
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of result on request.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/DataIndex"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "records": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "segment_uid": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/segments/{segment_uid}/subscribers": {
      "parameters": [
        {
          "name": "segment_uid",
          "in": "path",
          "required": true,
          "description": "Segment uid",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Segments"
        ],
        "summary": "Get Segments subscribers",
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of result on request.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/DataIndex"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "records": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/Subscriber"
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resources does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/segments/{segment_uid}": {
      "parameters": [
        {
          "name": "segment_uid",
          "in": "path",
          "required": true,
          "description": "Segment uid",
          "schema": {
            "type": "string"
          }
        }
      ],
      "delete": {
        "tags": [
          "Segments"
        ],
        "summary": "Delete the Segment",
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resource is not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/senders": {
      "get": {
        "tags": [
          "Senders"
        ],
        "summary": "Get Senders",
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of result on request.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/DataIndex"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "records": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "sender_uid": {
                                    "type": "string"
                                  },
                                  "from_name": {
                                    "type": "string"
                                  },
                                  "from_email": {
                                    "type": "string"
                                  },
                                  "reply_to": {
                                    "type": "string"
                                  },
                                  "status": {
                                    "type": "string"
                                  },
                                  "company_name": {
                                    "type": "string"
                                  },
                                  "street": {
                                    "type": "string"
                                  },
                                  "city": {
                                    "type": "string"
                                  },
                                  "country": {
                                    "type": "string"
                                  },
                                  "province": {
                                    "type": "string"
                                  },
                                  "zip": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Senders"
        ],
        "summary": "Create a Sender",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sender": {
                    "type": "object",
                    "properties": {
                      "from_name": {
                        "type": "string"
                      },
                      "from_email": {
                        "type": "string"
                      },
                      "reply_to": {
                        "type": "string"
                      },
                      "company_name": {
                        "type": "string"
                      },
                      "street": {
                        "type": "string"
                      },
                      "city": {
                        "type": "string"
                      },
                      "provine": {
                        "type": "string"
                      },
                      "country": {
                        "type": "string"
                      },
                      "zip": {
                        "type": "string"
                      }
                    }
                  }
                },
                "example": {
                  "sender": {
                    "from_name": "from name",
                    "from_email": "from email",
                    "reply_to": "reply to email",
                    "status": "status",
                    "company_name": "company name",
                    "street": "street name",
                    "city": "city name",
                    "country": "country name",
                    "provine": "provine name",
                    "zip": "zip code"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "allOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "sender_uid": {
                                "type": "string"
                              },
                              "from_name": {
                                "type": "string"
                              },
                              "from_email": {
                                "type": "string"
                              },
                              "reply_to": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "company_name": {
                                "type": "string"
                              },
                              "street": {
                                "type": "string"
                              },
                              "city": {
                                "type": "string"
                              },
                              "country": {
                                "type": "string"
                              },
                              "province": {
                                "type": "string"
                              },
                              "zip": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resources not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "The system is faulty or you are using the wrong method, please check again!.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/senders/{sender_uid}": {
      "parameters": [
        {
          "name": "sender_uid",
          "in": "path",
          "required": true,
          "description": "Sender uid",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Senders"
        ],
        "summary": "Get the Sender",
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "sender_uid": {
                          "type": "string"
                        },
                        "from_name": {
                          "type": "string"
                        },
                        "from_email": {
                          "type": "string"
                        },
                        "reply_to": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        },
                        "company_name": {
                          "type": "string"
                        },
                        "street": {
                          "type": "string"
                        },
                        "city": {
                          "type": "string"
                        },
                        "country": {
                          "type": "string"
                        },
                        "province": {
                          "type": "string"
                        },
                        "zip": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Senders"
        ],
        "summary": "Update the Sender",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sender": {
                    "type": "object",
                    "properties": {
                      "sender_uid": {
                        "type": "string"
                      },
                      "from_name": {
                        "type": "string"
                      },
                      "from_email": {
                        "type": "string"
                      },
                      "reply_to": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string"
                      },
                      "company_name": {
                        "type": "string"
                      },
                      "street": {
                        "type": "string"
                      },
                      "city": {
                        "type": "string"
                      },
                      "country": {
                        "type": "string"
                      },
                      "province": {
                        "type": "string"
                      },
                      "zip": {
                        "type": "string"
                      }
                    }
                  }
                },
                "example": {
                  "sender": {
                    "from_name": "from name",
                    "from_email": "from email",
                    "reply_to": "reply to email",
                    "company_name": "company name",
                    "street": "street name",
                    "city": "city name",
                    "provine": "provine name",
                    "country": "country name",
                    "zip": "zip code"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "allOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "sender_uid": {
                                "type": "string"
                              },
                              "from_name": {
                                "type": "string"
                              },
                              "from_email": {
                                "type": "string"
                              },
                              "reply_to": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "company_name": {
                                "type": "string"
                              },
                              "street": {
                                "type": "string"
                              },
                              "city": {
                                "type": "string"
                              },
                              "country": {
                                "type": "string"
                              },
                              "province": {
                                "type": "string"
                              },
                              "zip": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resources not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Senders"
        ],
        "summary": "Delete the Sender",
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resource is not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Invalid data when checking some rules",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/senders/{sender_uid}/resend-confirmation": {
      "parameters": [
        {
          "name": "sender_uid",
          "in": "path",
          "required": true,
          "description": "Sender uid",
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "Senders"
        ],
        "summary": "Resend confirmation the Sender",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": null
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "status": "success",
                    "message": "message success"
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resources not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sending-domains": {
      "get": {
        "tags": [
          "Sending Domains"
        ],
        "summary": "Get Sending Domains",
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of result on request.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/DataIndex"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "records": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "domain_id": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "verified": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Sending Domains"
        ],
        "summary": "Create a Sending Domain",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sending_domain": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    }
                  }
                },
                "example": {
                  "sending_domain": {
                    "name": "sending domain name"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "domain_id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "verified": {
                              "type": "string"
                            },
                            "dns_records": {
                              "type": "object"
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resources not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "The system is faulty or you are using the wrong method, please check again!.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sending-domains/{domain_id}": {
      "parameters": [
        {
          "name": "domain_id",
          "in": "path",
          "required": true,
          "description": "Domain id",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Sending Domains"
        ],
        "summary": "Get the Sending Domain",
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "record": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "verified": {
                              "type": "string"
                            },
                            "dns_records": {
                              "type": "object"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Sending Domains"
        ],
        "summary": "Update the Sending Domain",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sending_domain": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    }
                  }
                },
                "example": {
                  "sending_domain": {
                    "name": "name"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "domain_id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "verified": {
                              "type": "string"
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resources not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Sending Domains"
        ],
        "summary": "Delete the Sending Domain",
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resource is not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Invalid data when checking some rules",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sending-domains/{domain_id}/verify": {
      "parameters": [
        {
          "name": "domain_id",
          "in": "path",
          "required": true,
          "description": "Domain id",
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "Sending Domains"
        ],
        "summary": "Verify the Sending Domain",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": null
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  },
                  "example": {
                    "status": "success",
                    "message": "message success",
                    "data": {
                      "type": "object",
                      "items": {
                        "domain_id": "domain id",
                        "name": "name",
                        "verified": "0 or 1"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resources not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/groups": {
      "get": {
        "tags": [
          "Groups"
        ],
        "summary": "Get Groups",
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of result on request.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/DataIndex"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "records": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "group_uid": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Groups"
        ],
        "summary": "Create a Group",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "group": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "list_uids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "List uid"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "group": {
                    "name": "Group name",
                    "list_uids": [
                      "list_uid_1",
                      "list_uid_2"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "group_uid": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/groups/{group_uid}": {
      "parameters": [
        {
          "name": "group_uid",
          "in": "path",
          "required": true,
          "description": "The Group uid",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Groups"
        ],
        "summary": "Get the Group",
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "record": {
                          "type": "object",
                          "properties": {
                            "group_uid": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "lists": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "list_uid": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                }
                              },
                              "example": [
                                {
                                  "list_uid": "list_uid_1",
                                  "name": "List 1"
                                },
                                {
                                  "list_uid": "list_uid_2",
                                  "name": "List 2"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resources not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Groups"
        ],
        "summary": "Update the Group",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "group": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "list_uids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "List uid"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resources not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/groups/{group_uid}/copy": {
      "parameters": [
        {
          "name": "group_uid",
          "in": "path",
          "required": true,
          "description": "The Group uid",
          "schema": {
            "type": "string"
          }
        }
      ],
      "put": {
        "tags": [
          "Groups"
        ],
        "summary": "Copy the Group",
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "group_uid": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resources not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/campaigns": {
      "get": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Get Groups",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Campaign type",
            "schema": {
              "type": "string",
              "enum": [
                "autoresponder",
                "regular"
              ]
            }
          },
          {
            "name": "group_uid",
            "in": "query",
            "required": false,
            "description": "Autoresponder Group",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of result on request.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/DataIndex"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "records": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "campaign_uid": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "status": {
                                    "type": "string"
                                  },
                                  "group": {
                                    "description": "Only for Autoresponder Campaign",
                                    "type": "object",
                                    "properties": {
                                      "group_uid": {
                                        "type": "string"
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Create a Campaign",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "campaign": {
                    "$ref": "#/components/schemas/CampaignRequestData"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "campaign_uid": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Reached the limit or Permission deny",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/campaigns/{campaign_uid}": {
      "parameters": [
        {
          "name": "campaign_uid",
          "in": "path",
          "required": true,
          "description": "Campaign uid",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Get the Campaign",
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "record": {
                          "$ref": "#/components/schemas/Campaign"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resources is not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Update the Campaign",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "campaign": {
                    "$ref": "#/components/schemas/CampaignRequestData"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resource is not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Delete the Campaign",
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resource is not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Invalid data when checking some rules",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/campaigns/{campaign_uid}/template": {
      "parameters": [
        {
          "name": "campaign_uid",
          "in": "path",
          "required": true,
          "description": "Campaign uid",
          "schema": {
            "type": "string"
          }
        }
      ],
      "put": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Update the Campaign",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "campaign": {
                    "$ref": "#/components/schemas/CampaignTemplateRequestData"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resource is not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/campaigns/{campaign_uid}/confirm": {
      "parameters": [
        {
          "name": "campaign_uid",
          "in": "path",
          "required": true,
          "description": "Campaign uid",
          "schema": {
            "type": "string"
          }
        }
      ],
      "put": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Confirm the Campaign",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "send_at": {
                    "type": "string",
                    "example": "2021-01-01 00:00:00"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "campaign": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resources is not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/campaigns/{campaign_uid}/copy": {
      "parameters": [
        {
          "name": "campaign_uid",
          "in": "path",
          "required": true,
          "description": "Campaign uid",
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Copy the Campaign",
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "campaign_uid": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resources is not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/campaigns/{campaign_uid}/pause-unpause": {
      "parameters": [
        {
          "name": "campaign_uid",
          "in": "path",
          "required": true,
          "description": "Campaign uid",
          "schema": {
            "type": "string"
          }
        }
      ],
      "put": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Pause/Unpause the Campaign",
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "campaign": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resources is not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/campaigns/{campaign_uid}/mark-sent": {
      "parameters": [
        {
          "name": "campaign_uid",
          "in": "path",
          "required": true,
          "description": "Campaign uid",
          "schema": {
            "type": "string"
          }
        }
      ],
      "put": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Mark the Campaign as sent",
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "campaign": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resources is not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Invalid data when checking some rules",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/campaigns/{campaign_uid}/statistics": {
      "parameters": [
        {
          "name": "campaign_uid",
          "in": "path",
          "required": true,
          "description": "Campaign uid",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Get Campaign Statistics",
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "statistics": {
                          "type": "object",
                          "properties": {
                            "unique_open": {
                              "type": "integer"
                            },
                            "total_open": {
                              "type": "integer"
                            },
                            "unique_click": {
                              "type": "integer"
                            },
                            "total_click": {
                              "type": "integer"
                            },
                            "click_to_open": {
                              "type": "integer"
                            },
                            "unsubscribe": {
                              "type": "integer"
                            },
                            "complaint": {
                              "type": "integer"
                            },
                            "bounced": {
                              "type": "integer"
                            },
                            "processed": {
                              "type": "integer"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The resources is not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/suppression": {
      "post": {
        "tags": [
          "Global Suppression"
        ],
        "summary": "Add emails to global suppression list",
        "description": "Maximum 10,000 emails per request",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email_list": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "failed_emails": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Input error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/optional-suppression": {
      "get": {
        "tags": [
          "Optional Suppression"
        ],
        "summary": "Get an Optional Suppression Lists",
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of result on request.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/DataIndex"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "records": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/OptionalSuppression"
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Optional Suppression"
        ],
        "summary": "Create an Optional Suppression List ",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OptionalSuppressionRequestData"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "optional_suppression_list_uid": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Request data error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/optional-suppression/{optional_suppression_list_uid}": {
      "parameters": [
        {
          "name": "optional_suppression_list_uid",
          "in": "path",
          "required": true,
          "description": "optional suppression list uid",
          "schema": {
            "type": "string"
          }
        }
      ],
      "put": {
        "tags": [
          "Optional Suppression"
        ],
        "summary": "Update an Optional Suppression List",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OptionalSuppressionRequestData"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The optional suppression list does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request data error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Optional Suppression"
        ],
        "summary": "Delete an Optional Suppression List",
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The optional suppression list does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/optional-suppression/{optional_suppression_list_uid}/emails": {
      "parameters": [
        {
          "name": "optional_suppression_list_uid",
          "in": "path",
          "required": true,
          "description": "Get an Optional Suppression List Uid Emails",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Optional Suppression"
        ],
        "summary": "Get an Optional Suppression List Emails",
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of result on request.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/DataIndex"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "records": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/OptionalSuppressionEmails"
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Optional Suppression"
        ],
        "summary": "Create an Optional Suppression List Emails",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OptionalSuppressionEmailsRequestData"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "emails": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Request data error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/optional-suppression/{optional_suppression_list_uid}/emails/{email_id}": {
      "parameters": [
        {
          "name": "optional_suppression_list_uid",
          "in": "path",
          "required": true,
          "description": "Get an Optional Suppression List Uid Emails",
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "email_id",
          "in": "path",
          "required": true,
          "description": "Get an Optional Suppression List Email Id",
          "schema": {
            "type": "string"
          }
        }
      ],
      "put": {
        "tags": [
          "Optional Suppression"
        ],
        "summary": "Update an Optional Suppression List",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OptionalSuppressionEmailRequestData"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "email": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The optional suppression list email does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request data error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Optional Suppression"
        ],
        "summary": "Delete an Optional Suppression List",
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The optional suppression list does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/custom-fields": {
      "get": {
        "tags": [
          "Custom Fields"
        ],
        "summary": "Get all custom fields",
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "records": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "field_id": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "tag": {
                                    "type": "string"
                                  },
                                  "date_added": {
                                    "type": "string"
                                  },
                                  "last_updated": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Custom Fields"
        ],
        "summary": "Add a custom field",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "message": {
                      "type": "string",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "items": {
                            "type": "string"
                          }
                        },
                        "tag": {
                          "type": "string",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Input error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "You can only add N custom fields",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/custom-fields/{field_id}": {
      "parameters": [
        {
          "name": "field_id",
          "in": "path",
          "required": true,
          "description": "Field ID",
          "schema": {
            "type": "integer"
          }
        }
      ],
      "put": {
        "tags": [
          "Custom Fields"
        ],
        "summary": "Update a custom field",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "message": {
                      "type": "string",
                      "items": {
                        "type": "string"
                      }
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "List field not existed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Custom Fields"
        ],
        "summary": "Delete a custom field",
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "List field not existed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tags": {
      "get": {
        "tags": [
          "Tags"
        ],
        "summary": "Get tags",
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of result on request.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/DataIndex"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "records": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/Tag"
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Tags"
        ],
        "summary": "Create a tag",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TagRequestData"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "list_uid": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Request data error",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorInput"
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "template": {
                    "tag_name": "api tag",
                    "tag_description": "this tag is created from api"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/tags/{tag_id}": {
      "parameters": [
        {
          "name": "tag_id",
          "in": "path",
          "required": true,
          "description": "tag id",
          "schema": {
            "type": "string"
          }
        }
      ],
      "put": {
        "tags": [
          "Tags"
        ],
        "summary": "Update a tag",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TagRequestData"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The tag does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request data error",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorInput"
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "template": {
                    "tag_name": "api tag",
                    "tag_description": "this tag is created from api"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Tags"
        ],
        "summary": "Delete a tag",
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The tag does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tags/{tag_id}/emails": {
      "parameters": [
        {
          "name": "tag_id",
          "in": "path",
          "required": true,
          "description": "tag id",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Tags"
        ],
        "summary": "Get list of emails having this tag",
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of result on request.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "record": {
                          "$ref": "#/components/schemas/Tag"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The tag does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Tags"
        ],
        "summary": "Add tag to subscribers",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TagRequestData"
              },
              "example": {
                "general": {
                  "emails": [
                    "mail1@domain.com",
                    "mail2@domain.com"
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The tag does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request data error",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorInput"
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tags/{tag_id}/emails/{email}": {
      "parameters": [
        {
          "name": "tag_id",
          "in": "path",
          "required": true,
          "description": "Tag ID",
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "email",
          "in": "path",
          "required": true,
          "description": "Base64 encoded email",
          "schema": {
            "type": "string"
          }
        }
      ],
      "delete": {
        "tags": [
          "Tags"
        ],
        "summary": "Delete a tag from subscriber by Base64 encoded email",
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Only DELETE requests allowed for this endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid email.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "This tag does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "This subscriber does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "406": {
            "description": "This tag does not belong to this subscriber.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Error when delete this tag from this subscriber, please try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tags/{tag_id}/subscribers/{subscriber_uid}": {
      "parameters": [
        {
          "name": "tag_id",
          "in": "path",
          "required": true,
          "description": "Tag ID",
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "subscriber_uid",
          "in": "path",
          "required": true,
          "description": "Subscriber UID",
          "schema": {
            "type": "string"
          }
        }
      ],
      "delete": {
        "tags": [
          "Tags"
        ],
        "summary": "Delete a tag from subscriber by subscriber_uid",
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Only DELETE requests allowed for this endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "This tag does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "This subscriber does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "406": {
            "description": "This tag does not belong to this subscriber.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Error when delete this tag from this subscriber, please try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/send-email/process": {
      "post": {
        "tags": [
          "Send Email"
        ],
        "summary": "Send Email API",
        "description": "Send email to recipient(s) using API",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendEmailRequest"
              },
              "example": {
                "from_email": "sender@example.com",
                "to": "recipient@example.com",
                "subject": "Test Email",
                "html_body": "<h1>Hello World</h1><p>This is a test email.</p>",
                "text_body": "Hello World\n\nThis is a test email."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Email sent successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendEmailSuccess"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendEmailError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - API disabled or mailing disabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendEmailError"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed - Only POST requests allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendEmailError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error - Limit reached or server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendEmailError"
                }
              }
            }
          }
        }
      }
    },
    "/sub-accounts": {
      "get": {
        "tags": [
          "Sub Account"
        ],
        "summary": "Get Sub Users",
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of result on request.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/DataIndex"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "records": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/SubAccount"
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Sub Account"
        ],
        "summary": "Create a Sub User",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubAccountRequestData"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "message": {
                      "type": "string"
                    },
                    "customer_uid": {
                      "type": "string"
                    },
                    "first_name": {
                      "type": "string"
                    },
                    "last_name": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Request data error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "message": {
                      "type": "string"
                    },
                    "customer_uid": {
                      "type": "string"
                    },
                    "first_name": {
                      "type": "string"
                    },
                    "last_name": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "status": "error",
                  "error": {
                    "customer": "first name cannot blank"
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "customer": {
                    "first_name": "api first name",
                    "last_name": "this last name is created from api"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sub-accounts/{customer_uid}": {
      "parameters": [
        {
          "name": "customer_uid",
          "in": "path",
          "required": true,
          "description": "customer uid",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Sub Account"
        ],
        "summary": "Get a Sub User Detail",
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "record": {
                          "$ref": "#/components/schemas/SubAccount"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The sub user does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Sub Account"
        ],
        "summary": "Update a Sub User",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubAccountRequestData"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    }
                  }
                },
                "example": {
                  "message": "The sub user has been updated successfully.",
                  "status": "success"
                }
              }
            }
          },
          "400": {
            "description": "The tag does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": "error",
                  "error": "error message"
                }
              }
            }
          },
          "422": {
            "description": "Request data error",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorInput"
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                },
                "example": {
                  "status": "error",
                  "error": {
                    "customer": "first name cannot blank"
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "customer": {
                    "first_name": "api first name",
                    "last_name": "this last name is created from api"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Sub Account"
        ],
        "summary": "Delete a Sub User",
        "responses": {
          "200": {
            "description": "Request success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/Status"
                    }
                  }
                },
                "example": {
                  "message": "success message",
                  "status": "success"
                }
              }
            }
          },
          "400": {
            "description": "The tag does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "status": "error",
                  "error": "error message"
                }
              }
            }
          },
          "429": {
            "description": "Too many request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "List": {
        "type": "object",
        "properties": {
          "general": {
            "type": "object",
            "properties": {
              "list_uid": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "display_name": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "opt_in": {
                "type": "string",
                "enum": [
                  "double",
                  "single"
                ]
              },
              "welcome_email": {
                "$ref": "#/components/schemas/YesNoValue"
              },
              "date_added": {
                "type": "string"
              }
            }
          },
          "defaults": {
            "type": "object",
            "properties": {
              "sender_uid": {
                "type": "string"
              },
              "from_name": {
                "type": "string"
              },
              "from_email": {
                "type": "string"
              },
              "reply_to": {
                "type": "string"
              }
            }
          }
        }
      },
      "ListRequestData": {
        "type": "object",
        "properties": {
          "general": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "display_name": {
                "type": "string"
              },
              "opt_in": {
                "type": "string",
                "enum": [
                  "double",
                  "single"
                ]
              },
              "welcome_email": {
                "$ref": "#/components/schemas/YesNoValue"
              },
              "optional_suppression_list_uids": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "name",
              "description"
            ]
          },
          "defaults": {
            "type": "object",
            "properties": {
              "sender_uid": {
                "type": "string"
              }
            },
            "required": [
              "sender_uid"
            ]
          }
        },
        "example": {
          "general": {
            "name": "List name",
            "description": "List description",
            "display_name": "Display name",
            "welcome_email": "no",
            "optional_suppression_list_uids": [
              "optional_suppression_list_uids"
            ]
          },
          "defaults": {
            "sender_uid": "[sender_uid]"
          }
        }
      },
      "Subscriber": {
        "type": "object",
        "properties": {
          "subscriber_uid": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "fname": {
            "type": "string"
          },
          "lname": {
            "type": "string"
          },
          "full_name": {
            "type": "string"
          },
          "street": {
            "type": "string"
          },
          "street_second_line": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "zip_code": {
            "type": "string"
          },
          "comment": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/SubscriberAllStatus"
          },
          "source": {
            "type": "string",
            "enum": [
              "api",
              "web",
              "import"
            ]
          },
          "ip_address": {
            "type": "string"
          },
          "date_added": {
            "type": "string"
          }
        }
      },
      "SubscriberRequestData": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "fname": {
            "type": "string"
          },
          "lname": {
            "type": "string"
          },
          "full_name": {
            "type": "string"
          },
          "street": {
            "type": "string"
          },
          "street_second_line": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "zip_code": {
            "type": "string"
          },
          "comment": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/SubscriberStatusRequestData"
          },
          "details": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string"
              },
              "ip_address": {
                "type": "string"
              },
              "source": {
                "type": "string",
                "enum": [
                  "api",
                  "web",
                  "import"
                ]
              }
            }
          }
        }
      },
      "SubscriberAllStatus": {
        "type": "string",
        "enum": [
          "confirmed",
          "unconfirmed",
          "unsubscribed",
          "bounced",
          "unapproved",
          "disabled",
          "moved",
          "pending-approve"
        ]
      },
      "SubscriberStatusRequestData": {
        "type": "string",
        "enum": [
          "confirmed",
          "unconfirmed",
          "unsubscribed"
        ]
      },
      "Campaign": {
        "type": "object",
        "properties": {
          "campaign_uid": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "regular",
              "autoresponder"
            ]
          },
          "from_name": {
            "type": "string"
          },
          "from_email": {
            "type": "string"
          },
          "to_name": {
            "type": "string"
          },
          "reply_to": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "sender_uid": {
            "type": "string"
          },
          "date_added": {
            "type": "string"
          },
          "send_at": {
            "type": "string"
          },
          "lists": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "list_uid": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              }
            }
          },
          "segments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "segment_uid": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              }
            }
          },
          "exclude_lists": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "list_uid": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              }
            }
          },
          "exclude_segments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "segment_uid": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              }
            }
          },
          "group": {
            "description": "Only for Autoresponder campaign",
            "type": "object",
            "properties": {
              "group_uid": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "options": {
            "type": "object",
            "properties": {
              "preheader": {
                "type": "string"
              },
              "autoresponder_event": {
                "type": "string",
                "description": "Only for Autoresponder campaign",
                "enum": [
                  "AFTER-SUBSCRIBE",
                  "AFTER-CAMPAIGN-OPEN",
                  "AFTER-CAMPAIGN-SENT"
                ]
              },
              "autoresponder_time_unit": {
                "type": "string",
                "description": "Only for Autoresponder campaign",
                "enum": [
                  "minute",
                  "hour",
                  "day",
                  "week",
                  "month",
                  "year"
                ]
              },
              "autoresponder_time_value": {
                "type": "integer",
                "description": "Only for Autoresponder campaign"
              },
              "autoresponder_time_min_hour": {
                "type": "integer",
                "description": "Only for Autoresponder campaign",
                "minimum": 0,
                "maximum": 23
              },
              "autoresponder_time_min_minute": {
                "type": "integer",
                "description": "Only for Autoresponder campaign",
                "minimum": 0,
                "maximum": 59
              }
            },
            "example": {
              "preheader": null
            }
          }
        }
      },
      "CampaignRequestData": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "regular"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft"
            ]
          },
          "optional_suppression_list_uids": {
            "description": "Only for Regular campaign",
            "type": "array",
            "items": {
              "type": "string",
              "example": "optional_suppression_list_uid"
            }
          },
          "list_uids": {
            "description": "Only for Regular campaign",
            "type": "array",
            "items": {
              "type": "string",
              "example": "list_uid"
            }
          },
          "segment_uids": {
            "description": "Only for Regular campaign",
            "type": "array",
            "items": {
              "type": "string",
              "example": "segment_uid"
            }
          },
          "exclude_list_uids": {
            "description": "Only for Regular campaign",
            "type": "array",
            "items": {
              "type": "string",
              "example": "list_uid"
            }
          },
          "exclude_segment_uids": {
            "description": "Only for Regular campaign",
            "type": "array",
            "items": {
              "type": "string",
              "example": "segment_uid"
            }
          },
          "sender_uid": {
            "type": "string",
            "example": "sender_uid"
          },
          "subject": {
            "type": "string"
          },
          "template": {
            "type": "object",
            "properties": {
              "content": {
                "type": "string",
                "example": "Campaign content that has been converted to Base64",
                "description": "Campaign content that has been converted to Base64"
              },
              "template_uid": {
                "type": "string",
                "example": "Template will override content",
                "description": "Content will be overrided by the template"
              },
              "only_plain_text": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/YesNoValue"
                  },
                  {
                    "example": "no"
                  }
                ]
              },
              "auto_plain_text": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/YesNoValue"
                  },
                  {
                    "description": "Default is yes"
                  }
                ]
              },
              "plain_text": {
                "type": "string",
                "example": "The plain text that has been converted to Base64",
                "description": "The plain text that has been converted to Base64"
              }
            }
          },
          "options": {
            "type": "object",
            "properties": {
              "preheader": {
                "type": "string"
              },
              "autoresponder_event": {
                "type": "string",
                "description": "Only for Autoresponder campaign",
                "enum": [
                  "AFTER-SUBSCRIBE",
                  "AFTER-CAMPAIGN-OPEN",
                  "AFTER-CAMPAIGN-SENT"
                ]
              },
              "autoresponder_time_unit": {
                "type": "string",
                "description": "Only for Autoresponder campaign",
                "enum": [
                  "minute",
                  "hour",
                  "day",
                  "week",
                  "month",
                  "year"
                ]
              },
              "autoresponder_time_value": {
                "type": "integer",
                "description": "Only for Autoresponder campaign"
              },
              "autoresponder_time_min_hour": {
                "type": "integer",
                "description": "Only for Autoresponder campaign",
                "minimum": 0,
                "maximum": 23
              },
              "autoresponder_time_min_minute": {
                "type": "integer",
                "description": "Only for Autoresponder campaign",
                "minimum": 0,
                "maximum": 59
              }
            },
            "example": {
              "preheader": null
            }
          }
        }
      },
      "CampaignTemplateRequestData": {
        "type": "object",
        "properties": {
          "template": {
            "type": "object",
            "properties": {
              "content": {
                "type": "string",
                "example": "Campaign content that has been converted to Base64",
                "description": "Campaign content that has been converted to Base64"
              },
              "template_uid": {
                "type": "string",
                "example": "Template will override content",
                "description": "Content will be overrided by the template"
              },
              "only_plain_text": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/YesNoValue"
                  },
                  {
                    "example": "no"
                  }
                ]
              },
              "auto_plain_text": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/YesNoValue"
                  },
                  {
                    "description": "Default is yes"
                  }
                ]
              },
              "plain_text": {
                "type": "string",
                "example": "The plain text that has been converted to Base64",
                "description": "The plain text that has been converted to Base64"
              }
            }
          }
        }
      },
      "Tag": {
        "type": "object",
        "properties": {
          "general": {
            "type": "object",
            "properties": {
              "tag_id": {
                "type": "integer"
              },
              "tag_name": {
                "type": "string"
              },
              "tag_description": {
                "type": "string"
              },
              "date_added": {
                "type": "string"
              },
              "last_updated": {
                "type": "string"
              }
            }
          }
        }
      },
      "TagRequestData": {
        "type": "object",
        "properties": {
          "general": {
            "type": "object",
            "properties": {
              "tag_name": {
                "type": "string"
              },
              "tag_description": {
                "type": "string"
              },
              "emails": {
                "type": "string"
              }
            },
            "required": [
              "tag_name",
              "description"
            ]
          }
        },
        "example": {
          "general": {
            "tag_name": "new tag",
            "tag_description": "this tag is created from api"
          }
        }
      },
      "SubAccount": {
        "type": "object",
        "properties": {
          "customer": {
            "type": "object",
            "properties": {
              "customer_id": {
                "type": "integer"
              },
              "customer_uid": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "first_name": {
                "type": "string"
              },
              "last_name": {
                "type": "string"
              },
              "status": {
                "type": "string"
              }
            }
          }
        }
      },
      "SubAccountRequestData": {
        "type": "object",
        "properties": {
          "customer": {
            "type": "object",
            "properties": {
              "first_name": {
                "type": "string"
              },
              "last_name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "email_details": {
                "type": "string"
              },
              "fake_password": {
                "type": "string"
              },
              "confirm_password": {
                "type": "string"
              }
            },
            "required": [
              "first_name",
              "last_name",
              "email",
              "status",
              "email_details",
              "fake_password",
              "confirm_password"
            ]
          }
        },
        "example": {
          "customer": {
            "first_name": "new first name",
            "last_name": "new last name",
            "email": "new email",
            "status": "active",
            "email_details": "no",
            "password": "123456"
          }
        }
      },
      "OptionalSuppression": {
        "type": "object",
        "properties": {
          "general": {
            "type": "object",
            "properties": {
              "list_uid": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "date_added": {
                "type": "string"
              },
              "last_updated": {
                "type": "string"
              }
            }
          }
        }
      },
      "OptionalSuppressionRequestData": {
        "type": "object",
        "properties": {
          "general": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "optional_email_list_uids": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "name",
              "optional_email_list_uids"
            ]
          }
        },
        "example": {
          "general": {
            "name": "new optional suppression",
            "optional_email_list_uids": [
              "list_uids"
            ]
          }
        }
      },
      "OptionalSuppressionEmails": {
        "type": "object",
        "properties": {
          "email_id": {
            "type": "string"
          },
          "email": {
            "type": "string"
          }
        }
      },
      "OptionalSuppressionEmailsRequestData": {
        "type": "object",
        "properties": {
          "general": {
            "type": "object",
            "properties": {
              "emails": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "name",
              "optional_email_list_uids"
            ]
          }
        },
        "example": {
          "general": {
            "emails": [
              "emails"
            ]
          }
        }
      },
      "OptionalSuppressionEmailRequestData": {
        "type": "object",
        "properties": {
          "general": {
            "type": "object",
            "properties": {
              "email": {
                "type": "string"
              }
            },
            "required": [
              "name",
              "optional_email_list_uids"
            ]
          }
        },
        "example": {
          "general": {
            "email": "email"
          }
        }
      },
      "SendEmailRequest": {
        "type": "object",
        "required": [
          "from_email",
          "to"
        ],
        "properties": {
          "from_email": {
            "type": "string",
            "format": "email",
            "description": "Sender email address (must be verified sender)",
            "example": "sender@example.com"
          },
          "to": {
            "oneOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "email"
                }
              }
            ],
            "description": "Recipient email address(es)",
            "example": "recipient@example.com"
          },
          "subject": {
            "type": "string",
            "description": "Email subject line",
            "example": "Test Email Subject"
          },
          "html_body": {
            "type": "string",
            "description": "HTML content of the email (either html_body or text_body is required)",
            "example": "<h1>Hello World</h1><p>This is a test email.</p>"
          },
          "text_body": {
            "type": "string",
            "description": "Plain text content of the email (either html_body or text_body is required)",
            "example": "Hello World\\n\\nThis is a test email."
          }
        }
      },
      "SendEmailSuccess": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": ["success"]
          },
          "code": {
            "type": "integer",
            "example": 200
          },
          "delivery_logs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "log_key": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "email": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "SendEmailError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": ["error"]
          },
          "error": {
            "type": "string",
            "description": "Error message"
          },
          "errors": {
            "type": "object",
            "description": "Detailed validation errors (for 400 responses)"
          },
          "code": {
            "type": "integer",
            "description": "Error code"
          }
        }
      },
      "YesNoValue": {
        "type": "string",
        "enum": [
          "yes",
          "no"
        ],
        "example": "yes"
      },
      "Status": {
        "type": "string",
        "enum": [
          "success",
          "error"
        ],
        "example": "success"
      },
      "Error": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "error"
            ]
          },
          "error": {
            "type": "string"
          }
        },
        "example": {
          "status": "error",
          "error": "error message"
        }
      },
      "ErrorInput": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "error"
            ]
          },
          "error": {
            "type": "object"
          }
        },
        "example": {
          "status": "error",
          "error": {
            "general": {
              "field_id": "error message"
            }
          }
        }
      },
      "DataIndex": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "format": "int64"
          },
          "total_pages": {
            "type": "integer",
            "format": "int64"
          },
          "current_page": {
            "type": "integer",
            "format": "int64"
          },
          "next_page": {
            "type": "integer",
            "format": "int64"
          },
          "prev_page": {
            "type": "integer",
            "format": "int64"
          },
          "records": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "PublicKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY",
        "description": "You can get the key on page <a href='/members/settings/api-keys' target='_blank'>/members/settings/api-keys</a>"
      }
    }
  },
  "security": [
    {
      "PublicKey": []
    }
  ]
}