{
  "openapi": "3.1.0",
  "info": {
    "title": "ColdMeetings API",
    "version": "0.1.0",
    "description": "Cold email operations: sending domains, mailboxes, verified prospects, sequences, replies and meetings."
  },
  "servers": [
    {
      "url": "{baseUrl}",
      "description": "Your API base URL, sent by email with your API key. Email hello@coldmeetings.com to get both.",
      "variables": {
        "baseUrl": {
          "default": "",
          "description": "Replace with the API base URL in the email that carries your API key."
        }
      }
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "summary": "Liveness check.",
        "responses": {
          "200": {
            "description": "Success. Creation endpoints answer 201."
          },
          "default": {
            "description": "Error envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/plans": {
      "get": {
        "summary": "The three plans. Prices are set and nothing is charged live.",
        "responses": {
          "200": {
            "description": "Success. Creation endpoints answer 201."
          },
          "default": {
            "description": "Error envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/account": {
      "get": {
        "summary": "Account, plan, credit balance, usage and keys.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success. Creation endpoints answer 201."
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "default": {
            "description": "Error envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/account/export": {
      "get": {
        "summary": "Every row the account has, as one JSON document: profile, keys (by prefix), credit ledger, invoices, domains, mailboxes, campaigns, prospects, replies and the do-not-contact list. Secrets are left out. Three requests per account every ten minutes.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success. Creation endpoints answer 201."
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "default": {
            "description": "Error envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/checkout": {
      "post": {
        "summary": "Start a Stripe Checkout session. The plan starts when the payment is confirmed.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "plan": {
                    "type": "string",
                    "enum": [
                      "professional",
                      "enterprise"
                    ],
                    "description": "Professional starts a Checkout. Enterprise is bought on a call and answers 400 with the booking page."
                  },
                  "customer_email": {
                    "type": "string"
                  },
                  "attempt_id": {
                    "description": "A random id your client makes once per buy and sends again on every retry of it. A repeat with the same id returns the same Checkout instead of making another.",
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{16,64}$"
                  },
                  "success_url": {
                    "description": "Where checkout returns after payment. Must be a page on the ColdMeetings site; defaults to the pricing page.",
                    "type": "string",
                    "format": "uri"
                  },
                  "cancel_url": {
                    "description": "Where checkout returns if the person backs out. Must be a page on the ColdMeetings site; defaults to the pricing page.",
                    "type": "string",
                    "format": "uri"
                  }
                },
                "required": [
                  "plan",
                  "customer_email"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. Creation endpoints answer 201."
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "default": {
            "description": "Error envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/domains": {
      "get": {
        "summary": "List sending domains.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "description": "Rows per page, 1 to 100. More than 100 is held to 100."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The next_cursor of the previous page, sent back unchanged to the same route. Leave it out for the first page. A cursor that was edited or came from another route is refused."
          }
        ],
        "responses": {
          "200": {
            "description": "Success. One page; next_cursor is null on the last page."
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "default": {
            "description": "Error envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Register a sending domain you already own and get the DNS records it needs.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string",
                    "minLength": 4,
                    "maxLength": 253
                  },
                  "dkim_selector": {
                    "default": "google",
                    "type": "string",
                    "pattern": "^[a-z0-9-]{1,63}$"
                  },
                  "dkim_value": {
                    "description": "The DKIM TXT value your mailbox host issued. Added to required_records when given.",
                    "type": "string",
                    "maxLength": 2048
                  }
                },
                "required": [
                  "domain"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. Creation endpoints answer 201."
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "default": {
            "description": "Error envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/domains/{id}/dns": {
      "post": {
        "summary": "Publish the required records to your DNS host (Cloudflare). 503 until configured.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success. Creation endpoints answer 201."
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "default": {
            "description": "Error envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/domains/{id}/check-dns": {
      "post": {
        "summary": "Check live DNS for SPF, DKIM and DMARC and mark the domain authenticated.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success. Creation endpoints answer 201."
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "default": {
            "description": "Error envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mailboxes": {
      "get": {
        "summary": "List mailboxes and today's ramp-up send capacity.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "description": "Rows per page, 1 to 100. More than 100 is held to 100."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The next_cursor of the previous page, sent back unchanged to the same route. Leave it out for the first page. A cursor that was edited or came from another route is refused."
          }
        ],
        "responses": {
          "200": {
            "description": "Success. One page; next_cursor is null on the last page."
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "default": {
            "description": "Error envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a mailbox on a sending domain (Google Workspace). 503 until configured.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "domain_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "local_part": {
                    "type": "string",
                    "pattern": "^[a-z0-9][a-z0-9._-]{0,62}$"
                  },
                  "given_name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "family_name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  }
                },
                "required": [
                  "domain_id",
                  "local_part",
                  "given_name",
                  "family_name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. Creation endpoints answer 201."
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "default": {
            "description": "Error envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns": {
      "get": {
        "summary": "List campaigns.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "description": "Rows per page, 1 to 100. More than 100 is held to 100."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The next_cursor of the previous page, sent back unchanged to the same route. Leave it out for the first page. A cursor that was edited or came from another route is refused."
          }
        ],
        "responses": {
          "200": {
            "description": "Success. One page; next_cursor is null on the last page."
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "default": {
            "description": "Error envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a draft campaign with its sequence.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "timezone": {
                    "default": "America/New_York",
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 64
                  },
                  "steps": {
                    "minItems": 1,
                    "maxItems": 6,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "delay_days": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 30,
                          "description": "Days to wait after the previous step. 0 for step 1."
                        },
                        "variants": {
                          "minItems": 1,
                          "maxItems": 4,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "subject": {
                                "type": "string",
                                "maxLength": 200
                              },
                              "body": {
                                "type": "string",
                                "maxLength": 5000
                              }
                            },
                            "required": [
                              "subject",
                              "body"
                            ]
                          },
                          "description": "A/B alternatives. The first is the control. Every body must contain {{unsubscribe}} and {{sender_address}}."
                        }
                      },
                      "required": [
                        "delay_days",
                        "variants"
                      ]
                    }
                  }
                },
                "required": [
                  "name",
                  "steps"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. Creation endpoints answer 201."
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "default": {
            "description": "Error envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns/{id}": {
      "get": {
        "summary": "One campaign.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success. Creation endpoints answer 201."
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "default": {
            "description": "Error envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns/{id}/prospects": {
      "post": {
        "summary": "Import prospects: dedupe, suppression, region gate, verification, one credit each.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "allow_risky": {
                    "default": false,
                    "description": "Also import role mailboxes and free-provider addresses.",
                    "type": "boolean"
                  },
                  "prospects": {
                    "minItems": 1,
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "string",
                          "maxLength": 254
                        },
                        "first_name": {
                          "type": "string",
                          "maxLength": 80
                        },
                        "company": {
                          "type": "string",
                          "maxLength": 120
                        },
                        "country": {
                          "type": "string",
                          "minLength": 2,
                          "maxLength": 2,
                          "description": "ISO 3166-1 alpha-2 country of the prospect. Required: it decides region gating."
                        }
                      },
                      "required": [
                        "email",
                        "country"
                      ]
                    }
                  }
                },
                "required": [
                  "prospects"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. Creation endpoints answer 201."
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "default": {
            "description": "Error envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns/{id}/preflight": {
      "get": {
        "summary": "Everything that still blocks launch.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success. Creation endpoints answer 201."
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "default": {
            "description": "Error envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns/{id}/launch": {
      "post": {
        "summary": "Launch through the sending engine.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success. Creation endpoints answer 201."
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "default": {
            "description": "Error envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns/{id}/pause": {
      "post": {
        "summary": "Pause a campaign. Always pauses locally, even when the engine is unreachable; an unconfirmed engine pause is retried until it succeeds.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success. Creation endpoints answer 201."
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "default": {
            "description": "Error envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns/{id}/resume": {
      "post": {
        "summary": "Resume a campaign you paused. Runs the preflight, removes suppressed leads at the sending engine, then restarts it. Refused while the engine has not confirmed the pause (409), and for a campaign ColdMeetings paused itself (403).",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success. Creation endpoints answer 201."
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "default": {
            "description": "Error envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns/{id}/report": {
      "get": {
        "summary": "Sent, bounce, complaint and reply rates, reply intents, meetings booked.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success. Creation endpoints answer 201."
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "default": {
            "description": "Error envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/events": {
      "post": {
        "summary": "Record a sent, bounce or complaint event from the sending engine. Complaints suppress and can pause.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "campaign_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "email": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "sent",
                      "bounce",
                      "complaint"
                    ]
                  }
                },
                "required": [
                  "campaign_id",
                  "email",
                  "kind"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. Creation endpoints answer 201."
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "default": {
            "description": "Error envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/replies": {
      "post": {
        "summary": "Record a reply. Opt-outs are suppressed by a fixed rule before any AI runs.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "campaign_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "email": {
                    "type": "string"
                  },
                  "subject": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "body": {
                    "type": "string",
                    "maxLength": 20000
                  }
                },
                "required": [
                  "campaign_id",
                  "email",
                  "subject",
                  "body"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. Creation endpoints answer 201."
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "default": {
            "description": "Error envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/replies/{id}/meeting": {
      "post": {
        "summary": "Book a meeting for a reply through Cal.com. 503 until configured.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "attendee_name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "starts_at": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  "timezone": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 64
                  }
                },
                "required": [
                  "attendee_name",
                  "starts_at",
                  "timezone"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. Creation endpoints answer 201."
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "default": {
            "description": "Error envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/suppressions": {
      "get": {
        "summary": "The do-not-contact list.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "description": "Rows per page, 1 to 100. More than 100 is held to 100."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The next_cursor of the previous page, sent back unchanged to the same route. Leave it out for the first page. A cursor that was edited or came from another route is refused."
          }
        ],
        "responses": {
          "200": {
            "description": "Success. One page; next_cursor is null on the last page."
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "default": {
            "description": "Error envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Add an address to the do-not-contact list.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "reason": {
                    "default": "added by customer",
                    "type": "string",
                    "maxLength": 200
                  }
                },
                "required": [
                  "email"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. Creation endpoints answer 201."
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "default": {
            "description": "Error envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "API key starting cm_live_"
      }
    },
    "schemas": {
      "ErrorEnvelope": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message",
              "fix",
              "docs_url",
              "retryable",
              "request_id"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "unauthorized",
                  "forbidden",
                  "insufficient_credits",
                  "rate_limited",
                  "invalid_input",
                  "unknown_product",
                  "method_not_allowed",
                  "payload_too_large",
                  "provider_unavailable",
                  "internal_error",
                  "not_found",
                  "conflict",
                  "signature_invalid",
                  "plan_limit",
                  "subscription_required",
                  "trial_expired"
                ]
              },
              "message": {
                "type": "string"
              },
              "fix": {
                "type": "string"
              },
              "docs_url": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean"
              },
              "request_id": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
