{
 "openapi": "3.1.0",
 "info": {
  "title": "Email Prices API",
  "version": "1.0.0",
  "description": "Free, keyless, read-only prices of email marketing platforms, checked daily on each platform's own pricing page. The same numbers as emailprices.com. Every response carries checked_on and cite_as. Limits: 20 requests a minute and 1,000 a day per IP.",
  "license": {
   "name": "Free to quote with attribution",
   "url": "https://emailprices.com/agents"
  }
 },
 "servers": [
  {
   "url": "https://emailprices.com/api/v1"
  }
 ],
 "paths": {
  "/health": {
   "get": {
    "summary": "Service status and the date of the last price check",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/platforms": {
   "get": {
    "summary": "Every platform we price, with its plans and links",
    "responses": {
     "200": {
      "description": "Platforms",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/platforms/{id}": {
   "get": {
    "summary": "One platform's price at a list size: its cheapest option and every plan",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "description": "Platform id from /platforms, e.g. mailchimp.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "size",
      "in": "query",
      "required": true,
      "description": "Subscribers on your list (1 to 150,000).",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 150000
      }
     },
     {
      "name": "sends",
      "in": "query",
      "required": false,
      "description": "Emails each subscriber gets a month (1 to 30, default 4).",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 30,
       "default": 4
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Price",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Bad parameter: the body names it and its allowed values.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "404": {
      "description": "Unknown platform: use /platforms",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "429": {
      "description": "Rate limit (20 requests a minute, 1,000 a day per IP). See Retry-After.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/cheapest": {
   "get": {
    "summary": "Platforms cheapest first at a list size",
    "parameters": [
     {
      "name": "size",
      "in": "query",
      "required": true,
      "description": "Subscribers on your list (1 to 150,000).",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 150000
      }
     },
     {
      "name": "sends",
      "in": "query",
      "required": false,
      "description": "Emails each subscriber gets a month (1 to 30, default 4).",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 30,
       "default": 4
      }
     },
     {
      "name": "paid",
      "in": "query",
      "description": "Only plans that let you sell paid subscriptions.",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "features",
      "in": "query",
      "description": "Comma list of required features: automations, landing_pages, paid_subscriptions, custom_domain_sending, remove_branding, api_campaigns.",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "yearly",
      "in": "query",
      "description": "Use yearly billing prices (per month).",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "description": "How many to list (1 to 50, default 10).",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 50,
       "default": 10
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Ranked platforms",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Bad parameter: the body names it and its allowed values.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "429": {
      "description": "Rate limit (20 requests a minute, 1,000 a day per IP). See Retry-After.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/compare": {
   "get": {
    "summary": "Two platforms side by side at a list size",
    "parameters": [
     {
      "name": "a",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "b",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "size",
      "in": "query",
      "required": true,
      "description": "Subscribers on your list (1 to 150,000).",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 150000
      }
     },
     {
      "name": "sends",
      "in": "query",
      "required": false,
      "description": "Emails each subscriber gets a month (1 to 30, default 4).",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 30,
       "default": 4
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Comparison",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Bad parameter: the body names it and its allowed values.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "404": {
      "description": "Unknown platform",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "429": {
      "description": "Rate limit (20 requests a minute, 1,000 a day per IP). See Retry-After.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/free": {
   "get": {
    "summary": "Free plans whose stated limits cover the list",
    "parameters": [
     {
      "name": "size",
      "in": "query",
      "required": true,
      "description": "Subscribers on your list (1 to 150,000).",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 150000
      }
     },
     {
      "name": "sends",
      "in": "query",
      "required": false,
      "description": "Emails each subscriber gets a month (1 to 30, default 4).",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 30,
       "default": 4
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Free plans",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Bad parameter: the body names it and its allowed values.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "429": {
      "description": "Rate limit (20 requests a minute, 1,000 a day per IP). See Retry-After.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/deals": {
   "get": {
    "summary": "Live deals and coupon codes",
    "responses": {
     "200": {
      "description": "Deals",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/changes": {
   "get": {
    "summary": "Confirmed price changes since a date",
    "parameters": [
     {
      "name": "since",
      "in": "query",
      "required": true,
      "description": "YYYY-MM-DD",
      "schema": {
       "type": "string",
       "format": "date"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Changes",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Bad parameter: the body names it and its allowed values.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "429": {
      "description": "Rate limit (20 requests a minute, 1,000 a day per IP). See Retry-After.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  }
 }
}