{
  "openapi": "3.0.3",
  "info": {
    "title": "SwooshRank Public API",
    "version": "1.0.0",
    "description": "Programmatic access to your SwooshRank articles, sites, and keywords. Authenticate with a bearer token from Settings → API & Webhooks."
  },
  "servers": [
    {
      "url": "https://app.swooshrank.com/api/v1"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "sr_<32hex>",
        "description": "API key with prefix `sr_`. Generate in Settings → API & Webhooks."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      },
      "Article": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "siteId": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "planned",
              "generating",
              "draft",
              "scheduled",
              "published",
              "failed"
            ]
          },
          "targetKeyword": {
            "type": "string",
            "nullable": true
          },
          "wordCount": {
            "type": "integer"
          },
          "seoScore": {
            "type": "integer",
            "nullable": true
          },
          "publishedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Site": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "cms": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Keyword": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "siteId": {
            "type": "string",
            "format": "uuid"
          },
          "keyword": {
            "type": "string"
          },
          "searchVolume": {
            "type": "integer",
            "nullable": true
          },
          "difficulty": {
            "type": "integer",
            "nullable": true
          },
          "intent": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ConnectAccountInput": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "google_business",
              "facebook_page",
              "tiktok",
              "instagram",
              "google_analytics",
              "google_search_console",
              "google_ads",
              "google_calendar",
              "google_contacts",
              "supabase",
              "ai_key",
              "telnyx"
            ]
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "maxAccounts": {
            "default": 1,
            "type": "integer",
            "minimum": 1,
            "maximum": 20
          }
        },
        "required": [
          "provider",
          "label"
        ]
      },
      "ConnectAccountOutput": {
        "type": "object",
        "properties": {
          "connectUrl": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string"
          },
          "provider": {
            "type": "string",
            "enum": [
              "google_business",
              "facebook_page",
              "tiktok",
              "instagram",
              "google_analytics",
              "google_search_console",
              "google_ads",
              "google_calendar",
              "google_contacts",
              "supabase",
              "ai_key",
              "telnyx"
            ]
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "connectUrl",
          "expiresAt",
          "provider",
          "label"
        ],
        "additionalProperties": false
      },
      "ListAccountsInput": {
        "type": "object",
        "properties": {}
      },
      "ListAccountsOutput": {
        "type": "object",
        "properties": {
          "accounts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "accountId": {
                  "type": "string"
                },
                "provider": {
                  "type": "string",
                  "enum": [
                    "google_business",
                    "facebook_page",
                    "tiktok",
                    "instagram",
                    "google_analytics",
                    "google_search_console",
                    "google_ads",
                    "google_calendar",
                    "google_contacts",
                    "supabase",
                    "ai_key",
                    "telnyx"
                  ]
                },
                "label": {
                  "type": "string"
                },
                "name": {
                  "nullable": true,
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "connected",
                    "expired",
                    "revoked",
                    "pending_api_access"
                  ]
                },
                "locked": {
                  "type": "boolean"
                },
                "connectedAt": {
                  "nullable": true,
                  "type": "string"
                }
              },
              "required": [
                "accountId",
                "provider",
                "label",
                "name",
                "status",
                "locked",
                "connectedAt"
              ],
              "additionalProperties": false
            }
          },
          "pendingInvites": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "provider": {
                  "type": "string",
                  "enum": [
                    "google_business",
                    "facebook_page",
                    "tiktok",
                    "instagram",
                    "google_analytics",
                    "google_search_console",
                    "google_ads",
                    "google_calendar",
                    "google_contacts",
                    "supabase",
                    "ai_key",
                    "telnyx"
                  ]
                },
                "maxAccounts": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "expiresAt": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "label",
                "provider",
                "maxAccounts",
                "expiresAt"
              ],
              "additionalProperties": false
            }
          },
          "billing": {
            "type": "object",
            "properties": {
              "connected": {
                "type": "number"
              },
              "free": {
                "type": "number"
              },
              "billable": {
                "type": "number"
              },
              "needsPayment": {
                "type": "boolean"
              },
              "frozen": {
                "type": "boolean"
              },
              "complimentary": {
                "type": "boolean"
              }
            },
            "required": [
              "connected",
              "free",
              "billable",
              "needsPayment",
              "frozen",
              "complimentary"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "accounts",
          "pendingInvites",
          "billing"
        ],
        "additionalProperties": false
      },
      "CreatePostInput": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 5000
          },
          "media": {
            "type": "object",
            "properties": {
              "imageUrl": {
                "type": "string",
                "format": "uri"
              }
            },
            "required": [
              "imageUrl"
            ]
          },
          "link": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "accountId",
          "text"
        ]
      },
      "CreatePostOutput": {
        "type": "object",
        "properties": {
          "postId": {
            "type": "string"
          },
          "permalink": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "postId",
          "permalink"
        ],
        "additionalProperties": false
      },
      "ListReviewsInput": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "cursor": {
            "type": "string"
          }
        },
        "required": [
          "accountId"
        ]
      },
      "ListReviewsOutput": {
        "type": "object",
        "properties": {
          "reviews": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "reviewId": {
                  "type": "string"
                },
                "author": {
                  "type": "string"
                },
                "rating": {
                  "nullable": true,
                  "type": "number"
                },
                "text": {
                  "type": "string"
                },
                "date": {
                  "type": "string"
                },
                "replied": {
                  "type": "boolean"
                },
                "replyText": {
                  "type": "string"
                }
              },
              "required": [
                "reviewId",
                "author",
                "rating",
                "text",
                "date"
              ],
              "additionalProperties": false
            }
          },
          "nextCursor": {
            "type": "string"
          },
          "aggregate": {
            "type": "object",
            "properties": {
              "ratingValue": {
                "type": "number"
              },
              "reviewCount": {
                "type": "number"
              }
            },
            "required": [
              "ratingValue",
              "reviewCount"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "reviews"
        ],
        "additionalProperties": false
      },
      "ReplyReviewInput": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "reviewId": {
            "type": "string",
            "minLength": 1
          },
          "text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          }
        },
        "required": [
          "accountId",
          "reviewId",
          "text"
        ]
      },
      "ReplyReviewOutput": {
        "type": "object",
        "properties": {
          "repliedAt": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "repliedAt"
        ],
        "additionalProperties": false
      },
      "GetInsightsInput": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "range": {
            "default": "28d",
            "type": "string",
            "enum": [
              "7d",
              "28d",
              "90d"
            ]
          }
        },
        "required": [
          "accountId"
        ]
      },
      "GetInsightsOutput": {
        "type": "object",
        "properties": {
          "range": {
            "type": "object",
            "properties": {
              "startDate": {
                "type": "string"
              },
              "endDate": {
                "type": "string"
              }
            },
            "required": [
              "startDate",
              "endDate"
            ],
            "additionalProperties": false
          },
          "metrics": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "total": {
                  "type": "number"
                },
                "points": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "date": {
                        "type": "string"
                      },
                      "value": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "date",
                      "value"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "key",
                "label",
                "total",
                "points"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "range",
          "metrics"
        ],
        "additionalProperties": false
      },
      "InboxListInput": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "cursor": {
            "type": "string"
          },
          "channel": {
            "type": "string",
            "enum": [
              "review",
              "comment"
            ]
          }
        },
        "required": [
          "accountId"
        ]
      },
      "InboxListOutput": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "channel": {
                  "type": "string",
                  "enum": [
                    "review",
                    "comment"
                  ]
                },
                "author": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string"
                },
                "rating": {
                  "nullable": true,
                  "type": "number"
                },
                "replied": {
                  "nullable": true,
                  "type": "boolean"
                },
                "replyText": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "channel",
                "author",
                "text",
                "createdAt",
                "rating",
                "replied"
              ],
              "additionalProperties": false
            }
          },
          "nextCursor": {
            "nullable": true,
            "type": "string"
          },
          "aggregate": {
            "type": "object",
            "properties": {
              "ratingValue": {
                "type": "number"
              },
              "reviewCount": {
                "type": "number"
              }
            },
            "required": [
              "ratingValue",
              "reviewCount"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "items",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "InboxReplyInput": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "itemId": {
            "type": "string",
            "minLength": 1
          },
          "text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          }
        },
        "required": [
          "accountId",
          "itemId",
          "text"
        ]
      },
      "InboxReplyOutput": {
        "type": "object",
        "properties": {
          "repliedAt": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "repliedAt"
        ],
        "additionalProperties": false
      },
      "CalendarUpcomingInput": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "max": {
            "type": "integer",
            "minimum": 1,
            "maximum": 50
          }
        },
        "required": [
          "accountId"
        ]
      },
      "CalendarUpcomingOutput": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "start": {
                  "type": "string"
                },
                "end": {
                  "type": "string"
                },
                "link": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "title",
                "start",
                "end"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false
      },
      "CalendarSlotsInput": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "days": {
            "type": "integer",
            "minimum": 1,
            "maximum": 30
          }
        },
        "required": [
          "accountId"
        ]
      },
      "CalendarSlotsOutput": {
        "type": "object",
        "properties": {
          "slots": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "start": {
                  "type": "string"
                },
                "end": {
                  "type": "string"
                }
              },
              "required": [
                "start",
                "end"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "slots"
        ],
        "additionalProperties": false
      },
      "CalendarBookInput": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "start": {
            "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "end": {
            "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "leadName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": [
          "accountId",
          "start",
          "end",
          "leadName"
        ]
      },
      "CalendarBookOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "start": {
            "type": "string"
          },
          "end": {
            "type": "string"
          },
          "link": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "start",
          "end"
        ],
        "additionalProperties": false
      },
      "CalendarMoveInput": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "eventId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "start": {
            "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "end": {
            "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "accountId",
          "eventId",
          "start",
          "end"
        ]
      },
      "CalendarMoveOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "start": {
            "type": "string"
          },
          "end": {
            "type": "string"
          },
          "link": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "start",
          "end"
        ],
        "additionalProperties": false
      },
      "CalendarCancelInput": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "eventId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "accountId",
          "eventId"
        ]
      },
      "CalendarCancelOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "cancelled": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        },
        "required": [
          "id",
          "cancelled"
        ],
        "additionalProperties": false
      },
      "CustomersListInput": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "max": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          }
        },
        "required": [
          "accountId"
        ]
      },
      "CustomersListOutput": {
        "type": "object",
        "properties": {
          "contacts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "emails": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "phones": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "name",
                "emails",
                "phones"
              ],
              "additionalProperties": false
            }
          },
          "nextCursor": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "contacts",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "CustomersFindInput": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "q": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": [
          "accountId",
          "q"
        ]
      },
      "CustomersFindOutput": {
        "type": "object",
        "properties": {
          "match": {
            "nullable": true,
            "type": "object",
            "properties": {
              "displayName": {
                "type": "string"
              },
              "emails": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "phones": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "displayName",
              "emails",
              "phones"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "match"
        ],
        "additionalProperties": false
      },
      "AgentsCatalogInput": {
        "type": "object",
        "properties": {}
      },
      "AgentsCatalogOutput": {
        "type": "object",
        "properties": {
          "catalog": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "version": {
                  "type": "string"
                },
                "tier": {
                  "type": "string",
                  "enum": [
                    "free",
                    "premium"
                  ]
                },
                "targets": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "supabase"
                    ]
                  }
                },
                "modules": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "inbox",
                      "publish",
                      "insights",
                      "calendar",
                      "customers",
                      "agents",
                      "calls"
                    ]
                  }
                },
                "secrets": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "options": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "sensitive": {
                        "type": "boolean"
                      },
                      "multiline": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "name",
                      "label"
                    ],
                    "additionalProperties": false
                  }
                },
                "functions": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "schedule": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "id",
                "name",
                "description",
                "version",
                "tier",
                "targets",
                "modules",
                "secrets",
                "functions",
                "schedule"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "catalog"
        ],
        "additionalProperties": false
      },
      "AgentsListInput": {
        "type": "object",
        "properties": {}
      },
      "AgentsListOutput": {
        "type": "object",
        "properties": {
          "deployments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "templateId": {
                  "type": "string"
                },
                "templateVersion": {
                  "type": "string"
                },
                "runtimeTarget": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "deploying",
                    "live",
                    "failed",
                    "removed"
                  ]
                },
                "lastError": {
                  "nullable": true,
                  "type": "string"
                },
                "createdAt": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "templateId",
                "templateVersion",
                "runtimeTarget",
                "status",
                "lastError",
                "createdAt"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "deployments"
        ],
        "additionalProperties": false
      },
      "AgentsTargetsInput": {
        "type": "object",
        "properties": {
          "runtimeAccountId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "runtimeAccountId"
        ]
      },
      "AgentsTargetsOutput": {
        "type": "object",
        "properties": {
          "targets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "targets"
        ],
        "additionalProperties": false
      },
      "AgentsDeployInput": {
        "type": "object",
        "properties": {
          "templateId": {
            "type": "string",
            "minLength": 1
          },
          "runtimeAccountId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "runtimeTarget": {
            "type": "string",
            "minLength": 1
          },
          "secrets": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4096
            }
          },
          "aiAccountId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "templateId",
          "runtimeAccountId",
          "runtimeTarget",
          "secrets"
        ]
      },
      "AgentsDeployOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "templateId": {
            "type": "string"
          },
          "templateVersion": {
            "type": "string"
          },
          "runtimeTarget": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "deploying",
              "live",
              "failed",
              "removed"
            ]
          },
          "lastError": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "templateId",
          "templateVersion",
          "runtimeTarget",
          "status",
          "lastError",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "AgentsStatusInput": {
        "type": "object",
        "properties": {
          "deploymentId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "deploymentId"
        ]
      },
      "AgentsStatusOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "templateId": {
            "type": "string"
          },
          "templateVersion": {
            "type": "string"
          },
          "runtimeTarget": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "deploying",
              "live",
              "failed",
              "removed"
            ]
          },
          "lastError": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "parts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                }
              },
              "required": [
                "name",
                "status"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "id",
          "templateId",
          "templateVersion",
          "runtimeTarget",
          "status",
          "lastError",
          "createdAt",
          "parts"
        ],
        "additionalProperties": false
      },
      "AgentsRemoveInput": {
        "type": "object",
        "properties": {
          "deploymentId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "deploymentId"
        ]
      },
      "AgentsRemoveOutput": {
        "type": "object",
        "properties": {
          "removed": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        },
        "required": [
          "removed"
        ],
        "additionalProperties": false
      },
      "CallsNumbersInput": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "accountId"
        ]
      },
      "CallsNumbersOutput": {
        "type": "object",
        "properties": {
          "numbers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "number": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "number"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "numbers"
        ],
        "additionalProperties": false
      },
      "DialerCampaignsInput": {
        "type": "object",
        "properties": {}
      },
      "DialerCampaignsOutput": {
        "type": "object",
        "properties": {
          "campaigns": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "telnyxAccountId": {
                  "type": "string"
                },
                "fromNumber": {
                  "type": "string"
                },
                "lines": {
                  "type": "number",
                  "enum": [
                    1,
                    2,
                    3,
                    5
                  ]
                },
                "ringTimeoutSec": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "wrapUpSec": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "amd": {
                  "type": "string",
                  "enum": [
                    "off",
                    "detect",
                    "premium"
                  ]
                },
                "voicemailAction": {
                  "type": "string",
                  "enum": [
                    "hangup",
                    "drop_message"
                  ]
                },
                "hoursStart": {
                  "type": "string"
                },
                "hoursEnd": {
                  "type": "string"
                },
                "timezone": {
                  "type": "string"
                },
                "maxAttempts": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "retryAfterMin": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "active",
                    "paused",
                    "archived"
                  ]
                },
                "counts": {
                  "type": "object",
                  "properties": {
                    "pending": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "done": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "dnc": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "pending",
                    "done",
                    "dnc"
                  ],
                  "additionalProperties": false
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "human",
                    "ai"
                  ]
                },
                "aiMarketing": {
                  "type": "boolean"
                },
                "maxCallsPerDay": {
                  "nullable": true,
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "aiSettings": {
                  "nullable": true,
                  "type": "object",
                  "properties": {
                    "businessName": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "callbackNumber": {
                      "nullable": true,
                      "type": "string"
                    },
                    "transferTo": {
                      "nullable": true,
                      "type": "string"
                    }
                  },
                  "required": [
                    "businessName",
                    "reason",
                    "callbackNumber"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "id",
                "name",
                "telnyxAccountId",
                "fromNumber",
                "lines",
                "ringTimeoutSec",
                "wrapUpSec",
                "amd",
                "voicemailAction",
                "hoursStart",
                "hoursEnd",
                "timezone",
                "maxAttempts",
                "retryAfterMin",
                "status",
                "counts",
                "mode",
                "aiMarketing",
                "maxCallsPerDay",
                "aiSettings"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "campaigns"
        ],
        "additionalProperties": false
      },
      "DialerSaveCampaignInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "accountId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "telnyxAccountId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "fromNumber": {
            "type": "string",
            "pattern": "^\\+[1-9]\\d{6,14}$"
          },
          "lines": {
            "type": "number",
            "enum": [
              1,
              2,
              3,
              5
            ]
          },
          "ringTimeoutSec": {
            "type": "integer",
            "minimum": 5,
            "maximum": 120
          },
          "wrapUpSec": {
            "type": "integer",
            "minimum": 0,
            "maximum": 300
          },
          "amd": {
            "type": "string",
            "enum": [
              "off",
              "detect",
              "premium"
            ]
          },
          "voicemailAction": {
            "type": "string",
            "enum": [
              "hangup",
              "drop_message"
            ]
          },
          "hoursStart": {
            "type": "string",
            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
          },
          "hoursEnd": {
            "type": "string",
            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
          },
          "timezone": {
            "type": "string"
          },
          "maxAttempts": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20
          },
          "retryAfterMin": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10080
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused"
            ]
          },
          "mode": {
            "type": "string",
            "enum": [
              "human",
              "ai"
            ]
          },
          "aiMarketing": {
            "type": "boolean"
          },
          "maxCallsPerDay": {
            "nullable": true,
            "type": "integer",
            "minimum": 1,
            "maximum": 500
          },
          "aiSettings": {
            "type": "object",
            "properties": {
              "businessName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "reason": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              },
              "callbackNumber": {
                "nullable": true,
                "type": "string",
                "pattern": "^\\+[1-9]\\d{6,14}$"
              },
              "transferTo": {
                "nullable": true,
                "type": "string",
                "pattern": "^\\+[1-9]\\d{6,14}$"
              }
            },
            "required": [
              "businessName",
              "reason"
            ]
          }
        },
        "required": [
          "name",
          "fromNumber",
          "lines",
          "ringTimeoutSec",
          "wrapUpSec",
          "amd",
          "voicemailAction",
          "hoursStart",
          "hoursEnd",
          "timezone",
          "maxAttempts",
          "retryAfterMin"
        ]
      },
      "DialerSaveCampaignOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "telnyxAccountId": {
            "type": "string"
          },
          "fromNumber": {
            "type": "string"
          },
          "lines": {
            "type": "number",
            "enum": [
              1,
              2,
              3,
              5
            ]
          },
          "ringTimeoutSec": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "wrapUpSec": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "amd": {
            "type": "string",
            "enum": [
              "off",
              "detect",
              "premium"
            ]
          },
          "voicemailAction": {
            "type": "string",
            "enum": [
              "hangup",
              "drop_message"
            ]
          },
          "hoursStart": {
            "type": "string"
          },
          "hoursEnd": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "maxAttempts": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "retryAfterMin": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused",
              "archived"
            ]
          },
          "counts": {
            "type": "object",
            "properties": {
              "pending": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "done": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "dnc": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "pending",
              "done",
              "dnc"
            ],
            "additionalProperties": false
          },
          "mode": {
            "type": "string",
            "enum": [
              "human",
              "ai"
            ]
          },
          "aiMarketing": {
            "type": "boolean"
          },
          "maxCallsPerDay": {
            "nullable": true,
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "aiSettings": {
            "nullable": true,
            "type": "object",
            "properties": {
              "businessName": {
                "type": "string"
              },
              "reason": {
                "type": "string"
              },
              "callbackNumber": {
                "nullable": true,
                "type": "string"
              },
              "transferTo": {
                "nullable": true,
                "type": "string"
              }
            },
            "required": [
              "businessName",
              "reason",
              "callbackNumber"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "name",
          "telnyxAccountId",
          "fromNumber",
          "lines",
          "ringTimeoutSec",
          "wrapUpSec",
          "amd",
          "voicemailAction",
          "hoursStart",
          "hoursEnd",
          "timezone",
          "maxAttempts",
          "retryAfterMin",
          "status",
          "counts",
          "mode",
          "aiMarketing",
          "maxCallsPerDay",
          "aiSettings"
        ],
        "additionalProperties": false
      },
      "DialerImportContactsInput": {
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "csv": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000000
          },
          "rows": {
            "minItems": 1,
            "maxItems": 5000,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "nullable": true,
                  "type": "string",
                  "maxLength": 200
                },
                "phone": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 40
                },
                "timezone": {
                  "nullable": true,
                  "type": "string",
                  "maxLength": 64
                },
                "aiConsent": {
                  "nullable": true,
                  "type": "string",
                  "enum": [
                    "none",
                    "express",
                    "written"
                  ]
                },
                "consentSource": {
                  "nullable": true,
                  "type": "string",
                  "maxLength": 200
                },
                "consentText": {
                  "nullable": true,
                  "type": "string",
                  "maxLength": 2000
                },
                "consentAt": {
                  "nullable": true,
                  "type": "string",
                  "maxLength": 40
                }
              },
              "required": [
                "phone"
              ]
            }
          }
        },
        "required": [
          "campaignId"
        ]
      },
      "DialerImportContactsOutput": {
        "type": "object",
        "properties": {
          "added": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "duplicates": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "dnc": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "invalid": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "consentRejected": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "added",
          "duplicates",
          "dnc",
          "invalid",
          "consentRejected"
        ],
        "additionalProperties": false
      },
      "DialerAddDncInput": {
        "type": "object",
        "properties": {
          "phone": {
            "type": "string",
            "minLength": 1,
            "maxLength": 40
          }
        },
        "required": [
          "phone"
        ]
      },
      "DialerAddDncOutput": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        },
        "required": [
          "ok"
        ],
        "additionalProperties": false
      },
      "DialerSetConsentInput": {
        "type": "object",
        "properties": {
          "contactId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "level": {
            "type": "string",
            "enum": [
              "none",
              "express",
              "written"
            ]
          },
          "source": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "text": {
            "nullable": true,
            "type": "string",
            "maxLength": 2000
          }
        },
        "required": [
          "contactId",
          "level",
          "source"
        ]
      },
      "DialerSetConsentOutput": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        },
        "required": [
          "ok"
        ],
        "additionalProperties": false
      },
      "CallsLogInput": {
        "type": "object",
        "properties": {
          "since": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "direction": {
            "type": "string",
            "enum": [
              "inbound",
              "outbound"
            ]
          }
        }
      },
      "CallsLogOutput": {
        "type": "object",
        "properties": {
          "calls": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "direction": {
                  "type": "string",
                  "enum": [
                    "inbound",
                    "outbound"
                  ]
                },
                "campaignId": {
                  "nullable": true,
                  "type": "string"
                },
                "contactId": {
                  "nullable": true,
                  "type": "string"
                },
                "contactName": {
                  "nullable": true,
                  "type": "string"
                },
                "phone": {
                  "nullable": true,
                  "type": "string"
                },
                "startedAt": {
                  "type": "string"
                },
                "endedAt": {
                  "nullable": true,
                  "type": "string"
                },
                "outcome": {
                  "nullable": true,
                  "type": "string"
                },
                "consent": {
                  "nullable": true,
                  "type": "string",
                  "enum": [
                    "yes",
                    "no"
                  ]
                },
                "transferred": {
                  "type": "boolean"
                },
                "optedOut": {
                  "type": "boolean"
                },
                "summary": {
                  "nullable": true,
                  "type": "string"
                }
              },
              "required": [
                "id",
                "direction",
                "campaignId",
                "contactId",
                "contactName",
                "phone",
                "startedAt",
                "endedAt",
                "outcome",
                "consent",
                "transferred",
                "optedOut",
                "summary"
              ],
              "additionalProperties": false
            }
          },
          "nextCursor": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "calls",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "VoiceSettingsGetInput": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "accountId"
        ]
      },
      "VoiceSettingsGetOutput": {
        "type": "object",
        "properties": {
          "settings": {
            "nullable": true,
            "type": "object",
            "properties": {
              "accountId": {
                "type": "string"
              },
              "enabled": {
                "type": "boolean"
              },
              "inboundNumber": {
                "nullable": true,
                "type": "string"
              },
              "transferTo": {
                "nullable": true,
                "type": "string"
              },
              "hoursStart": {
                "type": "string"
              },
              "hoursEnd": {
                "type": "string"
              },
              "timezone": {
                "type": "string"
              },
              "greeting": {
                "nullable": true,
                "type": "string"
              },
              "instructions": {
                "nullable": true,
                "type": "string"
              },
              "assistantReady": {
                "type": "boolean"
              },
              "routingWarning": {
                "type": "string"
              }
            },
            "required": [
              "accountId",
              "enabled",
              "inboundNumber",
              "transferTo",
              "hoursStart",
              "hoursEnd",
              "timezone",
              "greeting",
              "instructions",
              "assistantReady"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "settings"
        ],
        "additionalProperties": false
      },
      "VoiceSettingsSaveInput": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "enabled": {
            "type": "boolean"
          },
          "inboundNumber": {
            "nullable": true,
            "type": "string",
            "pattern": "^\\+[1-9]\\d{6,14}$"
          },
          "transferTo": {
            "nullable": true,
            "type": "string",
            "pattern": "^\\+[1-9]\\d{6,14}$"
          },
          "hoursStart": {
            "type": "string",
            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
          },
          "hoursEnd": {
            "type": "string",
            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
          },
          "timezone": {
            "type": "string"
          },
          "greeting": {
            "nullable": true,
            "type": "string",
            "maxLength": 500
          },
          "instructions": {
            "nullable": true,
            "type": "string",
            "maxLength": 4000
          }
        },
        "required": [
          "accountId",
          "enabled",
          "inboundNumber",
          "transferTo",
          "hoursStart",
          "hoursEnd",
          "timezone",
          "greeting",
          "instructions"
        ]
      },
      "VoiceSettingsSaveOutput": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "inboundNumber": {
            "nullable": true,
            "type": "string"
          },
          "transferTo": {
            "nullable": true,
            "type": "string"
          },
          "hoursStart": {
            "type": "string"
          },
          "hoursEnd": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "greeting": {
            "nullable": true,
            "type": "string"
          },
          "instructions": {
            "nullable": true,
            "type": "string"
          },
          "assistantReady": {
            "type": "boolean"
          },
          "routingWarning": {
            "type": "string"
          }
        },
        "required": [
          "accountId",
          "enabled",
          "inboundNumber",
          "transferTo",
          "hoursStart",
          "hoursEnd",
          "timezone",
          "greeting",
          "instructions",
          "assistantReady"
        ],
        "additionalProperties": false
      },
      "ToolError": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "invalid_input",
                  "not_found",
                  "not_supported",
                  "payment_required",
                  "provider_auth",
                  "provider_permission",
                  "rate_limited",
                  "provider_error",
                  "transient",
                  "unauthorized"
                ]
              },
              "message": {
                "type": "string"
              }
            },
            "additionalProperties": true
          }
        }
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Missing or invalid API key",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "unauthorized",
                "message": "Invalid or missing API key"
              }
            }
          }
        }
      },
      "NotFound": {
        "description": "Resource not found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "not_found",
                "message": "Resource not found"
              }
            }
          }
        }
      },
      "RateLimited": {
        "description": "Rate limit exceeded (60 req/min)",
        "content": {
          "application/json": {
            "example": {
              "error": "rate_limit_exceeded"
            }
          }
        }
      },
      "BadRequest": {
        "description": "Bad request - missing or invalid parameter",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  },
  "paths": {
    "/connect/accounts": {
      "post": {
        "operationId": "connectAccount",
        "summary": "Create a connect link",
        "description": "Create a single-use link for a customer's client to connect one of their social or Google Business accounts.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ConnectAccountOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectAccountInput"
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listAccounts",
        "summary": "List connected accounts",
        "description": "List every account connected so far, any pending connect invites, and the current billing position.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ListAccountsOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        }
      }
    },
    "/connect/accounts/{accountId}/posts": {
      "post": {
        "operationId": "createPost",
        "summary": "Publish a post",
        "description": "Publish a post (text, and optionally an image or a link) to a connected account.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreatePostOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Path parameters take precedence; a copy in the body is ignored.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePostInput"
              }
            }
          }
        }
      }
    },
    "/connect/accounts/{accountId}/reviews": {
      "get": {
        "operationId": "listReviews",
        "summary": "List reviews",
        "description": "List reviews left on a connected account, newest information first.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ListReviewsOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        }
      }
    },
    "/connect/accounts/{accountId}/reviews/{reviewId}/reply": {
      "post": {
        "operationId": "replyReview",
        "summary": "Reply to a review",
        "description": "Post a reply to one review on a connected account.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "reviewId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ReplyReviewOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Path parameters take precedence; a copy in the body is ignored.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplyReviewInput"
              }
            }
          }
        }
      }
    },
    "/connect/accounts/{accountId}/insights": {
      "get": {
        "operationId": "getInsights",
        "summary": "Get insights",
        "description": "Get performance metrics for a connected account over a recent date range.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "range",
            "in": "query",
            "required": false,
            "schema": {
              "default": "28d",
              "type": "string",
              "enum": [
                "7d",
                "28d",
                "90d"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/GetInsightsOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        }
      }
    },
    "/connect/accounts/{accountId}/inbox": {
      "get": {
        "operationId": "inboxList",
        "summary": "List inbox items",
        "description": "List everything that has come in on a connected account — reviews and comments — newest first.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "review",
                "comment"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/InboxListOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        }
      }
    },
    "/connect/accounts/{accountId}/inbox/{itemId}/reply": {
      "post": {
        "operationId": "inboxReply",
        "summary": "Reply to an inbox item",
        "description": "Post a reply to one inbox item (a review or a comment) on a connected account.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/InboxReplyOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Path parameters take precedence; a copy in the body is ignored.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InboxReplyInput"
              }
            }
          }
        }
      }
    },
    "/connect/accounts/{accountId}/calendar": {
      "get": {
        "operationId": "calendarUpcoming",
        "summary": "List upcoming calendar events",
        "description": "List the owner's next events on a connected calendar, soonest first.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CalendarUpcomingOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        }
      }
    },
    "/connect/accounts/{accountId}/calendar/slots": {
      "get": {
        "operationId": "calendarSlots",
        "summary": "Find open calendar slots",
        "description": "Find open booking slots on a connected calendar over the next few days.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CalendarSlotsOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        }
      }
    },
    "/connect/accounts/{accountId}/calendar/book": {
      "post": {
        "operationId": "calendarBook",
        "summary": "Book a calendar appointment",
        "description": "Book a new appointment on the owner's real calendar. This changes their calendar.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CalendarBookOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Path parameters take precedence; a copy in the body is ignored.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalendarBookInput"
              }
            }
          }
        }
      }
    },
    "/connect/accounts/{accountId}/calendar/{eventId}/move": {
      "post": {
        "operationId": "calendarMove",
        "summary": "Move a calendar appointment",
        "description": "Reschedule an existing appointment on the owner's real calendar. This changes their calendar.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CalendarMoveOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Path parameters take precedence; a copy in the body is ignored.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalendarMoveInput"
              }
            }
          }
        }
      }
    },
    "/connect/accounts/{accountId}/calendar/{eventId}/cancel": {
      "post": {
        "operationId": "calendarCancel",
        "summary": "Cancel a calendar appointment",
        "description": "Cancel an existing appointment on the owner's real calendar. This changes their calendar.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CalendarCancelOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Path parameters take precedence; a copy in the body is ignored.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalendarCancelInput"
              }
            }
          }
        }
      }
    },
    "/connect/accounts/{accountId}/customers": {
      "get": {
        "operationId": "customersList",
        "summary": "List customers",
        "description": "List the owner's contacts on a connected customer list.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CustomersListOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        }
      }
    },
    "/connect/accounts/{accountId}/customers/find": {
      "get": {
        "operationId": "customersFind",
        "summary": "Find a customer",
        "description": "Find one contact on a connected customer list by name, email, or phone.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CustomersFindOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        }
      }
    },
    "/connect/agents/catalog": {
      "get": {
        "operationId": "agentsCatalog",
        "summary": "List agent templates",
        "description": "List the agent templates available to deploy.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AgentsCatalogOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        }
      }
    },
    "/connect/agents": {
      "get": {
        "operationId": "agentsList",
        "summary": "List agent deployments",
        "description": "List the agents already deployed for this organization.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AgentsListOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "agentsDeploy",
        "summary": "Deploy an agent",
        "description": "Deploy an agent template onto a connected runtime project. Deploying creates an API key for this agent; that key lets it reply and post on your connected accounts.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AgentsDeployOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentsDeployInput"
              }
            }
          }
        }
      }
    },
    "/connect/agents/targets/{runtimeAccountId}": {
      "get": {
        "operationId": "agentsTargets",
        "summary": "List agent deploy targets",
        "description": "List the projects an agent can be deployed onto for a connected runtime account.",
        "parameters": [
          {
            "name": "runtimeAccountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AgentsTargetsOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        }
      }
    },
    "/connect/agents/{deploymentId}": {
      "get": {
        "operationId": "agentsStatus",
        "summary": "Get agent deployment status",
        "description": "Get the current status of one agent deployment.",
        "parameters": [
          {
            "name": "deploymentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AgentsStatusOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "agentsRemove",
        "summary": "Remove an agent deployment",
        "description": "Tear down an agent deployment and revoke its API key.",
        "parameters": [
          {
            "name": "deploymentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AgentsRemoveOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        }
      }
    },
    "/connect/calls/numbers/{accountId}": {
      "get": {
        "operationId": "callsNumbers",
        "summary": "List phone numbers",
        "description": "List the active phone numbers on a connected phone account — the caller ids a dialer campaign can use.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CallsNumbersOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        }
      }
    },
    "/connect/calls/campaigns": {
      "get": {
        "operationId": "dialerCampaigns",
        "summary": "List dialer campaigns",
        "description": "List this organization's dialer campaigns with their settings and how many contacts are pending, done, or on the do-not-call list.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DialerCampaignsOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "dialerSaveCampaign",
        "summary": "Save a dialer campaign",
        "description": "Create a dialer campaign, or update one by id: caller id, lines per agent (1, 2, 3 or 5), ring timeout, wrap-up pause, calling hours and time zone, and retry rules. mode \"human\" (the default) is dialed only by a person on the dialer screen. mode \"ai\" is dialed only by our automated caller, only to contacts with recorded consent, within calling hours and the required daily limit (maxCallsPerDay, 1 to 500); it needs aiSettings with the business name and the reason for the call. A field left out keeps its saved value.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DialerSaveCampaignOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DialerSaveCampaignInput"
              }
            }
          }
        }
      }
    },
    "/connect/calls/campaigns/{campaignId}/contacts": {
      "post": {
        "operationId": "dialerImportContacts",
        "summary": "Import dialer contacts",
        "description": "Add contacts to a dialer campaign, either as CSV text (name, phone, optional timezone, ai_consent, consent_source, consent_text, consent_at columns) or as rows. A row's consent to automated calls (aiConsent express or written) needs a consentSource and, when given, a past consentAt; a row that claims consent without them is imported with no consent and counted in consentRejected. Numbers on the do-not-call list, duplicates and invalid numbers are skipped and counted.",
        "parameters": [
          {
            "name": "campaignId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DialerImportContactsOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Path parameters take precedence; a copy in the body is ignored.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DialerImportContactsInput"
              }
            }
          }
        }
      }
    },
    "/connect/calls/dnc": {
      "post": {
        "operationId": "dialerAddDnc",
        "summary": "Add a number to do-not-call",
        "description": "Add a phone number to this organization's do-not-call list. It is never dialed again from any campaign.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DialerAddDncOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DialerAddDncInput"
              }
            }
          }
        }
      }
    },
    "/connect/calls/contacts/{contactId}/consent": {
      "post": {
        "operationId": "dialerSetConsent",
        "summary": "Record a contact's consent",
        "description": "Record whether a dialer contact agreed to automated calls (none, express or written), with where that consent came from and, optionally, its wording. Only a contact with express or written consent can be called by an AI campaign.",
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DialerSetConsentOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Path parameters take precedence; a copy in the body is ignored.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DialerSetConsentInput"
              }
            }
          }
        }
      }
    },
    "/connect/calls/log": {
      "get": {
        "operationId": "callsLog",
        "summary": "List handled calls",
        "description": "List the calls our assistant handled on this organization's phone accounts: inbound calls it answered and outbound AI campaign calls, with the other party's number, the contact, the outcome (outbound only), consent, transfer, opt-out and summary. To poll: Start with an ISO `since` (e.g. now) and pass back `nextCursor`; each call then arrives exactly once, oldest end first, only after it ENDED and has been over for five minutes, so its outcome is final. nextCursor is the position of the last call returned (\"<endedAt ISO>|<id>\"), or null when nothing new arrived: keep your previous cursor then. At most limit calls per page (default 50, max 200). For a one-off look, without `since` you get a newest-first snapshot and calls may repeat between snapshots; it includes calls still in progress. The summary may arrive a few minutes after the call ends; poll again, with a snapshot or a since before that call's end, to pick it up.",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "inbound",
                "outbound"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CallsLogOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        }
      }
    },
    "/connect/calls/voice/{accountId}": {
      "get": {
        "operationId": "voiceSettingsGet",
        "summary": "Get receptionist settings",
        "description": "Get the AI receptionist settings for a connected phone account: whether it answers, the number it answers, the transfer number, business hours, greeting and instructions. settings is null when it was never set up.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VoiceSettingsGetOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "voiceSettingsSave",
        "summary": "Save receptionist settings",
        "description": "Save the AI receptionist settings for a connected phone account. Enabling it routes the chosen number to the receptionist; disabling it routes the number back to where it rang before. routingWarning is set when a number could not be routed back and needs fixing on the phone account.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VoiceSettingsSaveOutput"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "summary"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or missing API key"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          },
          "502": {
            "description": "Provider error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Path parameters take precedence; a copy in the body is ignored.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoiceSettingsSaveInput"
              }
            }
          }
        }
      }
    }
  }
}
