{
  "components": {
    "schemas": {
      "AIConfigSummary": {
        "description": "One saved AI enrichment config attached to (or global for) a list.\n\n`group_id` is the handle the worker uses to load the prompt, model and\noutput mapping. `usecase` lets the client predict credit cost via\nenrichment.constants.AI_USECASE_CREDITS (e.g. web-research = 3 credits/record).",
        "properties": {
          "group_id": {
            "title": "Group Id",
            "type": "string"
          },
          "is_active": {
            "default": true,
            "title": "Is Active",
            "type": "boolean"
          },
          "is_global": {
            "default": false,
            "title": "Is Global",
            "type": "boolean"
          },
          "list_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "List Id"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "usecase": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Use-case identifier (e.g. \"web-research\", \"content-generation\").",
            "title": "Usecase"
          }
        },
        "required": [
          "group_id",
          "name"
        ],
        "title": "AIConfigSummary",
        "type": "object"
      },
      "AIConfigsResponse": {
        "description": "Paginated (by list_id filter) collection of AI enrichment configs.",
        "properties": {
          "configs": {
            "items": {
              "$ref": "#/components/schemas/AIConfigSummary"
            },
            "title": "Configs",
            "type": "array"
          },
          "count": {
            "default": 0,
            "title": "Count",
            "type": "integer"
          },
          "list_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "List Id"
          }
        },
        "title": "AIConfigsResponse",
        "type": "object"
      },
      "AddContactsToListRequest": {
        "description": "Request body for adding contacts to a list.",
        "properties": {
          "contact_ids": {
            "description": "List of contact IDs to add",
            "items": {
              "type": "integer"
            },
            "title": "Contact Ids",
            "type": "array"
          }
        },
        "required": [
          "contact_ids"
        ],
        "title": "AddContactsToListRequest",
        "type": "object"
      },
      "AddGuestsRequest": {
        "properties": {
          "guests": {
            "items": {
              "type": "string"
            },
            "title": "Guests",
            "type": "array"
          }
        },
        "required": [
          "guests"
        ],
        "title": "AddGuestsRequest",
        "type": "object"
      },
      "AddNoteRequest": {
        "properties": {
          "text": {
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "text"
        ],
        "title": "AddNoteRequest",
        "type": "object"
      },
      "AddSequenceContactsRequest": {
        "properties": {
          "contact_ids": {
            "description": "Contact IDs to add to the sequence",
            "items": {
              "type": "integer"
            },
            "title": "Contact Ids",
            "type": "array"
          },
          "list_id": {
            "description": "List ID the contacts belong to",
            "title": "List Id",
            "type": "integer"
          }
        },
        "required": [
          "contact_ids",
          "list_id"
        ],
        "title": "AddSequenceContactsRequest",
        "type": "object"
      },
      "AnalyzeGapsRequest": {
        "properties": {
          "lenses": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lenses"
          }
        },
        "title": "AnalyzeGapsRequest",
        "type": "object"
      },
      "ApiResponse_AIConfigsResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AIConfigsResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[AIConfigsResponse]",
        "type": "object"
      },
      "ApiResponse_ApplyResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ApplyResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[ApplyResponse]",
        "type": "object"
      },
      "ApiResponse_AudienceSyncConfigResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AudienceSyncConfigResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[AudienceSyncConfigResponse]",
        "type": "object"
      },
      "ApiResponse_BatchAssertResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/BatchAssertResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[BatchAssertResponse]",
        "type": "object"
      },
      "ApiResponse_CallGradingResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CallGradingResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[CallGradingResponse]",
        "type": "object"
      },
      "ApiResponse_CallTranscriptResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CallTranscriptResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[CallTranscriptResponse]",
        "type": "object"
      },
      "ApiResponse_CallsListResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CallsListResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[CallsListResponse]",
        "type": "object"
      },
      "ApiResponse_CampaignVisitorsReport_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CampaignVisitorsReport"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[CampaignVisitorsReport]",
        "type": "object"
      },
      "ApiResponse_ClickhouseMashupResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ClickhouseMashupResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[ClickhouseMashupResponse]",
        "type": "object"
      },
      "ApiResponse_ClickhouseOrgAnalyticsResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ClickhouseOrgAnalyticsResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[ClickhouseOrgAnalyticsResponse]",
        "type": "object"
      },
      "ApiResponse_CompanyAssertResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CompanyAssertResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[CompanyAssertResponse]",
        "type": "object"
      },
      "ApiResponse_CompanyCreateResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CompanyCreateResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[CompanyCreateResponse]",
        "type": "object"
      },
      "ApiResponse_CompanyResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CompanyResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[CompanyResponse]",
        "type": "object"
      },
      "ApiResponse_ContactAssertResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ContactAssertResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[ContactAssertResponse]",
        "type": "object"
      },
      "ApiResponse_ContactCreateResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ContactCreateResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[ContactCreateResponse]",
        "type": "object"
      },
      "ApiResponse_ContactResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ContactResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[ContactResponse]",
        "type": "object"
      },
      "ApiResponse_ContactSupportResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ContactSupportResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[ContactSupportResponse]",
        "type": "object"
      },
      "ApiResponse_CreateCompanyColumnResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CreateCompanyColumnResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[CreateCompanyColumnResponse]",
        "type": "object"
      },
      "ApiResponse_CreateContactColumnResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CreateContactColumnResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[CreateContactColumnResponse]",
        "type": "object"
      },
      "ApiResponse_CreateDefaultWaterfallConfigResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CreateDefaultWaterfallConfigResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[CreateDefaultWaterfallConfigResponse]",
        "type": "object"
      },
      "ApiResponse_CreateFieldResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CreateFieldResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[CreateFieldResponse]",
        "type": "object"
      },
      "ApiResponse_CreateFieldsBatchResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CreateFieldsBatchResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[CreateFieldsBatchResponse]",
        "type": "object"
      },
      "ApiResponse_CrmFieldsResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CrmFieldsResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[CrmFieldsResponse]",
        "type": "object"
      },
      "ApiResponse_CrmPushResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CrmPushResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[CrmPushResponse]",
        "type": "object"
      },
      "ApiResponse_CrmStatusResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CrmStatusResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[CrmStatusResponse]",
        "type": "object"
      },
      "ApiResponse_DealAssertResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DealAssertResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[DealAssertResponse]",
        "type": "object"
      },
      "ApiResponse_DealResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DealResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[DealResponse]",
        "type": "object"
      },
      "ApiResponse_DeleteFieldResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DeleteFieldResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[DeleteFieldResponse]",
        "type": "object"
      },
      "ApiResponse_DialerAgentsListResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DialerAgentsListResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[DialerAgentsListResponse]",
        "type": "object"
      },
      "ApiResponse_DialerNumbersListResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DialerNumbersListResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[DialerNumbersListResponse]",
        "type": "object"
      },
      "ApiResponse_DialerSessionCreateResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DialerSessionCreateResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[DialerSessionCreateResponse]",
        "type": "object"
      },
      "ApiResponse_DialerSessionResumeResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DialerSessionResumeResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[DialerSessionResumeResponse]",
        "type": "object"
      },
      "ApiResponse_DialerSessionStatusUpdateResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DialerSessionStatusUpdateResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[DialerSessionStatusUpdateResponse]",
        "type": "object"
      },
      "ApiResponse_DialerSessionsListResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DialerSessionsListResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[DialerSessionsListResponse]",
        "type": "object"
      },
      "ApiResponse_DialerStatsResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DialerStatsResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[DialerStatsResponse]",
        "type": "object"
      },
      "ApiResponse_DraftResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DraftResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[DraftResponse]",
        "type": "object"
      },
      "ApiResponse_EnrichJobResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/EnrichJobResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[EnrichJobResponse]",
        "type": "object"
      },
      "ApiResponse_GenerateSpintaxResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/GenerateSpintaxResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[GenerateSpintaxResponse]",
        "type": "object"
      },
      "ApiResponse_GetFieldValueResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/GetFieldValueResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[GetFieldValueResponse]",
        "type": "object"
      },
      "ApiResponse_HotContactsResult_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/HotContactsResult"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[HotContactsResult]",
        "type": "object"
      },
      "ApiResponse_InboxThreadResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/InboxThreadResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[InboxThreadResponse]",
        "type": "object"
      },
      "ApiResponse_IntentSignalsResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/IntentSignalsResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[IntentSignalsResponse]",
        "type": "object"
      },
      "ApiResponse_IssueAnalyticsKpis_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/IssueAnalyticsKpis"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[IssueAnalyticsKpis]",
        "type": "object"
      },
      "ApiResponse_IssueDetail_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/IssueDetail"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[IssueDetail]",
        "type": "object"
      },
      "ApiResponse_KeywordCreateFromDomainResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/KeywordCreateFromDomainResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[KeywordCreateFromDomainResponse]",
        "type": "object"
      },
      "ApiResponse_KeywordsCreateFromSearchResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/KeywordsCreateFromSearchResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[KeywordsCreateFromSearchResponse]",
        "type": "object"
      },
      "ApiResponse_ListCreateResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ListCreateResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[ListCreateResponse]",
        "type": "object"
      },
      "ApiResponse_ListResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ListResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[ListResponse]",
        "type": "object"
      },
      "ApiResponse_LookupResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/LookupResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[LookupResponse]",
        "type": "object"
      },
      "ApiResponse_MarketplaceConnectStatusResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MarketplaceConnectStatusResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[MarketplaceConnectStatusResponse]",
        "type": "object"
      },
      "ApiResponse_MarketplaceHiringsResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MarketplaceHiringsResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[MarketplaceHiringsResponse]",
        "type": "object"
      },
      "ApiResponse_MarketplaceInvoicesResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MarketplaceInvoicesResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[MarketplaceInvoicesResponse]",
        "type": "object"
      },
      "ApiResponse_MarketplaceMeetingDetail_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MarketplaceMeetingDetail"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[MarketplaceMeetingDetail]",
        "type": "object"
      },
      "ApiResponse_MarketplaceMeetingsResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MarketplaceMeetingsResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[MarketplaceMeetingsResponse]",
        "type": "object"
      },
      "ApiResponse_MarketplaceOffersResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MarketplaceOffersResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[MarketplaceOffersResponse]",
        "type": "object"
      },
      "ApiResponse_MarketplacePayoutAccountResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MarketplacePayoutAccountResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[MarketplacePayoutAccountResponse]",
        "type": "object"
      },
      "ApiResponse_MarketplaceProfileResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MarketplaceProfileResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[MarketplaceProfileResponse]",
        "type": "object"
      },
      "ApiResponse_McpConnectionStatus_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/McpConnectionStatus"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[McpConnectionStatus]",
        "type": "object"
      },
      "ApiResponse_MeetingDetail_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MeetingDetail"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[MeetingDetail]",
        "type": "object"
      },
      "ApiResponse_MeetingsBookedResult_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MeetingsBookedResult"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[MeetingsBookedResult]",
        "type": "object"
      },
      "ApiResponse_MissedCallbacksResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MissedCallbacksResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[MissedCallbacksResponse]",
        "type": "object"
      },
      "ApiResponse_NewsletterDetail_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/NewsletterDetail"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[NewsletterDetail]",
        "type": "object"
      },
      "ApiResponse_NoteResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/NoteResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[NoteResponse]",
        "type": "object"
      },
      "ApiResponse_OpenSearchAggregateResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/OpenSearchAggregateResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[OpenSearchAggregateResponse]",
        "type": "object"
      },
      "ApiResponse_OpenSearchCountResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/OpenSearchCountResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[OpenSearchCountResponse]",
        "type": "object"
      },
      "ApiResponse_OpenSearchResolveResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/OpenSearchResolveResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[OpenSearchResolveResponse]",
        "type": "object"
      },
      "ApiResponse_OpenSearchSearchResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/OpenSearchSearchResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[OpenSearchSearchResponse]",
        "type": "object"
      },
      "ApiResponse_PagesByDomainResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PagesByDomainResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[PagesByDomainResponse]",
        "type": "object"
      },
      "ApiResponse_PagesSearchResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PagesSearchResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[PagesSearchResponse]",
        "type": "object"
      },
      "ApiResponse_PatchSetResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PatchSetResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[PatchSetResponse]",
        "type": "object"
      },
      "ApiResponse_PipelineResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PipelineResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[PipelineResponse]",
        "type": "object"
      },
      "ApiResponse_PipelineStageResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PipelineStageResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[PipelineStageResponse]",
        "type": "object"
      },
      "ApiResponse_ProviderCatalogResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ProviderCatalogResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[ProviderCatalogResponse]",
        "type": "object"
      },
      "ApiResponse_PublicCopilotResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PublicCopilotResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[PublicCopilotResponse]",
        "type": "object"
      },
      "ApiResponse_PublicEnrichResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PublicEnrichResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[PublicEnrichResponse]",
        "type": "object"
      },
      "ApiResponse_QuotableProductsResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/QuotableProductsResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[QuotableProductsResponse]",
        "type": "object"
      },
      "ApiResponse_QuoteDetail_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/QuoteDetail"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[QuoteDetail]",
        "type": "object"
      },
      "ApiResponse_QuoteListResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/QuoteListResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[QuoteListResponse]",
        "type": "object"
      },
      "ApiResponse_QuoteSettingsResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/QuoteSettingsResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[QuoteSettingsResponse]",
        "type": "object"
      },
      "ApiResponse_RepoResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/RepoResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[RepoResponse]",
        "type": "object"
      },
      "ApiResponse_ScanResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ScanResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[ScanResponse]",
        "type": "object"
      },
      "ApiResponse_SearchSaveResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SearchSaveResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[SearchSaveResponse]",
        "type": "object"
      },
      "ApiResponse_SendResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SendResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[SendResponse]",
        "type": "object"
      },
      "ApiResponse_SequenceActionResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SequenceActionResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[SequenceActionResponse]",
        "type": "object"
      },
      "ApiResponse_SequenceAnalyticsResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SequenceAnalyticsResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[SequenceAnalyticsResponse]",
        "type": "object"
      },
      "ApiResponse_SequenceCreateResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SequenceCreateResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[SequenceCreateResponse]",
        "type": "object"
      },
      "ApiResponse_SequenceDetailResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SequenceDetailResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[SequenceDetailResponse]",
        "type": "object"
      },
      "ApiResponse_SequencePreviewResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SequencePreviewResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[SequencePreviewResponse]",
        "type": "object"
      },
      "ApiResponse_SetFieldValueResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SetFieldValueResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[SetFieldValueResponse]",
        "type": "object"
      },
      "ApiResponse_SetFieldValuesBatchResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SetFieldValuesBatchResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[SetFieldValuesBatchResponse]",
        "type": "object"
      },
      "ApiResponse_SnippetResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SnippetResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[SnippetResponse]",
        "type": "object"
      },
      "ApiResponse_SubscriberListResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SubscriberListResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[SubscriberListResponse]",
        "type": "object"
      },
      "ApiResponse_SubscriberSummary_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SubscriberSummary"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[SubscriberSummary]",
        "type": "object"
      },
      "ApiResponse_TaskResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TaskResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[TaskResponse]",
        "type": "object"
      },
      "ApiResponse_UsageBalanceResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/UsageBalanceResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[UsageBalanceResponse]",
        "type": "object"
      },
      "ApiResponse_VerifyEmailResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/VerifyEmailResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[VerifyEmailResponse]",
        "type": "object"
      },
      "ApiResponse_VisitorCompanyResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/VisitorCompanyResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[VisitorCompanyResponse]",
        "type": "object"
      },
      "ApiResponse_VisitorScoreResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/VisitorScoreResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[VisitorScoreResponse]",
        "type": "object"
      },
      "ApiResponse_WaterfallConfigsResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/WaterfallConfigsResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[WaterfallConfigsResponse]",
        "type": "object"
      },
      "ApiResponse_WebhookResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/WebhookResponse"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[WebhookResponse]",
        "type": "object"
      },
      "ApiResponse_dict_": {
        "properties": {
          "data": {
            "additionalProperties": true,
            "title": "Data",
            "type": "object"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[dict]",
        "type": "object"
      },
      "ApiResponse_dict_str__Any__": {
        "properties": {
          "data": {
            "additionalProperties": true,
            "title": "Data",
            "type": "object"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[dict[str, Any]]",
        "type": "object"
      },
      "ApiResponse_list_": {
        "properties": {
          "data": {
            "items": {},
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list]",
        "type": "object"
      },
      "ApiResponse_list_AudienceSyncConfigResponse__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/AudienceSyncConfigResponse"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[AudienceSyncConfigResponse]]",
        "type": "object"
      },
      "ApiResponse_list_Column__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Column"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[Column]]",
        "type": "object"
      },
      "ApiResponse_list_CompanyContactItem__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/CompanyContactItem"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[CompanyContactItem]]",
        "type": "object"
      },
      "ApiResponse_list_CompanyListItem__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/CompanyListItem"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[CompanyListItem]]",
        "type": "object"
      },
      "ApiResponse_list_ContactDealResponse__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ContactDealResponse"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[ContactDealResponse]]",
        "type": "object"
      },
      "ApiResponse_list_ContactListItem__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ContactListItem"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[ContactListItem]]",
        "type": "object"
      },
      "ApiResponse_list_CrmIntegrationResponse__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/CrmIntegrationResponse"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[CrmIntegrationResponse]]",
        "type": "object"
      },
      "ApiResponse_list_DealResponse__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/DealResponse"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[DealResponse]]",
        "type": "object"
      },
      "ApiResponse_list_FieldResponse__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/FieldResponse"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[FieldResponse]]",
        "type": "object"
      },
      "ApiResponse_list_InboxThreadResponse__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/InboxThreadResponse"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[InboxThreadResponse]]",
        "type": "object"
      },
      "ApiResponse_list_ListResponse__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ListResponse"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[ListResponse]]",
        "type": "object"
      },
      "ApiResponse_list_MeetingSummary__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/MeetingSummary"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[MeetingSummary]]",
        "type": "object"
      },
      "ApiResponse_list_NoteResponse__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/NoteResponse"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[NoteResponse]]",
        "type": "object"
      },
      "ApiResponse_list_PipelineResponse__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/PipelineResponse"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[PipelineResponse]]",
        "type": "object"
      },
      "ApiResponse_list_PipelineStageResponse__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/PipelineStageResponse"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[PipelineStageResponse]]",
        "type": "object"
      },
      "ApiResponse_list_QuoteDetail__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/QuoteDetail"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[QuoteDetail]]",
        "type": "object"
      },
      "ApiResponse_list_RepoResponse__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/RepoResponse"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[RepoResponse]]",
        "type": "object"
      },
      "ApiResponse_list_RequestLogEntry__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/RequestLogEntry"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[RequestLogEntry]]",
        "type": "object"
      },
      "ApiResponse_list_SearchCompanyItem__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/SearchCompanyItem"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[SearchCompanyItem]]",
        "type": "object"
      },
      "ApiResponse_list_SearchContactItem__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/SearchContactItem"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[SearchContactItem]]",
        "type": "object"
      },
      "ApiResponse_list_SequenceContactItem__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/SequenceContactItem"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[SequenceContactItem]]",
        "type": "object"
      },
      "ApiResponse_list_SequenceListItem__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/SequenceListItem"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[SequenceListItem]]",
        "type": "object"
      },
      "ApiResponse_list_StreamInfoResponse__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/StreamInfoResponse"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[StreamInfoResponse]]",
        "type": "object"
      },
      "ApiResponse_list_SyncErrorResponse__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/SyncErrorResponse"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[SyncErrorResponse]]",
        "type": "object"
      },
      "ApiResponse_list_SyncRunResponse__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/SyncRunResponse"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[SyncRunResponse]]",
        "type": "object"
      },
      "ApiResponse_list_TaskResponse__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/TaskResponse"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[TaskResponse]]",
        "type": "object"
      },
      "ApiResponse_list_UsageTransactionResponse__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/UsageTransactionResponse"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[UsageTransactionResponse]]",
        "type": "object"
      },
      "ApiResponse_list_WebhookDeliveryResponse__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/WebhookDeliveryResponse"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[WebhookDeliveryResponse]]",
        "type": "object"
      },
      "ApiResponse_list_WebhookEventResponse__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/WebhookEventResponse"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[WebhookEventResponse]]",
        "type": "object"
      },
      "ApiResponse_list_WebhookResponse__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/WebhookResponse"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[WebhookResponse]]",
        "type": "object"
      },
      "ApiResponse_list_dict__": {
        "properties": {
          "data": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginationMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "ApiResponse[list[dict]]",
        "type": "object"
      },
      "ApplicationPatch": {
        "properties": {
          "hiring_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hiring Id"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          }
        },
        "title": "ApplicationPatch",
        "type": "object"
      },
      "ApplyResponse": {
        "properties": {
          "patch_count": {
            "title": "Patch Count",
            "type": "integer"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status",
          "patch_count"
        ],
        "title": "ApplyResponse",
        "type": "object"
      },
      "ApproveAllRequest": {
        "properties": {
          "lane": {
            "default": "now",
            "title": "Lane",
            "type": "string"
          }
        },
        "title": "ApproveAllRequest",
        "type": "object"
      },
      "ApproveOpportunityRequest": {
        "properties": {
          "content_types": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content Types"
          },
          "kinds": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kinds"
          },
          "seed_context": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SeedContext"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "ApproveOpportunityRequest",
        "type": "object"
      },
      "AssignRequest": {
        "properties": {
          "assignee_email": {
            "description": "Email of the user to assign",
            "title": "Assignee Email",
            "type": "string"
          }
        },
        "required": [
          "assignee_email"
        ],
        "title": "AssignRequest",
        "type": "object"
      },
      "AttendeeInput": {
        "properties": {
          "email": {
            "title": "Email",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "phone_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone Number"
          },
          "time_zone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Time Zone"
          }
        },
        "required": [
          "name",
          "email"
        ],
        "title": "AttendeeInput",
        "type": "object"
      },
      "AudienceSyncConfigResponse": {
        "properties": {
          "audience_id": {
            "title": "Audience Id",
            "type": "integer"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "is_active": {
            "default": true,
            "title": "Is Active",
            "type": "boolean"
          },
          "last_sync_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Sync At"
          },
          "mode": {
            "default": "mirror",
            "title": "Mode",
            "type": "string"
          },
          "platform": {
            "title": "Platform",
            "type": "string"
          },
          "platform_audience_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Platform Audience Name"
          },
          "refresh_cadence_hours": {
            "default": 24,
            "title": "Refresh Cadence Hours",
            "type": "integer"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          }
        },
        "required": [
          "id",
          "audience_id",
          "platform"
        ],
        "title": "AudienceSyncConfigResponse",
        "type": "object"
      },
      "AudienceSyncCreateRequest": {
        "properties": {
          "audience_id": {
            "description": "Audience list ID",
            "exclusiveMinimum": 0.0,
            "title": "Audience Id",
            "type": "integer"
          },
          "mode": {
            "default": "mirror",
            "description": "Sync mode: mirror | append_only",
            "title": "Mode",
            "type": "string"
          },
          "platform": {
            "description": "Ad platform: meta | linkedin | google | x",
            "title": "Platform",
            "type": "string"
          },
          "platform_audience_name": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Platform Audience Name"
          },
          "platform_config": {
            "additionalProperties": true,
            "description": "Platform-specific config (OAuth creds)",
            "title": "Platform Config",
            "type": "object"
          },
          "refresh_cadence_hours": {
            "default": 24,
            "maximum": 720.0,
            "minimum": 0.0,
            "title": "Refresh Cadence Hours",
            "type": "integer"
          },
          "suppression_list_ids": {
            "items": {
              "type": "integer"
            },
            "title": "Suppression List Ids",
            "type": "array"
          }
        },
        "required": [
          "audience_id",
          "platform"
        ],
        "title": "AudienceSyncCreateRequest",
        "type": "object"
      },
      "AudienceSyncUpdateRequest": {
        "properties": {
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active"
          },
          "mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sync mode: mirror | append_only",
            "title": "Mode"
          },
          "refresh_cadence_hours": {
            "anyOf": [
              {
                "maximum": 720.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Refresh Cadence Hours"
          },
          "suppression_list_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suppression List Ids"
          }
        },
        "title": "AudienceSyncUpdateRequest",
        "type": "object"
      },
      "AvailabilityInput": {
        "properties": {
          "days": {
            "items": {
              "type": "integer"
            },
            "title": "Days",
            "type": "array"
          },
          "end_time": {
            "title": "End Time",
            "type": "string"
          },
          "start_time": {
            "title": "Start Time",
            "type": "string"
          }
        },
        "required": [
          "days",
          "start_time",
          "end_time"
        ],
        "title": "AvailabilityInput",
        "type": "object"
      },
      "BatchAssertResponse": {
        "properties": {
          "created": {
            "default": 0,
            "title": "Created",
            "type": "integer"
          },
          "errors": {
            "default": [],
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Errors",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          },
          "updated": {
            "default": 0,
            "title": "Updated",
            "type": "integer"
          }
        },
        "required": [
          "total"
        ],
        "title": "BatchAssertResponse",
        "type": "object"
      },
      "BatchCompanyAssertRequest": {
        "properties": {
          "companies": {
            "description": "Up to 100 companies with domain or linkedin_url",
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "maxItems": 100,
            "title": "Companies",
            "type": "array"
          },
          "list_id": {
            "description": "Target list ID",
            "title": "List Id",
            "type": "integer"
          }
        },
        "required": [
          "list_id",
          "companies"
        ],
        "title": "BatchCompanyAssertRequest",
        "type": "object"
      },
      "BatchContactAssertRequest": {
        "properties": {
          "contacts": {
            "description": "Up to 100 contacts with work_email or linkedin_url",
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "maxItems": 100,
            "title": "Contacts",
            "type": "array"
          },
          "list_id": {
            "description": "Target list ID",
            "title": "List Id",
            "type": "integer"
          }
        },
        "required": [
          "list_id",
          "contacts"
        ],
        "title": "BatchContactAssertRequest",
        "type": "object"
      },
      "BatchFieldItem": {
        "description": "One column in a batch-create request.\n\n`title`, `data_type` and the optional `enrichment` block are per-column;\n`list_id` and `entity` are shared at the parent `CreateFieldsBatchRequest`\nlevel (a batch targets one entity and, when enrichment is used, one list).",
        "properties": {
          "data_type": {
            "default": "text",
            "description": "Column data type. Currently only 'text' is supported.",
            "title": "Data Type",
            "type": "string"
          },
          "enrichment": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CreateFieldEnrichmentInput"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional per-column waterfall enrichment block (identical shape to POST /fields). When supplied, a companion enrichment_configs row is created for that column so it's immediately runnable."
          },
          "title": {
            "description": "Column title, e.g. 'Job Level'",
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "title"
        ],
        "title": "BatchFieldItem",
        "type": "object"
      },
      "BatchFieldResult": {
        "description": "Per-column outcome inside a batch response.",
        "properties": {
          "enrichment": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CreateFieldEnrichmentResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Set when the column was created but its companion enrichment config failed.",
            "title": "Error"
          },
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "ok": {
            "default": true,
            "title": "Ok",
            "type": "boolean"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "title"
        ],
        "title": "BatchFieldResult",
        "type": "object"
      },
      "Body_connect_conferencing_appointments_conferencing_connect__provider__post": {
        "properties": {
          "link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Link"
          }
        },
        "title": "Body_connect_conferencing_appointments_conferencing_connect__provider__post",
        "type": "object"
      },
      "Body_set_provider_link_appointments_conferencing__provider__link_put": {
        "properties": {
          "link": {
            "title": "Link",
            "type": "string"
          }
        },
        "required": [
          "link"
        ],
        "title": "Body_set_provider_link_appointments_conferencing__provider__link_put",
        "type": "object"
      },
      "BookedMeeting": {
        "description": "One booked calendar meeting (non-cancelled, non-private).",
        "properties": {
          "attendees": {
            "default": 0,
            "description": "Attendee count",
            "title": "Attendees",
            "type": "integer"
          },
          "end_time": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "End Time"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "organizer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organizer"
          },
          "start_time": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Time"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "required": [
          "id"
        ],
        "title": "BookedMeeting",
        "type": "object"
      },
      "BulkCompetitorItem": {
        "properties": {
          "domain": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Domain",
            "type": "string"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "scan_config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScanConfigDTO"
              },
              {
                "type": "null"
              }
            ]
          },
          "tier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tier"
          }
        },
        "required": [
          "domain"
        ],
        "title": "BulkCompetitorItem",
        "type": "object"
      },
      "BulkCompetitorsRequest": {
        "properties": {
          "competitors": {
            "items": {
              "$ref": "#/components/schemas/BulkCompetitorItem"
            },
            "maxItems": 20,
            "title": "Competitors",
            "type": "array"
          }
        },
        "title": "BulkCompetitorsRequest",
        "type": "object"
      },
      "CallGradingResponse": {
        "description": "AI grading for a single dialer call.\n\nThe ``status`` field flips to ``\"pending\"`` when the upstream service\nreturns 204 (grading still being computed). In that case ``grading``\nwill be empty and ``reviewed`` will be ``False``. Callers can poll\nuntil ``status == \"ready\"``.",
        "properties": {
          "grading": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Grading"
          },
          "reviewed": {
            "default": false,
            "title": "Reviewed",
            "type": "boolean"
          },
          "reviewed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reviewed At"
          },
          "room_name": {
            "title": "Room Name",
            "type": "string"
          },
          "status": {
            "default": "ready",
            "description": "ready | pending",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "room_name"
        ],
        "title": "CallGradingResponse",
        "type": "object"
      },
      "CallSummaryRow": {
        "description": "Light-weight dialer call summary returned in the dialer-call list.\n\nDeliberately omits the transcript blob - transcripts are 5-50 KB each\nand including them in a list would blow caller context budget. Use\n``has_transcript`` to decide whether a follow-up GET to\n``/voice/dialer/calls/{room_name}/transcript`` is worthwhile.\n\n``contact_id``, ``from_``, and ``to`` are included so client-side\npolling consumers (SDR ingestion pipelines) can filter without an\nextra round-trip for each row.",
        "properties": {
          "call_duration": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Call Duration"
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "created_at": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "disposition": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disposition"
          },
          "from_": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "From"
          },
          "has_transcript": {
            "default": false,
            "title": "Has Transcript",
            "type": "boolean"
          },
          "parallel_session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parallel Session Id"
          },
          "recording_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recording Url"
          },
          "room_name": {
            "title": "Room Name",
            "type": "string"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          },
          "to": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "To"
          }
        },
        "required": [
          "room_name"
        ],
        "title": "CallSummaryRow",
        "type": "object"
      },
      "CallTranscriptResponse": {
        "description": "Full transcript payload for a single dialer call.\n\nMirrors the grading response shape: ``status=\"ready\"`` when the\ntranscript has been flushed to the database, ``status=\"empty\"`` when\nthe call row exists but the persistor has not yet written the\ntranscript column (the call may still be in progress or the flush\nmay be in-flight). 404 is raised by the route on a missing row.",
        "properties": {
          "call_duration": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Call Duration"
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "created_at": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "disposition": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disposition"
          },
          "parallel_session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parallel Session Id"
          },
          "recording_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recording Url"
          },
          "room_name": {
            "title": "Room Name",
            "type": "string"
          },
          "status": {
            "default": "ready",
            "description": "ready | empty",
            "title": "Status",
            "type": "string"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          },
          "transcript": {
            "items": {
              "$ref": "#/components/schemas/CallTranscriptSegment"
            },
            "title": "Transcript",
            "type": "array"
          }
        },
        "required": [
          "room_name"
        ],
        "title": "CallTranscriptResponse",
        "type": "object"
      },
      "CallTranscriptSegment": {
        "description": "One speaker turn in a persisted dialer transcript.\n\n``speaker`` is one of ``SDR | AI | HUMAN | BOT`` (voice service does\nnot gate the value, so consumers should treat unknown values as\npass-through rather than rejecting the row). ``timestamp`` is the\nvoice-service-emitted ISO-8601 string and may be missing on very\nearly rows that pre-date timestamping in dialer_events.py.",
        "properties": {
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content"
          },
          "speaker": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Speaker"
          },
          "timestamp": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timestamp"
          }
        },
        "title": "CallTranscriptSegment",
        "type": "object"
      },
      "CallsListResponse": {
        "description": "List wrapper for dialer call history.\n\nUsed by ``GET /voice/dialer/calls`` for ALL filter variants\n(contact_id, user_email, parallel_session_id, created_after). Echoes\nthe applied filter values back so callers can sanity-check what the\nserver actually applied (the proxy may pin org_id, normalize CRM\noverlay IDs, etc).",
        "properties": {
          "calls": {
            "items": {
              "$ref": "#/components/schemas/CallSummaryRow"
            },
            "title": "Calls",
            "type": "array"
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "count": {
            "default": 0,
            "title": "Count",
            "type": "integer"
          },
          "parallel_session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parallel Session Id"
          },
          "user_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Email"
          }
        },
        "title": "CallsListResponse",
        "type": "object"
      },
      "CampaignAttachAudienceRequest": {
        "description": "Body for PUT /campaigns/{id}/audience — attach (or detach with null) a list.",
        "properties": {
          "list_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "List ID to attach as the campaign's audience. Pass null to detach. The list must already exist in this org (matches audiences.id, the canonical lists table — accepts an integer or its string form).",
            "title": "List Id"
          }
        },
        "title": "CampaignAttachAudienceRequest",
        "type": "object"
      },
      "CampaignDocumentCreateRequest": {
        "properties": {
          "content": {
            "default": "",
            "description": "Document content",
            "title": "Content",
            "type": "string"
          },
          "display_name": {
            "description": "Human-readable document name",
            "title": "Display Name",
            "type": "string"
          },
          "file_type": {
            "description": "Document type, for example campaign_brief or sequence",
            "title": "File Type",
            "type": "string"
          },
          "folder_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional folder path",
            "title": "Folder Path"
          },
          "status": {
            "default": "draft",
            "description": "Document status — 'draft' (default) or 'completed'",
            "title": "Status",
            "type": "string"
          },
          "structured_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional structured payload (e.g., sequence steps, persona JSON) stored alongside the markdown content at meta_data.structured_data. Mirrors the update path so the MCP create+update flow is symmetric.",
            "title": "Structured Data"
          }
        },
        "required": [
          "file_type",
          "display_name"
        ],
        "title": "CampaignDocumentCreateRequest",
        "type": "object"
      },
      "CampaignDocumentUpdateRequest": {
        "properties": {
          "content": {
            "default": "",
            "description": "Document content",
            "title": "Content",
            "type": "string"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional document status",
            "title": "Status"
          },
          "structured_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional structured document data",
            "title": "Structured Data"
          }
        },
        "title": "CampaignDocumentUpdateRequest",
        "type": "object"
      },
      "CampaignFullPatchDocument": {
        "description": "A single-document patch for `PATCH /campaigns/{id}/full`.",
        "properties": {
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Plain string content (replaces existing meta_data.content).",
            "title": "Content"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Display name (create only)",
            "title": "Display Name"
          },
          "file_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Required when creating; ignored on update of existing id.",
            "title": "File Type"
          },
          "folder_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Folder path (create only)",
            "title": "Folder Path"
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Existing document id. When omitted, a new document is created.",
            "title": "Id"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Document status",
            "title": "Status"
          },
          "structured_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional structured data, merged into meta_data.structured_data.",
            "title": "Structured Data"
          }
        },
        "title": "CampaignFullPatchDocument",
        "type": "object"
      },
      "CampaignFullPatchRequest": {
        "description": "Deep-update payload for `PATCH /campaigns/{id}/full`.\n\nEvery field is optional. Each non-null section is applied in the same\ntransaction — campaign fields → audience → documents → sequence — so a\nsingle call can re-shape the whole campaign without ping-pong.",
        "properties": {
          "audience_list_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "If provided (including empty string treated as detach), updates audience_list_id. Use the dedicated PUT /audience endpoint when you only need to attach.",
            "title": "Audience List Id"
          },
          "brief": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Brief"
          },
          "category": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          },
          "core_concept": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Core Concept"
          },
          "detach_audience": {
            "default": false,
            "description": "Set true to explicitly DETACH the audience (audience_list_id=NULL). Required because JSON null in audience_list_id is ambiguous (could mean 'no change').",
            "title": "Detach Audience",
            "type": "boolean"
          },
          "documents": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/CampaignFullPatchDocument"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Per-document patches. Existing docs are updated in place (id required); new docs are created when id is omitted and file_type+display_name are present.",
            "title": "Documents"
          },
          "goal": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Goal"
          },
          "linked_sequence_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Existing sequence IDs to bind to this campaign. INSERTs rows with status='linked' into cb_campaign_sequence_links. Skips IDs that are already linked (any status). Use for pre-launch wiring of an existing sequence; launch writes its own 'pushed' audit rows.",
            "title": "Linked Sequence Ids"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "primary_hook": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Primary Hook"
          },
          "sequence_steps": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/SequenceStepRef"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "If provided, replaces the sequence step ordering (same as PUT /sequence).",
            "title": "Sequence Steps"
          },
          "target_persona": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Persona"
          },
          "unlink_sequence_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sequence IDs to UNLINK from this campaign. DELETEs ONLY rows where status='linked'. Launch-audit rows (status='pushed'/'superseded'/'failed') are never touched — those are an immutable historical record.",
            "title": "Unlink Sequence Ids"
          }
        },
        "title": "CampaignFullPatchRequest",
        "type": "object"
      },
      "CampaignLaunchRequest": {
        "description": "Optional body for ``POST /campaigns/{id}/launch`` — all fields optional.\n\nCallers that POST with no body (or an empty {}) use the first active email\nmailbox for the organization. Callers that want explicit control pass\n``sender_mailbox_ids``. Launch fails before sequence creation when no\nsupported active sender is available.\n\nThe MCP `g8_gtm_launch_campaign` wrapper passes ``sender_mailbox_ids`` when\nDaniel's agent already picked a sender; otherwise the auto-pick fallback\nkeeps the one-shot launch flow working with no extra round-trip.",
        "properties": {
          "appointment_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Calendar event-type ID (from GET /event-types) to attach as the booking link on the sequence. Stamped onto seqsequences.appointment_id. When omitted no booking link is attached and any sequence step referencing `{{booking_link}}` will render the org-default link (or empty).",
            "title": "Appointment Id"
          },
          "disable_auto_pick": {
            "default": false,
            "deprecated": true,
            "description": "Deprecated safety escape hatch. Launch now rejects True because a consequential action cannot proceed without an active sender.",
            "title": "Disable Auto Pick",
            "type": "boolean"
          },
          "schedule_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Send-window schedule UUID (from GET /schedules). Stamped onto seqsequences.schedule_id. When omitted the sequencer falls back to its org-default send window.",
            "title": "Schedule Id"
          },
          "sender_mailbox_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Explicit list of mailbox IDs (from GET /mailboxes) to attach as sequence channels before launch. Each ID must reference a connection_status='active', non-archived mailbox in this org. When omitted, the bridge auto-picks the first active email mailbox (ORDER BY id ASC). If no supported sender is available, launch fails before sequence creation.",
            "title": "Sender Mailbox Ids"
          },
          "textual_agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Voice-service agent identifier (from GET /agents) used for email / social steps. Stamped onto seqsequences.textual_agent_name. Pass the same value as `voice_agent_name` to use one agent across all channels (the common case — the unified Agent row already bundles persona + voice + phone + the attached appointment event).",
            "title": "Textual Agent Name"
          },
          "voice_agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Voice-service agent identifier (from GET /agents) used for phone / SMS steps. Stamped onto seqsequences.voice_agent_name. When you want a single agent for all channels, set both this and `textual_agent_name` to the same value.",
            "title": "Voice Agent Name"
          }
        },
        "title": "CampaignLaunchRequest",
        "type": "object"
      },
      "CampaignVisitorContact": {
        "description": "One row of the Top contacts table.\n\nCarries PII (``name`` / ``email``) for the org's own contacts. Omitted\nentirely from the response when the request passes ``include_contacts=false``.",
        "properties": {
          "contact_id": {
            "description": "Per-org contact id",
            "title": "Contact Id",
            "type": "integer"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contact work email when resolvable (PII)",
            "title": "Email"
          },
          "last_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Most recent path this contact clicked to",
            "title": "Last Path"
          },
          "last_seen": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Latest click timestamp (ISO)",
            "title": "Last Seen"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contact full name when resolvable (PII)",
            "title": "Name"
          },
          "step_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sequencer step the click was attributed to",
            "title": "Step Id"
          },
          "step_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Human-readable step label when resolvable",
            "title": "Step Label"
          },
          "visits": {
            "description": "Click events by this contact in the window",
            "title": "Visits",
            "type": "integer"
          }
        },
        "required": [
          "contact_id",
          "visits"
        ],
        "title": "CampaignVisitorContact",
        "type": "object"
      },
      "CampaignVisitorLink": {
        "description": "One row of the Email Link Engagement table (a clicked destination URL).",
        "properties": {
          "ctr_percent": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "events ÷ emails_with_link × 100, clamped [0,100]; null when no denominator",
            "title": "Ctr Percent"
          },
          "emails_with_link": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sends whose template embedded this URL (CTR denominator)",
            "title": "Emails With Link"
          },
          "events": {
            "description": "Human click events on this URL (scanner-filtered)",
            "title": "Events",
            "type": "integer"
          },
          "host": {
            "description": "Clicked destination host",
            "title": "Host",
            "type": "string"
          },
          "last_seen": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Latest click timestamp (ISO)",
            "title": "Last Seen"
          },
          "path": {
            "description": "Clicked destination path",
            "title": "Path",
            "type": "string"
          },
          "step_ids": {
            "description": "Sequencer steps whose links drove these clicks",
            "items": {
              "type": "string"
            },
            "title": "Step Ids",
            "type": "array"
          },
          "step_labels": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Human-readable labels for step_ids when resolvable",
            "title": "Step Labels"
          },
          "unique_contacts": {
            "description": "Distinct contacts who clicked this URL",
            "title": "Unique Contacts",
            "type": "integer"
          }
        },
        "required": [
          "host",
          "path",
          "events",
          "unique_contacts"
        ],
        "title": "CampaignVisitorLink",
        "type": "object"
      },
      "CampaignVisitorStep": {
        "description": "One row of the Top campaign steps table.",
        "properties": {
          "emails_sent": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "EMAIL sends dispatched from this step in the window",
            "title": "Emails Sent"
          },
          "emails_with_link": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Of those sends, how many carried a link",
            "title": "Emails With Link"
          },
          "events": {
            "description": "Campaign click events attributed to this step",
            "title": "Events",
            "type": "integer"
          },
          "first_seen": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Earliest click timestamp (ISO)",
            "title": "First Seen"
          },
          "last_seen": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Latest click timestamp (ISO)",
            "title": "Last Seen"
          },
          "step_id": {
            "description": "Sequencer step id (globally-unique CUID)",
            "title": "Step Id",
            "type": "string"
          },
          "step_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Human-readable '{sequence} / Step {n}' when resolvable",
            "title": "Step Label"
          },
          "unique_contacts": {
            "description": "Distinct contacts who clicked from this step",
            "title": "Unique Contacts",
            "type": "integer"
          }
        },
        "required": [
          "step_id",
          "events",
          "unique_contacts"
        ],
        "title": "CampaignVisitorStep",
        "type": "object"
      },
      "CampaignVisitorsReport": {
        "description": "Composite Campaign Visitors report for a single org (analytics report a23).",
        "properties": {
          "link_engagement": {
            "items": {
              "$ref": "#/components/schemas/CampaignVisitorLink"
            },
            "title": "Link Engagement",
            "type": "array"
          },
          "summary": {
            "$ref": "#/components/schemas/CampaignVisitorsSummary"
          },
          "top_campaign_steps": {
            "items": {
              "$ref": "#/components/schemas/CampaignVisitorStep"
            },
            "title": "Top Campaign Steps",
            "type": "array"
          },
          "top_contacts": {
            "items": {
              "$ref": "#/components/schemas/CampaignVisitorContact"
            },
            "title": "Top Contacts",
            "type": "array"
          },
          "window": {
            "$ref": "#/components/schemas/CampaignVisitorsWindow"
          }
        },
        "required": [
          "window",
          "summary",
          "top_campaign_steps",
          "link_engagement",
          "top_contacts"
        ],
        "title": "CampaignVisitorsReport",
        "type": "object"
      },
      "CampaignVisitorsSummary": {
        "description": "KPI tiles for the org's campaign-click activity in the window.\n\nAll click-derived counters are email-security-scanner filtered (humans only)\nwhen ``SEQUENCER_VISITOR_SCANNER_FILTER=enforce`` — the same honest counts the\nin-app report shows. ``total_page_events`` is all page volume (not filtered).",
        "properties": {
          "contact_rows": {
            "description": "Total (contact, step) click groups before the `limit` cap",
            "title": "Contact Rows",
            "type": "integer"
          },
          "encrypted_pageviews": {
            "description": "Diagnostic: campaign clicks with an encrypted (#c=e1.) hash",
            "title": "Encrypted Pageviews",
            "type": "integer"
          },
          "identified_visitors": {
            "description": "Distinct identified web sessions on campaign clicks",
            "title": "Identified Visitors",
            "type": "integer"
          },
          "jitsu_wired": {
            "description": "False when the org has no visitor-tracking pipeline / no page events",
            "title": "Jitsu Wired",
            "type": "boolean"
          },
          "link_rows": {
            "description": "Total distinct clicked (host, path) before the ceiling",
            "title": "Link Rows",
            "type": "integer"
          },
          "pageview_events": {
            "description": "Parseable campaign-attributed click events",
            "title": "Pageview Events",
            "type": "integer"
          },
          "plaintext_pageviews": {
            "description": "Diagnostic: campaign clicks with a plaintext hash",
            "title": "Plaintext Pageviews",
            "type": "integer"
          },
          "step_rows": {
            "description": "Total distinct campaign steps before the `limit` cap",
            "title": "Step Rows",
            "type": "integer"
          },
          "total_page_events": {
            "description": "All page events in the window (campaign + non-campaign)",
            "title": "Total Page Events",
            "type": "integer"
          },
          "unique_campaign_steps": {
            "description": "Distinct sequencer steps that drew clicks",
            "title": "Unique Campaign Steps",
            "type": "integer"
          },
          "unique_contacts": {
            "description": "Distinct contacts who clicked a campaign link",
            "title": "Unique Contacts",
            "type": "integer"
          },
          "unparseable_pageviews": {
            "description": "Campaign clicks whose tracking hash could not be decoded",
            "title": "Unparseable Pageviews",
            "type": "integer"
          }
        },
        "required": [
          "total_page_events",
          "pageview_events",
          "unique_contacts",
          "unique_campaign_steps",
          "identified_visitors",
          "jitsu_wired",
          "unparseable_pageviews",
          "encrypted_pageviews",
          "plaintext_pageviews",
          "contact_rows",
          "step_rows",
          "link_rows"
        ],
        "title": "CampaignVisitorsSummary",
        "type": "object"
      },
      "CampaignVisitorsWindow": {
        "description": "The resolved reporting window echoed back to the caller.",
        "properties": {
          "days": {
            "description": "Inclusive calendar-day span of the window",
            "title": "Days",
            "type": "integer"
          },
          "end_date": {
            "description": "Window end (inclusive), YYYY-MM-DD",
            "title": "End Date",
            "type": "string"
          },
          "mode": {
            "description": "'anchored' (explicit start/end) or 'rolling' (last-N-days)",
            "title": "Mode",
            "type": "string"
          },
          "start_date": {
            "description": "Window start (inclusive), YYYY-MM-DD",
            "title": "Start Date",
            "type": "string"
          }
        },
        "required": [
          "start_date",
          "end_date",
          "days",
          "mode"
        ],
        "title": "CampaignVisitorsWindow",
        "type": "object"
      },
      "CancelBookingRequest": {
        "properties": {
          "cancel_subsequent": {
            "default": false,
            "title": "Cancel Subsequent",
            "type": "boolean"
          },
          "cancellation_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cancellation Reason"
          }
        },
        "title": "CancelBookingRequest",
        "type": "object"
      },
      "ChannelConfig": {
        "properties": {
          "channel_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Extra channel metadata",
            "title": "Channel Data"
          },
          "channel_id": {
            "description": "Channel resource ID (mailbox ID, phone ID, etc.)",
            "title": "Channel Id",
            "type": "integer"
          },
          "channel_type": {
            "description": "Channel type. One of: SMTP, GMAIL, INBOXKIT, PHONE, LINKEDIN, SMS, WHATSAPP. Case-insensitive.",
            "title": "Channel Type",
            "type": "string"
          },
          "channel_value": {
            "description": "Channel value (email address, phone number, etc.)",
            "title": "Channel Value",
            "type": "string"
          }
        },
        "required": [
          "channel_id",
          "channel_value",
          "channel_type"
        ],
        "title": "ChannelConfig",
        "type": "object"
      },
      "ClickhouseMashupRequest": {
        "properties": {
          "limit": {
            "default": 1000,
            "maximum": 1000.0,
            "minimum": 1.0,
            "title": "Limit",
            "type": "integer"
          },
          "mode": {
            "description": "Which mashup PK to filter by.",
            "enum": [
              "by_upid",
              "by_hem",
              "by_domain"
            ],
            "title": "Mode",
            "type": "string"
          },
          "profile": {
            "default": "b2b",
            "description": "Which mashup table to read. 'joined' returns the lighter denormalized mashup_new with both profiles partially populated.",
            "enum": [
              "b2b",
              "b2c",
              "joined"
            ],
            "title": "Profile",
            "type": "string"
          },
          "values": {
            "description": "Up to 100 key values (UP_IDs, HEMs, or domains).",
            "items": {
              "type": "string"
            },
            "maxItems": 100,
            "minItems": 1,
            "title": "Values",
            "type": "array"
          }
        },
        "required": [
          "mode",
          "values"
        ],
        "title": "ClickhouseMashupRequest",
        "type": "object"
      },
      "ClickhouseMashupResponse": {
        "properties": {
          "matched": {
            "default": 0,
            "title": "Matched",
            "type": "integer"
          },
          "mode": {
            "title": "Mode",
            "type": "string"
          },
          "profile": {
            "title": "Profile",
            "type": "string"
          },
          "records": {
            "default": [],
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Records",
            "type": "array"
          },
          "requested": {
            "default": 0,
            "title": "Requested",
            "type": "integer"
          }
        },
        "required": [
          "mode",
          "profile"
        ],
        "title": "ClickhouseMashupResponse",
        "type": "object"
      },
      "ClickhouseOrgAnalyticsRequest": {
        "properties": {
          "aggregation": {
            "default": "raw",
            "description": "'raw' returns the matching rows (capped). 'daily_counts' returns {day, count}. 'top_n' returns {value, count} grouped by the dataset's primary group key (contact_id, company_id, keyword_id).",
            "enum": [
              "raw",
              "daily_counts",
              "top_n"
            ],
            "title": "Aggregation",
            "type": "string"
          },
          "dataset": {
            "description": "Which per-org table to read.",
            "enum": [
              "people_visitors",
              "company_visitors",
              "5x5_visitors",
              "intent_resolved"
            ],
            "title": "Dataset",
            "type": "string"
          },
          "filters": {
            "additionalProperties": true,
            "description": "Optional equality filters. Keys must match dataset columns; unknown columns are silently dropped so an LLM guess can't produce a SQL error.",
            "title": "Filters",
            "type": "object"
          },
          "limit": {
            "default": 1000,
            "maximum": 1000.0,
            "minimum": 1.0,
            "title": "Limit",
            "type": "integer"
          },
          "since": {
            "description": "ISO date or datetime (inclusive lower bound).",
            "title": "Since",
            "type": "string"
          },
          "until": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ISO date or datetime (exclusive upper bound). Defaults to now.",
            "title": "Until"
          }
        },
        "required": [
          "dataset",
          "since"
        ],
        "title": "ClickhouseOrgAnalyticsRequest",
        "type": "object"
      },
      "ClickhouseOrgAnalyticsResponse": {
        "properties": {
          "aggregation": {
            "title": "Aggregation",
            "type": "string"
          },
          "dataset": {
            "title": "Dataset",
            "type": "string"
          },
          "rows": {
            "default": [],
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Rows",
            "type": "array"
          },
          "total": {
            "default": 0,
            "title": "Total",
            "type": "integer"
          },
          "window": {
            "additionalProperties": {
              "type": "string"
            },
            "default": {},
            "title": "Window",
            "type": "object"
          }
        },
        "required": [
          "dataset",
          "aggregation"
        ],
        "title": "ClickhouseOrgAnalyticsResponse",
        "type": "object"
      },
      "Column": {
        "additionalProperties": false,
        "description": "Column entity representing a database column definition.\nUsed to describe table column metadata for MashupContact and other entities.",
        "properties": {
          "data_type": {
            "$ref": "#/components/schemas/ColumnType",
            "default": "text"
          },
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "is_global": {
            "description": "Automatically computed: True if object_id is None/empty, False otherwise.",
            "readOnly": true,
            "title": "Is Global",
            "type": "boolean"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "object_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Object Id"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "title",
          "is_global"
        ],
        "title": "Column",
        "type": "object"
      },
      "ColumnType": {
        "enum": [
          "text"
        ],
        "title": "ColumnType",
        "type": "string"
      },
      "CompaniesOpenJobsRequest": {
        "description": "Request contract for the hiring-signal batch lookup.\n\nField-for-field identical to the main-app model of the same name in\n``companies/interfaces/fastapi/router.py``. It is redefined here rather\nthan imported because that module imports\n``developer_api.dependencies.hybrid_auth``; importing it back would couple\nthe two app halves at import time. ``test_companies_open_jobs_api.py`` locks\nthe two models together so the duplication cannot silently drift.",
        "properties": {
          "company_ids": {
            "description": "CRM company IDs (mashup_companies.id) - NOT linkedin_company_id",
            "items": {
              "type": "integer"
            },
            "maxItems": 200,
            "minItems": 1,
            "title": "Company Ids",
            "type": "array"
          },
          "include_postings": {
            "default": true,
            "description": "False = counts only (one CH query)",
            "title": "Include Postings",
            "type": "boolean"
          },
          "include_subsidiaries": {
            "default": false,
            "description": "Roll subsidiary postings into the parent. Off by default: one row = one company. NOTE: when true, `jobs` expands to child companies but `open_jobs` stays parent-only, so len(jobs) can exceed open_jobs.",
            "title": "Include Subsidiaries",
            "type": "boolean"
          },
          "limit_per_company": {
            "default": 25,
            "maximum": 50.0,
            "minimum": 1.0,
            "title": "Limit Per Company",
            "type": "integer"
          },
          "window_days": {
            "default": 60,
            "maximum": 365.0,
            "minimum": 1.0,
            "title": "Window Days",
            "type": "integer"
          }
        },
        "required": [
          "company_ids"
        ],
        "title": "CompaniesOpenJobsRequest",
        "type": "object"
      },
      "CompanyAssertRequest": {
        "properties": {
          "annual_revenue": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Annual Revenue"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Company domain (primary match key)",
            "title": "Domain"
          },
          "employee_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Employee Count"
          },
          "industry": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Industry"
          },
          "linkedin_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "LinkedIn URL (fallback match key)",
            "title": "Linkedin Url"
          },
          "list_id": {
            "description": "Target list ID",
            "title": "List Id",
            "type": "integer"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          }
        },
        "required": [
          "list_id"
        ],
        "title": "CompanyAssertRequest",
        "type": "object"
      },
      "CompanyAssertResponse": {
        "properties": {
          "action": {
            "description": "'created' or 'updated'",
            "title": "Action",
            "type": "string"
          },
          "count": {
            "default": 1,
            "title": "Count",
            "type": "integer"
          }
        },
        "required": [
          "action"
        ],
        "title": "CompanyAssertResponse",
        "type": "object"
      },
      "CompanyContactItem": {
        "description": "Contact summary within a company.",
        "properties": {
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "direct_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Direct Phone"
          },
          "first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Name"
          },
          "full_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Full Name"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "job_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Title"
          },
          "last_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Name"
          },
          "linkedin_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedin Url"
          },
          "seniority_level": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seniority Level"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State"
          },
          "work_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Email"
          }
        },
        "required": [
          "id"
        ],
        "title": "CompanyContactItem",
        "type": "object"
      },
      "CompanyCreateRequest": {
        "description": "Request body for creating a company.\n\n``domain`` is required — it drives dedup (an existing company with the same\ndomain is reused, not duplicated) and the Deals company picker. Every other\nfield is optional.",
        "properties": {
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "domain": {
            "description": "Company domain, e.g. acme.com (required)",
            "title": "Domain",
            "type": "string"
          },
          "employee_count": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Employee Count"
          },
          "industry": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Industry"
          },
          "linkedin_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedin Url"
          },
          "list_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional list to add the company to after creation",
            "title": "List Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          },
          "zip": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Zip"
          }
        },
        "required": [
          "domain"
        ],
        "title": "CompanyCreateRequest",
        "type": "object"
      },
      "CompanyCreateResponse": {
        "properties": {
          "company_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Id"
          },
          "merged": {
            "default": false,
            "title": "Merged",
            "type": "boolean"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "title": "CompanyCreateResponse",
        "type": "object"
      },
      "CompanyListItem": {
        "description": "Lighter company representation for list endpoints.",
        "properties": {
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "custom_fields": {
            "anyOf": [
              {
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Fields"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Domain"
          },
          "employee_count": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Employee Count"
          },
          "founded_year": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Founded Year"
          },
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "industry": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Industry"
          },
          "linkedin_followers": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedin Followers"
          },
          "linkedin_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedin Url"
          },
          "logo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Logo Url"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "owner_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Id"
          },
          "owner_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Name"
          },
          "revenue": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revenue"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          }
        },
        "title": "CompanyListItem",
        "type": "object"
      },
      "CompanyLookupRequest": {
        "properties": {
          "domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Company domain",
            "title": "Domain"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Company name",
            "title": "Name"
          }
        },
        "title": "CompanyLookupRequest",
        "type": "object"
      },
      "CompanyProfileUpdateRequest": {
        "properties": {
          "fields": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Profile fields to save, e.g. {'company_name': 'Acme', 'industry': 'Manufacturing'}. Replaces the stored field set.",
            "title": "Fields",
            "type": "object"
          },
          "unapprove_if_approved": {
            "default": false,
            "description": "Approved profiles are immutable by design. Set true to explicitly unlock and overwrite a human-approved profile. Left false, an approved profile returns 409 instead of being silently unapproved.",
            "title": "Unapprove If Approved",
            "type": "boolean"
          },
          "website_url": {
            "description": "The client's real website. This is the source of truth Studio generation reads; setting it wrong is what makes every downstream ICP, persona and campaign describe the wrong company.",
            "title": "Website Url",
            "type": "string"
          }
        },
        "required": [
          "website_url",
          "fields"
        ],
        "title": "CompanyProfileUpdateRequest",
        "type": "object"
      },
      "CompanyResponse": {
        "properties": {
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "contact_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Count"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "crunchbase_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Crunchbase Url"
          },
          "custom_fields": {
            "anyOf": [
              {
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Fields"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Domain"
          },
          "employee_count": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Employee Count"
          },
          "facebook_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Facebook Url"
          },
          "founded_year": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Founded Year"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "industry": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Industry"
          },
          "industry_group": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Industry Group"
          },
          "linkedin_followers": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedin Followers"
          },
          "linkedin_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedin Url"
          },
          "logo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Logo Url"
          },
          "meta_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta Data"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "revenue": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revenue"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State"
          },
          "twitter_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Twitter Url"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          },
          "zip": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Zip"
          }
        },
        "required": [
          "id"
        ],
        "title": "CompanyResponse",
        "type": "object"
      },
      "CompanyUpdateRequest": {
        "description": "Request body for updating a company. All fields optional (partial update).",
        "properties": {
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Domain"
          },
          "employee_count": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Employee Count"
          },
          "industry": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Industry"
          },
          "linkedin_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedin Url"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          },
          "zip": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Zip"
          }
        },
        "title": "CompanyUpdateRequest",
        "type": "object"
      },
      "ConfirmBookingRequest": {
        "properties": {
          "confirmed": {
            "title": "Confirmed",
            "type": "boolean"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          }
        },
        "required": [
          "confirmed"
        ],
        "title": "ConfirmBookingRequest",
        "type": "object"
      },
      "ConnectRepoRequest": {
        "properties": {
          "default_branch": {
            "default": "main",
            "description": "Default branch name",
            "title": "Default Branch",
            "type": "string"
          },
          "provider": {
            "default": "github",
            "description": "Repository provider: github, gitlab, local",
            "title": "Provider",
            "type": "string"
          },
          "repo_name": {
            "description": "Repository name (e.g., my-saas-app)",
            "title": "Repo Name",
            "type": "string"
          },
          "repo_url": {
            "description": "Repository URL (e.g., https://github.com/org/repo)",
            "title": "Repo Url",
            "type": "string"
          }
        },
        "required": [
          "repo_url",
          "repo_name"
        ],
        "title": "ConnectRepoRequest",
        "type": "object"
      },
      "ConnectedCalendarResponse": {
        "properties": {
          "credential_id": {
            "title": "Credential Id",
            "type": "integer"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "invalid": {
            "default": false,
            "title": "Invalid",
            "type": "boolean"
          },
          "is_valid": {
            "default": true,
            "title": "Is Valid",
            "type": "boolean"
          },
          "provider": {
            "title": "Provider",
            "type": "string"
          },
          "sub_calendars": {
            "items": {
              "$ref": "#/components/schemas/SubCalendarResponse"
            },
            "title": "Sub Calendars",
            "type": "array"
          }
        },
        "required": [
          "credential_id",
          "provider"
        ],
        "title": "ConnectedCalendarResponse",
        "type": "object"
      },
      "ConnectedConferencingResponse": {
        "properties": {
          "credential_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Credential Id"
          },
          "is_default": {
            "default": false,
            "title": "Is Default",
            "type": "boolean"
          },
          "link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Link"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "provider": {
            "title": "Provider",
            "type": "string"
          }
        },
        "required": [
          "provider",
          "name"
        ],
        "title": "ConnectedConferencingResponse",
        "type": "object"
      },
      "ContactAssertRequest": {
        "properties": {
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "company_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Domain"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "direct_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Direct Phone"
          },
          "first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Name"
          },
          "job_department": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Department"
          },
          "job_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Title"
          },
          "last_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Name"
          },
          "linkedin_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "LinkedIn URL (fallback match key)",
            "title": "Linkedin Url"
          },
          "list_id": {
            "description": "Target list ID",
            "title": "List Id",
            "type": "integer"
          },
          "mobile_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mobile Phone"
          },
          "personal_emails": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Personal Emails"
          },
          "seniority_level": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seniority Level"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State"
          },
          "work_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Work email (primary match key)",
            "title": "Work Email"
          }
        },
        "required": [
          "list_id"
        ],
        "title": "ContactAssertRequest",
        "type": "object"
      },
      "ContactAssertResponse": {
        "properties": {
          "action": {
            "description": "'created' or 'updated'",
            "title": "Action",
            "type": "string"
          },
          "count": {
            "default": 1,
            "title": "Count",
            "type": "integer"
          }
        },
        "required": [
          "action"
        ],
        "title": "ContactAssertResponse",
        "type": "object"
      },
      "ContactBrief": {
        "description": "Lightweight contact summary embedded in deal responses.\n\n`id` is the canonical `mashup_contact_id` (BigInt), matching how contacts\nare addressed everywhere else in the public API (g8_search_contacts,\ng8_lookup_person, etc.). `role` is the contact's role within THIS deal\n(champion / decision_maker / influencer / blocker / coach / end_user) and\nis null when no role was set.",
        "properties": {
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "required": [
          "id"
        ],
        "title": "ContactBrief",
        "type": "object"
      },
      "ContactCompanySummary": {
        "properties": {
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Domain"
          },
          "employee_count": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Employee Count"
          },
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "industry": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Industry"
          },
          "linkedin_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedin Url"
          },
          "logo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Logo Url"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          }
        },
        "title": "ContactCompanySummary",
        "type": "object"
      },
      "ContactCreateRequest": {
        "description": "Request body for creating contacts.",
        "properties": {
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "City",
            "title": "City"
          },
          "company_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Company domain for matching",
            "title": "Company Domain"
          },
          "company_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Existing company id (mashup_companies.id) to attach",
            "title": "Company Id"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Country",
            "title": "Country"
          },
          "direct_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Direct phone number",
            "title": "Direct Phone"
          },
          "first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contact first name",
            "title": "First Name"
          },
          "job_department": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Department",
            "title": "Job Department"
          },
          "job_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Job title",
            "title": "Job Title"
          },
          "last_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contact last name",
            "title": "Last Name"
          },
          "linkedin_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "LinkedIn profile URL",
            "title": "Linkedin Url"
          },
          "list_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional target list ID. When provided, the contact is added to this list after it is created; omit to create the contact without a list.",
            "title": "List Id"
          },
          "mobile_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Mobile phone number",
            "title": "Mobile Phone"
          },
          "personal_emails": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Personal email addresses",
            "title": "Personal Emails"
          },
          "seniority_level": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Seniority level",
            "title": "Seniority Level"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "State/Province",
            "title": "State"
          },
          "work_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Work email address",
            "title": "Work Email"
          }
        },
        "title": "ContactCreateRequest",
        "type": "object"
      },
      "ContactCreateResponse": {
        "properties": {
          "company_attached": {
            "default": false,
            "title": "Company Attached",
            "type": "boolean"
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "count": {
            "title": "Count",
            "type": "integer"
          },
          "merged": {
            "default": false,
            "title": "Merged",
            "type": "boolean"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "validation_errors": {
            "items": {
              "type": "string"
            },
            "title": "Validation Errors",
            "type": "array"
          }
        },
        "required": [
          "status",
          "count"
        ],
        "title": "ContactCreateResponse",
        "type": "object"
      },
      "ContactDealResponse": {
        "description": "Deal response from contact or company deals handler (dict-based).",
        "properties": {
          "close_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Close Date"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency"
          },
          "deal_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deal Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "owner_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Id"
          },
          "pipeline_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pipeline Id"
          },
          "role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role"
          },
          "stage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stage"
          },
          "value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          }
        },
        "title": "ContactDealResponse",
        "type": "object"
      },
      "ContactListItem": {
        "description": "Lighter contact representation for list endpoints.",
        "properties": {
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "company_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Id"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "custom_fields": {
            "anyOf": [
              {
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Fields"
          },
          "direct_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Direct Phone"
          },
          "first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Name"
          },
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "job_department": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Department"
          },
          "job_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Title"
          },
          "last_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Name"
          },
          "linkedin_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedin Url"
          },
          "mobile_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mobile Phone"
          },
          "owner_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Id"
          },
          "owner_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Name"
          },
          "seniority_level": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seniority Level"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State"
          },
          "work_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Email"
          }
        },
        "title": "ContactListItem",
        "type": "object"
      },
      "ContactResponse": {
        "properties": {
          "about": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "About"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "company": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ContactCompanySummary"
              },
              {
                "type": "null"
              }
            ]
          },
          "confidence_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence Score"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "custom_fields": {
            "anyOf": [
              {
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Fields"
          },
          "direct_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Direct Phone"
          },
          "facebook_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Facebook Url"
          },
          "first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Name"
          },
          "full_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Full Name"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "job_department": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Department"
          },
          "job_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Title"
          },
          "last_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Name"
          },
          "linkedin_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedin Url"
          },
          "meta_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta Data"
          },
          "mobile_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mobile Phone"
          },
          "personal_emails": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Personal Emails"
          },
          "seniority_level": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seniority Level"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State"
          },
          "twitter_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Twitter Url"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "work_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Email"
          }
        },
        "required": [
          "id"
        ],
        "title": "ContactResponse",
        "type": "object"
      },
      "ContactSupportRequest": {
        "description": "A support request relayed from an AI client (or direct API caller).\n\n``urgency`` is deliberately a free-form string, not an enum — LLM callers\nproduce arbitrary phrasing and a 422 on vocabulary would block a user who\nis already asking for help. Urgent-flavored values (\"high\", \"urgent\",\n\"critical\", \"asap\") get a visible subject-line prefix; everything else is\npassed through as informational text.",
        "properties": {
          "contact_email": {
            "anyOf": [
              {
                "format": "email",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where graph8 support should reply. Optional for personal API keys (the key's own user email is used); REQUIRED for org-scoped machine keys, which carry no personal email.",
            "title": "Contact Email"
          },
          "message": {
            "description": "What the user needs help with, in their own words.",
            "maxLength": 5000,
            "minLength": 3,
            "title": "Message",
            "type": "string"
          },
          "urgency": {
            "anyOf": [
              {
                "maxLength": 32,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Free-form urgency hint, e.g. 'normal', 'high', 'urgent'.",
            "title": "Urgency"
          }
        },
        "required": [
          "message"
        ],
        "title": "ContactSupportRequest",
        "type": "object"
      },
      "ContactSupportResponse": {
        "description": "Acknowledgment for a support request.\n\n``status`` is ``received`` on first delivery and ``already_received`` when\nthe per-user cooldown swallowed a duplicate (still HTTP 200 — a retryable\nerror code would make LLM callers loop harder).",
        "properties": {
          "note": {
            "default": "",
            "description": "Human-readable summary for the caller to relay to the user.",
            "title": "Note",
            "type": "string"
          },
          "notified": {
            "default": 0,
            "description": "Support staff notified on this call (0 on cooldown).",
            "title": "Notified",
            "type": "integer"
          },
          "reply_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Address graph8 support will reply to.",
            "title": "Reply Email"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "title": "ContactSupportResponse",
        "type": "object"
      },
      "ContactUpdateRequest": {
        "description": "Request body for updating a contact. All fields optional (partial update).",
        "properties": {
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "company_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Domain"
          },
          "company_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Id"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "direct_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Direct Phone"
          },
          "first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Name"
          },
          "job_department": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Department"
          },
          "job_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Title"
          },
          "last_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Name"
          },
          "linkedin_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedin Url"
          },
          "mobile_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mobile Phone"
          },
          "seniority_level": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seniority Level"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State"
          },
          "work_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Email"
          }
        },
        "title": "ContactUpdateRequest",
        "type": "object"
      },
      "CreateBookingRequest": {
        "properties": {
          "attendees": {
            "items": {
              "$ref": "#/components/schemas/AttendeeInput"
            },
            "title": "Attendees",
            "type": "array"
          },
          "end_time": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "End Time"
          },
          "event_type_id": {
            "title": "Event Type Id",
            "type": "integer"
          },
          "guests": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Guests"
          },
          "language": {
            "default": "en",
            "title": "Language",
            "type": "string"
          },
          "location": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Location"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "override_availability": {
            "default": false,
            "title": "Override Availability",
            "type": "boolean"
          },
          "recurring_event_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recurring Event Id"
          },
          "responses": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Responses"
          },
          "selected_conferencing": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LocationItem"
              },
              {
                "type": "null"
              }
            ]
          },
          "selected_location": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LocationItem"
              },
              {
                "type": "null"
              }
            ]
          },
          "slot_uid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slot Uid"
          },
          "start_time": {
            "title": "Start Time",
            "type": "string"
          }
        },
        "required": [
          "event_type_id",
          "start_time",
          "attendees"
        ],
        "title": "CreateBookingRequest",
        "type": "object"
      },
      "CreateCompanyColumnRequest": {
        "description": "Request body for `POST /companies/columns/create`.\n\nMirrors the shared `CreateColumnRequest` shape (`title`, `data_type`,\n`list_id`, `created_by`) plus an OPTIONAL `enrichment` block that, when\nsupplied, provisions a companion waterfall pipeline in the same\nrequest — so the new column is immediately runnable via\n`POST /enrichment/waterfall/enrich`.\n\nWithout the `enrichment` block the column is created, but it has no\nenrichment plan; the UI \"Enrich\" button (and `g8_enrich_contacts` in\nwaterfall mode) will return 422 (`waterfall_config_missing`) until a\npipeline is provisioned separately via\n`POST /enrichment/waterfall/configs`.\n\nBackwards compatible: callers that previously POSTed only `title` /\n`data_type` / `list_id` / `created_by` continue to work unchanged.",
        "properties": {
          "created_by": {
            "description": "Email of the user creating the column (for audit).",
            "format": "email",
            "title": "Created By",
            "type": "string"
          },
          "data_type": {
            "$ref": "#/components/schemas/ColumnType",
            "default": "text",
            "description": "Column data type. Currently only 'text' is supported."
          },
          "enrichment": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CreateFieldEnrichmentInput"
              },
              {
                "type": "null"
              }
            ],
            "description": "STRONGLY RECOMMENDED. Optional waterfall enrichment block. When supplied, a companion `enrichment_configs` row is created alongside the column so the UI 'Enrich' button works immediately. Without it the column exists but isn't enrichable until a pipeline is configured via POST /enrichment/waterfall/configs."
          },
          "list_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "If set, the column is list-scoped (only visible on that list). Required when `enrichment` is supplied — waterfall pipelines are list-scoped.",
            "title": "List Id"
          },
          "title": {
            "description": "Column title shown in the UI (e.g. 'Tier')",
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "title",
          "created_by"
        ],
        "title": "CreateCompanyColumnRequest",
        "type": "object"
      },
      "CreateCompanyColumnResponse": {
        "description": "Response shape for `POST /companies/columns/create`.\n\nMirrors the `Column` entity fields verbatim so existing callers reading\n`data.id` / `data.title` / `data.name` / `data.is_global` etc. keep\nworking without code changes. Adds one new optional `enrichment` field\nthat is populated when the request included an `enrichment` block.",
        "properties": {
          "data_type": {
            "$ref": "#/components/schemas/ColumnType",
            "default": "text"
          },
          "enrichment": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CreateFieldEnrichmentResponse"
              },
              {
                "type": "null"
              }
            ],
            "description": "Populated when the request included an `enrichment` block. Use `enrichment.column_id` for subsequent POST /enrichment/waterfall/enrich calls."
          },
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "is_global": {
            "default": false,
            "description": "Computed: True when object_id is null/empty (global column).",
            "title": "Is Global",
            "type": "boolean"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "object_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Object Id"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "title"
        ],
        "title": "CreateCompanyColumnResponse",
        "type": "object"
      },
      "CreateCompetitorRequest": {
        "properties": {
          "domain": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Domain",
            "type": "string"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "scan_config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScanConfigDTO"
              },
              {
                "type": "null"
              }
            ]
          },
          "tier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": "tier2",
            "title": "Tier"
          }
        },
        "required": [
          "domain"
        ],
        "title": "CreateCompetitorRequest",
        "type": "object"
      },
      "CreateContactColumnRequest": {
        "description": "Request body for `POST /contacts/columns/create`.\n\nMirrors the shared `CreateColumnRequest` shape (`title`, `data_type`,\n`list_id`, `created_by`) plus an OPTIONAL `enrichment` block that, when\nsupplied, provisions a companion waterfall pipeline in the same\nrequest — so the new column is immediately runnable via\n`POST /enrichment/waterfall/enrich`.\n\nWithout the `enrichment` block the column is created, but it has no\nenrichment plan; the UI \"Enrich\" button (and `g8_enrich_contacts` in\nwaterfall mode) will return 422 (`waterfall_config_missing`) until a\npipeline is provisioned separately via\n`POST /enrichment/waterfall/configs`.\n\nBackwards compatible: callers that previously POSTed only `title` /\n`data_type` / `list_id` / `created_by` continue to work unchanged.",
        "properties": {
          "created_by": {
            "description": "Email of the user creating the column (for audit).",
            "format": "email",
            "title": "Created By",
            "type": "string"
          },
          "data_type": {
            "$ref": "#/components/schemas/ColumnType",
            "default": "text",
            "description": "Column data type. Currently only 'text' is supported."
          },
          "enrichment": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CreateFieldEnrichmentInput"
              },
              {
                "type": "null"
              }
            ],
            "description": "STRONGLY RECOMMENDED. Optional waterfall enrichment block. When supplied, a companion `enrichment_configs` row is created alongside the column so the UI 'Enrich' button works immediately. Without it the column exists but isn't enrichable until a pipeline is configured via POST /enrichment/waterfall/configs."
          },
          "list_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "If set, the column is list-scoped (only visible on that list). Required when `enrichment` is supplied — waterfall pipelines are list-scoped.",
            "title": "List Id"
          },
          "title": {
            "description": "Column title shown in the UI (e.g. 'Lead Score')",
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "title",
          "created_by"
        ],
        "title": "CreateContactColumnRequest",
        "type": "object"
      },
      "CreateContactColumnResponse": {
        "description": "Response shape for `POST /contacts/columns/create`.\n\nMirrors the `Column` entity fields verbatim so existing callers reading\n`data.id` / `data.title` / `data.name` / `data.is_global` etc. keep\nworking without code changes. Adds one new optional `enrichment` field\nthat is populated when the request included an `enrichment` block.",
        "properties": {
          "data_type": {
            "$ref": "#/components/schemas/ColumnType",
            "default": "text"
          },
          "enrichment": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CreateFieldEnrichmentResponse"
              },
              {
                "type": "null"
              }
            ],
            "description": "Populated when the request included an `enrichment` block. Use `enrichment.column_id` for subsequent POST /enrichment/waterfall/enrich calls."
          },
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "is_global": {
            "default": false,
            "description": "Computed: True when object_id is null/empty (global column).",
            "title": "Is Global",
            "type": "boolean"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "object_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Object Id"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "title"
        ],
        "title": "CreateContactColumnResponse",
        "type": "object"
      },
      "CreateDefaultWaterfallConfigRequest": {
        "description": "Create (or reuse) a waterfall pipeline for a list.\n\nThree call-styles, in increasing order of control:\n\n1. **Bare** — pass only `list_id`. Server builds a single-step graph8\n   lookup pipeline that fills name/email/company for 0 credits.\n   Backward-compatible with the pre-2026-06 contract.\n2. **By providers** — pass `providers=[\"hunter\",\"prospeo\"]`. Server maps\n   each provider to its default email-finder action (see provider matrix\n   in `docs/developer-api-reference.md`) and ordered steps. Use this when\n   you want a 1-line \"try these providers, in this order\" pipeline.\n3. **By steps** — pass `steps=[...]` with full step shapes. Server\n   persists them verbatim. Use this when you need provider-specific\n   config (e.g. apollo `reveal_phone_numbers=true`).\n\n`providers[]` and `steps[]` are mutually exclusive — pass one or\nneither, not both. `email_verification` may be combined with any\ncall-style; when set it runs after the main waterfall and follows the\nsame credit + valid-status rules the UI uses.\n\n`list_id` is required; everything else has a sensible default so callers\npass the minimum. `skip_existing_values` defaults True so we never\noverwrite populated fields. Idempotent by `(list_id, name)`.",
        "properties": {
          "credential_mode": {
            "default": "auto",
            "description": "How to resolve each provider step's credential source. Applies to the `providers[]` shortcut and the bare default; `steps[]` payloads always honor their own per-step `is_system_provider`. 'auto' (default, matches the UI): for each provider use the org's BYOK key when one is configured (free), otherwise graph8's system key for funded providers (charges credits). 'system': force graph8 system keys for funded providers (charges credits). 'byok': force the org's own keys for every non-graph8 provider (legacy behavior — steps silently skip when no key exists). graph8 is always system-funded regardless of mode.",
            "enum": [
              "auto",
              "system",
              "byok"
            ],
            "title": "Credential Mode",
            "type": "string"
          },
          "email_verification": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EmailVerificationInput"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional post-enrichment email verification config. When set, ZeroBounce/Hunter/Icypeas/LeadMagic runs after the main waterfall and writes verification status into the column."
          },
          "field": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Canonical enrichment column to fill — CONTACT_DIRECT_PHONE, CONTACT_MOBILE_PHONE, CONTACT_WORK_EMAIL, CONTACT_PERSONAL_EMAILS, CONTACT_LINKEDIN_URL, COMPANY_PHONE, COMPANY_LINKEDIN_URL — or a friendly synonym ('phone', 'mobile', 'email', 'linkedin', 'company_phone'). When set, the pipeline is built from the server's per-field waterfall TEMPLATE, so each provider runs its CORRECT action for that column (e.g. leadmagic `mobile_finder` for a phone, not `email_finder`), and the enriched value is written into the real contact/company column — exactly like the web UI's 'enrich existing column' flow. Combine with `providers[]` to keep only those providers from the template (their correct per-field action is preserved). Mutually exclusive with `steps[]`. When omitted, the legacy bare/`providers[]` email-finder behavior is unchanged.",
            "title": "Field"
          },
          "field_to_enrich": {
            "default": "work_email",
            "description": "Target field identifier for this pipeline (legacy; ignored when `field` is set)",
            "title": "Field To Enrich",
            "type": "string"
          },
          "list_id": {
            "description": "List ID to attach the pipeline to",
            "title": "List Id",
            "type": "integer"
          },
          "name": {
            "default": "API Auto-Created Pipeline",
            "description": "Human-readable name for the pipeline",
            "title": "Name",
            "type": "string"
          },
          "providers": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Ordered list of provider names — server builds default email-finder steps in this order. Mutually exclusive with `steps`. Allowed providers: graph8, hunter, prospeo, dropcontact, icypeas, leadmagic, emaillistverify, apollo, lusha, rocketreach. Use `steps[]` for full control.",
            "title": "Providers"
          },
          "skip_existing_values": {
            "default": true,
            "description": "If true, the pipeline skips contacts where the target field is already populated",
            "title": "Skip Existing Values",
            "type": "boolean"
          },
          "steps": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/WaterfallStepInput"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Full caller-supplied step list (advanced). Persisted verbatim into the pipeline. Mutually exclusive with `providers`.",
            "title": "Steps"
          }
        },
        "required": [
          "list_id"
        ],
        "title": "CreateDefaultWaterfallConfigRequest",
        "type": "object"
      },
      "CreateDefaultWaterfallConfigResponse": {
        "description": "Result of creating (or reusing) a default pipeline.",
        "properties": {
          "column_id": {
            "title": "Column Id",
            "type": "string"
          },
          "config_id": {
            "title": "Config Id",
            "type": "string"
          },
          "created": {
            "default": false,
            "description": "True if a new config was created; False if an existing one with the same name was reused",
            "title": "Created",
            "type": "boolean"
          },
          "email_verification": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Persisted email_verification block, if any. Mirrors EmailVerificationInput shape.",
            "title": "Email Verification"
          },
          "list_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "List Id"
          },
          "missing_credentials": {
            "description": "Providers whose step is BYOK but the org has no active key (these steps will be skipped at run time). Empty when every step is runnable.",
            "items": {
              "type": "string"
            },
            "title": "Missing Credentials",
            "type": "array"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "providers": {
            "description": "Ordered, de-duplicated provider list of the persisted (or reused) pipeline.",
            "items": {
              "type": "string"
            },
            "title": "Providers",
            "type": "array"
          },
          "providers_detail": {
            "description": "Per-step credential breakdown (system vs BYOK + readiness) for the persisted pipeline.",
            "items": {
              "$ref": "#/components/schemas/ProviderStepDetail"
            },
            "title": "Providers Detail",
            "type": "array"
          }
        },
        "required": [
          "column_id",
          "config_id",
          "name"
        ],
        "title": "CreateDefaultWaterfallConfigResponse",
        "type": "object"
      },
      "CreateEventTypeRequest": {
        "properties": {
          "after_event_buffer": {
            "default": 0,
            "title": "After Event Buffer",
            "type": "integer"
          },
          "before_event_buffer": {
            "default": 0,
            "title": "Before Event Buffer",
            "type": "integer"
          },
          "booking_fields": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Booking Fields"
          },
          "default_layout": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Layout"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "disable_cancelling": {
            "default": false,
            "title": "Disable Cancelling",
            "type": "boolean"
          },
          "disable_guests": {
            "default": false,
            "title": "Disable Guests",
            "type": "boolean"
          },
          "disable_rescheduling": {
            "default": false,
            "title": "Disable Rescheduling",
            "type": "boolean"
          },
          "event_color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Color"
          },
          "event_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Name"
          },
          "hidden": {
            "default": false,
            "title": "Hidden",
            "type": "boolean"
          },
          "initial_hosts": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Initial Hosts"
          },
          "layouts": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Layouts"
          },
          "length": {
            "title": "Length",
            "type": "integer"
          },
          "locations": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Locations"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "minimum_booking_notice": {
            "default": 120,
            "title": "Minimum Booking Notice",
            "type": "integer"
          },
          "period_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Period Days"
          },
          "period_end_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Period End Date"
          },
          "period_start_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Period Start Date"
          },
          "period_type": {
            "default": "unlimited",
            "title": "Period Type",
            "type": "string"
          },
          "recurring_event": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recurring Event"
          },
          "requires_confirmation": {
            "default": false,
            "title": "Requires Confirmation",
            "type": "boolean"
          },
          "schedule_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Schedule Id"
          },
          "scheduling_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scheduling Type"
          },
          "seats_per_time_slot": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats Per Time Slot"
          },
          "slot_interval": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slot Interval"
          },
          "slug": {
            "title": "Slug",
            "type": "string"
          },
          "success_redirect_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Success Redirect Url"
          },
          "time_zone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Time Zone"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "use_common_schedule": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Use Common Schedule"
          }
        },
        "required": [
          "title",
          "slug",
          "length"
        ],
        "title": "CreateEventTypeRequest",
        "type": "object"
      },
      "CreateFieldEnrichmentInput": {
        "description": "Optional enrichment-pipeline block attached at column-create time.\n\nWhen supplied, `POST /fields` creates a companion `enrichment_configs`\nrow in the same request so the new column is immediately runnable via\n`POST /enrichment/waterfall/enrich`. Without this block the column\nexists but has no enrichment plan — calling /waterfall/enrich on it\nreturns 422 (`waterfall_config_missing`).\n\nCurrently only `type='waterfall'` is supported; AI / formula\nenrichment will follow once the rest of the agent surface lands.",
        "properties": {
          "email_verification": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EmailVerificationInput"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional post-enrichment email verification config."
          },
          "field_to_enrich": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Target field identifier. Defaults to the new column's slug.",
            "title": "Field To Enrich"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pipeline name. Defaults to `<column title> Enrichment` if omitted.",
            "title": "Name"
          },
          "providers": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Ordered list of provider names. Without `target_field`, server maps each to its default email-finder action (legacy). With `target_field`, filters the column template to these providers (correct per-field action preserved). Mutually exclusive with `steps`.",
            "title": "Providers"
          },
          "skip_existing_values": {
            "default": true,
            "description": "If true, skip rows where the target field is already populated.",
            "title": "Skip Existing Values",
            "type": "boolean"
          },
          "steps": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/WaterfallStepInput"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Full caller-supplied step list. Persisted verbatim. Mutually exclusive with `providers`.",
            "title": "Steps"
          },
          "target_field": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Kind of data this column holds — CONTACT_DIRECT_PHONE, CONTACT_MOBILE_PHONE, CONTACT_WORK_EMAIL, CONTACT_LINKEDIN_URL, COMPANY_PHONE, ... or a friendly synonym ('phone', 'mobile', 'email', 'linkedin'). When set, the pipeline is built from the server's per-column TEMPLATE so each provider runs its CORRECT action for that data kind (e.g. leadmagic `mobile_finder` for a phone, NOT `email_finder`) — the same actions the web UI's 'Add column -> Waterfall' picks. Combine with `providers[]` to keep only those providers from the template. Mutually exclusive with `steps`. When omitted, the legacy `providers[]` email-finder shortcut is unchanged.",
            "title": "Target Field"
          },
          "type": {
            "default": "waterfall",
            "description": "Pipeline kind. Only 'waterfall' is supported today.",
            "title": "Type",
            "type": "string"
          }
        },
        "title": "CreateFieldEnrichmentInput",
        "type": "object"
      },
      "CreateFieldEnrichmentResponse": {
        "description": "Echo of the companion enrichment config created by `enrichment` block.",
        "properties": {
          "column_id": {
            "description": "column_id slug to pass to /enrichment/waterfall/enrich",
            "title": "Column Id",
            "type": "string"
          },
          "config_id": {
            "title": "Config Id",
            "type": "string"
          },
          "email_verification": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email Verification"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "providers": {
            "items": {
              "type": "string"
            },
            "title": "Providers",
            "type": "array"
          },
          "type": {
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "column_id",
          "config_id",
          "name",
          "type"
        ],
        "title": "CreateFieldEnrichmentResponse",
        "type": "object"
      },
      "CreateFieldRequest": {
        "description": "Request body for creating a custom field (column).",
        "properties": {
          "data_type": {
            "default": "text",
            "description": "Column data type. Currently only 'text' is supported; additional types (numeric, date, boolean, select) may be added in future versions.",
            "title": "Data Type",
            "type": "string"
          },
          "enrichment": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CreateFieldEnrichmentInput"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional enrichment-pipeline block. When supplied, a companion `enrichment_configs` row is created in the same request so the new column is immediately runnable via /enrichment/waterfall/enrich."
          },
          "entity": {
            "default": "contacts",
            "description": "Target entity: 'contacts' or 'companies'",
            "title": "Entity",
            "type": "string"
          },
          "list_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "If set, field is list-specific; otherwise global across the org",
            "title": "List Id"
          },
          "title": {
            "description": "Column title, e.g. 'Job Level'",
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "title"
        ],
        "title": "CreateFieldRequest",
        "type": "object"
      },
      "CreateFieldResponse": {
        "properties": {
          "data_type": {
            "title": "Data Type",
            "type": "string"
          },
          "enrichment": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CreateFieldEnrichmentResponse"
              },
              {
                "type": "null"
              }
            ],
            "description": "Populated when the request included an `enrichment` block. Use `enrichment.column_id` for subsequent /enrichment/waterfall/enrich calls."
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "is_global": {
            "title": "Is Global",
            "type": "boolean"
          },
          "list_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "List Id"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "data_type",
          "name",
          "is_global"
        ],
        "title": "CreateFieldResponse",
        "type": "object"
      },
      "CreateFieldsBatchRequest": {
        "description": "Create MANY custom columns in one request.\n\nAll columns are created in a single DB transaction with a SINGLE view\nrebuild — at 40-50 columns this replaces 40-50 view recreations with one.",
        "properties": {
          "entity": {
            "default": "contacts",
            "description": "Target entity for ALL columns: 'contacts' or 'companies'",
            "title": "Entity",
            "type": "string"
          },
          "fields": {
            "description": "Columns to create (1-100).",
            "items": {
              "$ref": "#/components/schemas/BatchFieldItem"
            },
            "title": "Fields",
            "type": "array"
          },
          "list_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Shared list scope for all columns. REQUIRED if ANY field carries an `enrichment` block — waterfall pipelines are list-scoped.",
            "title": "List Id"
          }
        },
        "required": [
          "fields"
        ],
        "title": "CreateFieldsBatchRequest",
        "type": "object"
      },
      "CreateFieldsBatchResponse": {
        "properties": {
          "entity": {
            "title": "Entity",
            "type": "string"
          },
          "list_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "List Id"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/BatchFieldResult"
            },
            "title": "Results",
            "type": "array"
          },
          "total_created": {
            "title": "Total Created",
            "type": "integer"
          },
          "total_requested": {
            "title": "Total Requested",
            "type": "integer"
          }
        },
        "required": [
          "entity",
          "total_requested",
          "total_created",
          "results"
        ],
        "title": "CreateFieldsBatchResponse",
        "type": "object"
      },
      "CreateIcpRequest": {
        "description": "Body for POST /icps - create a Studio ICP manually (no AI generation).\n\nMirrors the internal Studio \"Add ICP\" action. Manual ICPs are created with\nstatus 'active'; the fit/opportunity/readiness/total scores stay null (they are\nonly produced by the AI generate flow, which this endpoint does not run).",
        "properties": {
          "buying_signals": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "List of buying-intent signals.",
            "title": "Buying Signals"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Freeform ICP description.",
            "title": "Description"
          },
          "estimated_market_size": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Estimated addressable-market count.",
            "title": "Estimated Market Size"
          },
          "firmographics": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Firmographic criteria (industry, size, geo, ...).",
            "title": "Firmographics"
          },
          "name": {
            "description": "ICP name/title.",
            "title": "Name",
            "type": "string"
          },
          "tech_stack": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Technology signals.",
            "title": "Tech Stack"
          },
          "website_url": {
            "description": "The org website this ICP belongs to.",
            "title": "Website Url",
            "type": "string"
          }
        },
        "required": [
          "name",
          "website_url"
        ],
        "title": "CreateIcpRequest",
        "type": "object"
      },
      "CreateOutOfOfficeRequest": {
        "properties": {
          "end": {
            "title": "End",
            "type": "string"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "public_note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Public Note"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "start": {
            "title": "Start",
            "type": "string"
          },
          "time_zone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Time Zone"
          },
          "to_user_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "To User Id"
          },
          "user_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          }
        },
        "required": [
          "start",
          "end"
        ],
        "title": "CreateOutOfOfficeRequest",
        "type": "object"
      },
      "CreatePersonaRequest": {
        "description": "Body for POST /personas - create a Studio buyer persona manually.\n\nMirrors the internal Studio \"Add Persona\" action. Manual personas are created\nwith status 'active'; AI/score fields stay null (they are only populated by the\nAI generate flow, which this endpoint intentionally does not run).",
        "properties": {
          "campaign_approach": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Recommended campaign approach.",
            "title": "Campaign Approach"
          },
          "confidence": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Confidence label (e.g. 'high'/'medium'/'low'). Defaults to 'medium'.",
            "title": "Confidence"
          },
          "expected_receptivity": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Expected receptivity note.",
            "title": "Expected Receptivity"
          },
          "key_signals": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "List of buying/intent signals.",
            "title": "Key Signals"
          },
          "priority": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Display priority (lower sorts first). Defaults to 1.",
            "title": "Priority"
          },
          "recommended_goal": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Recommended campaign goal.",
            "title": "Recommended Goal"
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Origin label for the persona. Defaults to 'manual'.",
            "title": "Source"
          },
          "title": {
            "description": "Persona title (e.g. 'Director of Marketing Operations').",
            "title": "Title",
            "type": "string"
          },
          "website_url": {
            "description": "The org website this persona belongs to.",
            "title": "Website Url",
            "type": "string"
          },
          "why_target": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why this persona is worth targeting.",
            "title": "Why Target"
          }
        },
        "required": [
          "title",
          "website_url"
        ],
        "title": "CreatePersonaRequest",
        "type": "object"
      },
      "CreateRoutingFormRequest": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "disabled": {
            "default": false,
            "title": "Disabled",
            "type": "boolean"
          },
          "fields": {
            "items": {
              "$ref": "#/components/schemas/RoutingFormField"
            },
            "title": "Fields",
            "type": "array"
          },
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "routes": {
            "items": {
              "$ref": "#/components/schemas/RoutingFormRouteInput"
            },
            "title": "Routes",
            "type": "array"
          }
        },
        "required": [
          "name"
        ],
        "title": "CreateRoutingFormRequest",
        "type": "object"
      },
      "CreateScheduleRequest": {
        "properties": {
          "availability": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/AvailabilityInput"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Availability"
          },
          "is_default": {
            "default": false,
            "title": "Is Default",
            "type": "boolean"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "overrides": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/OverrideInput"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Overrides"
          },
          "time_zone": {
            "title": "Time Zone",
            "type": "string"
          }
        },
        "required": [
          "name",
          "time_zone"
        ],
        "title": "CreateScheduleRequest",
        "type": "object"
      },
      "CreateStepRequest": {
        "properties": {
          "angle_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Angle Id"
          },
          "channel": {
            "title": "Channel",
            "type": "string"
          },
          "condition": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Condition"
          },
          "constraints": {
            "additionalProperties": true,
            "title": "Constraints",
            "type": "object"
          },
          "cta_type": {
            "default": "soft_ask",
            "title": "Cta Type",
            "type": "string"
          },
          "day": {
            "title": "Day",
            "type": "integer"
          },
          "mode": {
            "title": "Mode",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "personalization_level": {
            "default": "medium",
            "title": "Personalization Level",
            "type": "string"
          },
          "platform": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Platform"
          },
          "stop_on_reply": {
            "default": true,
            "title": "Stop On Reply",
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "channel",
          "mode",
          "day"
        ],
        "title": "CreateStepRequest",
        "type": "object"
      },
      "CreateWorkflowRequest": {
        "properties": {
          "event_type_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Type Ids"
          },
          "is_active_on_all": {
            "default": false,
            "title": "Is Active On All",
            "type": "boolean"
          },
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/WorkflowStepInput"
            },
            "maxItems": 20,
            "minItems": 1,
            "title": "Steps",
            "type": "array"
          },
          "time": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Time"
          },
          "time_unit": {
            "anyOf": [
              {
                "enum": [
                  "minutes",
                  "hours",
                  "days"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Time Unit"
          },
          "trigger": {
            "enum": [
              "new_booking",
              "before_event",
              "after_event",
              "booking_cancelled",
              "booking_rescheduled"
            ],
            "title": "Trigger",
            "type": "string"
          }
        },
        "required": [
          "name",
          "trigger",
          "steps"
        ],
        "title": "CreateWorkflowRequest",
        "type": "object"
      },
      "CrmFieldItem": {
        "properties": {
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "required": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Required"
          },
          "slug": {
            "title": "Slug",
            "type": "string"
          },
          "type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Type"
          }
        },
        "required": [
          "name",
          "slug"
        ],
        "title": "CrmFieldItem",
        "type": "object"
      },
      "CrmFieldsResponse": {
        "properties": {
          "fields": {
            "items": {
              "$ref": "#/components/schemas/CrmFieldItem"
            },
            "title": "Fields",
            "type": "array"
          }
        },
        "title": "CrmFieldsResponse",
        "type": "object"
      },
      "CrmIntegrationResponse": {
        "properties": {
          "connected_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Connected At"
          },
          "connection_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Connection Id"
          },
          "last_sync_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Sync At"
          },
          "provider": {
            "title": "Provider",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "provider",
          "status"
        ],
        "title": "CrmIntegrationResponse",
        "type": "object"
      },
      "CrmProvider": {
        "enum": [
          "hubspot",
          "salesforce",
          "pipedrive",
          "zoho",
          "sugarcrm"
        ],
        "title": "CrmProvider",
        "type": "string"
      },
      "CrmPushRequest": {
        "properties": {
          "provider_fields": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Field mapping overrides",
            "title": "Provider Fields"
          },
          "records": {
            "description": "Records to push to the CRM provider",
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Records",
            "type": "array"
          }
        },
        "required": [
          "records"
        ],
        "title": "CrmPushRequest",
        "type": "object"
      },
      "CrmPushResponse": {
        "properties": {
          "errors": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Errors",
            "type": "array"
          },
          "failed_count": {
            "default": 0,
            "title": "Failed Count",
            "type": "integer"
          },
          "pushed_count": {
            "default": 0,
            "title": "Pushed Count",
            "type": "integer"
          }
        },
        "title": "CrmPushResponse",
        "type": "object"
      },
      "CrmStatusResponse": {
        "properties": {
          "connected": {
            "title": "Connected",
            "type": "boolean"
          },
          "connection_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Connection Id"
          },
          "crm_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Crm Type"
          },
          "last_sync_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Sync At"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "provider": {
            "title": "Provider",
            "type": "string"
          }
        },
        "required": [
          "provider",
          "connected"
        ],
        "title": "CrmStatusResponse",
        "type": "object"
      },
      "DealAssertRequest": {
        "properties": {
          "amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount"
          },
          "close_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Close Date"
          },
          "company_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Company ID (match key, combined with name)",
            "title": "Company Id"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "name": {
            "description": "Deal name (match key)",
            "title": "Name",
            "type": "string"
          },
          "pipeline_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pipeline Id"
          },
          "stage_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stage Id"
          }
        },
        "required": [
          "name"
        ],
        "title": "DealAssertRequest",
        "type": "object"
      },
      "DealAssertResponse": {
        "properties": {
          "action": {
            "description": "'created' or 'updated'",
            "title": "Action",
            "type": "string"
          },
          "deal_id": {
            "title": "Deal Id",
            "type": "string"
          }
        },
        "required": [
          "action",
          "deal_id"
        ],
        "title": "DealAssertResponse",
        "type": "object"
      },
      "DealContactAssertRequest": {
        "properties": {
          "deal_id": {
            "description": "Deal ID to associate",
            "title": "Deal Id",
            "type": "string"
          }
        },
        "required": [
          "deal_id"
        ],
        "title": "DealContactAssertRequest",
        "type": "object"
      },
      "DealCreateRequest": {
        "properties": {
          "allow_duplicate": {
            "default": false,
            "description": "Set true to create a deal even if one already exists for the company",
            "title": "Allow Duplicate",
            "type": "boolean"
          },
          "amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Deal monetary value",
            "title": "Amount"
          },
          "close_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Expected close date (ISO 8601)",
            "title": "Close Date"
          },
          "company_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Deprecated: the company is derived from the contacts. If sent, it must match; otherwise omit it.",
            "title": "Company Id"
          },
          "contact_ids": {
            "description": "mashup_contact_ids to associate with the deal (>=1 required; all must share one company)",
            "items": {
              "type": "integer"
            },
            "minItems": 1,
            "title": "Contact Ids",
            "type": "array"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": "USD",
            "description": "Currency code (default: USD)",
            "title": "Currency"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Deal description",
            "title": "Description"
          },
          "name": {
            "description": "Deal name",
            "title": "Name",
            "type": "string"
          },
          "owner_id": {
            "description": "Deal owner (user id or email). Required.",
            "title": "Owner Id",
            "type": "string"
          },
          "pipeline_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pipeline ID (defaults to org default)",
            "title": "Pipeline Id"
          },
          "stage_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Stage ID (from /deals/pipelines)",
            "title": "Stage Id"
          }
        },
        "required": [
          "name",
          "owner_id",
          "contact_ids"
        ],
        "title": "DealCreateRequest",
        "type": "object"
      },
      "DealResponse": {
        "properties": {
          "amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount"
          },
          "close_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Close Date"
          },
          "closed_lost_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Closed Lost Reason"
          },
          "company_id": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Company Id"
          },
          "contact_count": {
            "default": 0,
            "title": "Contact Count",
            "type": "integer"
          },
          "contacts": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ContactBrief"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contacts"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "last_activity_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Activity At"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "owner_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Email"
          },
          "owner_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Id"
          },
          "owner_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Name"
          },
          "pipeline_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pipeline Id"
          },
          "primary_contact": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ContactBrief"
              },
              {
                "type": "null"
              }
            ]
          },
          "stage_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stage Id"
          },
          "stage_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stage Name"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "title": "DealResponse",
        "type": "object"
      },
      "DealUpdateRequest": {
        "properties": {
          "add_contact_ids": {
            "description": "mashup_contact_ids to add to the deal (must match the deal's company; idempotent)",
            "items": {
              "type": "integer"
            },
            "title": "Add Contact Ids",
            "type": "array"
          },
          "amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Deal monetary value",
            "title": "Amount"
          },
          "close_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Expected close date (ISO 8601)",
            "title": "Close Date"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Currency code",
            "title": "Currency"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Deal description",
            "title": "Description"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Deal name",
            "title": "Name"
          },
          "owner_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "New deal owner (user id or email)",
            "title": "Owner Id"
          },
          "remove_contact_ids": {
            "description": "mashup_contact_ids to remove from the deal (idempotent — unlinked skipped)",
            "items": {
              "type": "integer"
            },
            "title": "Remove Contact Ids",
            "type": "array"
          },
          "stage_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Stage ID",
            "title": "Stage Id"
          }
        },
        "title": "DealUpdateRequest",
        "type": "object"
      },
      "DefaultConferencingEnvelope": {
        "description": "Envelope for GET/POST conferencing default. Inner fields are all-Optional\n(``null`` when nothing is configured), so the envelope is what carries the\nreal payload through response validation.",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DefaultConferencingResponse"
          }
        },
        "required": [
          "data"
        ],
        "title": "DefaultConferencingEnvelope",
        "type": "object"
      },
      "DefaultConferencingResponse": {
        "properties": {
          "credential_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Credential Id"
          },
          "link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Link"
          },
          "provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider"
          }
        },
        "title": "DefaultConferencingResponse",
        "type": "object"
      },
      "DeleteFieldResponse": {
        "properties": {
          "column_id": {
            "title": "Column Id",
            "type": "integer"
          },
          "deleted": {
            "default": true,
            "title": "Deleted",
            "type": "boolean"
          }
        },
        "required": [
          "column_id"
        ],
        "title": "DeleteFieldResponse",
        "type": "object"
      },
      "DestinationCalendarEnvelope": {
        "description": "Envelope for GET/PUT /calendars/destination. ``data`` is ``null`` when\nno destination calendar is configured.",
        "properties": {
          "data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DestinationCalendarResponse"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "DestinationCalendarEnvelope",
        "type": "object"
      },
      "DestinationCalendarResponse": {
        "properties": {
          "credential_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Credential Id"
          },
          "event_type_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Type Id"
          },
          "external_id": {
            "title": "External Id",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "integration": {
            "title": "Integration",
            "type": "string"
          },
          "primary_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Primary Email"
          }
        },
        "required": [
          "id",
          "integration",
          "external_id"
        ],
        "title": "DestinationCalendarResponse",
        "type": "object"
      },
      "DialerAgentSummary": {
        "description": "One row from the agents list.\n\nTrimmed to the fields a chat picker needs (name, role, status, and the\nUUID to feed back into ``create_dialer_session``). Anything else the\nvoice service returns (knowledge collections, voice/calendar) stays\nserver-side - the chat layer doesn't need it for the picker UX.",
        "properties": {
          "agent_id": {
            "description": "Agent UUID - feed this into create_dialer_session.",
            "title": "Agent Id",
            "type": "string"
          },
          "agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Name"
          },
          "agent_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Status"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "entity_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Entity Type"
          },
          "is_template": {
            "default": false,
            "title": "Is Template",
            "type": "boolean"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role"
          }
        },
        "required": [
          "agent_id"
        ],
        "title": "DialerAgentSummary",
        "type": "object"
      },
      "DialerAgentsListResponse": {
        "description": "List wrapper for the agents picker.",
        "properties": {
          "agents": {
            "items": {
              "$ref": "#/components/schemas/DialerAgentSummary"
            },
            "title": "Agents",
            "type": "array"
          },
          "total_count": {
            "default": 0,
            "title": "Total Count",
            "type": "integer"
          }
        },
        "title": "DialerAgentsListResponse",
        "type": "object"
      },
      "DialerNumberInfo": {
        "description": "One available dialer number with its current health stats.",
        "properties": {
          "assigned_to": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned To"
          },
          "calls_7d": {
            "default": 0,
            "title": "Calls 7D",
            "type": "integer"
          },
          "calls_today": {
            "default": 0,
            "title": "Calls Today",
            "type": "integer"
          },
          "connect_rate_7d": {
            "default": 0.0,
            "title": "Connect Rate 7D",
            "type": "number"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "daily_limit": {
            "default": 40,
            "title": "Daily Limit",
            "type": "integer"
          },
          "inbound_type": {
            "default": "ai",
            "title": "Inbound Type",
            "type": "string"
          },
          "is_valid": {
            "default": true,
            "title": "Is Valid",
            "type": "boolean"
          },
          "number": {
            "title": "Number",
            "type": "string"
          },
          "telephony_provider": {
            "default": "twilio",
            "title": "Telephony Provider",
            "type": "string"
          }
        },
        "required": [
          "number"
        ],
        "title": "DialerNumberInfo",
        "type": "object"
      },
      "DialerNumbersListResponse": {
        "description": "List wrapper for dialer numbers.\n\nThe voice payload includes a top-level ``daily_limit`` default; we\ndrop it from the public shape because it is per-number on each row\nalready, so re-publishing it would just confuse callers.",
        "properties": {
          "numbers": {
            "items": {
              "$ref": "#/components/schemas/DialerNumberInfo"
            },
            "title": "Numbers",
            "type": "array"
          }
        },
        "title": "DialerNumbersListResponse",
        "type": "object"
      },
      "DialerReportFilters": {
        "description": "Echo of the filters the voice service ran the report with.\n\nUseful for clients that need to confirm which slice they got back,\nespecially when the request omits ``date_from`` / ``date_to`` and the\nserver applies defaults.",
        "properties": {
          "aggregation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Aggregation"
          },
          "date_from": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Date From"
          },
          "date_to": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Date To"
          },
          "org_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Org Id"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          },
          "user_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Email"
          }
        },
        "title": "DialerReportFilters",
        "type": "object"
      },
      "DialerReportMetric": {
        "description": "One aggregated row in the analytics report.\n\nSchema mirrors ``ParallelDialerMetrics``. The disposition breakdown\nis a passthrough dict so that voice-side disposition additions do\nnot require a coordinated DTO bump here.",
        "properties": {
          "avg_call_duration_minutes": {
            "default": 0.0,
            "title": "Avg Call Duration Minutes",
            "type": "number"
          },
          "avg_calls_per_session": {
            "default": 0.0,
            "title": "Avg Calls Per Session",
            "type": "number"
          },
          "connection_rate": {
            "default": 0.0,
            "title": "Connection Rate",
            "type": "number"
          },
          "date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Date"
          },
          "dispositions": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dispositions"
          },
          "list_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "List Title"
          },
          "org_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Org Id"
          },
          "peak_calling_hour": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Peak Calling Hour"
          },
          "redial_count": {
            "default": 0,
            "title": "Redial Count",
            "type": "integer"
          },
          "redial_success_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Redial Success Rate"
          },
          "sdr_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sdr Name"
          },
          "success_rate": {
            "default": 0.0,
            "title": "Success Rate",
            "type": "number"
          },
          "talk_time_minutes": {
            "default": 0.0,
            "title": "Talk Time Minutes",
            "type": "number"
          },
          "total_callbacks": {
            "default": 0,
            "title": "Total Callbacks",
            "type": "integer"
          },
          "total_connections": {
            "default": 0,
            "title": "Total Connections",
            "type": "integer"
          },
          "total_dials": {
            "default": 0,
            "title": "Total Dials",
            "type": "integer"
          },
          "total_voicemails": {
            "default": 0,
            "title": "Total Voicemails",
            "type": "integer"
          },
          "unique_sessions": {
            "default": 0,
            "title": "Unique Sessions",
            "type": "integer"
          },
          "voicemail_rate": {
            "default": 0.0,
            "title": "Voicemail Rate",
            "type": "number"
          }
        },
        "title": "DialerReportMetric",
        "type": "object"
      },
      "DialerSessionCreateRequest": {
        "description": "Body for creating a parallel-dialer session in PAUSED state.\n\nThe session is created paused so the SDR can open the dialer UI and\nstart dialing on their own time. Org and user are pinned server-side\nfrom the API key - any value supplied here is ignored.\n\nRequired: ``name``, ``from_phone``.\nOptional: ``list_id`` / ``list_title`` (carried in session metadata),\n``agent_id`` (V2 agent UUID - use ``GET /voice/dialer/agents`` to look up),\n``studio_campaign_id`` (Campaign Builder UUID for studio campaign linkage).",
        "properties": {
          "agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Voice agent UUID. Use GET /voice/dialer/agents to look up.",
            "title": "Agent Id"
          },
          "agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Legacy V1 agent name fallback (defaults to \"default_agent\" upstream).",
            "title": "Agent Name"
          },
          "entity_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "V2 agent entity type (\"agent\" or \"twin\"). Optional.",
            "title": "Entity Type"
          },
          "from_phone": {
            "description": "Caller-ID phone number. Must be one of the org's dialer numbers.",
            "maxLength": 16,
            "minLength": 9,
            "title": "From Phone",
            "type": "string"
          },
          "list_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contact list ID the SDR will dial from. Stored in session metadata.",
            "title": "List Id"
          },
          "list_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Display title for the list (e.g. 'Q4 ICP'). Stored in metadata.",
            "title": "List Title"
          },
          "name": {
            "description": "Session display name.",
            "maxLength": 200,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "skip_voicemails": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Per-session override for voicemail-skip behaviour. None = use SDR default.",
            "title": "Skip Voicemails"
          },
          "studio_campaign_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Campaign Builder (Studio) campaign UUID. Optional linkage.",
            "title": "Studio Campaign Id"
          },
          "user_timezone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "IANA timezone for analytics grouping (e.g. \"America/New_York\").",
            "title": "User Timezone"
          }
        },
        "required": [
          "name",
          "from_phone"
        ],
        "title": "DialerSessionCreateRequest",
        "type": "object"
      },
      "DialerSessionCreateResponse": {
        "description": "Echo of the voice service's ``ParallelDialResponse`` for a paused-create.\n\nWe deliberately drop ``twilio_token`` from the public shape - it is\nSDR-frontend-specific and is regenerated by the dialer UI on join, so\nre-publishing it here would only confuse a chat caller.",
        "properties": {
          "created_at": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "from_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "From Phone"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "org_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Org Id"
          },
          "session_id": {
            "title": "Session Id",
            "type": "string"
          },
          "session_metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Metadata"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "total_calls": {
            "default": 0,
            "title": "Total Calls",
            "type": "integer"
          },
          "user_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Email"
          },
          "user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          }
        },
        "required": [
          "session_id",
          "status"
        ],
        "title": "DialerSessionCreateResponse",
        "type": "object"
      },
      "DialerSessionResumeRequest": {
        "description": "Body for resuming a paused parallel-dialer session.\n\nThe resume endpoint mirrors what the dialer UI does when the SDR\nclicks \"Start Dialing\" on a paused session: it pages the source list\nusing the cursor stored in ``session_metadata``, filters out\nalready-called contacts, and forwards the next batch to the voice\nservice's ``start-session`` endpoint.\n\nOnly ``max_contacts`` is exposed - org / user / from_phone /\nlist_id / agent / session_metadata are all read off the persisted\nsession so the caller doesn't have to reconstruct them.",
        "properties": {
          "max_contacts": {
            "default": 4,
            "description": "Number of contacts to dial in this batch. Voice caps parallel dialing at 4.",
            "maximum": 4.0,
            "minimum": 1.0,
            "title": "Max Contacts",
            "type": "integer"
          }
        },
        "title": "DialerSessionResumeRequest",
        "type": "object"
      },
      "DialerSessionResumeResponse": {
        "description": "Echo of voice's ``ParallelDialResponse`` plus a count of contacts dialed.\n\n``dialed_count`` is the number of calls actually placed in this\nresume batch. It can be lower than ``max_contacts`` when the list is\nnear exhausted, every remaining row is missing a phone, or every\ncandidate was already called earlier in the session.\n\n``twilio_token`` and ``conference_name`` are deliberately dropped -\nthey are SDR-frontend specific and an MCP / API caller has no use\nfor them. The dialer UI regenerates them on join.",
        "properties": {
          "created_at": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "dialed_count": {
            "default": 0,
            "title": "Dialed Count",
            "type": "integer"
          },
          "from_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "From Phone"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "org_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Org Id"
          },
          "session_id": {
            "title": "Session Id",
            "type": "string"
          },
          "session_metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Metadata"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "total_calls": {
            "default": 0,
            "title": "Total Calls",
            "type": "integer"
          },
          "updated_at": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "user_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Email"
          },
          "user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          }
        },
        "required": [
          "session_id",
          "status"
        ],
        "title": "DialerSessionResumeResponse",
        "type": "object"
      },
      "DialerSessionStatusUpdateRequest": {
        "description": "Body for pause / resume / stop on a parallel-dialer session.\n\nThe voice service treats a status PATCH as the lifecycle hook:\n- ``ACTIVE`` resumes a paused session.\n- ``PAUSED`` pauses an active session.\n- ``COMPLETED`` ends the session - one-way, can be re-opened only via\n  ``manual-dial`` (which we do not expose here).\n- ``FAILED`` is reserved for system use; we reject it on the public\n  surface so a caller cannot mis-mark a session.",
        "properties": {
          "status": {
            "description": "One of \"ACTIVE\" (resume), \"PAUSED\" (pause), \"COMPLETED\" (stop).",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "title": "DialerSessionStatusUpdateRequest",
        "type": "object"
      },
      "DialerSessionStatusUpdateResponse": {
        "description": "Echo of voice's ``SessionUpdateResponse`` for the public surface.",
        "properties": {
          "created_at": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "from_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "From Phone"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "org_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Org Id"
          },
          "session_id": {
            "title": "Session Id",
            "type": "string"
          },
          "session_metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Metadata"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "total_calls": {
            "default": 0,
            "title": "Total Calls",
            "type": "integer"
          },
          "updated_at": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "user_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Email"
          },
          "user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          }
        },
        "required": [
          "session_id",
          "status"
        ],
        "title": "DialerSessionStatusUpdateResponse",
        "type": "object"
      },
      "DialerSessionSummary": {
        "description": "One row from the dialer-sessions list.\n\nThe voice service returns a flat dict per session built from\n``ParallelDialSession`` columns plus an aggregated ``contact_ids``\narray. We surface every documented column directly so that read-only\nconsumers can introspect a session without a follow-up call.",
        "properties": {
          "campaign_builder_campaign_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Campaign Builder Campaign Id"
          },
          "campaign_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Campaign Id"
          },
          "contact_ids": {
            "items": {},
            "title": "Contact Ids",
            "type": "array"
          },
          "created_at": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "from_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "From Phone"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "org_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Org Id"
          },
          "session_id": {
            "title": "Session Id",
            "type": "string"
          },
          "session_metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Metadata"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "total_calls": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Calls"
          },
          "updated_at": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "user_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Email"
          },
          "user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          }
        },
        "required": [
          "session_id"
        ],
        "title": "DialerSessionSummary",
        "type": "object"
      },
      "DialerSessionsListResponse": {
        "description": "List wrapper for dialer sessions.\n\nTop-level matches the voice payload (``data`` + ``pagination``) so the\npublic API caller sees the exact same shape they would get if voice\nwere exposed directly. The standard ``ApiResponse`` envelope wraps\nTHIS object as its ``data`` field.",
        "properties": {
          "pagination": {
            "$ref": "#/components/schemas/VoicePagination"
          },
          "sessions": {
            "items": {
              "$ref": "#/components/schemas/DialerSessionSummary"
            },
            "title": "Sessions",
            "type": "array"
          }
        },
        "title": "DialerSessionsListResponse",
        "type": "object"
      },
      "DialerStatsResponse": {
        "description": "Top-level wrapper for dialer analytics.\n\nField names follow the voice ``ParallelDialerReport`` shape so the\nstructured response is meaningful both to a Developer API caller and\nto an MCP agent rendering it inline.",
        "properties": {
          "filters": {
            "$ref": "#/components/schemas/DialerReportFilters"
          },
          "metrics": {
            "items": {
              "$ref": "#/components/schemas/DialerReportMetric"
            },
            "title": "Metrics",
            "type": "array"
          },
          "summary": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DialerReportMetric"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "DialerStatsResponse",
        "type": "object"
      },
      "DisputeInvoiceRequest": {
        "properties": {
          "reason": {
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "reason"
        ],
        "title": "DisputeInvoiceRequest",
        "type": "object"
      },
      "DraftResponse": {
        "properties": {
          "content": {
            "description": "Generated draft text (HTML)",
            "title": "Content",
            "type": "string"
          },
          "credits_charged": {
            "default": 0,
            "title": "Credits Charged",
            "type": "integer"
          },
          "plain_content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Plain text version",
            "title": "Plain Content"
          }
        },
        "required": [
          "content"
        ],
        "title": "DraftResponse",
        "type": "object"
      },
      "EmailVerificationInput": {
        "description": "Email verification config attached to a waterfall pipeline.\n\nMirrors the canonical `EmailVerificationConfigDto` in\n`enrichment/interfaces/fastapi/waterfall_dtos.py` so the dev-API and the\nUI persist an identical settings shape (the CF worker reads `settings.\nemail_verification.*` regardless of which surface saved the pipeline).",
        "properties": {
          "accept_catchall": {
            "default": false,
            "description": "Treat catch-all responses as valid (domains that accept any address).",
            "title": "Accept Catchall",
            "type": "boolean"
          },
          "enabled": {
            "default": true,
            "description": "Enable post-enrichment email verification",
            "title": "Enabled",
            "type": "boolean"
          },
          "provider": {
            "default": "zerobounce",
            "description": "Verification provider. Charges credits when use_system_credentials=True.",
            "enum": [
              "zerobounce",
              "hunter",
              "icypeas",
              "leadmagic"
            ],
            "title": "Provider",
            "type": "string"
          },
          "use_system_credentials": {
            "default": true,
            "description": "Use graph8-managed API keys (charges credits). False = use org's BYOK keys.",
            "title": "Use System Credentials",
            "type": "boolean"
          },
          "valid_statuses": {
            "description": "Verification statuses to accept as valid. Typical: ['valid'] or ['valid','catch-all'].",
            "items": {
              "type": "string"
            },
            "title": "Valid Statuses",
            "type": "array"
          }
        },
        "title": "EmailVerificationInput",
        "type": "object"
      },
      "EnablementAssetUploadRequest": {
        "description": "Base64 file upload for the org's Studio Enablement library.",
        "properties": {
          "content_base64": {
            "minLength": 1,
            "title": "Content Base64",
            "type": "string"
          },
          "file_name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "File Name",
            "type": "string"
          },
          "folder": {
            "anyOf": [
              {
                "maxLength": 50,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Folder"
          },
          "mime_type": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mime Type"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "maxItems": 20,
            "title": "Tags",
            "type": "array"
          }
        },
        "required": [
          "file_name",
          "content_base64"
        ],
        "title": "EnablementAssetUploadRequest",
        "type": "object"
      },
      "EnrichJobResponse": {
        "properties": {
          "completed": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed"
          },
          "failed_enrichments": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failed Enrichments"
          },
          "job_id": {
            "title": "Job Id",
            "type": "string"
          },
          "provider_errors": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Errors"
          },
          "results": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Results"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "successful_enrichments": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Successful Enrichments"
          },
          "total": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total"
          },
          "total_credits_used": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Credits Used"
          },
          "warnings": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Warnings"
          }
        },
        "required": [
          "job_id",
          "status"
        ],
        "title": "EnrichJobResponse",
        "type": "object"
      },
      "EnrichRequest": {
        "description": "Request to start an async waterfall enrichment job.",
        "properties": {
          "contact_ids": {
            "description": "Contact IDs to enrich",
            "items": {
              "type": "integer"
            },
            "title": "Contact Ids",
            "type": "array"
          },
          "fields_config": {
            "anyOf": [
              {
                "additionalProperties": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Fields to enrich and provider order. Example: {\"work_email\": [\"prospeo\", \"dropcontact\"]}",
            "title": "Fields Config"
          },
          "list_id": {
            "description": "List ID the contacts belong to",
            "title": "List Id",
            "type": "integer"
          }
        },
        "required": [
          "contact_ids",
          "list_id"
        ],
        "title": "EnrichRequest",
        "type": "object"
      },
      "EventTypeListItem": {
        "description": "One row in the booking-link picker. `id` feeds `appointment_id` on the launch body.",
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "hidden": {
            "default": false,
            "description": "When True the event type is not bookable publicly. Excluded by default.",
            "title": "Hidden",
            "type": "boolean"
          },
          "id": {
            "description": "Event-type integer ID; pass back to launch / PATCH endpoints as `appointment_id`.",
            "title": "Id",
            "type": "integer"
          },
          "length": {
            "description": "Slot duration in minutes.",
            "title": "Length",
            "type": "integer"
          },
          "schedule_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "ID of the availability schedule attached to this event type, if any.",
            "title": "Schedule Id"
          },
          "scheduling_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Cal.com scheduling type: managed | round_robin | collective | None (= single-host).",
            "title": "Scheduling Type"
          },
          "slug": {
            "description": "URL-safe slug (the path segment used in `appointments/team/...` links).",
            "title": "Slug",
            "type": "string"
          },
          "title": {
            "description": "Display title shown on the booking page.",
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "slug",
          "length"
        ],
        "title": "EventTypeListItem",
        "type": "object"
      },
      "EventTypesListResponse": {
        "description": "Envelope for `GET /event-types`.",
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/EventTypeListItem"
            },
            "title": "Data",
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "title": "EventTypesListResponse",
        "type": "object"
      },
      "ExactReplacementRequest": {
        "description": "One exact replacement applied against the evolving HTML document.",
        "properties": {
          "expected_matches": {
            "default": 1,
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Expected Matches",
            "type": "integer"
          },
          "new": {
            "maxLength": 500000,
            "title": "New",
            "type": "string"
          },
          "old": {
            "maxLength": 200000,
            "minLength": 1,
            "title": "Old",
            "type": "string"
          }
        },
        "required": [
          "old",
          "new"
        ],
        "title": "ExactReplacementRequest",
        "type": "object"
      },
      "FailureRuleRequest": {
        "properties": {
          "channel": {
            "description": "Channel the injected failure applies to: email, sms, whatsapp, voice, linkedin, crm, ads, calendar, or '*' for every channel.",
            "title": "Channel",
            "type": "string"
          },
          "failure_mode": {
            "description": "One of: hard_bounce, provider_error, timeout, rate_limited, invalid_recipient.",
            "title": "Failure Mode",
            "type": "string"
          },
          "remaining": {
            "anyOf": [
              {
                "maximum": 10000.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Fail this many sends, then auto-clear. Omit to fail until cleared.",
            "title": "Remaining"
          }
        },
        "required": [
          "channel",
          "failure_mode"
        ],
        "title": "FailureRuleRequest",
        "type": "object"
      },
      "FailureRulesResponse": {
        "properties": {
          "rules": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Rules",
            "type": "array"
          },
          "sandbox": {
            "default": true,
            "title": "Sandbox",
            "type": "boolean"
          }
        },
        "required": [
          "rules"
        ],
        "title": "FailureRulesResponse",
        "type": "object"
      },
      "FieldResponse": {
        "properties": {
          "data_type": {
            "default": "text",
            "title": "Data Type",
            "type": "string"
          },
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "is_global": {
            "default": true,
            "title": "Is Global",
            "type": "boolean"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "title"
        ],
        "title": "FieldResponse",
        "type": "object"
      },
      "FieldValueItem": {
        "description": "One (column, value) pair to write on a row.",
        "properties": {
          "column_id": {
            "description": "Column ID from g8_list_fields or g8_create_field.",
            "title": "Column Id",
            "type": "integer"
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Value to write into the custom column. Pass null (or omit) to clear the field.",
            "title": "Value"
          }
        },
        "required": [
          "column_id"
        ],
        "title": "FieldValueItem",
        "type": "object"
      },
      "FixtureActionResponse": {
        "properties": {
          "action": {
            "title": "Action",
            "type": "string"
          },
          "companies": {
            "default": 0,
            "title": "Companies",
            "type": "integer"
          },
          "contacts": {
            "default": 0,
            "title": "Contacts",
            "type": "integer"
          },
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          },
          "sandbox": {
            "default": true,
            "title": "Sandbox",
            "type": "boolean"
          }
        },
        "required": [
          "action"
        ],
        "title": "FixtureActionResponse",
        "type": "object"
      },
      "GenerateSpintaxRequest": {
        "description": "One-time AI generation: rewrite a manual email into spintax.\n\nField types intentionally mirror the internal\n``sequencer.interfaces.voice.email_generation.GenerateSpintaxPayload``\n(same Literals) so outer/inner validation cannot drift. The legacy\n``target_combinations`` knob is deliberately NOT exposed on the public\nsurface; ``strength`` supersedes it.",
        "properties": {
          "body": {
            "description": "Email body to rewrite into spintax",
            "maxLength": 50000,
            "minLength": 1,
            "title": "Body",
            "type": "string"
          },
          "email_type": {
            "default": "plain",
            "description": "Body format. 'html' preserves every <a href> link and all {{variables}} in the rewrite.",
            "enum": [
              "plain",
              "html"
            ],
            "title": "Email Type",
            "type": "string"
          },
          "strength": {
            "default": "balanced",
            "description": "Variation intensity: how heavily to vary the copy and how deeply to nest spintax blocks.",
            "enum": [
              "light",
              "balanced",
              "maximum"
            ],
            "title": "Strength",
            "type": "string"
          },
          "subject": {
            "description": "Email subject to rewrite into spintax",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Subject",
            "type": "string"
          },
          "tone_instructions": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional tone/style guidance applied during the rewrite (e.g. 'casual, no exclamation marks').",
            "title": "Tone Instructions"
          }
        },
        "required": [
          "subject",
          "body"
        ],
        "title": "GenerateSpintaxRequest",
        "type": "object"
      },
      "GenerateSpintaxResponse": {
        "description": "Spintax-encoded email plus its distinct-rendering counts.",
        "properties": {
          "body": {
            "description": "Body rewritten with (possibly nested) spintax blocks",
            "title": "Body",
            "type": "string"
          },
          "body_combinations": {
            "description": "Distinct renderings the body can produce",
            "title": "Body Combinations",
            "type": "integer"
          },
          "subject": {
            "description": "Subject rewritten with {{option a|option b}} spintax blocks",
            "title": "Subject",
            "type": "string"
          },
          "subject_combinations": {
            "description": "Distinct renderings the subject can produce",
            "title": "Subject Combinations",
            "type": "integer"
          },
          "total_combinations": {
            "description": "Distinct full-email renderings (subject x body)",
            "title": "Total Combinations",
            "type": "integer"
          }
        },
        "required": [
          "subject",
          "body",
          "subject_combinations",
          "body_combinations",
          "total_combinations"
        ],
        "title": "GenerateSpintaxResponse",
        "type": "object"
      },
      "GetFieldValueResponse": {
        "description": "Response body for reading a single custom column value from one row.",
        "properties": {
          "column_id": {
            "title": "Column Id",
            "type": "integer"
          },
          "entity": {
            "title": "Entity",
            "type": "string"
          },
          "name": {
            "description": "The underlying column slug (column_name_db).",
            "title": "Name",
            "type": "string"
          },
          "record_id": {
            "title": "Record Id",
            "type": "integer"
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The stored value, or null if the column is unset for this row.",
            "title": "Value"
          }
        },
        "required": [
          "column_id",
          "record_id",
          "entity",
          "name"
        ],
        "title": "GetFieldValueResponse",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "HireOfferAcceptedTerm": {
        "description": "One T&C document the client agreed to when sending the offer.\n\nMirrors ``AcceptedTermDTO`` in ``marketplace.interfaces.fastapi.dtos``:\nonly ``document_id`` is sent; the server resolves the current\nversion + URL server-side at send time.",
        "properties": {
          "document_id": {
            "description": "marketplace-terms | sdr-participation-agreement",
            "title": "Document Id",
            "type": "string"
          }
        },
        "required": [
          "document_id"
        ],
        "title": "HireOfferAcceptedTerm",
        "type": "object"
      },
      "HireSdrRequest": {
        "description": "Hire-offer body — mirrors the Phase B ``HireSdrRequest`` in\n``marketplace.interfaces.fastapi.dtos``.\n\nPhase B removed ``hiring_fee_usd`` and ``commission_percentage`` and added\n``contract_length_months``, ``scope_text`` and the required\n``accepted_terms``. The contract is generated + e-signed inside graph8,\nand the client's T&C acceptance is captured in the same transaction as the\nhiring row — so ``accepted_terms`` must be non-empty or the underlying\nhandler returns ``terms_not_accepted`` (400).",
        "properties": {
          "accepted_terms": {
            "description": "Required: client's acceptance of the Marketplace Terms + SDR Participation Agreement. An empty list is rejected with 400 (terms_not_accepted) by the underlying hire handler.",
            "items": {
              "$ref": "#/components/schemas/HireOfferAcceptedTerm"
            },
            "title": "Accepted Terms",
            "type": "array"
          },
          "contract_length_months": {
            "anyOf": [
              {
                "maximum": 120.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "None = month-to-month (default); otherwise number of months",
            "title": "Contract Length Months"
          },
          "monthly_rate_usd": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "default": "0",
            "title": "Monthly Rate Usd"
          },
          "per_meeting_rate_usd": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "default": "0",
            "title": "Per Meeting Rate Usd"
          },
          "scope_text": {
            "anyOf": [
              {
                "maxLength": 4000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional scope-of-engagement text shown on the contract",
            "title": "Scope Text"
          },
          "sdr_id": {
            "title": "Sdr Id",
            "type": "string"
          },
          "start_date": {
            "description": "YYYY-MM-DD",
            "title": "Start Date",
            "type": "string"
          }
        },
        "required": [
          "sdr_id",
          "start_date"
        ],
        "title": "HireSdrRequest",
        "type": "object"
      },
      "HotContact": {
        "description": "One most-engaged contact (ranked by recent inbound activity).",
        "properties": {
          "contact_id": {
            "title": "Contact Id",
            "type": "string"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "events": {
            "default": 0,
            "description": "Inbound interaction events in the window",
            "title": "Events",
            "type": "integer"
          },
          "last_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Most recent inbound activity (ISO)",
            "title": "Last At"
          },
          "meetings": {
            "default": 0,
            "description": "Of those events, how many were meetings",
            "title": "Meetings",
            "type": "integer"
          },
          "who": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Display name, else email, else id",
            "title": "Who"
          }
        },
        "required": [
          "contact_id"
        ],
        "title": "HotContact",
        "type": "object"
      },
      "HotContactsResult": {
        "properties": {
          "contacts": {
            "items": {
              "$ref": "#/components/schemas/HotContact"
            },
            "title": "Contacts",
            "type": "array"
          },
          "days": {
            "title": "Days",
            "type": "integer"
          }
        },
        "required": [
          "days"
        ],
        "title": "HotContactsResult",
        "type": "object"
      },
      "InboxChannel": {
        "enum": [
          "email",
          "sms",
          "linkedin"
        ],
        "title": "InboxChannel",
        "type": "string"
      },
      "InboxMessageItem": {
        "properties": {
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content"
          },
          "date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Date"
          },
          "from_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "From Address"
          },
          "is_draft": {
            "default": false,
            "title": "Is Draft",
            "type": "boolean"
          },
          "message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message Id"
          },
          "responder": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "USER, AI, or OTHER",
            "title": "Responder"
          },
          "to_addresses": {
            "items": {
              "type": "string"
            },
            "title": "To Addresses",
            "type": "array"
          }
        },
        "title": "InboxMessageItem",
        "type": "object"
      },
      "InboxThreadResponse": {
        "properties": {
          "assignees": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Assignees",
            "type": "array"
          },
          "channel": {
            "title": "Channel",
            "type": "string"
          },
          "contact": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contact snapshot: name, email, company",
            "title": "Contact"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/InboxMessageItem"
            },
            "title": "Messages",
            "type": "array"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "tags": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Tags",
            "type": "array"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "required": [
          "id",
          "channel"
        ],
        "title": "InboxThreadResponse",
        "type": "object"
      },
      "IntentPageItem": {
        "properties": {
          "audience": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Audience"
          },
          "commercial_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Commercial Score"
          },
          "domain_root": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Domain Root"
          },
          "mention_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mention Score"
          },
          "page_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page Type"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          }
        },
        "title": "IntentPageItem",
        "type": "object"
      },
      "IntentSignalsResponse": {
        "properties": {
          "domain": {
            "title": "Domain",
            "type": "string"
          },
          "intent": {
            "default": "low",
            "title": "Intent",
            "type": "string"
          },
          "last_seen": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Seen"
          },
          "score": {
            "default": 0,
            "title": "Score",
            "type": "integer"
          },
          "signals": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Signals",
            "type": "array"
          }
        },
        "required": [
          "domain"
        ],
        "title": "IntentSignalsResponse",
        "type": "object"
      },
      "IssueAnalyticsKpis": {
        "additionalProperties": true,
        "description": "``GET /{newsletter_id}/issues/{issue_id}/analytics/kpis``. Open dict\nfor the ``kpis`` bucket — bucketed counters evolve independently of\nthis API surface (see ``issue_analytics_router.py`` docstring).",
        "properties": {
          "kpis": {
            "additionalProperties": true,
            "title": "Kpis",
            "type": "object"
          },
          "last_updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Updated At"
          },
          "stale": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stale"
          }
        },
        "title": "IssueAnalyticsKpis",
        "type": "object"
      },
      "IssueCreateRequest": {
        "properties": {
          "html_body": {
            "title": "Html Body",
            "type": "string"
          },
          "plain_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Plain Text"
          },
          "preview_text": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preview Text"
          },
          "reply_to": {
            "anyOf": [
              {
                "format": "email",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reply To"
          },
          "sender_email": {
            "anyOf": [
              {
                "format": "email",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Email"
          },
          "sender_name": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Name"
          },
          "subject": {
            "maxLength": 2000,
            "title": "Subject",
            "type": "string"
          }
        },
        "required": [
          "subject",
          "html_body"
        ],
        "title": "IssueCreateRequest",
        "type": "object"
      },
      "IssueDetail": {
        "additionalProperties": true,
        "description": "A single newsletter issue. Open dict — the internal handler returns\nthe row dict plus derived KPI/status fields.",
        "properties": {
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "newsletter_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Newsletter Id"
          },
          "sent_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sent At"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "title": "IssueDetail",
        "type": "object"
      },
      "IssueSendRequest": {
        "description": "Enqueue or schedule an issue for sending. ``scheduled_at`` omitted\n(or null) sends immediately.",
        "properties": {
          "scheduled_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scheduled At"
          }
        },
        "title": "IssueSendRequest",
        "type": "object"
      },
      "IssueSendTestRequest": {
        "properties": {
          "test_email": {
            "maxLength": 255,
            "title": "Test Email",
            "type": "string"
          }
        },
        "required": [
          "test_email"
        ],
        "title": "IssueSendTestRequest",
        "type": "object"
      },
      "IssueUpdateRequest": {
        "description": "Partial update for a draft issue. All fields optional — only the\nones sent are changed (mirrors the internal ``exclude_unset=True``\nhandling in ``update_issue``).",
        "properties": {
          "html_body": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Html Body"
          },
          "plain_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Plain Text"
          },
          "preview_text": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preview Text"
          },
          "reply_to": {
            "anyOf": [
              {
                "format": "email",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reply To"
          },
          "sender_email": {
            "anyOf": [
              {
                "format": "email",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Email"
          },
          "sender_name": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Name"
          },
          "subject": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          }
        },
        "title": "IssueUpdateRequest",
        "type": "object"
      },
      "JobPostCreate": {
        "properties": {
          "countries": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Countries"
          },
          "deal_size_band": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deal Size Band"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "engagement_type": {
            "default": "monthly",
            "maxLength": 30,
            "title": "Engagement Type",
            "type": "string"
          },
          "industries": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Industries"
          },
          "languages": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Languages"
          },
          "monthly_rate_usd_max": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Rate Usd Max"
          },
          "monthly_rate_usd_min": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Rate Usd Min"
          },
          "openings_count": {
            "default": 1,
            "minimum": 1.0,
            "title": "Openings Count",
            "type": "integer"
          },
          "per_meeting_rate_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Per Meeting Rate Usd"
          },
          "regions": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Regions"
          },
          "role_type": {
            "maxLength": 40,
            "title": "Role Type",
            "type": "string"
          },
          "seniority": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seniority"
          },
          "status": {
            "default": "draft",
            "title": "Status",
            "type": "string"
          },
          "title": {
            "maxLength": 200,
            "title": "Title",
            "type": "string"
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          }
        },
        "required": [
          "title",
          "role_type"
        ],
        "title": "JobPostCreate",
        "type": "object"
      },
      "JobPostUpdate": {
        "properties": {
          "countries": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Countries"
          },
          "deal_size_band": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deal Size Band"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "engagement_type": {
            "anyOf": [
              {
                "maxLength": 30,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Engagement Type"
          },
          "industries": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Industries"
          },
          "languages": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Languages"
          },
          "monthly_rate_usd_max": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Rate Usd Max"
          },
          "monthly_rate_usd_min": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Rate Usd Min"
          },
          "openings_count": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Openings Count"
          },
          "per_meeting_rate_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Per Meeting Rate Usd"
          },
          "regions": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Regions"
          },
          "role_type": {
            "anyOf": [
              {
                "maxLength": 40,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role Type"
          },
          "seniority": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seniority"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "title": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          }
        },
        "title": "JobPostUpdate",
        "type": "object"
      },
      "KBSearchRequest": {
        "properties": {
          "limit": {
            "default": 10,
            "description": "Max results",
            "maximum": 50.0,
            "minimum": 1.0,
            "title": "Limit",
            "type": "integer"
          },
          "query": {
            "description": "Search query",
            "title": "Query",
            "type": "string"
          }
        },
        "required": [
          "query"
        ],
        "title": "KBSearchRequest",
        "type": "object"
      },
      "KeywordCreateFromDomainRequest": {
        "properties": {
          "contact_limit": {
            "default": 200,
            "description": "Max contacts to pre-resolve.",
            "maximum": 500.0,
            "minimum": 1.0,
            "title": "Contact Limit",
            "type": "integer"
          },
          "domain": {
            "description": "Competitor domain to track, e.g. 'cognism.com'.",
            "maxLength": 253,
            "minLength": 3,
            "title": "Domain",
            "type": "string"
          },
          "page_limit": {
            "default": 200,
            "description": "Max pages to seed from the domain.",
            "maximum": 500.0,
            "minimum": 1.0,
            "title": "Page Limit",
            "type": "integer"
          }
        },
        "required": [
          "domain"
        ],
        "title": "KeywordCreateFromDomainRequest",
        "type": "object"
      },
      "KeywordCreateFromDomainResponse": {
        "properties": {
          "companies_seeded": {
            "default": 0,
            "title": "Companies Seeded",
            "type": "integer"
          },
          "contacts_seeded": {
            "default": 0,
            "title": "Contacts Seeded",
            "type": "integer"
          },
          "keyword": {
            "title": "Keyword",
            "type": "string"
          },
          "keyword_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Keyword Id"
          },
          "message": {
            "default": "",
            "title": "Message",
            "type": "string"
          },
          "off_domain_rejected": {
            "default": 0,
            "title": "Off Domain Rejected",
            "type": "integer"
          },
          "pages_seeded": {
            "default": 0,
            "title": "Pages Seeded",
            "type": "integer"
          }
        },
        "required": [
          "keyword"
        ],
        "title": "KeywordCreateFromDomainResponse",
        "type": "object"
      },
      "KeywordCreateFromSearchItem": {
        "properties": {
          "companies_seeded": {
            "default": 0,
            "title": "Companies Seeded",
            "type": "integer"
          },
          "contacts_seeded": {
            "default": 0,
            "title": "Contacts Seeded",
            "type": "integer"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "keyword": {
            "title": "Keyword",
            "type": "string"
          },
          "keyword_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Keyword Id"
          },
          "pages_seeded": {
            "default": 0,
            "title": "Pages Seeded",
            "type": "integer"
          },
          "status": {
            "description": "'created' | 'skipped' | 'error'",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "keyword",
          "status"
        ],
        "title": "KeywordCreateFromSearchItem",
        "type": "object"
      },
      "KeywordDetailRequest": {
        "properties": {
          "conditions": {
            "description": "Optional `[{field, operator, value}]` filter conditions.",
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Conditions",
            "type": "array"
          },
          "limit": {
            "default": 100,
            "maximum": 500.0,
            "minimum": 1.0,
            "title": "Limit",
            "type": "integer"
          },
          "page": {
            "default": 1,
            "minimum": 1.0,
            "title": "Page",
            "type": "integer"
          }
        },
        "title": "KeywordDetailRequest",
        "type": "object"
      },
      "KeywordFiltersUpdateRequest": {
        "properties": {
          "search_filters": {
            "additionalProperties": true,
            "description": "Full-replacement `search_filters` JSON. Typed fields in `intent.domain.models.keyword.KeywordSearchFilters`: audience, exclude_page_types, min_commercial_intent_level, max_urls_per_domain, llm_triage, exclude_domains. Extra keys allowed.",
            "title": "Search Filters",
            "type": "object"
          }
        },
        "required": [
          "search_filters"
        ],
        "title": "KeywordFiltersUpdateRequest",
        "type": "object"
      },
      "KeywordsCreateFromSearchRequest": {
        "properties": {
          "contact_limit": {
            "default": 50,
            "description": "Max contacts to pre-resolve per keyword.",
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Contact Limit",
            "type": "integer"
          },
          "keywords": {
            "description": "1-10 free-text keyword queries. Each is searched against the intent page index, contacts/companies are resolved, and a compete-tracking keyword row is saved. Duplicates within the request (case-insensitive, trimmed) are skipped, not re-saved.",
            "items": {
              "maxLength": 500,
              "type": "string"
            },
            "maxItems": 10,
            "minItems": 1,
            "title": "Keywords",
            "type": "array"
          },
          "page_limit": {
            "default": 20,
            "description": "Max pages to seed per keyword. Deliberately smaller than create-from-domain's 200 default since this runs once per keyword.",
            "maximum": 50.0,
            "minimum": 1.0,
            "title": "Page Limit",
            "type": "integer"
          },
          "search_filters": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional intent-search filters applied to EVERY keyword in the batch (audience, page_type, commercial_score_min, etc.). Stored verbatim on each saved keyword row so the daily resolver replays them.",
            "title": "Search Filters"
          },
          "semantic_ratio": {
            "default": 0.0,
            "description": "0 = text search (default, cheapest), 1 = semantic, between = hybrid.",
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Semantic Ratio",
            "type": "number"
          }
        },
        "required": [
          "keywords"
        ],
        "title": "KeywordsCreateFromSearchRequest",
        "type": "object"
      },
      "KeywordsCreateFromSearchResponse": {
        "properties": {
          "created_count": {
            "default": 0,
            "title": "Created Count",
            "type": "integer"
          },
          "error_count": {
            "default": 0,
            "title": "Error Count",
            "type": "integer"
          },
          "results": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/KeywordCreateFromSearchItem"
            },
            "title": "Results",
            "type": "array"
          },
          "skipped_count": {
            "default": 0,
            "title": "Skipped Count",
            "type": "integer"
          }
        },
        "title": "KeywordsCreateFromSearchResponse",
        "type": "object"
      },
      "KeywordsListRequest": {
        "properties": {
          "keyword_contains": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Case-insensitive keyword substring filter.",
            "title": "Keyword Contains"
          },
          "limit": {
            "default": 100,
            "maximum": 500.0,
            "minimum": 1.0,
            "title": "Limit",
            "type": "integer"
          },
          "page": {
            "default": 1,
            "minimum": 1.0,
            "title": "Page",
            "type": "integer"
          }
        },
        "title": "KeywordsListRequest",
        "type": "object"
      },
      "KnowledgeContextRequest": {
        "properties": {
          "entity_concept_ids": {
            "items": {
              "type": "string"
            },
            "maxItems": 20,
            "title": "Entity Concept Ids",
            "type": "array"
          },
          "task": {
            "maxLength": 2000,
            "minLength": 1,
            "title": "Task",
            "type": "string"
          },
          "token_budget": {
            "anyOf": [
              {
                "maximum": 100000.0,
                "minimum": 100.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Token Budget"
          }
        },
        "required": [
          "task"
        ],
        "title": "KnowledgeContextRequest",
        "type": "object"
      },
      "LandingPagePatchRequest": {
        "description": "Conflict-safe, idempotent landing-page patch request.",
        "properties": {
          "base_sha256": {
            "pattern": "^[a-f0-9]{64}$",
            "title": "Base Sha256",
            "type": "string"
          },
          "idempotency_key": {
            "maxLength": 128,
            "minLength": 8,
            "pattern": "^[A-Za-z0-9._:-]+$",
            "title": "Idempotency Key",
            "type": "string"
          },
          "replacements": {
            "items": {
              "$ref": "#/components/schemas/ExactReplacementRequest"
            },
            "maxItems": 20,
            "minItems": 1,
            "title": "Replacements",
            "type": "array"
          },
          "summary": {
            "default": "External AI edit",
            "maxLength": 500,
            "title": "Summary",
            "type": "string"
          }
        },
        "required": [
          "base_sha256",
          "replacements",
          "idempotency_key"
        ],
        "title": "LandingPagePatchRequest",
        "type": "object"
      },
      "ListCreateRequest": {
        "description": "Request body for creating a new list.",
        "properties": {
          "title": {
            "description": "Name of the list",
            "title": "Title",
            "type": "string"
          },
          "type": {
            "default": "contacts",
            "description": "List type: contacts, companies, suppressions, deals, leads",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "title"
        ],
        "title": "ListCreateRequest",
        "type": "object"
      },
      "ListCreateResponse": {
        "properties": {
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "total": {
            "default": 0,
            "title": "Total",
            "type": "integer"
          },
          "type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Type"
          }
        },
        "required": [
          "id",
          "title"
        ],
        "title": "ListCreateResponse",
        "type": "object"
      },
      "ListResponse": {
        "description": "Audience/list representation for the public API.",
        "properties": {
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "created_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "is_dynamic": {
            "default": false,
            "title": "Is Dynamic",
            "type": "boolean"
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source of the list",
            "title": "Source"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "title": "Tags",
            "type": "array"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "total": {
            "default": 0,
            "title": "Total",
            "type": "integer"
          },
          "type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "List type (contacts, companies, suppressions, deals, leads)",
            "title": "Type"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "required": [
          "id",
          "title"
        ],
        "title": "ListResponse",
        "type": "object"
      },
      "ListUpdateRequest": {
        "description": "Request body for updating (renaming) an existing list.",
        "properties": {
          "title": {
            "description": "New name for the list",
            "minLength": 1,
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "title"
        ],
        "title": "ListUpdateRequest",
        "type": "object"
      },
      "LocationItem": {
        "description": "A single location option on an event type.",
        "properties": {
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address"
          },
          "display_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Label"
          },
          "kind": {
            "$ref": "#/components/schemas/LocationKind"
          },
          "link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Link"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider"
          },
          "public": {
            "default": true,
            "title": "Public",
            "type": "boolean"
          }
        },
        "required": [
          "kind"
        ],
        "title": "LocationItem",
        "type": "object"
      },
      "LocationKind": {
        "description": "Rich location types for event types.",
        "enum": [
          "in_person_host",
          "in_person_attendee",
          "phone_host",
          "phone_attendee",
          "link",
          "conferencing",
          "custom"
        ],
        "title": "LocationKind",
        "type": "string"
      },
      "LookupResponse": {
        "properties": {
          "confidence": {
            "default": 0.0,
            "title": "Confidence",
            "type": "number"
          },
          "data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data"
          },
          "found": {
            "title": "Found",
            "type": "boolean"
          }
        },
        "required": [
          "found"
        ],
        "title": "LookupResponse",
        "type": "object"
      },
      "MarkAbsentRequest": {
        "properties": {
          "attendees": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attendees"
          },
          "host": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Host"
          }
        },
        "title": "MarkAbsentRequest",
        "type": "object"
      },
      "MarketplaceConnectStatusResponse": {
        "description": "Stripe Connect onboarding state. Schema mirrors the marketplace\nhandler's response shape directly.",
        "properties": {
          "account": {
            "additionalProperties": true,
            "title": "Account",
            "type": "object"
          }
        },
        "required": [
          "account"
        ],
        "title": "MarketplaceConnectStatusResponse",
        "type": "object"
      },
      "MarketplaceHiring": {
        "description": "An active hiring contract (either side).",
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "monthly_rate_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Rate Usd"
          },
          "org_id": {
            "title": "Org Id",
            "type": "string"
          },
          "per_meeting_rate_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Per Meeting Rate Usd"
          },
          "sdr_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sdr Email"
          },
          "sdr_id": {
            "title": "Sdr Id",
            "type": "string"
          },
          "sdr_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sdr Name"
          },
          "sdr_role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sdr Role"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "org_id",
          "sdr_id",
          "status"
        ],
        "title": "MarketplaceHiring",
        "type": "object"
      },
      "MarketplaceHiringsResponse": {
        "properties": {
          "count": {
            "title": "Count",
            "type": "integer"
          },
          "hirings": {
            "items": {
              "$ref": "#/components/schemas/MarketplaceHiring"
            },
            "title": "Hirings",
            "type": "array"
          }
        },
        "required": [
          "hirings",
          "count"
        ],
        "title": "MarketplaceHiringsResponse",
        "type": "object"
      },
      "MarketplaceInvoice": {
        "description": "An invoice. SDR-side: invoices I've issued. Org-side: invoices I owe.",
        "properties": {
          "due_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Due At"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "issued_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Issued At"
          },
          "org_id": {
            "title": "Org Id",
            "type": "string"
          },
          "paid_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paid At"
          },
          "sdr_id": {
            "title": "Sdr Id",
            "type": "string"
          },
          "sdr_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sdr Name"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "total_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Usd"
          }
        },
        "required": [
          "id",
          "sdr_id",
          "org_id",
          "status"
        ],
        "title": "MarketplaceInvoice",
        "type": "object"
      },
      "MarketplaceInvoicesResponse": {
        "properties": {
          "count": {
            "title": "Count",
            "type": "integer"
          },
          "invoices": {
            "items": {
              "$ref": "#/components/schemas/MarketplaceInvoice"
            },
            "title": "Invoices",
            "type": "array"
          }
        },
        "required": [
          "invoices",
          "count"
        ],
        "title": "MarketplaceInvoicesResponse",
        "type": "object"
      },
      "MarketplaceMeetingDetail": {
        "properties": {
          "meeting": {
            "additionalProperties": true,
            "title": "Meeting",
            "type": "object"
          }
        },
        "required": [
          "meeting"
        ],
        "title": "MarketplaceMeetingDetail",
        "type": "object"
      },
      "MarketplaceMeetingsResponse": {
        "description": "Generic envelope for meeting list / details — the underlying row shape\nis wide and varies (transcripts, attendees, recordings, etc.), so we pass\nit through as raw dicts under ``meetings`` rather than typing every field.\nMirrors the dialer + voice routers' opaque-payload pattern.",
        "properties": {
          "count": {
            "title": "Count",
            "type": "integer"
          },
          "meetings": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Meetings",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "meetings",
          "count",
          "total"
        ],
        "title": "MarketplaceMeetingsResponse",
        "type": "object"
      },
      "MarketplaceOffer": {
        "description": "A pending hire offer the SDR can accept or reject.",
        "properties": {
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "monthly_rate_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Rate Usd"
          },
          "org_id": {
            "title": "Org Id",
            "type": "string"
          },
          "org_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Org Name"
          },
          "per_meeting_rate_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Per Meeting Rate Usd"
          },
          "sdr_id": {
            "title": "Sdr Id",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "org_id",
          "sdr_id",
          "status"
        ],
        "title": "MarketplaceOffer",
        "type": "object"
      },
      "MarketplaceOffersResponse": {
        "properties": {
          "count": {
            "title": "Count",
            "type": "integer"
          },
          "offers": {
            "items": {
              "$ref": "#/components/schemas/MarketplaceOffer"
            },
            "title": "Offers",
            "type": "array"
          }
        },
        "required": [
          "offers",
          "count"
        ],
        "title": "MarketplaceOffersResponse",
        "type": "object"
      },
      "MarketplacePayoutAccountResponse": {
        "properties": {
          "account": {
            "additionalProperties": true,
            "title": "Account",
            "type": "object"
          }
        },
        "required": [
          "account"
        ],
        "title": "MarketplacePayoutAccountResponse",
        "type": "object"
      },
      "MarketplaceProfileResponse": {
        "description": "Caller's own marketplace SDR profile (when the API key is personal).",
        "properties": {
          "availability_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Availability Status"
          },
          "bio": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bio"
          },
          "country_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country Code"
          },
          "email": {
            "title": "Email",
            "type": "string"
          },
          "first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Name"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "is_complete": {
            "default": false,
            "title": "Is Complete",
            "type": "boolean"
          },
          "last_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Name"
          },
          "marketplace_role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Marketplace Role"
          },
          "monthly_rate_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Rate Usd"
          },
          "per_meeting_rate_usd": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Per Meeting Rate Usd"
          }
        },
        "required": [
          "id",
          "email"
        ],
        "title": "MarketplaceProfileResponse",
        "type": "object"
      },
      "McpConnectionStatus": {
        "properties": {
          "determined": {
            "default": true,
            "description": "False when the facts could not be read (transient DB error) and the zero shape below is a fallback, not evidence — consumers should abstain from first-connect claims when False",
            "title": "Determined",
            "type": "boolean"
          },
          "ever_connected": {
            "description": "True if ANY MCP session row exists for this org (incl. revoked)",
            "title": "Ever Connected",
            "type": "boolean"
          },
          "first_connected_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ISO timestamp of the earliest session row",
            "title": "First Connected At"
          },
          "last_client_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Client of the most recent session (e.g. Claude)",
            "title": "Last Client Type"
          },
          "last_connected_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ISO timestamp of the most recent activity",
            "title": "Last Connected At"
          },
          "sessions_count": {
            "description": "Total session rows for this org (incl. expired/revoked)",
            "title": "Sessions Count",
            "type": "integer"
          }
        },
        "required": [
          "ever_connected",
          "sessions_count"
        ],
        "title": "McpConnectionStatus",
        "type": "object"
      },
      "MeetingAttendee": {
        "description": "Lightweight attendee record on a meeting.",
        "properties": {
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "organizer": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "True when this attendee is the meeting organizer",
            "title": "Organizer"
          },
          "response_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider-reported RSVP: accepted, declined, tentative, needsAction",
            "title": "Response Status"
          }
        },
        "title": "MeetingAttendee",
        "type": "object"
      },
      "MeetingDetail": {
        "description": "Full meeting record returned by the detail endpoint.\n\nBundles transcript text + structured extractions inline so a single\ncall returns everything a UI needs to render the meeting view. When\nthe caller lacks `meetings:see_transcripts` permission and is not a\nparticipant, `transcript_redacted=true` and transcript content is\nomitted (status / IDs still returned).",
        "properties": {
          "action_items": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Action Items"
          },
          "assignees": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Assignees",
            "type": "array"
          },
          "attendees": {
            "items": {
              "$ref": "#/components/schemas/MeetingAttendee"
            },
            "title": "Attendees",
            "type": "array"
          },
          "audience_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Audience Type"
          },
          "campaign_mentions": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Campaign Mentions"
          },
          "channel": {
            "default": "meetings",
            "title": "Channel",
            "type": "string"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "custom_fields": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Fields"
          },
          "end_time": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "End Time"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "is_internal_only": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Internal Only"
          },
          "key_topics": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Key Topics"
          },
          "matched_account": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Matched Account"
          },
          "meeting_sensitivity": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meeting Sensitivity"
          },
          "meeting_tasks": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "CRM tasks created from transcript action items",
            "title": "Meeting Tasks"
          },
          "meeting_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meeting Url"
          },
          "organizer_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organizer Email"
          },
          "organizer_team_member": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organizer Team Member"
          },
          "owner_team_member": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Team Member"
          },
          "participant_links": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Participant Links"
          },
          "start_time": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Time"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "tags": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Tags",
            "type": "array"
          },
          "transcript_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transcript Id"
          },
          "transcript_link_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transcript Link Source"
          },
          "transcript_redacted": {
            "default": false,
            "title": "Transcript Redacted",
            "type": "boolean"
          },
          "transcript_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transcript Source"
          },
          "transcript_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transcript Status"
          },
          "transcript_summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transcript Summary"
          },
          "transcript_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Full transcript body text (omitted when redacted)",
            "title": "Transcript Text"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "user_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Email"
          }
        },
        "required": [
          "id"
        ],
        "title": "MeetingDetail",
        "type": "object"
      },
      "MeetingSummary": {
        "description": "Card-level meeting record returned by the list endpoint.\n\nMirrors the UnifiedChannelItem meeting fields most clients need to\nrender a meeting list (cards / table rows). The transcript preview\nis included as `transcript_summary`; full body text is only returned\nby the detail endpoint to keep list payloads small.",
        "properties": {
          "assignees": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Assignees",
            "type": "array"
          },
          "attendees": {
            "items": {
              "$ref": "#/components/schemas/MeetingAttendee"
            },
            "title": "Attendees",
            "type": "array"
          },
          "audience_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "customer, prospect, internal, or unknown",
            "title": "Audience Type"
          },
          "channel": {
            "default": "meetings",
            "title": "Channel",
            "type": "string"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "end_time": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "End Time"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "is_internal_only": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Internal Only"
          },
          "matched_account": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Matched Account"
          },
          "meeting_sensitivity": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meeting Sensitivity"
          },
          "meeting_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meeting Url"
          },
          "organizer_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organizer Email"
          },
          "preview": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Short conversational summary for inbox-card rendering",
            "title": "Preview"
          },
          "start_time": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Time"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Meeting title",
            "title": "Subject"
          },
          "tags": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Tags",
            "type": "array"
          },
          "transcript_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transcript Id"
          },
          "transcript_redacted": {
            "default": false,
            "description": "True when transcript content is hidden due to lack of permissions",
            "title": "Transcript Redacted",
            "type": "boolean"
          },
          "transcript_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transcript Source"
          },
          "transcript_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "linked, missing, or no_transcript_expected",
            "title": "Transcript Status"
          },
          "transcript_summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Short transcript summary (preview only)",
            "title": "Transcript Summary"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "user_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Calendar owner email (the user this meeting belongs to)",
            "title": "User Email"
          }
        },
        "required": [
          "id"
        ],
        "title": "MeetingSummary",
        "type": "object"
      },
      "MeetingsBookedResult": {
        "properties": {
          "count": {
            "default": 0,
            "description": "Total booked meetings in the window",
            "title": "Count",
            "type": "integer"
          },
          "days": {
            "title": "Days",
            "type": "integer"
          },
          "has_next": {
            "default": false,
            "description": "Whether another page exists",
            "title": "Has Next",
            "type": "boolean"
          },
          "meetings": {
            "items": {
              "$ref": "#/components/schemas/BookedMeeting"
            },
            "title": "Meetings",
            "type": "array"
          },
          "page": {
            "default": 1,
            "description": "1-based page of the booked list",
            "title": "Page",
            "type": "integer"
          },
          "upcoming_only": {
            "default": false,
            "title": "Upcoming Only",
            "type": "boolean"
          }
        },
        "required": [
          "days"
        ],
        "title": "MeetingsBookedResult",
        "type": "object"
      },
      "MissedCallback": {
        "description": "One missed inbound callback row.",
        "properties": {
          "call_duration": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Call Duration"
          },
          "caller_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Caller Phone"
          },
          "contact_id": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "created_at": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Name"
          },
          "id": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "inbound_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Inbound Number"
          },
          "is_callback": {
            "default": false,
            "title": "Is Callback",
            "type": "boolean"
          },
          "last_disposition": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Disposition"
          },
          "last_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Name"
          },
          "missed_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Missed Reason"
          },
          "parallel_session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parallel Session Id"
          },
          "previous_calls_count": {
            "default": 0,
            "title": "Previous Calls Count",
            "type": "integer"
          },
          "resolution": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolution"
          },
          "resolved_at": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Resolved At"
          },
          "resolved_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolved By"
          },
          "seen_at": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Seen At"
          },
          "seen_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seen By"
          },
          "session": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MissedCallbackSession"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "MissedCallback",
        "type": "object"
      },
      "MissedCallbackSession": {
        "description": "Parallel session the caller was previously dialed from.",
        "properties": {
          "campaign_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Campaign Id"
          },
          "list_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "List Id"
          },
          "list_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "List Title"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          }
        },
        "title": "MissedCallbackSession",
        "type": "object"
      },
      "MissedCallbacksResponse": {
        "properties": {
          "count": {
            "default": 0,
            "title": "Count",
            "type": "integer"
          },
          "missed_callbacks": {
            "items": {
              "$ref": "#/components/schemas/MissedCallback"
            },
            "title": "Missed Callbacks",
            "type": "array"
          }
        },
        "title": "MissedCallbacksResponse",
        "type": "object"
      },
      "NewsletterCreateRequest": {
        "description": "Create a new newsletter. Mirrors ``CreateNewsletterRequest``.",
        "properties": {
          "goal": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Goal"
          },
          "name": {
            "maxLength": 255,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "NewsletterCreateRequest",
        "type": "object"
      },
      "NewsletterDetail": {
        "additionalProperties": true,
        "description": "A single newsletter row. Open dict — mirrors ``_serialize_newsletter``.",
        "properties": {
          "audience_list_id": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Audience List Id"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "goal": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Goal"
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "title": "NewsletterDetail",
        "type": "object"
      },
      "NoteCreateRequest": {
        "properties": {
          "content": {
            "description": "Note content (plain text or markdown)",
            "title": "Content",
            "type": "string"
          }
        },
        "required": [
          "content"
        ],
        "title": "NoteCreateRequest",
        "type": "object"
      },
      "NoteResponse": {
        "properties": {
          "content": {
            "title": "Content",
            "type": "string"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "created_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "created_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By Name"
          },
          "entity_id": {
            "title": "Entity Id",
            "type": "string"
          },
          "entity_type": {
            "title": "Entity Type",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "required": [
          "id",
          "entity_type",
          "entity_id",
          "content"
        ],
        "title": "NoteResponse",
        "type": "object"
      },
      "NoteUpdateRequest": {
        "properties": {
          "content": {
            "description": "Updated note content",
            "title": "Content",
            "type": "string"
          }
        },
        "required": [
          "content"
        ],
        "title": "NoteUpdateRequest",
        "type": "object"
      },
      "OpenSearchAggGroup": {
        "properties": {
          "agg": {
            "additionalProperties": true,
            "description": "Metric values keyed by alias, e.g. {\"count\": 1247, \"unique_domains\": 1184}.",
            "title": "Agg",
            "type": "object"
          },
          "key": {
            "additionalProperties": true,
            "description": "The group-by field values for this group, e.g. {\"COMPANY_NAICS\": \"3311\", \"COMPANY_STATE\": \"OH\"}.",
            "title": "Key",
            "type": "object"
          }
        },
        "title": "OpenSearchAggGroup",
        "type": "object"
      },
      "OpenSearchAggSpec": {
        "description": "A single aggregate metric over the grouped rows.\n\n``count`` needs no field (it is the bucket doc count). All other functions\nrequire ``field``. ``alias`` keys the value in each group's ``agg`` map;\nit defaults to ``function`` when omitted (so two same-function metrics must\neach carry a distinct ``alias``).",
        "properties": {
          "alias": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Output key for this metric in each group's `agg` map. Defaults to `function`.",
            "title": "Alias"
          },
          "field": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "RAW UPPERCASE field the metric runs over. Required for every function except `count`. For unique-company counts use uniqExact on COMPANY_ID (the index is contact-grained).",
            "title": "Field"
          },
          "function": {
            "default": "count",
            "description": "count=doc count per group; uniqExact=cardinality (HLL-approximate); sum/avg/min/max=numeric metric over `field`.",
            "enum": [
              "count",
              "uniqExact",
              "sum",
              "avg",
              "min",
              "max"
            ],
            "title": "Function",
            "type": "string"
          }
        },
        "title": "OpenSearchAggSpec",
        "type": "object"
      },
      "OpenSearchAggregateRequest": {
        "description": "Generic, allowlist-bounded GROUP BY over a whitelisted mashup index.\n\nTranslates to nested OpenSearch ``terms`` aggregations (one level per\n``group_by`` field) with metric sub-aggregations. ``having`` / ``sort`` /\n``limit`` are applied to the flattened groups server-side. Counts from\n``terms`` buckets / ``cardinality`` are APPROXIMATE on a sharded index.",
        "properties": {
          "agg": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/OpenSearchAggSpec"
                },
                "maxItems": 10,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Metrics to compute per group (max 10). Defaults to a single `count` when omitted.",
            "title": "Agg"
          },
          "filters": {
            "additionalProperties": true,
            "description": "Pre-aggregation equality filters, identical semantics to /opensearch/search. RAW UPPERCASE field names.",
            "title": "Filters",
            "type": "object"
          },
          "group_by": {
            "description": "1-3 RAW UPPERCASE keyword fields to group on (e.g. [\"COMPANY_NAICS\", \"COMPANY_STATE\"]). Must be keyword-type fields -- the canonical COMPANY_* firmographics are. Capped at 3 dimensions to bound cluster cost. ORDER HIGHEST-CARDINALITY FIRST: deeper dimensions get smaller per-level bucket caps (1000 / 100 / 20), so a low-cardinality field placed last keeps full fidelity while a high-cardinality field placed last may be truncated.",
            "items": {
              "type": "string"
            },
            "maxItems": 3,
            "minItems": 1,
            "title": "Group By",
            "type": "array"
          },
          "having": {
            "anyOf": [
              {
                "additionalProperties": {
                  "additionalProperties": {
                    "type": "number"
                  },
                  "type": "object"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Post-aggregation group filter keyed by metric alias, e.g. {\"count\": {\"gte\": 50}}. Operators: eq, gte, lte, gt, lt.",
            "title": "Having"
          },
          "index": {
            "description": "Logical index to aggregate. Maps to a whitelisted physical alias.",
            "enum": [
              "mashup_contacts",
              "mashup_companies",
              "hem2contact",
              "ip2company"
            ],
            "title": "Index",
            "type": "string"
          },
          "limit": {
            "default": 100,
            "description": "Max number of groups returned (after having + sort). Hard-capped at 1000.",
            "maximum": 1000.0,
            "minimum": 1.0,
            "title": "Limit",
            "type": "integer"
          },
          "sort": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sort the returned groups by a metric alias, e.g. [{\"count\": \"desc\"}]. Applied after `having`.",
            "title": "Sort"
          }
        },
        "required": [
          "index",
          "group_by"
        ],
        "title": "OpenSearchAggregateRequest",
        "type": "object"
      },
      "OpenSearchAggregateResponse": {
        "properties": {
          "groups": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/OpenSearchAggGroup"
            },
            "title": "Groups",
            "type": "array"
          },
          "index": {
            "title": "Index",
            "type": "string"
          },
          "took_ms": {
            "default": 0,
            "title": "Took Ms",
            "type": "integer"
          },
          "total_groups": {
            "default": 0,
            "title": "Total Groups",
            "type": "integer"
          }
        },
        "required": [
          "index"
        ],
        "title": "OpenSearchAggregateResponse",
        "type": "object"
      },
      "OpenSearchCountRequest": {
        "description": "Exact-count request. Same ``index`` + ``filters`` shape as search; the\npage-oriented fields (fields/sort/limit/cursor) are intentionally absent\nbecause a count returns no rows.",
        "properties": {
          "filters": {
            "additionalProperties": true,
            "description": "Field equality filters, identical semantics to /opensearch/search. Scalar -> term, list -> terms (OR). RAW UPPERCASE field names (e.g. COMPANY_INDUSTRY, COMPANY_NAICS, COMPANY_COUNTRY).",
            "title": "Filters",
            "type": "object"
          },
          "index": {
            "description": "Logical index to count. Maps to a whitelisted physical alias.",
            "enum": [
              "mashup_contacts",
              "mashup_companies",
              "hem2contact",
              "ip2company"
            ],
            "title": "Index",
            "type": "string"
          }
        },
        "required": [
          "index"
        ],
        "title": "OpenSearchCountRequest",
        "type": "object"
      },
      "OpenSearchCountResponse": {
        "properties": {
          "count": {
            "default": 0,
            "title": "Count",
            "type": "integer"
          },
          "index": {
            "title": "Index",
            "type": "string"
          }
        },
        "required": [
          "index"
        ],
        "title": "OpenSearchCountResponse",
        "type": "object"
      },
      "OpenSearchHit": {
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Score"
          },
          "sort": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sort"
          },
          "source": {
            "additionalProperties": true,
            "default": {},
            "title": "Source",
            "type": "object"
          }
        },
        "required": [
          "id"
        ],
        "title": "OpenSearchHit",
        "type": "object"
      },
      "OpenSearchResolveRequest": {
        "properties": {
          "ids": {
            "description": "Up to 500 input IDs (HEMs or IPs).",
            "items": {
              "type": "string"
            },
            "maxItems": 500,
            "minItems": 1,
            "title": "Ids",
            "type": "array"
          },
          "kind": {
            "description": "Which resolver path to use.",
            "enum": [
              "hem_to_contact",
              "ip_to_company"
            ],
            "title": "Kind",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "ids"
        ],
        "title": "OpenSearchResolveRequest",
        "type": "object"
      },
      "OpenSearchResolveResponse": {
        "properties": {
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "matched": {
            "default": 0,
            "title": "Matched",
            "type": "integer"
          },
          "requested": {
            "default": 0,
            "title": "Requested",
            "type": "integer"
          },
          "results": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "default": {},
            "title": "Results",
            "type": "object"
          }
        },
        "required": [
          "kind"
        ],
        "title": "OpenSearchResolveResponse",
        "type": "object"
      },
      "OpenSearchSearchRequest": {
        "properties": {
          "cursor": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "search_after token returned from a prior page. Pair with `sort`.",
            "title": "Cursor"
          },
          "fields": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional projection. If omitted, returns the full _source. Pass a list to reduce payload size when the LLM only needs a few columns.",
            "title": "Fields"
          },
          "filters": {
            "additionalProperties": true,
            "description": "Field equality filters. Scalar value -> term, list -> terms (OR). Use this to narrow by COMPANY_DOMAIN, COMPANY_INDUSTRY, hem, etc. Field names are the RAW index fields (UPPERCASE, e.g. COMPANY_INDUSTRY) -- not the friendly snake_case names used by /search.",
            "title": "Filters",
            "type": "object"
          },
          "index": {
            "description": "Logical index to search. Maps to a whitelisted physical alias.",
            "enum": [
              "mashup_contacts",
              "mashup_companies",
              "hem2contact",
              "ip2company"
            ],
            "title": "Index",
            "type": "string"
          },
          "limit": {
            "default": 50,
            "description": "Hard-capped at 200.",
            "maximum": 200.0,
            "minimum": 1.0,
            "title": "Limit",
            "type": "integer"
          },
          "sort": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional sort, list of `{field: 'asc'|'desc'}`. Required if you intend to paginate via cursor.",
            "title": "Sort"
          },
          "track_total_hits": {
            "anyOf": [
              {
                "maximum": 1000000.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Exact-count ceiling for the returned `total`. OMIT for the default behaviour (OpenSearch saturates `total` at 10000). Pass an integer ceiling 1-1000000 (e.g. 100000) to get an exact `total` up to that bound in the SAME round trip as the page. For a count with no page payload prefer POST /opensearch/count. Does NOT lift the from+size pagination depth -- use `cursor` (search_after) for that. (0 is rejected: it would mean 'disable tracking' in OpenSearch, which is what omitting it does.)",
            "title": "Track Total Hits"
          }
        },
        "required": [
          "index"
        ],
        "title": "OpenSearchSearchRequest",
        "type": "object"
      },
      "OpenSearchSearchResponse": {
        "properties": {
          "cursor": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cursor"
          },
          "hits": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/OpenSearchHit"
            },
            "title": "Hits",
            "type": "array"
          },
          "index": {
            "title": "Index",
            "type": "string"
          },
          "took_ms": {
            "default": 0,
            "title": "Took Ms",
            "type": "integer"
          },
          "total": {
            "default": 0,
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "index"
        ],
        "title": "OpenSearchSearchResponse",
        "type": "object"
      },
      "OutboxListResponse": {
        "properties": {
          "count": {
            "title": "Count",
            "type": "integer"
          },
          "items": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Items",
            "type": "array"
          },
          "sandbox": {
            "default": true,
            "title": "Sandbox",
            "type": "boolean"
          }
        },
        "required": [
          "items",
          "count"
        ],
        "title": "OutboxListResponse",
        "type": "object"
      },
      "OverrideInput": {
        "properties": {
          "date": {
            "title": "Date",
            "type": "string"
          },
          "end_time": {
            "title": "End Time",
            "type": "string"
          },
          "start_time": {
            "title": "Start Time",
            "type": "string"
          }
        },
        "required": [
          "date",
          "start_time",
          "end_time"
        ],
        "title": "OverrideInput",
        "type": "object"
      },
      "PagesByDomainRequest": {
        "properties": {
          "domain": {
            "description": "Competitor root domain. Subdomains auto-matched.",
            "maxLength": 253,
            "minLength": 3,
            "title": "Domain",
            "type": "string"
          },
          "limit": {
            "default": 200,
            "maximum": 500.0,
            "minimum": 1.0,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "minimum": 0.0,
            "title": "Offset",
            "type": "integer"
          }
        },
        "required": [
          "domain"
        ],
        "title": "PagesByDomainRequest",
        "type": "object"
      },
      "PagesByDomainResponse": {
        "properties": {
          "domain": {
            "title": "Domain",
            "type": "string"
          },
          "pages": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/IntentPageItem"
            },
            "title": "Pages",
            "type": "array"
          },
          "took_ms": {
            "default": 0,
            "title": "Took Ms",
            "type": "integer"
          },
          "total_hits": {
            "default": 0,
            "title": "Total Hits",
            "type": "integer"
          }
        },
        "required": [
          "domain"
        ],
        "title": "PagesByDomainResponse",
        "type": "object"
      },
      "PagesContactsRequest": {
        "properties": {
          "limit": {
            "default": 100,
            "maximum": 500.0,
            "minimum": 1.0,
            "title": "Limit",
            "type": "integer"
          },
          "mode": {
            "default": "quick",
            "title": "Mode",
            "type": "string"
          },
          "offset": {
            "default": 0,
            "minimum": 0.0,
            "title": "Offset",
            "type": "integer"
          },
          "urls": {
            "items": {
              "type": "string"
            },
            "maxItems": 200,
            "minItems": 1,
            "title": "Urls",
            "type": "array"
          }
        },
        "required": [
          "urls"
        ],
        "title": "PagesContactsRequest",
        "type": "object"
      },
      "PagesSearchRequest": {
        "properties": {
          "filters": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filters"
          },
          "include_visitors": {
            "default": true,
            "title": "Include Visitors",
            "type": "boolean"
          },
          "limit": {
            "default": 50,
            "maximum": 500.0,
            "minimum": 1.0,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "minimum": 0.0,
            "title": "Offset",
            "type": "integer"
          },
          "query": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Query",
            "type": "string"
          },
          "semantic_ratio": {
            "default": 0.0,
            "description": "0 = text, 1 = semantic, between = hybrid",
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Semantic Ratio",
            "type": "number"
          },
          "sort": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sort"
          }
        },
        "required": [
          "query"
        ],
        "title": "PagesSearchRequest",
        "type": "object"
      },
      "PagesSearchResponse": {
        "properties": {
          "mode": {
            "default": "text",
            "title": "Mode",
            "type": "string"
          },
          "pages": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/IntentPageItem"
            },
            "title": "Pages",
            "type": "array"
          },
          "query": {
            "title": "Query",
            "type": "string"
          },
          "took_ms": {
            "default": 0,
            "title": "Took Ms",
            "type": "integer"
          },
          "total_hits": {
            "default": 0,
            "title": "Total Hits",
            "type": "integer"
          }
        },
        "required": [
          "query"
        ],
        "title": "PagesSearchResponse",
        "type": "object"
      },
      "PagesVisitorCountsRequest": {
        "properties": {
          "urls": {
            "items": {
              "type": "string"
            },
            "maxItems": 15000,
            "minItems": 1,
            "title": "Urls",
            "type": "array"
          }
        },
        "required": [
          "urls"
        ],
        "title": "PagesVisitorCountsRequest",
        "type": "object"
      },
      "PagesVisitorsRequest": {
        "properties": {
          "limit": {
            "default": 50,
            "maximum": 500.0,
            "minimum": 1.0,
            "title": "Limit",
            "type": "integer"
          },
          "mode": {
            "default": "quick",
            "description": "'quick' (~500ms) or 'full' (~2-3s, all paths).",
            "title": "Mode",
            "type": "string"
          },
          "offset": {
            "default": 0,
            "minimum": 0.0,
            "title": "Offset",
            "type": "integer"
          },
          "url": {
            "description": "Canonical PAGE_URL, e.g. 'cognism.com/pricing' (no scheme, no www).",
            "maxLength": 1024,
            "minLength": 1,
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "title": "PagesVisitorsRequest",
        "type": "object"
      },
      "PaginationMeta": {
        "properties": {
          "has_next": {
            "description": "Whether there are more pages",
            "title": "Has Next",
            "type": "boolean"
          },
          "limit": {
            "description": "Items per page",
            "title": "Limit",
            "type": "integer"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers.",
            "title": "Next Cursor"
          },
          "page": {
            "description": "Current page number (1-indexed)",
            "title": "Page",
            "type": "integer"
          },
          "total": {
            "description": "Total number of items",
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "page",
          "limit",
          "total",
          "has_next"
        ],
        "title": "PaginationMeta",
        "type": "object"
      },
      "PatchCompetitorRequest": {
        "properties": {
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "scan_config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScanConfigDTO"
              },
              {
                "type": "null"
              }
            ]
          },
          "tier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tier"
          }
        },
        "title": "PatchCompetitorRequest",
        "type": "object"
      },
      "PatchGapRequest": {
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "title": "PatchGapRequest",
        "type": "object"
      },
      "PatchResponse": {
        "properties": {
          "action": {
            "title": "Action",
            "type": "string"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "diff": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Diff"
          },
          "file_path": {
            "title": "File Path",
            "type": "string"
          }
        },
        "required": [
          "file_path",
          "action",
          "description"
        ],
        "title": "PatchResponse",
        "type": "object"
      },
      "PatchSetResponse": {
        "properties": {
          "applied_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Applied At"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "patches": {
            "items": {
              "$ref": "#/components/schemas/PatchResponse"
            },
            "title": "Patches",
            "type": "array"
          },
          "repo_id": {
            "format": "uuid",
            "title": "Repo Id",
            "type": "string"
          },
          "rolled_back_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rolled Back At"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "repo_id",
          "status",
          "patches"
        ],
        "title": "PatchSetResponse",
        "type": "object"
      },
      "PersonLookupRequest": {
        "properties": {
          "company_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Company domain (requires first_name + last_name)",
            "title": "Company Domain"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Work email address",
            "title": "Email"
          },
          "first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "First name (requires last_name + company_domain)",
            "title": "First Name"
          },
          "last_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Last name (requires first_name + company_domain)",
            "title": "Last Name"
          },
          "linkedin_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "LinkedIn profile URL",
            "title": "Linkedin Url"
          }
        },
        "title": "PersonLookupRequest",
        "type": "object"
      },
      "PipelineCreateRequest": {
        "properties": {
          "blank": {
            "default": false,
            "title": "Blank",
            "type": "boolean"
          },
          "name": {
            "default": "Sales Pipeline",
            "title": "Name",
            "type": "string"
          },
          "target": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target"
          }
        },
        "title": "PipelineCreateRequest",
        "type": "object"
      },
      "PipelineResponse": {
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "is_default": {
            "default": false,
            "title": "Is Default",
            "type": "boolean"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "stages": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/PipelineStageResponse"
            },
            "title": "Stages",
            "type": "array"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "PipelineResponse",
        "type": "object"
      },
      "PipelineStageResponse": {
        "properties": {
          "channel_scripts": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Channel Scripts",
            "type": "object"
          },
          "color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "position": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Position"
          },
          "probability": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Probability"
          },
          "recommended_elements": {
            "items": {
              "type": "string"
            },
            "title": "Recommended Elements",
            "type": "array"
          },
          "required_elements": {
            "items": {
              "type": "string"
            },
            "title": "Required Elements",
            "type": "array"
          },
          "stage_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stage Type"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "PipelineStageResponse",
        "type": "object"
      },
      "PipelineUpdateRequest": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "set_default": {
            "default": false,
            "title": "Set Default",
            "type": "boolean"
          },
          "target": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target"
          }
        },
        "title": "PipelineUpdateRequest",
        "type": "object"
      },
      "PreviewChannelItem": {
        "properties": {
          "channel_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Id"
          },
          "channel_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Type"
          },
          "channel_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Value"
          },
          "id": {
            "title": "Id",
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "title": "PreviewChannelItem",
        "type": "object"
      },
      "PreviewStepItem": {
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "input_type": {
            "title": "Input Type",
            "type": "string"
          },
          "step_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Step Data"
          },
          "step_order": {
            "title": "Step Order",
            "type": "integer"
          },
          "step_type": {
            "title": "Step Type",
            "type": "string"
          },
          "time_interval": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Time Interval"
          }
        },
        "required": [
          "id",
          "step_order",
          "step_type",
          "input_type"
        ],
        "title": "PreviewStepItem",
        "type": "object"
      },
      "ProviderCatalogEntry": {
        "description": "One enrichment provider in the catalog: its credential mode + credit cost.\n\nLets a caller see which providers graph8 funds (usable with no setup, charges\ncredits) vs which require the org's own API key (BYOK), before building a\npipeline — the programmatic equivalent of the UI's provider picker.",
        "properties": {
          "actions": {
            "description": "Action identifiers available for this provider.",
            "items": {
              "type": "string"
            },
            "title": "Actions",
            "type": "array"
          },
          "byok_configured": {
            "description": "True if the org has an active BYOK key configured for this provider.",
            "title": "Byok Configured",
            "type": "boolean"
          },
          "credits_per_row": {
            "additionalProperties": {
              "type": "number"
            },
            "description": "Per-action credit cost when run on graph8 system credentials (action -> credits/row).",
            "title": "Credits Per Row",
            "type": "object"
          },
          "default_credential_source": {
            "description": "What credential_mode='auto' resolves to for this provider for this org right now.",
            "enum": [
              "system",
              "byok"
            ],
            "title": "Default Credential Source",
            "type": "string"
          },
          "provider": {
            "title": "Provider",
            "type": "string"
          },
          "system_funded": {
            "description": "True if graph8 holds a system-managed key for this provider (usable without BYOK; charges credits).",
            "title": "System Funded",
            "type": "boolean"
          }
        },
        "required": [
          "provider",
          "system_funded",
          "byok_configured",
          "default_credential_source"
        ],
        "title": "ProviderCatalogEntry",
        "type": "object"
      },
      "ProviderCatalogResponse": {
        "description": "Catalog of enrichment providers: which are graph8-funded (system) by default\nvs require the org's own key (BYOK), plus the credit cost per action.",
        "properties": {
          "count": {
            "default": 0,
            "title": "Count",
            "type": "integer"
          },
          "providers": {
            "items": {
              "$ref": "#/components/schemas/ProviderCatalogEntry"
            },
            "title": "Providers",
            "type": "array"
          }
        },
        "title": "ProviderCatalogResponse",
        "type": "object"
      },
      "ProviderStepDetail": {
        "description": "Per-step credential breakdown so callers can see, before running, which\nsteps use graph8 system keys (charge credits) vs the org's own BYOK key,\nand whether the required credential is actually present.",
        "properties": {
          "credential_ready": {
            "description": "True if the step can actually run: system steps are always ready; BYOK steps are ready only when the org has an active key for that provider.",
            "title": "Credential Ready",
            "type": "boolean"
          },
          "credential_source": {
            "description": "'system' = graph8-funded; 'byok' = org's own key.",
            "enum": [
              "system",
              "byok"
            ],
            "title": "Credential Source",
            "type": "string"
          },
          "is_system_provider": {
            "description": "True = uses graph8-managed system key (charges credits). False = uses org BYOK key.",
            "title": "Is System Provider",
            "type": "boolean"
          },
          "provider": {
            "title": "Provider",
            "type": "string"
          }
        },
        "required": [
          "provider",
          "is_system_provider",
          "credential_source",
          "credential_ready"
        ],
        "title": "ProviderStepDetail",
        "type": "object"
      },
      "PublicCopilotRequest": {
        "properties": {
          "context": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Context"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          }
        },
        "required": [
          "message"
        ],
        "title": "PublicCopilotRequest",
        "type": "object"
      },
      "PublicCopilotResponse": {
        "properties": {
          "response": {
            "title": "Response",
            "type": "string"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          },
          "sources": {
            "default": [],
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Sources",
            "type": "array"
          }
        },
        "required": [
          "response"
        ],
        "title": "PublicCopilotResponse",
        "type": "object"
      },
      "PublicEnrichRequest": {
        "properties": {
          "email": {
            "description": "Email address to look up",
            "title": "Email",
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "title": "PublicEnrichRequest",
        "type": "object"
      },
      "PublicEnrichResponse": {
        "properties": {
          "found": {
            "description": "Whether the email was found in graph8",
            "title": "Found",
            "type": "boolean"
          },
          "known_fields": {
            "additionalProperties": true,
            "default": {},
            "description": "Fields graph8 already knows",
            "title": "Known Fields",
            "type": "object"
          },
          "missing_fields": {
            "default": [],
            "description": "Fields the form should ask for",
            "items": {
              "type": "string"
            },
            "title": "Missing Fields",
            "type": "array"
          }
        },
        "required": [
          "found"
        ],
        "title": "PublicEnrichResponse",
        "type": "object"
      },
      "QuotableProductsResponse": {
        "description": "``GET /quotable-products`` envelope (pagination preserved).",
        "properties": {
          "items": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "page": {
            "title": "Page",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "page",
          "limit"
        ],
        "title": "QuotableProductsResponse",
        "type": "object"
      },
      "QuoteCreateRequest": {
        "description": "Create a new quote (always starts in `draft` status).\n\nMirrors ``CreateQuoteDTO``. At least one of ``signer_contact_id`` or\n``signer_email`` is required. ``line_items`` must be non-empty —\nzero-line quotes can't be invoiced.",
        "properties": {
          "accepted_payment_methods": {
            "anyOf": [
              {
                "items": {
                  "enum": [
                    "ach",
                    "credit_card",
                    "wire"
                  ],
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Accepted Payment Methods"
          },
          "billing_address": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Address"
          },
          "billing_contact_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Contact Id"
          },
          "billing_email": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Email"
          },
          "billing_legal_name": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Legal Name"
          },
          "billing_primary_email": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Primary Email"
          },
          "contract_duration_unit": {
            "anyOf": [
              {
                "enum": [
                  "months",
                  "weeks",
                  "days"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Duration Unit"
          },
          "contract_duration_value": {
            "anyOf": [
              {
                "maximum": 3650.0,
                "minimum": 0.1,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Duration Value"
          },
          "contract_end_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract End Date"
          },
          "contract_months": {
            "anyOf": [
              {
                "maximum": 120.0,
                "minimum": 0.1,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Months"
          },
          "contract_start_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Start Date"
          },
          "currency": {
            "default": "USD",
            "maxLength": 3,
            "minLength": 3,
            "title": "Currency",
            "type": "string"
          },
          "deal_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deal Id"
          },
          "line_items": {
            "items": {
              "$ref": "#/components/schemas/QuoteLineItemRequest"
            },
            "minItems": 1,
            "title": "Line Items",
            "type": "array"
          },
          "marketing_rights": {
            "anyOf": [
              {
                "items": {
                  "enum": [
                    "logo",
                    "quote",
                    "case_study"
                  ],
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Marketing Rights"
          },
          "mashup_company_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mashup Company Id"
          },
          "notes": {
            "anyOf": [
              {
                "maxLength": 10000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "owner_id": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Id"
          },
          "payment_terms": {
            "default": "net_30",
            "enum": [
              "due_on_receipt",
              "net_15",
              "net_30",
              "net_45",
              "net_60",
              "net_90"
            ],
            "title": "Payment Terms",
            "type": "string"
          },
          "privacy_content": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Privacy Content"
          },
          "public_notes": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Public Notes"
          },
          "signer_contact_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signer Contact Id"
          },
          "signer_email": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signer Email"
          },
          "signer_name": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signer Name"
          },
          "tax_amount": {
            "default": 0,
            "maximum": 1000000000.0,
            "minimum": 0.0,
            "title": "Tax Amount",
            "type": "integer"
          },
          "template_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template Id"
          },
          "terms_content": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Terms Content"
          },
          "title": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Title",
            "type": "string"
          },
          "valid_until": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Valid Until"
          }
        },
        "required": [
          "title",
          "line_items"
        ],
        "title": "QuoteCreateRequest",
        "type": "object"
      },
      "QuoteDetail": {
        "additionalProperties": true,
        "description": "Full row + line items + activity + envelope from ``GET /quotes/{id}``.\n\nOpen dict because ``_get_quote_detail`` returns the dynamic\n``_row_to_dict`` shape plus resolved contact/company/envelope blocks.",
        "properties": {
          "activity": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Activity"
          },
          "envelope": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Envelope"
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "line_items": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Line Items"
          },
          "quote_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quote Number"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "title": "QuoteDetail",
        "type": "object"
      },
      "QuoteLineItemRequest": {
        "description": "One line item on a quote request body.\n\nShape mirrors ``integrations_v4.interfaces.fastapi.quote_router.LineItemDTO``\nexactly. Pass either ``stripe_product_id`` + ``stripe_price_id`` (for a\nStripe-catalogue product) or ``manual_product_id`` (for an org-owned\nmanual catalogue entry), or neither (for a custom one-off line).\nAuthorization is enforced server-side — non-quotable products are\nrejected with 400.",
        "properties": {
          "billing_frequency": {
            "anyOf": [
              {
                "enum": [
                  "one_time",
                  "month",
                  "year",
                  "quarter"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Frequency"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "discount_pct": {
            "default": 0,
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Discount Pct",
            "type": "number"
          },
          "manual_product_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Manual Product Id"
          },
          "product_name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Product Name",
            "type": "string"
          },
          "quantity": {
            "default": 1,
            "maximum": 10000.0,
            "minimum": 1.0,
            "title": "Quantity",
            "type": "integer"
          },
          "sort_order": {
            "default": 0,
            "title": "Sort Order",
            "type": "integer"
          },
          "stripe_price_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stripe Price Id"
          },
          "stripe_product_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stripe Product Id"
          },
          "unit_amount": {
            "description": "In cents",
            "maximum": 1000000000.0,
            "minimum": 0.0,
            "title": "Unit Amount",
            "type": "integer"
          }
        },
        "required": [
          "product_name",
          "unit_amount"
        ],
        "title": "QuoteLineItemRequest",
        "type": "object"
      },
      "QuoteListResponse": {
        "description": "``GET /quotes`` envelope — preserves the original list endpoint's\npagination fields verbatim (the internal handler returns\n``{items, total, page, limit}``).",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/QuoteSummary"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "page": {
            "title": "Page",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "page",
          "limit"
        ],
        "title": "QuoteListResponse",
        "type": "object"
      },
      "QuoteSendRequest": {
        "description": "Send (or resend) a quote for e-signature.\n\nBoth fields are optional — the server falls back to the quote title\nfor ``subject`` and a default cover line for ``message``. When the\ntarget quote already has an active envelope (``sent`` / ``viewed``)\nthis resends without minting a new signing link.",
        "properties": {
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          }
        },
        "title": "QuoteSendRequest",
        "type": "object"
      },
      "QuoteSettingsResponse": {
        "additionalProperties": true,
        "description": "``GET /quote-settings`` row. Open dict — settings columns evolve\nindependently of this API surface.",
        "properties": {},
        "title": "QuoteSettingsResponse",
        "type": "object"
      },
      "QuoteSummary": {
        "additionalProperties": true,
        "description": "List-view row from ``GET /quotes``. ``extra=\"allow\"`` keeps every\nbackend column flowing through without us re-declaring CBQuote.",
        "properties": {
          "accepted_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Accepted At"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency"
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "quote_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quote Number"
          },
          "sent_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sent At"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "total": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total"
          }
        },
        "title": "QuoteSummary",
        "type": "object"
      },
      "QuoteUpdateRequest": {
        "description": "Partial update for a draft quote.\n\nAll fields optional. Passing ``line_items`` replaces them entirely\n(and re-runs quotable-product authorization). Quotes in any status\nother than ``draft`` reject updates with 400 — use ``edit-as-draft``\non a ``sent`` quote, or ``duplicate`` on a terminal one, to get a\nfresh editable copy.",
        "properties": {
          "accepted_payment_methods": {
            "anyOf": [
              {
                "items": {
                  "enum": [
                    "ach",
                    "credit_card",
                    "wire"
                  ],
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Accepted Payment Methods"
          },
          "billing_address": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Address"
          },
          "billing_contact_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Contact Id"
          },
          "billing_email": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Email"
          },
          "billing_legal_name": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Legal Name"
          },
          "billing_primary_email": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Primary Email"
          },
          "contract_duration_unit": {
            "anyOf": [
              {
                "enum": [
                  "months",
                  "weeks",
                  "days"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Duration Unit"
          },
          "contract_duration_value": {
            "anyOf": [
              {
                "maximum": 3650.0,
                "minimum": 0.1,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Duration Value"
          },
          "contract_end_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract End Date"
          },
          "contract_months": {
            "anyOf": [
              {
                "maximum": 120.0,
                "minimum": 0.1,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Months"
          },
          "contract_start_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Start Date"
          },
          "currency": {
            "anyOf": [
              {
                "maxLength": 3,
                "minLength": 3,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency"
          },
          "deal_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deal Id"
          },
          "line_items": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/QuoteLineItemRequest"
                },
                "minItems": 1,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Line Items"
          },
          "marketing_rights": {
            "anyOf": [
              {
                "items": {
                  "enum": [
                    "logo",
                    "quote",
                    "case_study"
                  ],
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Marketing Rights"
          },
          "mashup_company_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mashup Company Id"
          },
          "notes": {
            "anyOf": [
              {
                "maxLength": 10000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "owner_id": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Id"
          },
          "payment_terms": {
            "anyOf": [
              {
                "enum": [
                  "due_on_receipt",
                  "net_15",
                  "net_30",
                  "net_45",
                  "net_60",
                  "net_90"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Terms"
          },
          "privacy_content": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Privacy Content"
          },
          "public_notes": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Public Notes"
          },
          "signer_contact_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signer Contact Id"
          },
          "signer_email": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signer Email"
          },
          "signer_name": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signer Name"
          },
          "tax_amount": {
            "anyOf": [
              {
                "maximum": 1000000000.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Amount"
          },
          "terms_content": {
            "anyOf": [
              {
                "maxLength": 50000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Terms Content"
          },
          "title": {
            "anyOf": [
              {
                "maxLength": 500,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "valid_until": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Valid Until"
          }
        },
        "title": "QuoteUpdateRequest",
        "type": "object"
      },
      "RadarAlerts": {
        "properties": {
          "case_files": {
            "default": true,
            "title": "Case Files",
            "type": "boolean"
          },
          "content_velocity": {
            "default": true,
            "title": "Content Velocity",
            "type": "boolean"
          },
          "keyword_overtake": {
            "default": true,
            "title": "Keyword Overtake",
            "type": "boolean"
          },
          "new_ads": {
            "default": true,
            "title": "New Ads",
            "type": "boolean"
          },
          "pricing_change": {
            "default": true,
            "title": "Pricing Change",
            "type": "boolean"
          },
          "warm_account": {
            "default": true,
            "title": "Warm Account",
            "type": "boolean"
          }
        },
        "title": "RadarAlerts",
        "type": "object"
      },
      "RadarChannels": {
        "properties": {
          "bridge": {
            "default": false,
            "title": "Bridge",
            "type": "boolean"
          },
          "in_app": {
            "default": true,
            "title": "In App",
            "type": "boolean"
          }
        },
        "title": "RadarChannels",
        "type": "object"
      },
      "RadarSettings": {
        "properties": {
          "ad_source": {
            "default": "stored",
            "enum": [
              "stored",
              "linkedin",
              "meta",
              "google",
              "all"
            ],
            "title": "Ad Source",
            "type": "string"
          },
          "alerts": {
            "$ref": "#/components/schemas/RadarAlerts"
          },
          "channels": {
            "$ref": "#/components/schemas/RadarChannels"
          },
          "tier1_cadence_days": {
            "default": 7,
            "maximum": 365.0,
            "minimum": 1.0,
            "title": "Tier1 Cadence Days",
            "type": "integer"
          },
          "tier2_cadence_days": {
            "default": 30,
            "maximum": 365.0,
            "minimum": 1.0,
            "title": "Tier2 Cadence Days",
            "type": "integer"
          }
        },
        "title": "RadarSettings",
        "type": "object"
      },
      "RegenerateContextRequest": {
        "properties": {
          "doc_types": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Specific Studio doc types to regenerate (e.g. ['icp_research','persona_research']). Omit to regenerate every document that already exists in the org.",
            "title": "Doc Types"
          },
          "website_url": {
            "description": "Website to generate from. After a company-profile change this must be the NEW domain — intelligence is keyed by URL, so passing the old one silently regenerates the same stale content.",
            "title": "Website Url",
            "type": "string"
          }
        },
        "required": [
          "website_url"
        ],
        "title": "RegenerateContextRequest",
        "type": "object"
      },
      "RemoveContactsFromListRequest": {
        "description": "Request body for removing contacts from a list.",
        "properties": {
          "contact_ids": {
            "description": "List of contact IDs to remove",
            "items": {
              "type": "integer"
            },
            "title": "Contact Ids",
            "type": "array"
          }
        },
        "required": [
          "contact_ids"
        ],
        "title": "RemoveContactsFromListRequest",
        "type": "object"
      },
      "RepoResponse": {
        "properties": {
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "default_branch": {
            "title": "Default Branch",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "install_status": {
            "title": "Install Status",
            "type": "string"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "provider": {
            "title": "Provider",
            "type": "string"
          },
          "repo_name": {
            "title": "Repo Name",
            "type": "string"
          },
          "repo_url": {
            "title": "Repo Url",
            "type": "string"
          },
          "scan_status": {
            "title": "Scan Status",
            "type": "string"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "write_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Write Key"
          }
        },
        "required": [
          "id",
          "repo_url",
          "repo_name",
          "provider",
          "default_branch",
          "scan_status",
          "install_status"
        ],
        "title": "RepoResponse",
        "type": "object"
      },
      "RequestLogEntry": {
        "properties": {
          "method": {
            "description": "HTTP method",
            "title": "Method",
            "type": "string"
          },
          "path": {
            "description": "Request path",
            "title": "Path",
            "type": "string"
          },
          "request_id": {
            "description": "Correlation id — matches the X-Request-Id response header",
            "title": "Request Id",
            "type": "string"
          },
          "status": {
            "description": "HTTP status code of the response",
            "title": "Status",
            "type": "integer"
          },
          "timestamp": {
            "description": "Unix seconds when the request completed",
            "title": "Timestamp",
            "type": "integer"
          }
        },
        "required": [
          "request_id",
          "method",
          "path",
          "status",
          "timestamp"
        ],
        "title": "RequestLogEntry",
        "type": "object"
      },
      "RequestRescheduleRequest": {
        "properties": {
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          }
        },
        "title": "RequestRescheduleRequest",
        "type": "object"
      },
      "RescheduleBookingRequest": {
        "properties": {
          "rescheduling_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rescheduling Reason"
          },
          "start_time": {
            "title": "Start Time",
            "type": "string"
          }
        },
        "required": [
          "start_time"
        ],
        "title": "RescheduleBookingRequest",
        "type": "object"
      },
      "RoutingFormCondition": {
        "properties": {
          "field_id": {
            "minLength": 1,
            "title": "Field Id",
            "type": "string"
          },
          "operator": {
            "enum": [
              "equals",
              "not_equals",
              "contains",
              "not_contains",
              "is_empty",
              "is_not_empty",
              "greater_than",
              "less_than",
              "select_equals",
              "select_not_equals"
            ],
            "title": "Operator",
            "type": "string"
          },
          "value": {
            "default": "",
            "title": "Value",
            "type": "string"
          }
        },
        "required": [
          "field_id",
          "operator"
        ],
        "title": "RoutingFormCondition",
        "type": "object"
      },
      "RoutingFormField": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Identifier"
          },
          "label": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Label",
            "type": "string"
          },
          "options": {
            "items": {
              "$ref": "#/components/schemas/RoutingFormFieldOption"
            },
            "title": "Options",
            "type": "array"
          },
          "placeholder": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Placeholder"
          },
          "required": {
            "default": true,
            "title": "Required",
            "type": "boolean"
          },
          "type": {
            "default": "select",
            "enum": [
              "text",
              "email",
              "phone",
              "number",
              "textarea",
              "select",
              "multiselect",
              "radio",
              "checkbox"
            ],
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "label"
        ],
        "title": "RoutingFormField",
        "type": "object"
      },
      "RoutingFormFieldOption": {
        "properties": {
          "event_type_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Type Id"
          },
          "label": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Label",
            "type": "string"
          },
          "value": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Value",
            "type": "string"
          }
        },
        "required": [
          "label",
          "value"
        ],
        "title": "RoutingFormFieldOption",
        "type": "object"
      },
      "RoutingFormRouteInput": {
        "properties": {
          "action_type": {
            "default": "redirect_event_type",
            "enum": [
              "redirect_event_type",
              "redirect_url",
              "show_message"
            ],
            "title": "Action Type",
            "type": "string"
          },
          "action_value": {
            "default": "",
            "title": "Action Value",
            "type": "string"
          },
          "conditions": {
            "items": {
              "$ref": "#/components/schemas/RoutingFormCondition"
            },
            "title": "Conditions",
            "type": "array"
          },
          "is_fallback": {
            "default": false,
            "title": "Is Fallback",
            "type": "boolean"
          },
          "position": {
            "default": 0,
            "title": "Position",
            "type": "integer"
          }
        },
        "title": "RoutingFormRouteInput",
        "type": "object"
      },
      "RowFieldValues": {
        "description": "One row (contact or company) plus the columns to set on it.",
        "properties": {
          "fields": {
            "description": "Column/value pairs to write on this row. Empty = no-op (counts as ok with 0 writes).",
            "items": {
              "$ref": "#/components/schemas/FieldValueItem"
            },
            "maxItems": 500,
            "title": "Fields",
            "type": "array"
          },
          "record_id": {
            "description": "Contact ID (entity='contacts') or company ID (entity='companies').",
            "title": "Record Id",
            "type": "integer"
          }
        },
        "required": [
          "record_id"
        ],
        "title": "RowFieldValues",
        "type": "object"
      },
      "RunAIEnrichRequest": {
        "description": "Run a saved AI enrichment config on specific records.\n\nThe prompt, model, outputs, and column mapping live on the config\nreferenced by `group_id`. We accept `record_ids` so callers can target\nexactly the contacts they want enriched.",
        "properties": {
          "group_id": {
            "description": "group_id of a saved AI enrichment config (starts with 'ai_enrich')",
            "title": "Group Id",
            "type": "string"
          },
          "list_id": {
            "description": "List ID the records belong to",
            "title": "List Id",
            "type": "integer"
          },
          "max_records": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional cap on records processed (defaults to len(record_ids)).",
            "title": "Max Records"
          },
          "record_ids": {
            "description": "Contact IDs to enrich",
            "items": {
              "type": "integer"
            },
            "title": "Record Ids",
            "type": "array"
          },
          "skip_existing_values": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Override the config's skip_existing_values setting.",
            "title": "Skip Existing Values"
          }
        },
        "required": [
          "group_id",
          "list_id",
          "record_ids"
        ],
        "title": "RunAIEnrichRequest",
        "type": "object"
      },
      "RunWaterfallEnrichRequest": {
        "description": "Run a saved waterfall pipeline on specific records.",
        "properties": {
          "column_id": {
            "description": "column_id from a saved waterfall pipeline",
            "title": "Column Id",
            "type": "string"
          },
          "list_id": {
            "description": "List ID the records belong to",
            "title": "List Id",
            "type": "integer"
          },
          "record_ids": {
            "description": "Contact IDs to enrich",
            "items": {
              "type": "integer"
            },
            "title": "Record Ids",
            "type": "array"
          },
          "skip_existing_values": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Override the pipeline's skip_existing_values setting. If None (default), the pipeline's saved setting is used.",
            "title": "Skip Existing Values"
          }
        },
        "required": [
          "column_id",
          "list_id",
          "record_ids"
        ],
        "title": "RunWaterfallEnrichRequest",
        "type": "object"
      },
      "SandboxStatusResponse": {
        "properties": {
          "environment": {
            "default": "sandbox",
            "title": "Environment",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "org_id": {
            "title": "Org Id",
            "type": "string"
          },
          "sandbox": {
            "default": true,
            "title": "Sandbox",
            "type": "boolean"
          }
        },
        "required": [
          "org_id",
          "message"
        ],
        "title": "SandboxStatusResponse",
        "type": "object"
      },
      "ScanConfigDTO": {
        "description": "Per-competitor page-selection config (persisted on profile.meta.scan_config).\n\nmode=auto: Firecrawl /map → rank by traffic + pricing/feature paths → scrape\ntop N (= tier page budget). mode=manual: scrape include_paths (literal or\n/wildcard/* patterns), capped to the budget.",
        "properties": {
          "include_paths": {
            "items": {
              "maxLength": 255,
              "type": "string"
            },
            "maxItems": 50,
            "title": "Include Paths",
            "type": "array"
          },
          "mode": {
            "default": "auto",
            "enum": [
              "auto",
              "manual"
            ],
            "title": "Mode",
            "type": "string"
          }
        },
        "title": "ScanConfigDTO",
        "type": "object"
      },
      "ScanResponse": {
        "properties": {
          "api_routes": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Api Routes",
            "type": "array"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "gtm_readiness": {
            "additionalProperties": true,
            "default": {},
            "title": "Gtm Readiness",
            "type": "object"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "product_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Type"
          },
          "readme_summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Readme Summary"
          },
          "repo_id": {
            "format": "uuid",
            "title": "Repo Id",
            "type": "string"
          },
          "scan_duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scan Duration Ms"
          },
          "tech_stack": {
            "additionalProperties": true,
            "title": "Tech Stack",
            "type": "object"
          }
        },
        "required": [
          "id",
          "repo_id",
          "tech_stack",
          "api_routes"
        ],
        "title": "ScanResponse",
        "type": "object"
      },
      "ScanResultsRequest": {
        "properties": {
          "api_routes": {
            "default": [],
            "description": "Detected API routes",
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Api Routes",
            "type": "array"
          },
          "gtm_readiness": {
            "additionalProperties": true,
            "default": {},
            "description": "GTM readiness flags",
            "title": "Gtm Readiness",
            "type": "object"
          },
          "product_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Detected product type (b2b_saas, api, etc.)",
            "title": "Product Type"
          },
          "readme_summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Extracted README summary",
            "title": "Readme Summary"
          },
          "scan_duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Scan duration in milliseconds",
            "title": "Scan Duration Ms"
          },
          "tech_stack": {
            "additionalProperties": true,
            "description": "Detected tech stack (framework, language, etc.)",
            "title": "Tech Stack",
            "type": "object"
          }
        },
        "required": [
          "tech_stack"
        ],
        "title": "ScanResultsRequest",
        "type": "object"
      },
      "ScheduleDayWindow": {
        "description": "One day's send window — flattens `{start, end}` from the sequencer.\n\nDays that are absent from the underlying config (= no sending) are\nomitted from the response rather than serialized as nulls — keeps\nthe response compact and matches the picker UI's behaviour.",
        "properties": {
          "day": {
            "description": "Lowercase day name: monday | tuesday | wednesday | thursday | friday | saturday | sunday.",
            "title": "Day",
            "type": "string"
          },
          "end": {
            "description": "Window end, 24h HH:MM in `timezone`.",
            "title": "End",
            "type": "string"
          },
          "start": {
            "description": "Window start, 24h HH:MM in `timezone`.",
            "title": "Start",
            "type": "string"
          }
        },
        "required": [
          "day",
          "start",
          "end"
        ],
        "title": "ScheduleDayWindow",
        "type": "object"
      },
      "ScheduleListItem": {
        "description": "One row in the schedule picker. `id` feeds `schedule_id` on the launch body.",
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional human description.",
            "title": "Description"
          },
          "id": {
            "description": "Schedule UUID; pass back to launch / PATCH endpoints.",
            "title": "Id",
            "type": "string"
          },
          "is_archived": {
            "default": false,
            "description": "Archived schedules are excluded by default — pass `include_archived=true` to include them.",
            "title": "Is Archived",
            "type": "boolean"
          },
          "name": {
            "description": "Display name as set in the Sequencer schedule UI.",
            "title": "Name",
            "type": "string"
          },
          "timezone": {
            "description": "IANA timezone name applied to every window (e.g. 'Europe/Madrid').",
            "title": "Timezone",
            "type": "string"
          },
          "windows": {
            "description": "Per-day send windows for the schedule. Days with no window are omitted.",
            "items": {
              "$ref": "#/components/schemas/ScheduleDayWindow"
            },
            "title": "Windows",
            "type": "array"
          }
        },
        "required": [
          "id",
          "name",
          "timezone"
        ],
        "title": "ScheduleListItem",
        "type": "object"
      },
      "SchedulesListResponse": {
        "description": "Envelope for `GET /schedules`.",
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ScheduleListItem"
            },
            "title": "Data",
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "title": "SchedulesListResponse",
        "type": "object"
      },
      "SearchCompanyItem": {
        "description": "Company result from open data search.",
        "properties": {
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "crunchbase_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Crunchbase Url"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Domain"
          },
          "employee_count": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Employee Count"
          },
          "facebook_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Facebook Url"
          },
          "founded_year": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Founded Year"
          },
          "industry": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Industry"
          },
          "industry_group": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Industry Group"
          },
          "linkedin_followers": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedin Followers"
          },
          "linkedin_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedin Url"
          },
          "logo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Logo Url"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "revenue": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revenue"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State"
          },
          "twitter_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Twitter Url"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          },
          "zip": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Zip"
          }
        },
        "title": "SearchCompanyItem",
        "type": "object"
      },
      "SearchContactItem": {
        "description": "Contact result from open data search.",
        "properties": {
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "company_country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Country"
          },
          "company_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Domain"
          },
          "company_employee_count": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Employee Count"
          },
          "company_industry": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Industry"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Name"
          },
          "confidence_score": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence Score"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "direct_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Direct Phone"
          },
          "first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Name"
          },
          "job_department": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Department"
          },
          "job_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Title"
          },
          "last_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Name"
          },
          "linkedin_headline": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedin Headline"
          },
          "linkedin_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedin Url"
          },
          "middle_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Middle Name"
          },
          "mobile_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mobile Phone"
          },
          "personal_emails": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Personal Emails"
          },
          "role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role"
          },
          "seniority_level": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seniority Level"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State"
          },
          "work_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Email"
          }
        },
        "title": "SearchContactItem",
        "type": "object"
      },
      "SearchFilter": {
        "description": "A single filter condition.",
        "properties": {
          "field": {
            "description": "Field name to filter on (e.g., 'job_title', 'country', 'industry')",
            "title": "Field",
            "type": "string"
          },
          "operator": {
            "$ref": "#/components/schemas/SearchOperator",
            "description": "Filter operator"
          },
          "value": {
            "description": "Filter values",
            "items": {},
            "title": "Value",
            "type": "array"
          }
        },
        "required": [
          "field",
          "operator"
        ],
        "title": "SearchFilter",
        "type": "object"
      },
      "SearchOperator": {
        "description": "Supported filter operators for search queries.",
        "enum": [
          "any_of",
          "contains",
          "all_of",
          "none_of",
          "is_empty",
          "is_not_empty",
          "between",
          "exists"
        ],
        "title": "SearchOperator",
        "type": "string"
      },
      "SearchRequest": {
        "description": "Request body for search endpoints.",
        "properties": {
          "filters": {
            "description": "Filter conditions (AND logic)",
            "items": {
              "$ref": "#/components/schemas/SearchFilter"
            },
            "title": "Filters",
            "type": "array"
          },
          "limit": {
            "default": 25,
            "description": "Results per page (max 100)",
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Limit",
            "type": "integer"
          },
          "page": {
            "default": 1,
            "description": "Page number (1-indexed)",
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Page",
            "type": "integer"
          }
        },
        "title": "SearchRequest",
        "type": "object"
      },
      "SearchSaveRequest": {
        "description": "Request to search and save results to a list.",
        "properties": {
          "filters": {
            "description": "Filter conditions (AND logic)",
            "items": {
              "$ref": "#/components/schemas/SearchFilter"
            },
            "title": "Filters",
            "type": "array"
          },
          "limit": {
            "default": 25,
            "description": "Results per page (max 100)",
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Limit",
            "type": "integer"
          },
          "list_title": {
            "description": "Title for the new list",
            "title": "List Title",
            "type": "string"
          },
          "max_results": {
            "default": 1000,
            "description": "Maximum results to save (max 10,000)",
            "maximum": 10000.0,
            "minimum": 1.0,
            "title": "Max Results",
            "type": "integer"
          },
          "page": {
            "default": 1,
            "description": "Page number (1-indexed)",
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Page",
            "type": "integer"
          }
        },
        "required": [
          "list_title"
        ],
        "title": "SearchSaveRequest",
        "type": "object"
      },
      "SearchSaveResponse": {
        "description": "Response from save-to-list endpoints.",
        "properties": {
          "estimated_total": {
            "title": "Estimated Total",
            "type": "integer"
          },
          "list_id": {
            "title": "List Id",
            "type": "integer"
          },
          "list_title": {
            "title": "List Title",
            "type": "string"
          },
          "status": {
            "default": "processing",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "list_id",
          "list_title",
          "estimated_total"
        ],
        "title": "SearchSaveResponse",
        "type": "object"
      },
      "SeedContext": {
        "description": "Optional richer seed for an approved stub — e.g. the target keyword (+ volume/cpc)\nto seed an SEO page with. All optional; absent → current behavior unchanged.",
        "properties": {
          "cpc": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cpc"
          },
          "primary_keyword": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Primary Keyword"
          },
          "volume": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Volume"
          }
        },
        "title": "SeedContext",
        "type": "object"
      },
      "SelectCalendarRequest": {
        "properties": {
          "credential_id": {
            "title": "Credential Id",
            "type": "integer"
          },
          "external_id": {
            "title": "External Id",
            "type": "string"
          },
          "integration": {
            "title": "Integration",
            "type": "string"
          }
        },
        "required": [
          "credential_id",
          "integration",
          "external_id"
        ],
        "title": "SelectCalendarRequest",
        "type": "object"
      },
      "SelectedCalendarEnvelope": {
        "description": "Envelope for POST /calendars/selected.",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SelectedCalendarResponse"
          }
        },
        "required": [
          "data"
        ],
        "title": "SelectedCalendarEnvelope",
        "type": "object"
      },
      "SelectedCalendarResponse": {
        "properties": {
          "credential_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Credential Id"
          },
          "external_id": {
            "title": "External Id",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "integration": {
            "title": "Integration",
            "type": "string"
          }
        },
        "required": [
          "id",
          "integration",
          "external_id"
        ],
        "title": "SelectedCalendarResponse",
        "type": "object"
      },
      "SendRequest": {
        "properties": {
          "body": {
            "description": "Message body to send",
            "title": "Body",
            "type": "string"
          },
          "channel": {
            "$ref": "#/components/schemas/InboxChannel",
            "description": "Channel to send through: email, sms, or linkedin"
          },
          "from_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sender address (mailbox email, phone number, or LinkedIn account ID)",
            "title": "From Address"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Email subject (optional, for email channel)",
            "title": "Subject"
          },
          "to": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Recipient override (email address, phone number, or LinkedIn ID)",
            "title": "To"
          }
        },
        "required": [
          "body",
          "channel"
        ],
        "title": "SendRequest",
        "type": "object"
      },
      "SendResponse": {
        "properties": {
          "channel": {
            "default": "email",
            "title": "Channel",
            "type": "string"
          },
          "message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message Id"
          },
          "status": {
            "default": "sent",
            "title": "Status",
            "type": "string"
          }
        },
        "title": "SendResponse",
        "type": "object"
      },
      "SequenceActionResponse": {
        "properties": {
          "contacts_affected": {
            "default": 0,
            "title": "Contacts Affected",
            "type": "integer"
          },
          "sequence_id": {
            "title": "Sequence Id",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "sequence_id",
          "status"
        ],
        "title": "SequenceActionResponse",
        "type": "object"
      },
      "SequenceAnalyticsResponse": {
        "properties": {
          "contact_distribution": {
            "additionalProperties": true,
            "title": "Contact Distribution",
            "type": "object"
          },
          "engagement": {
            "additionalProperties": true,
            "title": "Engagement",
            "type": "object"
          },
          "overview": {
            "additionalProperties": true,
            "title": "Overview",
            "type": "object"
          },
          "performance": {
            "additionalProperties": true,
            "title": "Performance",
            "type": "object"
          },
          "sender_distribution": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Sender Distribution",
            "type": "array"
          },
          "step_breakdown": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Step Breakdown",
            "type": "array"
          },
          "step_creation_methods": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Step Creation Methods",
            "type": "array"
          },
          "timeline": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Timeline",
            "type": "array"
          }
        },
        "title": "SequenceAnalyticsResponse",
        "type": "object"
      },
      "SequenceContactItem": {
        "properties": {
          "contact_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "current_step_order": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Step Order"
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "title": "SequenceContactItem",
        "type": "object"
      },
      "SequenceCreateRequest": {
        "properties": {
          "associated_list_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contact list to associate",
            "title": "Associated List Id"
          },
          "campaign_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "AI Studio campaign to link",
            "title": "Campaign Id"
          },
          "channels": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ChannelConfig"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Channels to attach",
            "title": "Channels"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sequence description",
            "title": "Description"
          },
          "finish_on_reply": {
            "default": true,
            "description": "Stop contacting on reply",
            "title": "Finish On Reply",
            "type": "boolean"
          },
          "name": {
            "description": "Sequence name",
            "title": "Name",
            "type": "string"
          },
          "pinned_mailbox_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Mailbox ID to pin for a nurture sequence. Required when sequence_kind='nurture'; all email channels must use this mailbox. Ignored for cold_outbound sequences.",
            "title": "Pinned Mailbox Id"
          },
          "send_in_same_thread": {
            "default": false,
            "description": "Send follow-ups in same email thread",
            "title": "Send In Same Thread",
            "type": "boolean"
          },
          "sequence_kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": "cold_outbound",
            "description": "Sequence kind: 'cold_outbound' (default) or 'nurture'. Immutable after creation. 'nurture' requires pinned_mailbox_id and is gated by the ENABLE_NURTURE feature flag.",
            "title": "Sequence Kind"
          },
          "steps": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/StepConfig"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sequence steps to create",
            "title": "Steps"
          },
          "user_email": {
            "description": "Owner email address",
            "title": "User Email",
            "type": "string"
          },
          "wait_for_new_contacts": {
            "default": false,
            "description": "Keep sequence waiting for new contacts",
            "title": "Wait For New Contacts",
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "user_email"
        ],
        "title": "SequenceCreateRequest",
        "type": "object"
      },
      "SequenceCreateResponse": {
        "properties": {
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "status"
        ],
        "title": "SequenceCreateResponse",
        "type": "object"
      },
      "SequenceDetailResponse": {
        "properties": {
          "appointment_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Appointment Id"
          },
          "associated_list_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Associated List Id"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "finish_on_reply": {
            "default": false,
            "title": "Finish On Reply",
            "type": "boolean"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "paused_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paused At"
          },
          "pinned_mailbox_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pinned Mailbox Id"
          },
          "resumed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resumed At"
          },
          "schedule_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Schedule Id"
          },
          "send_in_same_thread": {
            "default": false,
            "title": "Send In Same Thread",
            "type": "boolean"
          },
          "sequence_kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sequence Kind"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "textual_agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Textual Agent Name"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "user_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Email"
          },
          "voice_agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Agent Name"
          },
          "wait_for_new_contacts": {
            "default": false,
            "title": "Wait For New Contacts",
            "type": "boolean"
          }
        },
        "required": [
          "id"
        ],
        "title": "SequenceDetailResponse",
        "type": "object"
      },
      "SequenceListItem": {
        "properties": {
          "associated_list_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Associated List Id"
          },
          "contact_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Count"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "sequence_kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sequence Kind"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "step_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Step Count"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "user_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Email"
          }
        },
        "required": [
          "id"
        ],
        "title": "SequenceListItem",
        "type": "object"
      },
      "SequencePreviewResponse": {
        "properties": {
          "channels": {
            "items": {
              "$ref": "#/components/schemas/PreviewChannelItem"
            },
            "title": "Channels",
            "type": "array"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/PreviewStepItem"
            },
            "title": "Steps",
            "type": "array"
          }
        },
        "required": [
          "id"
        ],
        "title": "SequencePreviewResponse",
        "type": "object"
      },
      "SequenceStepRef": {
        "properties": {
          "condition": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Condition"
          },
          "day": {
            "title": "Day",
            "type": "integer"
          },
          "step_id": {
            "title": "Step Id",
            "type": "string"
          },
          "stop_on_reply": {
            "default": true,
            "title": "Stop On Reply",
            "type": "boolean"
          }
        },
        "required": [
          "step_id",
          "day"
        ],
        "title": "SequenceStepRef",
        "type": "object"
      },
      "SequenceUpdateRequest": {
        "properties": {
          "appointment_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Calendar event-type ID (from GET /event-types). Stamped onto seqsequences.appointment_id.",
            "title": "Appointment Id"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sequence description",
            "title": "Description"
          },
          "finish_on_reply": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Finish on reply",
            "title": "Finish On Reply"
          },
          "is_shared": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether sequence is shared",
            "title": "Is Shared"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sequence name",
            "title": "Name"
          },
          "schedule_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Send-window schedule UUID (from GET /schedules). Stamped onto seqsequences.schedule_id.",
            "title": "Schedule Id"
          },
          "send_in_same_thread": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Send in same thread",
            "title": "Send In Same Thread"
          },
          "textual_agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Voice-service agent identifier (from GET /voice/dialer/agents) for email / social steps. Stamped onto seqsequences.textual_agent_name. The same value as voice_agent_name is the common case (one agent across channels).",
            "title": "Textual Agent Name"
          },
          "voice_agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Voice-service agent identifier (from GET /voice/dialer/agents) for phone / SMS steps. Stamped onto seqsequences.voice_agent_name.",
            "title": "Voice Agent Name"
          },
          "wait_for_new_contacts": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Wait for new contacts",
            "title": "Wait For New Contacts"
          }
        },
        "title": "SequenceUpdateRequest",
        "type": "object"
      },
      "SetDefaultConferencingRequest": {
        "properties": {
          "credential_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Credential Id"
          },
          "link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Link"
          }
        },
        "title": "SetDefaultConferencingRequest",
        "type": "object"
      },
      "SetDestinationCalendarRequest": {
        "properties": {
          "credential_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Credential Id"
          },
          "event_type_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Type Id"
          },
          "external_id": {
            "title": "External Id",
            "type": "string"
          },
          "integration": {
            "title": "Integration",
            "type": "string"
          }
        },
        "required": [
          "integration",
          "external_id"
        ],
        "title": "SetDestinationCalendarRequest",
        "type": "object"
      },
      "SetFieldValueRequest": {
        "description": "Request body for writing a custom column value to a single contact or company row.",
        "properties": {
          "entity": {
            "default": "contacts",
            "description": "Target entity: 'contacts' or 'companies'",
            "title": "Entity",
            "type": "string"
          },
          "record_id": {
            "description": "Contact ID (entity='contacts') or company ID (entity='companies')",
            "title": "Record Id",
            "type": "integer"
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Value to write into the custom column. Pass null (or omit) to clear the field.",
            "title": "Value"
          }
        },
        "required": [
          "record_id"
        ],
        "title": "SetFieldValueRequest",
        "type": "object"
      },
      "SetFieldValueResponse": {
        "properties": {
          "column_id": {
            "title": "Column Id",
            "type": "integer"
          },
          "record_id": {
            "title": "Record Id",
            "type": "integer"
          },
          "updated": {
            "default": true,
            "title": "Updated",
            "type": "boolean"
          }
        },
        "required": [
          "column_id",
          "record_id"
        ],
        "title": "SetFieldValueResponse",
        "type": "object"
      },
      "SetFieldValuesBatchRequest": {
        "description": "Write custom column values to one OR many contact/company rows at once.",
        "properties": {
          "entity": {
            "default": "contacts",
            "description": "Target entity, SHARED across every row: 'contacts' or 'companies'.",
            "title": "Entity",
            "type": "string"
          },
          "rows": {
            "description": "Rows to update (1-500). Each carries its own record_id + fields[].",
            "items": {
              "$ref": "#/components/schemas/RowFieldValues"
            },
            "title": "Rows",
            "type": "array"
          }
        },
        "required": [
          "rows"
        ],
        "title": "SetFieldValuesBatchRequest",
        "type": "object"
      },
      "SetFieldValuesBatchResponse": {
        "properties": {
          "entity": {
            "title": "Entity",
            "type": "string"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/SetFieldValuesRowResult"
            },
            "title": "Results",
            "type": "array"
          },
          "total_rows_requested": {
            "title": "Total Rows Requested",
            "type": "integer"
          },
          "total_rows_updated": {
            "title": "Total Rows Updated",
            "type": "integer"
          },
          "total_values_written": {
            "title": "Total Values Written",
            "type": "integer"
          }
        },
        "required": [
          "entity",
          "total_rows_requested",
          "total_rows_updated",
          "total_values_written",
          "results"
        ],
        "title": "SetFieldValuesBatchResponse",
        "type": "object"
      },
      "SetFieldValuesRowResult": {
        "description": "Per-row outcome inside a batch value-write response.",
        "properties": {
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Set when this row failed (record not found, unknown column, etc.). Other rows still commit.",
            "title": "Error"
          },
          "ok": {
            "default": true,
            "title": "Ok",
            "type": "boolean"
          },
          "record_id": {
            "title": "Record Id",
            "type": "integer"
          },
          "updated_columns": {
            "items": {
              "type": "integer"
            },
            "title": "Updated Columns",
            "type": "array"
          }
        },
        "required": [
          "record_id"
        ],
        "title": "SetFieldValuesRowResult",
        "type": "object"
      },
      "SnapshotActionResponse": {
        "properties": {
          "action": {
            "title": "Action",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "sandbox": {
            "default": true,
            "title": "Sandbox",
            "type": "boolean"
          },
          "tables": {
            "items": {
              "type": "string"
            },
            "title": "Tables",
            "type": "array"
          }
        },
        "required": [
          "action",
          "name",
          "tables"
        ],
        "title": "SnapshotActionResponse",
        "type": "object"
      },
      "SnippetResponse": {
        "properties": {
          "config": {
            "additionalProperties": true,
            "description": "Full configuration object for gtm/config.json",
            "title": "Config",
            "type": "object"
          },
          "domains": {
            "items": {
              "type": "string"
            },
            "title": "Domains",
            "type": "array"
          },
          "react_snippet": {
            "description": "Ready-to-use React component import for @graph8/nextjs",
            "title": "React Snippet",
            "type": "string"
          },
          "script_tag": {
            "description": "Vanilla JS script tag for non-React apps",
            "title": "Script Tag",
            "type": "string"
          },
          "tracking_host": {
            "default": "https://t.graph8.com",
            "title": "Tracking Host",
            "type": "string"
          },
          "write_key": {
            "title": "Write Key",
            "type": "string"
          }
        },
        "required": [
          "write_key",
          "react_snippet",
          "script_tag"
        ],
        "title": "SnippetResponse",
        "type": "object"
      },
      "StageCreateRequest": {
        "properties": {
          "channel_scripts": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Scripts"
          },
          "color": {
            "default": "#6B7280",
            "title": "Color",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "probability": {
            "default": 0,
            "title": "Probability",
            "type": "integer"
          },
          "recommended_elements": {
            "items": {
              "type": "string"
            },
            "title": "Recommended Elements",
            "type": "array"
          },
          "required_elements": {
            "items": {
              "type": "string"
            },
            "title": "Required Elements",
            "type": "array"
          },
          "stage_type": {
            "default": "open",
            "title": "Stage Type",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "StageCreateRequest",
        "type": "object"
      },
      "StageReorderRequest": {
        "properties": {
          "stage_ids": {
            "items": {
              "type": "string"
            },
            "title": "Stage Ids",
            "type": "array"
          }
        },
        "required": [
          "stage_ids"
        ],
        "title": "StageReorderRequest",
        "type": "object"
      },
      "StageUpdateRequest": {
        "properties": {
          "channel_scripts": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Scripts"
          },
          "color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "probability": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Probability"
          },
          "recommended_elements": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recommended Elements"
          },
          "required_elements": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Required Elements"
          },
          "stage_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stage Type"
          }
        },
        "title": "StageUpdateRequest",
        "type": "object"
      },
      "StepConfig": {
        "properties": {
          "input_type": {
            "default": "ON_DEMAND",
            "description": "Input type. One of: ON_DEMAND, MANUAL_TEMPLATE, AI_GENERATED_TEMPLATE. Case-insensitive aliases accepted (e.g. 'template' -> MANUAL_TEMPLATE, 'ai' -> AI_GENERATED_TEMPLATE).",
            "title": "Input Type",
            "type": "string"
          },
          "step_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Step template/content data (subject, body, instructions, etc.)",
            "title": "Step Data"
          },
          "step_order": {
            "description": "Order of the step in the sequence (1-based)",
            "title": "Step Order",
            "type": "integer"
          },
          "step_type": {
            "description": "Step type. One of: EMAIL, PHONE, SMS, WHATSAPP, HEYREACH, MANUAL_DIALER. Note: LinkedIn outreach uses HEYREACH (not LINKEDIN). Case-insensitive aliases accepted.",
            "title": "Step Type",
            "type": "string"
          },
          "time_interval": {
            "default": 0,
            "description": "Delay in seconds after the previous step",
            "title": "Time Interval",
            "type": "integer"
          }
        },
        "required": [
          "step_order",
          "step_type"
        ],
        "title": "StepConfig",
        "type": "object"
      },
      "StepUpdateRequest": {
        "properties": {
          "input_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Input type. One of: ON_DEMAND, MANUAL_TEMPLATE, AI_GENERATED_TEMPLATE. Case-insensitive.",
            "title": "Input Type"
          },
          "step_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Step template/content data",
            "title": "Step Data"
          },
          "step_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Step type. One of: EMAIL, PHONE, SMS, WHATSAPP, HEYREACH, MANUAL_DIALER. Case-insensitive.",
            "title": "Step Type"
          },
          "time_interval": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Delay in seconds after the previous step",
            "title": "Time Interval"
          }
        },
        "title": "StepUpdateRequest",
        "type": "object"
      },
      "StreamInfoResponse": {
        "properties": {
          "domains": {
            "description": "Domains associated with this stream",
            "items": {
              "type": "string"
            },
            "title": "Domains",
            "type": "array"
          },
          "id": {
            "description": "Stream ID used to select this stream",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "description": "User-friendly stream name (e.g. 'graph8.com', 'heyreach-graph8')",
            "title": "Name",
            "type": "string"
          },
          "write_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Public write key for this stream",
            "title": "Write Key"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "StreamInfoResponse",
        "type": "object"
      },
      "SubCalendarResponse": {
        "properties": {
          "external_id": {
            "title": "External Id",
            "type": "string"
          },
          "is_primary": {
            "default": false,
            "title": "Is Primary",
            "type": "boolean"
          },
          "is_selected": {
            "default": false,
            "title": "Is Selected",
            "type": "boolean"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "read_only": {
            "default": false,
            "title": "Read Only",
            "type": "boolean"
          }
        },
        "required": [
          "external_id",
          "name"
        ],
        "title": "SubCalendarResponse",
        "type": "object"
      },
      "SubmitInvoiceRequest": {
        "properties": {
          "hiring_id": {
            "title": "Hiring Id",
            "type": "string"
          },
          "period_end": {
            "description": "YYYY-MM-DD",
            "title": "Period End",
            "type": "string"
          },
          "period_start": {
            "description": "YYYY-MM-DD",
            "title": "Period Start",
            "type": "string"
          }
        },
        "required": [
          "hiring_id",
          "period_start",
          "period_end"
        ],
        "title": "SubmitInvoiceRequest",
        "type": "object"
      },
      "SubscriberAddRequest": {
        "properties": {
          "email": {
            "maxLength": 255,
            "title": "Email",
            "type": "string"
          },
          "first_name": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Name"
          },
          "last_name": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Name"
          }
        },
        "required": [
          "email"
        ],
        "title": "SubscriberAddRequest",
        "type": "object"
      },
      "SubscriberListResponse": {
        "description": "``GET /{newsletter_id}/subscribers`` — preserves the internal\n``{items, total, page, page_size}`` shape verbatim.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SubscriberSummary"
            },
            "title": "Items",
            "type": "array"
          },
          "page": {
            "default": 1,
            "title": "Page",
            "type": "integer"
          },
          "page_size": {
            "default": 25,
            "title": "Page Size",
            "type": "integer"
          },
          "total": {
            "default": 0,
            "title": "Total",
            "type": "integer"
          }
        },
        "title": "SubscriberListResponse",
        "type": "object"
      },
      "SubscriberSummary": {
        "additionalProperties": true,
        "description": "A single newsletter subscriber row.",
        "properties": {
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Name"
          },
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "last_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Name"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "verification_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Verification Status"
          }
        },
        "title": "SubscriberSummary",
        "type": "object"
      },
      "SuggestRequest": {
        "properties": {
          "motion_hint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Motion Hint"
          },
          "target": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target"
          },
          "use_brief_only": {
            "default": true,
            "title": "Use Brief Only",
            "type": "boolean"
          }
        },
        "title": "SuggestRequest",
        "type": "object"
      },
      "SyncErrorResponse": {
        "properties": {
          "details": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Details"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          }
        },
        "required": [
          "id"
        ],
        "title": "SyncErrorResponse",
        "type": "object"
      },
      "SyncRunResponse": {
        "properties": {
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "finished_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "members_added": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Members Added"
          },
          "members_removed": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Members Removed"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "total_members": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Members"
          }
        },
        "required": [
          "id"
        ],
        "title": "SyncRunResponse",
        "type": "object"
      },
      "TagRequest": {
        "properties": {
          "tag_ids": {
            "description": "Tag IDs to associate with the thread",
            "items": {
              "type": "string"
            },
            "title": "Tag Ids",
            "type": "array"
          }
        },
        "required": [
          "tag_ids"
        ],
        "title": "TagRequest",
        "type": "object"
      },
      "TaskCreateRequest": {
        "properties": {
          "assignee_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "User ID to assign the task to",
            "title": "Assignee Id"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Task description",
            "title": "Description"
          },
          "due_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Due date (ISO 8601)",
            "title": "Due Date"
          },
          "parent_task_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Parent task UUID. When set, this task is inserted as a subtask of the parent. Subtasks cannot themselves have subtasks (one level deep).",
            "title": "Parent Task Id"
          },
          "priority": {
            "anyOf": [
              {
                "maximum": 4.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Priority (0=none, 1=urgent, 2=high, 3=normal, 4=low)",
            "title": "Priority"
          },
          "subtask_sort_order": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sort position within the parent's subtasks. When omitted on a subtask create, the handler appends to the end.",
            "title": "Subtask Sort Order"
          },
          "title": {
            "description": "Task title",
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "title"
        ],
        "title": "TaskCreateRequest",
        "type": "object"
      },
      "TaskResponse": {
        "properties": {
          "assignee_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assignee Id"
          },
          "assignee_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assignee Name"
          },
          "completed_subtask_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed Subtask Count"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "created_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "due_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Due Date"
          },
          "entity_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Entity Id"
          },
          "entity_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Entity Type"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "parent_task_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Task Id"
          },
          "priority": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Priority"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "subtask_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subtask Count"
          },
          "subtask_sort_order": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subtask Sort Order"
          },
          "task_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Type"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "required": [
          "id",
          "title"
        ],
        "title": "TaskResponse",
        "type": "object"
      },
      "TaskUpdateRequest": {
        "properties": {
          "assignee_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "User ID to assign the task to",
            "title": "Assignee Id"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Task description",
            "title": "Description"
          },
          "due_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Due date (ISO 8601)",
            "title": "Due Date"
          },
          "parent_task_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "New parent task UUID. Re-parents this task into a subtask of the given parent. Parent must exist and must not itself be a subtask.",
            "title": "Parent Task Id"
          },
          "priority": {
            "anyOf": [
              {
                "maximum": 4.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Priority (0=none, 1=urgent, 2=high, 3=normal, 4=low)",
            "title": "Priority"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Task status (open, completed)",
            "title": "Status"
          },
          "subtask_sort_order": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "New sort position within the parent's subtasks (reorder).",
            "title": "Subtask Sort Order"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Task title",
            "title": "Title"
          }
        },
        "title": "TaskUpdateRequest",
        "type": "object"
      },
      "ToggleWorkflowRequest": {
        "properties": {
          "active": {
            "title": "Active",
            "type": "boolean"
          }
        },
        "required": [
          "active"
        ],
        "title": "ToggleWorkflowRequest",
        "type": "object"
      },
      "UpdateAvailabilityRequest": {
        "properties": {
          "availability": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/AvailabilityInput"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Availability"
          },
          "overrides": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/OverrideInput"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Overrides"
          }
        },
        "title": "UpdateAvailabilityRequest",
        "type": "object"
      },
      "UpdateEventTypeRequest": {
        "properties": {
          "after_event_buffer": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "After Event Buffer"
          },
          "before_event_buffer": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Before Event Buffer"
          },
          "booking_fields": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Booking Fields"
          },
          "default_layout": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Layout"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "disable_cancelling": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disable Cancelling"
          },
          "disable_guests": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disable Guests"
          },
          "disable_rescheduling": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disable Rescheduling"
          },
          "event_color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Color"
          },
          "event_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Name"
          },
          "hidden": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hidden"
          },
          "layouts": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Layouts"
          },
          "length": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Length"
          },
          "locations": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Locations"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "minimum_booking_notice": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Minimum Booking Notice"
          },
          "period_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Period Days"
          },
          "period_end_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Period End Date"
          },
          "period_start_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Period Start Date"
          },
          "period_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Period Type"
          },
          "recurring_event": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recurring Event"
          },
          "requires_confirmation": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requires Confirmation"
          },
          "schedule_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Schedule Id"
          },
          "scheduling_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scheduling Type"
          },
          "seats_per_time_slot": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats Per Time Slot"
          },
          "slot_interval": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slot Interval"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug"
          },
          "success_redirect_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Success Redirect Url"
          },
          "time_zone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Time Zone"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "use_common_schedule": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Use Common Schedule"
          }
        },
        "title": "UpdateEventTypeRequest",
        "type": "object"
      },
      "UpdateGlobalContextRequest": {
        "description": "Body for PATCH /global-context/documents/{doc_id}.\n\nPartial update: send only the fields you want to change. At least one of\n``content`` / ``status`` must be present.",
        "properties": {
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "New document body. Stored at meta_data.content. Omit to leave unchanged.",
            "title": "Content"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "New document status (e.g. 'completed', 'draft'). Omit to leave unchanged.",
            "title": "Status"
          }
        },
        "title": "UpdateGlobalContextRequest",
        "type": "object"
      },
      "UpdateIcpRequest": {
        "description": "Body for PATCH /icps/{icp_id}. Partial - send only the fields to change.\n\nAt least one field must be present. Archiving is a separate lifecycle action\n(POST /icps/{icp_id}/archive), matching the internal Studio split.",
        "properties": {
          "buying_signals": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "New list of buying-intent signals.",
            "title": "Buying Signals"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "New description.",
            "title": "Description"
          },
          "estimated_market_size": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "New estimated market-size count.",
            "title": "Estimated Market Size"
          },
          "firmographics": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "New firmographic criteria.",
            "title": "Firmographics"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "New ICP name.",
            "title": "Name"
          },
          "tech_stack": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "New technology signals.",
            "title": "Tech Stack"
          }
        },
        "title": "UpdateIcpRequest",
        "type": "object"
      },
      "UpdateLocationRequest": {
        "properties": {
          "location": {
            "title": "Location",
            "type": "string"
          }
        },
        "required": [
          "location"
        ],
        "title": "UpdateLocationRequest",
        "type": "object"
      },
      "UpdateMyMeetingRequest": {
        "description": "Employee-side meeting edit — notes + client-contact fields only.\n\nMirrors ``UpdateMyMeetingRequest`` in ``self_service_router`` exactly,\nwhich in turn is bounded by the ``SdrMeeting`` ORM columns\n(``shared/infrustructure/db/cdp/models/sdr_meeting.py``): only ``notes``,\n``client_contact_name`` and ``client_contact_email`` exist. The field\nnames here are the raw column names because the update is applied via\n``update(SdrMeeting).values(**updates)`` with no whitelist/rename step —\nan unknown key (the old ``contact_name``/``contact_phone``/``contact_title``\n/``contact_company``/``contact_linkedin_url`` set) raises SQLAlchemy\n\"Unconsumed column names\" inside the handler and 500s. Lifecycle fields\n(status, meeting_date, meeting_type, hiring_id) are intentionally not\neditable — those are calendar-driven client-side fields.",
        "properties": {
          "client_contact_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Contact Email"
          },
          "client_contact_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Contact Name"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          }
        },
        "title": "UpdateMyMeetingRequest",
        "type": "object"
      },
      "UpdateOutOfOfficeRequest": {
        "properties": {
          "end": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "End"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "public_note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Public Note"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "start": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start"
          },
          "time_zone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Time Zone"
          },
          "to_user_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "To User Id"
          }
        },
        "title": "UpdateOutOfOfficeRequest",
        "type": "object"
      },
      "UpdatePersonaRequest": {
        "description": "Body for PATCH /personas/{persona_id}. Partial - send only fields to change.\n\nAt least one field must be present. Passing status='archived' is equivalent to\ncalling POST /personas/{persona_id}/archive.",
        "properties": {
          "campaign_approach": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "New campaign approach.",
            "title": "Campaign Approach"
          },
          "confidence": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "New confidence label.",
            "title": "Confidence"
          },
          "expected_receptivity": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "New expected-receptivity note.",
            "title": "Expected Receptivity"
          },
          "key_signals": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "New list of buying/intent signals.",
            "title": "Key Signals"
          },
          "priority": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "New display priority.",
            "title": "Priority"
          },
          "recommended_goal": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "New recommended goal.",
            "title": "Recommended Goal"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "New status (e.g. 'active', 'archived').",
            "title": "Status"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "New persona title.",
            "title": "Title"
          },
          "why_target": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "New 'why target' text.",
            "title": "Why Target"
          }
        },
        "title": "UpdatePersonaRequest",
        "type": "object"
      },
      "UpdateResearchReportRequest": {
        "description": "Body for PATCH /research-reports/{report_id}.\n\nPartial update: send only what you want to change. At least one of\n``markdown_content`` / ``status`` must be present.",
        "properties": {
          "markdown_content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "New rendered markdown body. Omit to leave unchanged. Triggers RAG re-index.",
            "title": "Markdown Content"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "New report status. A report already 'completed'/'approved' can only move between those two states (done reports stay done).",
            "title": "Status"
          }
        },
        "title": "UpdateResearchReportRequest",
        "type": "object"
      },
      "UpdateRoutingFormRequest": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "disabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disabled"
          },
          "fields": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/RoutingFormField"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fields"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "routes": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/RoutingFormRouteInput"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Routes"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug"
          }
        },
        "title": "UpdateRoutingFormRequest",
        "type": "object"
      },
      "UpdateScheduleRequest": {
        "properties": {
          "availability": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/AvailabilityInput"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Availability"
          },
          "is_default": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Default"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "overrides": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/OverrideInput"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Overrides"
          },
          "time_zone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Time Zone"
          }
        },
        "title": "UpdateScheduleRequest",
        "type": "object"
      },
      "UpdateStepRequest": {
        "properties": {
          "angle_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Angle Id"
          },
          "channel": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel"
          },
          "condition": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Condition"
          },
          "constraints": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Constraints"
          },
          "cta_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cta Type"
          },
          "day": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Day"
          },
          "do_not_send_rules": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Do Not Send Rules"
          },
          "mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mode"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "personalization_level": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Personalization Level"
          },
          "platform": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Platform"
          },
          "stop_on_reply": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stop On Reply"
          }
        },
        "title": "UpdateStepRequest",
        "type": "object"
      },
      "UpdateWorkflowRequest": {
        "properties": {
          "event_type_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Type Ids"
          },
          "is_active_on_all": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active On All"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "steps": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/WorkflowStepInput"
                },
                "maxItems": 20,
                "minItems": 1,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Steps"
          },
          "time": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Time"
          },
          "time_unit": {
            "anyOf": [
              {
                "enum": [
                  "minutes",
                  "hours",
                  "days"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Time Unit"
          },
          "trigger": {
            "anyOf": [
              {
                "enum": [
                  "new_booking",
                  "before_event",
                  "after_event",
                  "booking_cancelled",
                  "booking_rescheduled"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trigger"
          }
        },
        "title": "UpdateWorkflowRequest",
        "type": "object"
      },
      "UrlCompaniesRequest": {
        "properties": {
          "days": {
            "default": 90,
            "maximum": 365.0,
            "minimum": 1.0,
            "title": "Days",
            "type": "integer"
          },
          "limit": {
            "default": 200,
            "maximum": 500.0,
            "minimum": 1.0,
            "title": "Limit",
            "type": "integer"
          },
          "url": {
            "description": "Canonical page_url (no scheme, no www)",
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "title": "UrlCompaniesRequest",
        "type": "object"
      },
      "UsageBalanceResponse": {
        "description": "An org's current credit balance + lifetime totals.",
        "properties": {
          "available_credits": {
            "description": "Spendable credits (credits - held)",
            "title": "Available Credits",
            "type": "number"
          },
          "credits": {
            "description": "Total credit balance",
            "title": "Credits",
            "type": "number"
          },
          "customer_id": {
            "description": "Org / customer id the credits belong to",
            "title": "Customer Id",
            "type": "string"
          },
          "held_credits": {
            "description": "Credits currently on hold",
            "title": "Held Credits",
            "type": "number"
          },
          "total_earned": {
            "description": "Lifetime credits earned",
            "title": "Total Earned",
            "type": "number"
          },
          "total_used": {
            "description": "Lifetime credits used",
            "title": "Total Used",
            "type": "number"
          }
        },
        "required": [
          "customer_id",
          "credits",
          "held_credits",
          "available_credits",
          "total_earned",
          "total_used"
        ],
        "title": "UsageBalanceResponse",
        "type": "object"
      },
      "UsageTransactionResponse": {
        "description": "A single credit-ledger transaction.",
        "properties": {
          "amount": {
            "default": 0.0,
            "description": "Credit delta (negative = spend)",
            "title": "Amount",
            "type": "number"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Transaction id",
            "title": "Id"
          },
          "llm_tier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "g8_t1 / g8_t2 / g8_t3 when an LLM charge",
            "title": "Llm Tier"
          },
          "quantity": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quantity"
          },
          "service": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Service the charge was for (e.g. 'ai_enrichment')",
            "title": "Service"
          },
          "type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Transaction type (e.g. 'usage', 'purchase')",
            "title": "Type"
          }
        },
        "title": "UsageTransactionResponse",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      },
      "VerifyEmailRequest": {
        "properties": {
          "email": {
            "description": "Email address to verify",
            "title": "Email",
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "title": "VerifyEmailRequest",
        "type": "object"
      },
      "VerifyEmailResponse": {
        "additionalProperties": true,
        "type": "object"
      },
      "VisitorCompanyResponse": {
        "properties": {
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "company_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Domain"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Name"
          },
          "confidence": {
            "default": 0.0,
            "title": "Confidence",
            "type": "number"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "employee_count": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Employee Count"
          },
          "industry": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Industry"
          }
        },
        "title": "VisitorCompanyResponse",
        "type": "object"
      },
      "VisitorScoreResponse": {
        "properties": {
          "engagement": {
            "default": 0,
            "title": "Engagement",
            "type": "integer"
          },
          "intent": {
            "default": "low",
            "title": "Intent",
            "type": "string"
          },
          "signals": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Signals",
            "type": "array"
          }
        },
        "title": "VisitorScoreResponse",
        "type": "object"
      },
      "VoicePagination": {
        "description": "Pagination block returned by the voice list-sessions endpoint.\n\nMirrored verbatim so the field names match what voice already ships\n(``total_items`` / ``total_pages`` / ``current_page`` / ``page_size``).\nKeeping voice's field names here avoids a renaming layer that would\nhave to be updated every time voice extends the block.",
        "properties": {
          "current_page": {
            "default": 1,
            "title": "Current Page",
            "type": "integer"
          },
          "page_size": {
            "default": 50,
            "title": "Page Size",
            "type": "integer"
          },
          "total_items": {
            "default": 0,
            "title": "Total Items",
            "type": "integer"
          },
          "total_pages": {
            "default": 0,
            "title": "Total Pages",
            "type": "integer"
          }
        },
        "title": "VoicePagination",
        "type": "object"
      },
      "WaterfallConfigSummary": {
        "description": "One saved waterfall pipeline attached to (or global for) a list.\n\n`column_id` is the handle the worker uses to resolve config + store\nenrichment output. `providers` is a de-duplicated list of step providers\nso callers can see at a glance what a pipeline actually runs.",
        "properties": {
          "column_id": {
            "title": "Column Id",
            "type": "string"
          },
          "data_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data Type"
          },
          "field_to_enrich": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Field To Enrich"
          },
          "is_active": {
            "default": true,
            "title": "Is Active",
            "type": "boolean"
          },
          "is_global": {
            "default": false,
            "title": "Is Global",
            "type": "boolean"
          },
          "list_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "List Id"
          },
          "missing_credentials": {
            "description": "Providers in this pipeline whose step is BYOK but the org has no active key (these steps will be skipped at run time). Empty when everything is runnable.",
            "items": {
              "type": "string"
            },
            "title": "Missing Credentials",
            "type": "array"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "providers": {
            "items": {
              "type": "string"
            },
            "title": "Providers",
            "type": "array"
          },
          "providers_detail": {
            "description": "Per-step credential breakdown (system vs BYOK + readiness) for this pipeline.",
            "items": {
              "$ref": "#/components/schemas/ProviderStepDetail"
            },
            "title": "Providers Detail",
            "type": "array"
          },
          "step_count": {
            "default": 0,
            "title": "Step Count",
            "type": "integer"
          }
        },
        "required": [
          "column_id",
          "name"
        ],
        "title": "WaterfallConfigSummary",
        "type": "object"
      },
      "WaterfallConfigsResponse": {
        "description": "Paginated (by list_id filter) collection of waterfall pipeline configs.",
        "properties": {
          "configs": {
            "items": {
              "$ref": "#/components/schemas/WaterfallConfigSummary"
            },
            "title": "Configs",
            "type": "array"
          },
          "count": {
            "default": 0,
            "title": "Count",
            "type": "integer"
          },
          "list_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "List Id"
          }
        },
        "title": "WaterfallConfigsResponse",
        "type": "object"
      },
      "WaterfallStepInput": {
        "description": "Single step in a caller-supplied waterfall sequence.\n\nMirrors `WaterfallStepDto` in `enrichment/interfaces/fastapi/waterfall_dtos.py`.\nPersisted verbatim into `enrichment_configs.config.steps[]` so the CF\nworker can resolve provider, action and credentials the same way\nUI-saved pipelines do.",
        "properties": {
          "action": {
            "description": "Provider action: lookup_person, find_email, enrich_person, ...",
            "title": "Action",
            "type": "string"
          },
          "action_display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Human-readable label shown in UI. Auto-titled from `action` if omitted.",
            "title": "Action Display Name"
          },
          "confidence_threshold": {
            "default": 0.0,
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Confidence Threshold",
            "type": "number"
          },
          "config": {
            "additionalProperties": true,
            "description": "Provider-specific options (e.g. apollo `reveal_phone_numbers=true`).",
            "title": "Config",
            "type": "object"
          },
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Step identifier. Auto-generated (`step_<provider>_<uuid8>`) if omitted.",
            "title": "Id"
          },
          "input_mapping": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Maps provider input names to graph8 column identifiers (CONTACT_*).",
            "title": "Input Mapping",
            "type": "object"
          },
          "is_system_provider": {
            "default": false,
            "description": "True = use graph8-managed credentials + charge credits. False = use org BYOK.",
            "title": "Is System Provider",
            "type": "boolean"
          },
          "max_retries": {
            "default": 0,
            "maximum": 3.0,
            "minimum": 0.0,
            "title": "Max Retries",
            "type": "integer"
          },
          "order": {
            "default": 0,
            "description": "0-indexed execution order.",
            "minimum": 0.0,
            "title": "Order",
            "type": "integer"
          },
          "output_field": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Dotted path the worker writes into (e.g. 'contact.work_email').",
            "title": "Output Field"
          },
          "output_mapping": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Optional output field remap (deprecated — prefer `output_field`).",
            "title": "Output Mapping",
            "type": "object"
          },
          "provider": {
            "description": "Provider name: graph8, hunter, prospeo, dropcontact, apollo, ...",
            "title": "Provider",
            "type": "string"
          },
          "stop_on_success": {
            "default": true,
            "title": "Stop On Success",
            "type": "boolean"
          }
        },
        "required": [
          "provider",
          "action"
        ],
        "title": "WaterfallStepInput",
        "type": "object"
      },
      "WebhookCreateRequest": {
        "properties": {
          "events": {
            "description": "Event types to subscribe to",
            "items": {
              "type": "string"
            },
            "title": "Events",
            "type": "array"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Human-readable name",
            "title": "Name"
          },
          "url": {
            "description": "Target URL for webhook delivery",
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url",
          "events"
        ],
        "title": "WebhookCreateRequest",
        "type": "object"
      },
      "WebhookDeliveryResponse": {
        "properties": {
          "attempts": {
            "default": 0,
            "title": "Attempts",
            "type": "integer"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "event": {
            "title": "Event",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "max_attempts": {
            "default": 3,
            "title": "Max Attempts",
            "type": "integer"
          },
          "response_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Code"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "event",
          "status"
        ],
        "title": "WebhookDeliveryResponse",
        "type": "object"
      },
      "WebhookEventResponse": {
        "properties": {
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "event": {
            "title": "Event",
            "type": "string"
          }
        },
        "required": [
          "event"
        ],
        "title": "WebhookEventResponse",
        "type": "object"
      },
      "WebhookResponse": {
        "properties": {
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "events": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Events",
            "type": "array"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "is_active": {
            "default": true,
            "title": "Is Active",
            "type": "boolean"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only returned on create and rotate-secret",
            "title": "Secret"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "id",
          "url"
        ],
        "title": "WebhookResponse",
        "type": "object"
      },
      "WebhookUpdateRequest": {
        "properties": {
          "events": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Event types to subscribe to",
            "title": "Events"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether the webhook is active",
            "title": "Is Active"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Human-readable name",
            "title": "Name"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Target URL for webhook delivery",
            "title": "Url"
          }
        },
        "title": "WebhookUpdateRequest",
        "type": "object"
      },
      "WorkflowStepInput": {
        "properties": {
          "action": {
            "enum": [
              "email_host",
              "email_attendee",
              "email_address"
            ],
            "title": "Action",
            "type": "string"
          },
          "email_subject": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email Subject"
          },
          "include_calendar_event": {
            "default": false,
            "title": "Include Calendar Event",
            "type": "boolean"
          },
          "reminder_body": {
            "anyOf": [
              {
                "maxLength": 20000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reminder Body"
          },
          "send_to": {
            "anyOf": [
              {
                "format": "email",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Send To"
          },
          "sender": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender"
          },
          "template": {
            "default": "reminder",
            "enum": [
              "reminder",
              "custom",
              "cancelled",
              "rescheduled",
              "completed",
              "rating"
            ],
            "title": "Template",
            "type": "string"
          }
        },
        "required": [
          "action"
        ],
        "title": "WorkflowStepInput",
        "type": "object"
      },
      "appointments__domain__entities__UpdateSequenceRequest": {
        "description": "Associate a booking with a sequencer sequence (or detach when null).\n\n`sequence_id` is the `seqsequences.id` UUID. Persisted under\n`booking.metadata_['campaignId']` — same key the public booking flow\npopulates from the `?campaignId=` URL param at create time.",
        "properties": {
          "sequence_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sequence Id"
          }
        },
        "title": "UpdateSequenceRequest",
        "type": "object"
      },
      "developer_api__interfaces__v1__cli_campaigns_router__CampaignCreateRequest": {
        "properties": {
          "brief": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Campaign brief",
            "title": "Brief"
          },
          "category": {
            "default": "Outbound",
            "description": "Campaign category",
            "title": "Category",
            "type": "string"
          },
          "core_concept": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Core concept",
            "title": "Core Concept"
          },
          "goal": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Campaign goal",
            "title": "Goal"
          },
          "name": {
            "description": "Campaign name",
            "title": "Name",
            "type": "string"
          },
          "primary_hook": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Primary hook text",
            "title": "Primary Hook"
          },
          "target_persona": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Target persona",
            "title": "Target Persona"
          }
        },
        "required": [
          "name"
        ],
        "title": "CampaignCreateRequest",
        "type": "object"
      },
      "developer_api__interfaces__v1__cli_campaigns_router__CampaignUpdateRequest": {
        "properties": {
          "brief": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Campaign brief",
            "title": "Brief"
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Campaign category",
            "title": "Category"
          },
          "core_concept": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Core concept",
            "title": "Core Concept"
          },
          "goal": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Campaign goal",
            "title": "Goal"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Campaign name",
            "title": "Name"
          },
          "primary_hook": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Primary hook text",
            "title": "Primary Hook"
          },
          "target_persona": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Target persona",
            "title": "Target Persona"
          }
        },
        "title": "CampaignUpdateRequest",
        "type": "object"
      },
      "developer_api__interfaces__v1__gtm_campaigns_router__CampaignCreateRequest": {
        "properties": {
          "audience_list_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "If provided, attaches this list ID to cb_campaigns.audience_list_id at create time.",
            "title": "Audience List Id"
          },
          "auto_generate_documents": {
            "default": false,
            "description": "When True, dispatches the Celery campaign-content generator asynchronously after creation: the paired cb_campaign_ideas row is inserted (so the FE workbench sees the campaign), cb_campaign_metadata is created, the campaign starts in status='copy_in_progress', and flips to 'active' once docs are ready (~60-90s). Default is False to preserve byte-for-byte backwards compatibility with the original bare-bones draft behavior — the MCP tool wrapper sets True explicitly to opt into Studio parity.",
            "title": "Auto Generate Documents",
            "type": "boolean"
          },
          "brief": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Campaign brief",
            "title": "Brief"
          },
          "category": {
            "default": "Outbound",
            "description": "Campaign category",
            "maxLength": 100,
            "title": "Category",
            "type": "string"
          },
          "core_concept": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Core concept",
            "title": "Core Concept"
          },
          "execution_targets": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Execution destinations: sequencer, dialer, or content_only.",
            "title": "Execution Targets"
          },
          "goal": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Campaign goal",
            "title": "Goal"
          },
          "name": {
            "description": "Campaign name",
            "maxLength": 255,
            "title": "Name",
            "type": "string"
          },
          "primary_hook": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Primary hook text",
            "title": "Primary Hook"
          },
          "secondary_hooks": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Additional hook variations to seed the campaign idea with.",
            "title": "Secondary Hooks"
          },
          "target_channels": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Channels the campaign will use, e.g. ['email'], ['email','linkedin']. Drives which copy documents the auto-generator creates. Defaults to ['email'].",
            "title": "Target Channels"
          },
          "target_persona": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Target persona",
            "title": "Target Persona"
          }
        },
        "required": [
          "name"
        ],
        "title": "CampaignCreateRequest",
        "type": "object"
      },
      "developer_api__interfaces__v1__gtm_campaigns_router__CampaignUpdateRequest": {
        "properties": {
          "brief": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Campaign brief",
            "title": "Brief"
          },
          "category": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Campaign category",
            "title": "Category"
          },
          "core_concept": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Core concept",
            "title": "Core Concept"
          },
          "goal": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Campaign goal",
            "title": "Goal"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Campaign name",
            "title": "Name"
          },
          "primary_hook": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Primary hook text",
            "title": "Primary Hook"
          },
          "target_persona": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Target persona",
            "title": "Target Persona"
          }
        },
        "title": "CampaignUpdateRequest",
        "type": "object"
      },
      "developer_api__interfaces__v1__gtm_campaigns_router__UpdateSequenceRequest": {
        "properties": {
          "steps": {
            "items": {
              "$ref": "#/components/schemas/SequenceStepRef"
            },
            "title": "Steps",
            "type": "array"
          }
        },
        "required": [
          "steps"
        ],
        "title": "UpdateSequenceRequest",
        "type": "object"
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "description": "Org API key: `Authorization: Bearer <api_key>`",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Public API for programmatic access to graph8 data. Authenticate with an org API key: `Authorization: Bearer <api_key>`",
    "title": "graph8 Developer API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/activities": {
      "get": {
        "description": "List recent activities for the authenticated organization.",
        "operationId": "list_activities_activities_get",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "activity_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Activity Type"
            }
          },
          {
            "in": "query",
            "name": "contact_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Contact Id"
            }
          },
          {
            "in": "query",
            "name": "company_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Company Id"
            }
          },
          {
            "in": "query",
            "name": "mashup_contact_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Mashup Contact Id"
            }
          },
          {
            "in": "query",
            "name": "mashup_company_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Mashup Company Id"
            }
          },
          {
            "in": "query",
            "name": "deal_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Deal Id"
            }
          },
          {
            "in": "query",
            "name": "occurred_after",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Occurred After"
            }
          },
          {
            "in": "query",
            "name": "occurred_before",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Occurred Before"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_dict__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Activities",
        "tags": [
          "GTM Context"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      }
    },
    "/agency/clients": {
      "get": {
        "description": "List the client orgs this agency key may target via X-Target-Org-Id.\n\nEach entry's ``org_id`` is the value to pass in the ``X-Target-Org-Id``\nheader on any subsequent request to operate that client org.",
        "operationId": "list_agency_clients_agency_clients_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_dict__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Agency Clients",
        "tags": [
          "Agency"
        ],
        "x-graph8-scope": "account:read",
        "x-graph8-tier": "read"
      }
    },
    "/agency/me": {
      "get": {
        "description": "Describe the agency credential: agency org + authorized client count.",
        "operationId": "get_agency_me_agency_me_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Agency Me",
        "tags": [
          "Agency"
        ],
        "x-graph8-scope": "account:read",
        "x-graph8-tier": "read"
      }
    },
    "/analytics/campaign-visitors": {
      "get": {
        "description": "Campaign Visitors report for the authenticated org (analytics report a23).\n\nReturns, for the resolved window:\n\n  * **summary** — KPI tiles (page events, campaign clicks, unique contacts /\n    steps, identified visitors, and the encrypted/plaintext/unparseable\n    diagnostic split). Click counters are email-security-scanner filtered\n    (humans only) so they match the in-app report — raw scanner traffic\n    (Microsoft Defender / SafeLinks) is excluded.\n  * **top_campaign_steps** — per sequencer step: clicks, unique contacts, a\n    human-readable label, and send-side context (emails sent / with link).\n  * **link_engagement** — per clicked destination URL: human clicks, unique\n    contacts, the emails-with-link denominator, and CTR% (clamped 0–100).\n  * **top_contacts** — who clicked, with resolved name/email (PII; omit via\n    `include_contacts=false`).\n\nEnrichment (labels, email, send counts, CTR) is best-effort: a field is\n``null`` when it couldn't be resolved, never a fabricated zero. An org with\nno visitor-tracking pipeline returns an empty report with\n``summary.jitsu_wired = false``.\n\nAgency keys: pass ``X-Target-Org-Id`` to run the report for a specific client\norg within your authorized set.",
        "operationId": "get_campaign_visitors_analytics_campaign_visitors_get",
        "parameters": [
          {
            "description": "Window start (inclusive), YYYY-MM-DD. If omitted, derived from `days`.",
            "in": "query",
            "name": "start_date",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Window start (inclusive), YYYY-MM-DD. If omitted, derived from `days`.",
              "title": "Start Date"
            }
          },
          {
            "description": "Window end (inclusive), YYYY-MM-DD. If omitted, today.",
            "in": "query",
            "name": "end_date",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Window end (inclusive), YYYY-MM-DD. If omitted, today.",
              "title": "End Date"
            }
          },
          {
            "description": "Rolling 'last N days from today'. Ignored when start_date/end_date are supplied.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 365,
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Rolling 'last N days from today'. Ignored when start_date/end_date are supplied.",
              "title": "Days"
            }
          },
          {
            "description": "Row cap for the steps + contacts tables",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Row cap for the steps + contacts tables",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Include the Top contacts table (contact name + email — PII). Set false to omit it entirely for a privacy-lean response.",
            "in": "query",
            "name": "include_contacts",
            "required": false,
            "schema": {
              "default": true,
              "description": "Include the Top contacts table (contact name + email — PII). Set false to omit it entirely for a privacy-lean response.",
              "title": "Include Contacts",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CampaignVisitorsReport_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Campaign Visitors",
        "tags": [
          "Analytics"
        ]
      }
    },
    "/appointments/bookings": {
      "get": {
        "description": "List bookings visible to the caller.\n\nPersonal keys retain the member-scoped path. An organization key that\npassed the existing explicit ``meetings:read`` gate uses the handler's\norg-wide read path and therefore never looks up the synthetic API identity.",
        "operationId": "list_bookings_appointments_bookings_get",
        "parameters": [
          {
            "description": "Filter by status: accepted | pending | cancelled | rejected.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by status: accepted | pending | cancelled | rejected.",
              "title": "Status"
            }
          },
          {
            "description": "Only bookings for this event type.",
            "in": "query",
            "name": "event_type_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only bookings for this event type.",
              "title": "Event Type Id"
            }
          },
          {
            "description": "ISO-8601 lower bound on start_time.",
            "in": "query",
            "name": "after_start",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "ISO-8601 lower bound on start_time.",
              "title": "After Start"
            }
          },
          {
            "description": "ISO-8601 upper bound on end_time.",
            "in": "query",
            "name": "before_end",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "ISO-8601 upper bound on end_time.",
              "title": "Before End"
            }
          },
          {
            "description": "Filter by an attendee email.",
            "in": "query",
            "name": "attendee_email",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by an attendee email.",
              "title": "Attendee Email"
            }
          },
          {
            "description": "start_time | end_time | created_at | status.",
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "default": "start_time",
              "description": "start_time | end_time | created_at | status.",
              "title": "Sort By",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sort_order",
            "required": false,
            "schema": {
              "default": "desc",
              "pattern": "^(asc|desc)$",
              "title": "Sort Order",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "skip",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Skip",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "take",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "title": "Take",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Bookings Appointments Bookings Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List the caller's bookings (paginated)",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create (book) an appointment on behalf of the API key's user.\n\nReuses ``BookingsHandler.handle_create`` verbatim — same host selection,\nconflict checks, credit charge (~20 credits), calendar push, attendee\nnotifications, and EDA emit as an in-app booking. Surfaces the handler's\n402 (insufficient credits) / 409 (slot conflict) / 404 (event type)\nuntouched.",
        "operationId": "create_booking_appointments_bookings_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBookingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Create Booking Appointments Bookings Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create a booking (charges credits + sends notifications)",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:run",
        "x-graph8-tier": "external"
      }
    },
    "/appointments/bookings/insights": {
      "get": {
        "description": "Return aggregated booking insights for the caller's org.\n\nCovers booking counts, show/no-show rates, and per-event-type breakdowns\nfor the given date window.  Backed by ``BookingsHandler.handle_insights``\n(same handler as the in-app insights view).  ``is_admin`` is forced False\nso the caller sees only their own data. The in-app ``member_user_id`` filter\nis intentionally NOT exposed: it is an admin-only knob and an API key never\nholds admin, so the handler would ignore it anyway - omitting it from the\nroute signature avoids the misleading \"forwarded but ignored\" surface.",
        "operationId": "get_booking_insights_appointments_bookings_insights_get",
        "parameters": [
          {
            "description": "ISO date string for range start (e.g. '2026-01-01').",
            "in": "query",
            "name": "date_from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "ISO date string for range start (e.g. '2026-01-01').",
              "title": "Date From"
            }
          },
          {
            "description": "ISO date string for range end (e.g. '2026-12-31').",
            "in": "query",
            "name": "date_to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "ISO date string for range end (e.g. '2026-12-31').",
              "title": "Date To"
            }
          },
          {
            "description": "Comma-separated event-type IDs to filter by.",
            "in": "query",
            "name": "event_type_ids",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma-separated event-type IDs to filter by.",
              "title": "Event Type Ids"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Get Booking Insights Appointments Bookings Insights Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get aggregated booking insights",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:read",
        "x-graph8-tier": "read"
      }
    },
    "/appointments/bookings/{booking_uid}": {
      "get": {
        "description": "Return the full booking detail (attendees, references, meeting_url,\nresponses, internal notes). Backed by ``BookingsHandler.handle_get``;\nraises 404 when the UID isn't visible to the caller.",
        "operationId": "get_booking_appointments_bookings__booking_uid__get",
        "parameters": [
          {
            "description": "Booking UID (uuid string).",
            "in": "path",
            "name": "booking_uid",
            "required": true,
            "schema": {
              "description": "Booking UID (uuid string).",
              "title": "Booking Uid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Get Booking Appointments Bookings  Booking Uid  Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get a single booking by UID",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:read",
        "x-graph8-tier": "read"
      }
    },
    "/appointments/bookings/{booking_uid}/cancel": {
      "post": {
        "description": "Cancel a booking. Reuses ``BookingsHandler.handle_cancel`` (sends the\ncancellation emails, releases the slot, emits the EDA event). Body is\noptional — omit it to cancel with no reason.",
        "operationId": "cancel_booking_appointments_bookings__booking_uid__cancel_post",
        "parameters": [
          {
            "in": "path",
            "name": "booking_uid",
            "required": true,
            "schema": {
              "title": "Booking Uid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/CancelBookingRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Request"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Cancel Booking Appointments Bookings  Booking Uid  Cancel Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Cancel a booking and notify both parties",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:delete",
        "x-graph8-tier": "destructive"
      }
    },
    "/appointments/bookings/{booking_uid}/confirm": {
      "post": {
        "description": "Confirm or reject a booking that requires host approval.\n\nWhen ``confirmed=True`` the booking moves from ``pending`` to\n``accepted`` and confirmation emails are sent.  When ``confirmed=False``\nthe booking is rejected and the attendee is notified with the optional\n``reason``.  Backed by ``BookingsHandler.handle_confirm``; raises 404\nwhen the booking uid is not visible to the caller, 403 on permission.",
        "operationId": "confirm_booking_appointments_bookings__booking_uid__confirm_post",
        "parameters": [
          {
            "description": "Booking UID (uuid string).",
            "in": "path",
            "name": "booking_uid",
            "required": true,
            "schema": {
              "description": "Booking UID (uuid string).",
              "title": "Booking Uid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmBookingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Confirm Booking Appointments Bookings  Booking Uid  Confirm Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Confirm or reject a pending booking",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:run",
        "x-graph8-tier": "external"
      }
    },
    "/appointments/bookings/{booking_uid}/guests": {
      "post": {
        "description": "Invite additional guests (email addresses) to an existing booking.\n\nSends notification emails to each new guest and updates the booking's\nattendee list.  Backed by ``BookingsHandler.handle_add_guests``.\nRaises 404 when the booking uid is not visible to the caller.",
        "operationId": "add_booking_guests_appointments_bookings__booking_uid__guests_post",
        "parameters": [
          {
            "description": "Booking UID (uuid string).",
            "in": "path",
            "name": "booking_uid",
            "required": true,
            "schema": {
              "description": "Booking UID (uuid string).",
              "title": "Booking Uid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddGuestsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Add Booking Guests Appointments Bookings  Booking Uid  Guests Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add guest attendees to a booking",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:run",
        "x-graph8-tier": "external"
      }
    },
    "/appointments/bookings/{booking_uid}/location": {
      "patch": {
        "description": "Change the meeting location for a booking and re-notify both parties.\n\n``location`` is a location key such as ``\"zoom\"``, ``\"google_meet\"``,\n``\"in_person\"``, or a custom URL.  Backed by\n``BookingsHandler.handle_update_location`` (updates the booking row,\nsends location-updated emails, emits an EDA event).  Raises 404 when\nthe booking uid is not visible to the caller.",
        "operationId": "update_booking_location_appointments_bookings__booking_uid__location_patch",
        "parameters": [
          {
            "description": "Booking UID (uuid string).",
            "in": "path",
            "name": "booking_uid",
            "required": true,
            "schema": {
              "description": "Booking UID (uuid string).",
              "title": "Booking Uid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateLocationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Update Booking Location Appointments Bookings  Booking Uid  Location Patch",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update the meeting location and notify both parties",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:run",
        "x-graph8-tier": "external"
      }
    },
    "/appointments/bookings/{booking_uid}/mark-absent": {
      "post": {
        "description": "Record a no-show for the host, one or more attendees, or both.\n\nPass ``host=true`` to flag the host as absent.  Pass ``attendees`` as a\nlist of attendee dicts (each containing at least ``email``) to flag\nspecific attendees.  Backed by ``BookingsHandler.handle_mark_absent``\n(updates ``no_show`` flags; sends no automatic notifications - this is\nan operator CRM action).  Raises 404 when the booking uid is not visible\nto the caller.",
        "operationId": "mark_absent_appointments_bookings__booking_uid__mark_absent_post",
        "parameters": [
          {
            "description": "Booking UID (uuid string).",
            "in": "path",
            "name": "booking_uid",
            "required": true,
            "schema": {
              "description": "Booking UID (uuid string).",
              "title": "Booking Uid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkAbsentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Mark Absent Appointments Bookings  Booking Uid  Mark Absent Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Mark host or attendees as no-show",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:run",
        "x-graph8-tier": "external"
      }
    },
    "/appointments/bookings/{booking_uid}/notes": {
      "post": {
        "description": "Append an internal (host-only) note to a booking.\n\nNotes are not visible to attendees; they appear in the booking detail\nview for org members.  Backed by ``BookingsHandler.handle_add_note``.\nRaises 404 when the booking uid is not visible to the caller.",
        "operationId": "add_booking_note_appointments_bookings__booking_uid__notes_post",
        "parameters": [
          {
            "description": "Booking UID (uuid string).",
            "in": "path",
            "name": "booking_uid",
            "required": true,
            "schema": {
              "description": "Booking UID (uuid string).",
              "title": "Booking Uid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddNoteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Add Booking Note Appointments Bookings  Booking Uid  Notes Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add an internal note to a booking",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:run",
        "x-graph8-tier": "external"
      }
    },
    "/appointments/bookings/{booking_uid}/request-reschedule": {
      "post": {
        "description": "Ask the attendee to pick a new time.\n\nSends a reschedule-request email with the optional host ``reason``\nmessage and a link to the public booking page.  Does NOT move or cancel\nthe original booking - the attendee reschedules by clicking the link.\nBacked by ``BookingsHandler.handle_request_reschedule``.  Raises 404\nwhen the booking uid is not visible to the caller.",
        "operationId": "request_booking_reschedule_appointments_bookings__booking_uid__request_reschedule_post",
        "parameters": [
          {
            "description": "Booking UID (uuid string).",
            "in": "path",
            "name": "booking_uid",
            "required": true,
            "schema": {
              "description": "Booking UID (uuid string).",
              "title": "Booking Uid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestRescheduleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Request Booking Reschedule Appointments Bookings  Booking Uid  Request Reschedule Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Send a reschedule-request email to the attendee (host action)",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:run",
        "x-graph8-tier": "external"
      }
    },
    "/appointments/bookings/{booking_uid}/reschedule": {
      "post": {
        "description": "Reschedule a booking to ``start_time``. Reuses\n``BookingsHandler.handle_reschedule`` (no double credit charge — reschedules\nare free; re-renders the title, updates the calendar event, notifies\nattendees). Returns the NEW booking detail.",
        "operationId": "reschedule_booking_appointments_bookings__booking_uid__reschedule_post",
        "parameters": [
          {
            "in": "path",
            "name": "booking_uid",
            "required": true,
            "schema": {
              "title": "Booking Uid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RescheduleBookingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Reschedule Booking Appointments Bookings  Booking Uid  Reschedule Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Reschedule a booking to a new start time",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:run",
        "x-graph8-tier": "external"
      }
    },
    "/appointments/bookings/{booking_uid}/sequence": {
      "patch": {
        "description": "Link a booking to a sequencer sequence or remove the link.\n\n``sequence_id`` is the sequence UUID (``seqsequences.id``); pass\n``null`` / omit to detach.  Writes to\n``booking.metadata_['campaignId']`` - the same field the public booking\nflow populates from ``?campaignId=`` at create time.  No EDA event is\nemitted (CRM-only action).  Backed by\n``BookingsHandler.handle_update_sequence``.  Raises 404 when the\nbooking uid is not visible to the caller.",
        "operationId": "update_booking_sequence_appointments_bookings__booking_uid__sequence_patch",
        "parameters": [
          {
            "description": "Booking UID (uuid string).",
            "in": "path",
            "name": "booking_uid",
            "required": true,
            "schema": {
              "description": "Booking UID (uuid string).",
              "title": "Booking Uid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/appointments__domain__entities__UpdateSequenceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Update Booking Sequence Appointments Bookings  Booking Uid  Sequence Patch",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Associate a booking with a sequence (or detach)",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:run",
        "x-graph8-tier": "external"
      }
    },
    "/appointments/calendars": {
      "get": {
        "description": "List calendar accounts (Google, Outlook) connected to the caller's\nappointments profile, each with its sub-calendars and selection state.\nReuses the in-app list_calendars logic faithfully.",
        "operationId": "list_calendars_appointments_calendars_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ConnectedCalendarResponse"
                  },
                  "title": "Response List Calendars Appointments Calendars Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List connected calendar accounts",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:read",
        "x-graph8-tier": "read"
      }
    },
    "/appointments/calendars/destination": {
      "get": {
        "description": "Get the destination calendar for the caller. When ``event_type_id`` is\nprovided, returns the event-type-specific override if one exists, falling\nback to the user-level default. Returns ``{data: null}`` when none is set.\nReuses the in-app get_destination_calendar logic.",
        "operationId": "get_destination_calendar_appointments_calendars_destination_get",
        "parameters": [
          {
            "in": "query",
            "name": "event_type_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Event Type Id"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DestinationCalendarEnvelope"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get the destination calendar (with event-type fallback)",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:read",
        "x-graph8-tier": "read"
      },
      "put": {
        "description": "Set (upsert) the destination calendar where booking events are pushed.\nOptionally scoped to a specific event type via ``event_type_id``. Reuses\nthe in-app set_destination_calendar logic (upsert_destination_calendar).",
        "operationId": "set_destination_calendar_appointments_calendars_destination_put",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDestinationCalendarRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DestinationCalendarEnvelope"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Set the destination calendar for new booking events",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:run",
        "x-graph8-tier": "external"
      }
    },
    "/appointments/calendars/selected": {
      "delete": {
        "description": "Remove a sub-calendar from the caller's conflict-checking set.\nReuses the in-app deselect_calendar logic (delete_selected_calendar).",
        "operationId": "deselect_calendar_appointments_calendars_selected_delete",
        "parameters": [
          {
            "in": "query",
            "name": "credential_id",
            "required": true,
            "schema": {
              "title": "Credential Id",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "integration",
            "required": true,
            "schema": {
              "title": "Integration",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "external_id",
            "required": true,
            "schema": {
              "title": "External Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Deselect a sub-calendar from conflict checking",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:delete",
        "x-graph8-tier": "destructive"
      },
      "post": {
        "description": "Add a sub-calendar to the caller's conflict-checking set.\nReuses the in-app select_calendar logic (credential ownership check +\ncreate_selected_calendar). Raises 404 when the credential is not found\nor does not belong to the caller.",
        "operationId": "select_calendar_appointments_calendars_selected_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SelectCalendarRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SelectedCalendarEnvelope"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Select a sub-calendar for conflict checking",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:run",
        "x-graph8-tier": "external"
      }
    },
    "/appointments/calendars/{credential_id}": {
      "delete": {
        "description": "Disconnect a calendar account with best-effort token revocation.\nReuses the in-app disconnect_calendar logic (revoke + delete credential +\nclean up destination calendar rows pointing at the removed credential).\nRaises 404 when not found; 403 when it belongs to a different user.",
        "operationId": "disconnect_calendar_appointments_calendars__credential_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "credential_id",
            "required": true,
            "schema": {
              "title": "Credential Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Disconnect a calendar account",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:delete",
        "x-graph8-tier": "destructive"
      }
    },
    "/appointments/conferencing": {
      "get": {
        "description": "List conferencing providers connected to the caller's appointments profile.\nGoogle Meet is synthesized from any google_calendar credential (it has no\nreal credential row) and is suppressed when google_meet_suppressed is set.\nReuses the in-app list_conferencing logic faithfully.",
        "operationId": "list_conferencing_appointments_conferencing_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ConnectedConferencingResponse"
                  },
                  "title": "Response List Conferencing Appointments Conferencing Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List connected conferencing providers",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:read",
        "x-graph8-tier": "read"
      }
    },
    "/appointments/conferencing/connect/{provider}": {
      "post": {
        "description": "Connect a conferencing provider that does not require a browser OAuth\nflow. Supported providers: google_meet, roam, roam_auto, whereby, jitsi.\nZoom and office365_video (Teams) are excluded - they require a browser\nOAuth redirect that cannot be completed via an API key.\n\ngoogle_meet: clears the google_meet_suppressed flag (requires an existing\ngoogle_calendar credential - no credential row is created for Meet itself).\n\nroam, whereby, jitsi: creates a credential row; optional ``link`` is the\nmeeting URL validated against the provider's URL pattern.\n\nroam_auto: creates a stub credential row (no OAuth tokens - the Roam Auto\nintegration requires a prior OAuth flow to be completed in the web app).",
        "operationId": "connect_conferencing_appointments_conferencing_connect__provider__post",
        "parameters": [
          {
            "description": "Provider: google_meet | roam | roam_auto | whereby | jitsi",
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "description": "Provider: google_meet | roam | roam_auto | whereby | jitsi",
              "title": "Provider",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Body_connect_conferencing_appointments_conferencing_connect__provider__post"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Connect Conferencing Appointments Conferencing Connect  Provider  Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Connect a conferencing provider (link-based / no-OAuth only)",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:run",
        "x-graph8-tier": "external"
      }
    },
    "/appointments/conferencing/default": {
      "get": {
        "description": "Get the default conferencing provider. Returns provider, credential_id,\nand link. Returns ``{data: {provider: null}}`` when none is configured.\nReuses the in-app get_default_conferencing logic.",
        "operationId": "get_default_conferencing_appointments_conferencing_default_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultConferencingEnvelope"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get the current default conferencing provider",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:read",
        "x-graph8-tier": "read"
      }
    },
    "/appointments/conferencing/{provider}/default": {
      "post": {
        "description": "Set the default conferencing provider for new meetings. For link-based\nproviders (roam, whereby, jitsi) a meeting URL is required (either in the\nrequest or previously stored on the credential). Reuses the in-app\nset_default_conferencing logic.",
        "operationId": "set_default_conferencing_appointments_conferencing__provider__default_post",
        "parameters": [
          {
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "title": "Provider",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDefaultConferencingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultConferencingEnvelope"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Set the default conferencing provider",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:run",
        "x-graph8-tier": "external"
      }
    },
    "/appointments/conferencing/{provider}/disconnect": {
      "delete": {
        "description": "Disconnect a conferencing provider. For real-credential providers\n(zoom, roam, whereby, jitsi, office365_video, roam_auto) this deletes\nthe matching credentials row. Google Meet is special: it is a synthetic\nprovider - disconnect sets google_meet_suppressed and clears the default\nif it pointed at Meet. Reuses the in-app disconnect_conferencing logic.",
        "operationId": "disconnect_conferencing_appointments_conferencing__provider__disconnect_delete",
        "parameters": [
          {
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "title": "Provider",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Disconnect a conferencing provider",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:delete",
        "x-graph8-tier": "destructive"
      }
    },
    "/appointments/conferencing/{provider}/link": {
      "put": {
        "description": "Set or update the meeting URL for a link-based conferencing provider\n(roam, whereby, jitsi). The provider must already be installed. Validates\nthe URL against the provider's pattern. Reuses the in-app set_provider_link\nlogic (validate + update_credential_key).",
        "operationId": "set_provider_link_appointments_conferencing__provider__link_put",
        "parameters": [
          {
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "title": "Provider",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Body_set_provider_link_appointments_conferencing__provider__link_put"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Set Provider Link Appointments Conferencing  Provider  Link Put",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Set or update a link-based conferencing provider's meeting URL",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:run",
        "x-graph8-tier": "external"
      }
    },
    "/appointments/event-types": {
      "post": {
        "description": "Create a new event type. Reuses ``EventTypesHandler.handle_create``\nverbatim (slug uniqueness, host wiring, schedule attach), so the result is\nidentical to creating one in the app. ``slug`` must be unique within the org\n(409 on collision); ``length`` is the meeting duration in minutes.",
        "operationId": "create_event_type_appointments_event_types_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEventTypeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Create Event Type Appointments Event Types Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create a bookable event type",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:write",
        "x-graph8-tier": "write"
      }
    },
    "/appointments/event-types/{event_type_id}": {
      "delete": {
        "description": "Delete an event type. Reuses ``EventTypesHandler.handle_delete``.\n\n``EventTypePolicy.can_delete()`` is ADMIN-ONLY (Cal.com \"team event delete =\nadmin only\"; hosts cannot delete). So this requires the API key's user to\nhold Admin/Owner in the org - resolved via ``_is_org_admin``. Member/Viewer\nkeys and org-scoped machine keys get a 403 from the handler. Returns\n``{data: {deleted: true, event_type_id}}`` on success.",
        "operationId": "delete_event_type_appointments_event_types__event_type_id__delete",
        "parameters": [
          {
            "description": "Event-type integer ID.",
            "in": "path",
            "name": "event_type_id",
            "required": true,
            "schema": {
              "description": "Event-type integer ID.",
              "minimum": 1,
              "title": "Event Type Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Delete Event Type Appointments Event Types  Event Type Id  Delete",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete an event type",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:delete",
        "x-graph8-tier": "destructive"
      },
      "get": {
        "description": "Return the full event-type record (booking fields, locations, hosts,\nschedule, buffers, notice) — everything an agent needs before booking a\nslot. Backed by ``EventTypesHandler.handle_get`` (same handler as the\nin-app event-type detail view). Raises 404 when the id doesn't exist in\nthis org.",
        "operationId": "get_event_type_appointments_event_types__event_type_id__get",
        "parameters": [
          {
            "description": "Event-type integer ID.",
            "in": "path",
            "name": "event_type_id",
            "required": true,
            "schema": {
              "description": "Event-type integer ID.",
              "minimum": 1,
              "title": "Event Type Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Get Event Type Appointments Event Types  Event Type Id  Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get full detail for one bookable event type",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:read",
        "x-graph8-tier": "read"
      },
      "patch": {
        "description": "Partially update an event type. Only the fields you send are changed\n(``exclude_unset`` semantics) - omit a field to leave it untouched, including\n``hidden`` (the active/visible toggle). Reuses\n``EventTypesHandler.handle_update`` (schedule-ownership guard, host policy).\n``is_admin`` is forced False.",
        "operationId": "update_event_type_appointments_event_types__event_type_id__patch",
        "parameters": [
          {
            "description": "Event-type integer ID.",
            "in": "path",
            "name": "event_type_id",
            "required": true,
            "schema": {
              "description": "Event-type integer ID.",
              "minimum": 1,
              "title": "Event Type Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEventTypeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Update Event Type Appointments Event Types  Event Type Id  Patch",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update an event type (partial)",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:write",
        "x-graph8-tier": "write"
      }
    },
    "/appointments/event-types/{event_type_id}/duplicate": {
      "post": {
        "description": "Duplicate an event type, generating a unique ``{slug}-copy`` slug and\ncopying its hosts. Mirrors the in-app duplicate path (repo-direct, no\nhandler) using the shared appointments helpers; ``is_admin`` is forced False\nso a host (or the owner) can duplicate, matching ``EventTypePolicy``.",
        "operationId": "duplicate_event_type_appointments_event_types__event_type_id__duplicate_post",
        "parameters": [
          {
            "description": "Source event-type integer ID.",
            "in": "path",
            "name": "event_type_id",
            "required": true,
            "schema": {
              "description": "Source event-type integer ID.",
              "minimum": 1,
              "title": "Event Type Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Duplicate Event Type Appointments Event Types  Event Type Id  Duplicate Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Duplicate an event type (with a '-copy' slug)",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:write",
        "x-graph8-tier": "write"
      }
    },
    "/appointments/out-of-office": {
      "get": {
        "description": "List all out-of-office entries belonging to the calling user. API keys\nnever receive org-wide admin access, so this always returns only the\ncaller's own entries (equivalent to the non-admin in-app path).",
        "operationId": "list_ooo_appointments_out_of_office_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Ooo Appointments Out Of Office Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List out-of-office entries for the calling user",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create an out-of-office entry for the calling user. While active, the\nuser's slots are blocked for booking. ``start`` and ``end`` may be local\ncalendar dates paired with ``time_zone`` or legacy ISO-8601 datetimes.\nOptional ``to_user_id`` exposes an alternative teammate booking path.",
        "operationId": "create_ooo_appointments_out_of_office_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOutOfOfficeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Create Ooo Appointments Out Of Office Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create an out-of-office entry",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:write",
        "x-graph8-tier": "write"
      }
    },
    "/appointments/out-of-office/{ooo_uuid}": {
      "delete": {
        "description": "Delete an out-of-office entry. Only the owner may delete their own\nentry (API keys force ``is_admin=False``). Returns\n``{data: {deleted: true, ooo_uuid}}`` on success.",
        "operationId": "delete_ooo_appointments_out_of_office__ooo_uuid__delete",
        "parameters": [
          {
            "description": "UUID of the out-of-office entry to delete.",
            "in": "path",
            "name": "ooo_uuid",
            "required": true,
            "schema": {
              "description": "UUID of the out-of-office entry to delete.",
              "title": "Ooo Uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Delete Ooo Appointments Out Of Office  Ooo Uuid  Delete",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete an out-of-office entry",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:delete",
        "x-graph8-tier": "destructive"
      },
      "patch": {
        "description": "Update an entry owned by the calling API user.",
        "operationId": "update_ooo_appointments_out_of_office__ooo_uuid__patch",
        "parameters": [
          {
            "description": "UUID of the out-of-office entry to update.",
            "in": "path",
            "name": "ooo_uuid",
            "required": true,
            "schema": {
              "description": "UUID of the out-of-office entry to update.",
              "title": "Ooo Uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOutOfOfficeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Update Ooo Appointments Out Of Office  Ooo Uuid  Patch",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update an out-of-office entry",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:write",
        "x-graph8-tier": "write"
      }
    },
    "/appointments/routing-forms": {
      "get": {
        "description": "List all routing forms owned by the API-key user.\n\n``is_admin`` is forced False - returns only the caller's own forms.\nEach item includes ``response_count`` (total submissions captured).",
        "operationId": "list_routing_forms_appointments_routing_forms_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Routing Forms Appointments Routing Forms Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List routing forms (includes response_count)",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create a new routing form with optional fields and routes.\n\nReturns the created form including its generated slug. ``is_admin`` is\nforced False so the form is owned by the API-key user.",
        "operationId": "create_routing_form_appointments_routing_forms_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoutingFormRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Create Routing Form Appointments Routing Forms Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create a routing form",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:write",
        "x-graph8-tier": "write"
      }
    },
    "/appointments/routing-forms/{form_id}": {
      "delete": {
        "description": "Delete a routing form permanently. Cascades to its fields and routes.\n\nReturns 404 when the form does not exist or belongs to another user.",
        "operationId": "delete_routing_form_appointments_routing_forms__form_id__delete",
        "parameters": [
          {
            "description": "Routing form integer ID.",
            "in": "path",
            "name": "form_id",
            "required": true,
            "schema": {
              "description": "Routing form integer ID.",
              "minimum": 1,
              "title": "Form Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Delete Routing Form Appointments Routing Forms  Form Id  Delete",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete a routing form (cascades fields and routes)",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:delete",
        "x-graph8-tier": "destructive"
      },
      "get": {
        "description": "Return a routing form with its fields, routes, and response_count.\n\nReturns 404 when the form does not exist or belongs to another user.",
        "operationId": "get_routing_form_appointments_routing_forms__form_id__get",
        "parameters": [
          {
            "description": "Routing form integer ID.",
            "in": "path",
            "name": "form_id",
            "required": true,
            "schema": {
              "description": "Routing form integer ID.",
              "minimum": 1,
              "title": "Form Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Get Routing Form Appointments Routing Forms  Form Id  Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get a single routing form",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:read",
        "x-graph8-tier": "read"
      },
      "patch": {
        "description": "Partially update a routing form. Only sent fields are changed.\n\nOmit a field to leave it untouched. Slug must be unique in the org (409 on\ncollision). Fields/routes are replaced atomically when present in the body.",
        "operationId": "update_routing_form_appointments_routing_forms__form_id__patch",
        "parameters": [
          {
            "description": "Routing form integer ID.",
            "in": "path",
            "name": "form_id",
            "required": true,
            "schema": {
              "description": "Routing form integer ID.",
              "minimum": 1,
              "title": "Form Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRoutingFormRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Update Routing Form Appointments Routing Forms  Form Id  Patch",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update a routing form (partial)",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:write",
        "x-graph8-tier": "write"
      }
    },
    "/appointments/routing-forms/{form_id}/duplicate": {
      "post": {
        "description": "Duplicate a routing form. Creates a copy named \"{name} (copy)\" with\na unique slug, copying all fields and routes verbatim.",
        "operationId": "duplicate_routing_form_appointments_routing_forms__form_id__duplicate_post",
        "parameters": [
          {
            "description": "Source routing form integer ID.",
            "in": "path",
            "name": "form_id",
            "required": true,
            "schema": {
              "description": "Source routing form integer ID.",
              "minimum": 1,
              "title": "Form Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Duplicate Routing Form Appointments Routing Forms  Form Id  Duplicate Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Duplicate a routing form (copy with all fields and routes)",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:write",
        "x-graph8-tier": "write"
      }
    },
    "/appointments/routing-forms/{form_id}/responses": {
      "get": {
        "description": "List captured form responses. Paginated via ``skip`` / ``take``.\n\nReturns 404 when the form does not exist or belongs to another user.\nResponse items include: ``id``, ``form_id``, ``responses`` (field answers),\n``routed_to_event_type_id``, and ``created_at``.",
        "operationId": "list_routing_form_responses_appointments_routing_forms__form_id__responses_get",
        "parameters": [
          {
            "description": "Routing form integer ID.",
            "in": "path",
            "name": "form_id",
            "required": true,
            "schema": {
              "description": "Routing form integer ID.",
              "minimum": 1,
              "title": "Form Id",
              "type": "integer"
            }
          },
          {
            "description": "Number of responses to skip.",
            "in": "query",
            "name": "skip",
            "required": false,
            "schema": {
              "default": 0,
              "description": "Number of responses to skip.",
              "minimum": 0,
              "title": "Skip",
              "type": "integer"
            }
          },
          {
            "description": "Maximum responses to return (max 500).",
            "in": "query",
            "name": "take",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Maximum responses to return (max 500).",
              "maximum": 500,
              "minimum": 1,
              "title": "Take",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Routing Form Responses Appointments Routing Forms  Form Id  Responses Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List captured responses for a routing form (paginated)",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:read",
        "x-graph8-tier": "read"
      }
    },
    "/appointments/schedules": {
      "get": {
        "description": "List the caller's appointment availability schedules (the \"when am I\nfree?\" working-hours profiles used by event types). This is DISTINCT from\nthe sequencer send-window schedules at ``GET /schedules`` - those drive\nemail send timing, these drive bookability. Each schedule carries its weekly\nrules' owner + a ``is_default`` flag derived from the caller's settings.",
        "operationId": "list_schedules_appointments_schedules_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Schedules Appointments Schedules Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List the caller's availability schedules",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create a named availability schedule with weekly rules and optional date overrides.\n\nDefaults to Mon-Fri 09:00-17:00 when ``availability`` is omitted.\nPass ``is_default=True`` to immediately set this as the caller's default\nschedule (persisted via ``update_appointment_settings``).",
        "operationId": "create_schedule_appointments_schedules_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateScheduleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Create Schedule Appointments Schedules Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create an availability schedule",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:write",
        "x-graph8-tier": "write"
      }
    },
    "/appointments/schedules/{schedule_id}": {
      "delete": {
        "description": "Delete a schedule. Returns 409 when this is the caller's last schedule\n(mirroring the in-app guard - every user must retain at least one schedule).\nReturns 404 when the schedule does not exist or belongs to another user.",
        "operationId": "delete_schedule_appointments_schedules__schedule_id__delete",
        "parameters": [
          {
            "description": "Schedule integer ID.",
            "in": "path",
            "name": "schedule_id",
            "required": true,
            "schema": {
              "description": "Schedule integer ID.",
              "minimum": 1,
              "title": "Schedule Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Delete Schedule Appointments Schedules  Schedule Id  Delete",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete a schedule",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:delete",
        "x-graph8-tier": "destructive"
      },
      "get": {
        "description": "Return a schedule's full detail: weekly availability rules, date overrides,\nowner info, and the list of event types currently linked to this schedule.\nReturns 404 when the schedule doesn't exist or belongs to another user.",
        "operationId": "get_schedule_appointments_schedules__schedule_id__get",
        "parameters": [
          {
            "description": "Schedule integer ID.",
            "in": "path",
            "name": "schedule_id",
            "required": true,
            "schema": {
              "description": "Schedule integer ID.",
              "minimum": 1,
              "title": "Schedule Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Get Schedule Appointments Schedules  Schedule Id  Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get a schedule with availability and linked event types",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:read",
        "x-graph8-tier": "read"
      },
      "patch": {
        "description": "Partially update a schedule. Pass only the fields to change.\n\n- ``name`` / ``time_zone``: update schedule metadata.\n- ``availability``: replaces ALL weekly recurring rules (pass every active day).\n- ``overrides``: replaces ALL date-specific overrides.\n- ``is_default``: when True, sets this as the caller's default schedule.",
        "operationId": "update_schedule_appointments_schedules__schedule_id__patch",
        "parameters": [
          {
            "description": "Schedule integer ID.",
            "in": "path",
            "name": "schedule_id",
            "required": true,
            "schema": {
              "description": "Schedule integer ID.",
              "minimum": 1,
              "title": "Schedule Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateScheduleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Update Schedule Appointments Schedules  Schedule Id  Patch",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update a schedule (partial)",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:write",
        "x-graph8-tier": "write"
      }
    },
    "/appointments/schedules/{schedule_id}/availability": {
      "get": {
        "description": "Return the weekly recurring availability rules and date-specific overrides\nfor the given schedule. Availability entries without a ``date`` are weekly\nrules; entries with a ``date`` are one-time overrides for that calendar day.",
        "operationId": "get_availability_appointments_schedules__schedule_id__availability_get",
        "parameters": [
          {
            "description": "Schedule integer ID.",
            "in": "path",
            "name": "schedule_id",
            "required": true,
            "schema": {
              "description": "Schedule integer ID.",
              "minimum": 1,
              "title": "Schedule Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Get Availability Appointments Schedules  Schedule Id  Availability Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get availability rules and overrides for a schedule",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:read",
        "x-graph8-tier": "read"
      },
      "patch": {
        "description": "Replace weekly availability rules and/or date overrides for a schedule.\n\nBody: ``{\"availability\": [...], \"overrides\": [...]}``\n\n- ``availability``: list of ``{days, start_time, end_time}`` - replaces ALL weekly rules.\n- ``overrides``: list of ``{date, start_time, end_time}`` - replaces ALL date overrides.\n\nOmit a key to leave that set unchanged. At least one key is required.\nMirrors the in-app ``PATCH /schedules/{id}/availability`` logic verbatim.\nTyped via ``UpdateAvailabilityRequest`` so malformed items fail at FastAPI\nvalidation (422) rather than as an opaque 500.",
        "operationId": "update_availability_appointments_schedules__schedule_id__availability_patch",
        "parameters": [
          {
            "description": "Schedule integer ID.",
            "in": "path",
            "name": "schedule_id",
            "required": true,
            "schema": {
              "description": "Schedule integer ID.",
              "minimum": 1,
              "title": "Schedule Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAvailabilityRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Update Availability Appointments Schedules  Schedule Id  Availability Patch",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Replace availability rules and/or date overrides for a schedule",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:write",
        "x-graph8-tier": "write"
      }
    },
    "/appointments/schedules/{schedule_id}/set-default": {
      "post": {
        "description": "Mark a schedule as the caller's default availability schedule.\n\nPersists via ``repo.update_appointment_settings(default_schedule_id=...)``\nwhich is identical to the in-app ``PATCH /me`` (profile router) path that\nsets ``default_schedule_id``. The default schedule is used for slot\ngeneration when an event type has no schedule attached (Layer 3 resolution).\nReturns 404 when the schedule does not exist or belongs to another user.",
        "operationId": "set_default_schedule_appointments_schedules__schedule_id__set_default_post",
        "parameters": [
          {
            "description": "Schedule integer ID.",
            "in": "path",
            "name": "schedule_id",
            "required": true,
            "schema": {
              "description": "Schedule integer ID.",
              "minimum": 1,
              "title": "Schedule Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Set Default Schedule Appointments Schedules  Schedule Id  Set Default Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Set a schedule as the caller's default",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:write",
        "x-graph8-tier": "write"
      }
    },
    "/appointments/workflows": {
      "get": {
        "description": "List all workflows for the organisation.",
        "operationId": "list_workflows_appointments_workflows_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Workflows Appointments Workflows Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List all workflows",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create a new workflow. Steps define the actions to take; event_type_ids\nattaches the workflow to specific event types (omit or set ``is_active_on_all``\nto apply org-wide). ``trigger`` must be one of: new_booking, before_event,\nafter_event, booking_cancelled, booking_rescheduled. Time-based triggers\n(before_event / after_event) require ``time`` and ``time_unit``.",
        "operationId": "create_workflow_appointments_workflows_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWorkflowRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Create Workflow Appointments Workflows Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create a workflow",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:run",
        "x-graph8-tier": "external"
      }
    },
    "/appointments/workflows/{workflow_id}": {
      "delete": {
        "description": "Delete a workflow and cancel any pending reminder rows created by it.\nMirrors the in-app router: ``cancel_workflow_reminders`` is called BEFORE\n``delete_workflow`` so reminder FK constraints are satisfied and scheduled\nworker jobs for this workflow never fire after deletion.",
        "operationId": "delete_workflow_appointments_workflows__workflow_id__delete",
        "parameters": [
          {
            "description": "Workflow integer ID.",
            "in": "path",
            "name": "workflow_id",
            "required": true,
            "schema": {
              "description": "Workflow integer ID.",
              "minimum": 1,
              "title": "Workflow Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete a workflow and cancel pending reminders",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:delete",
        "x-graph8-tier": "destructive"
      },
      "get": {
        "description": "Return the full workflow record (steps, linked event types, trigger config).",
        "operationId": "get_workflow_appointments_workflows__workflow_id__get",
        "parameters": [
          {
            "description": "Workflow integer ID.",
            "in": "path",
            "name": "workflow_id",
            "required": true,
            "schema": {
              "description": "Workflow integer ID.",
              "minimum": 1,
              "title": "Workflow Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Get Workflow Appointments Workflows  Workflow Id  Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get a single workflow",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:read",
        "x-graph8-tier": "read"
      },
      "patch": {
        "description": "Partially update a workflow. Only the fields you send are changed; omit a\nfield to leave it as-is. Steps are replaced wholesale when provided.",
        "operationId": "update_workflow_appointments_workflows__workflow_id__patch",
        "parameters": [
          {
            "description": "Workflow integer ID.",
            "in": "path",
            "name": "workflow_id",
            "required": true,
            "schema": {
              "description": "Workflow integer ID.",
              "minimum": 1,
              "title": "Workflow Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWorkflowRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Update Workflow Appointments Workflows  Workflow Id  Patch",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update a workflow (partial)",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:run",
        "x-graph8-tier": "external"
      }
    },
    "/appointments/workflows/{workflow_id}/toggle": {
      "post": {
        "description": "Set the workflow's active state. When deactivating (``active: false``),\nall pending reminders are cancelled first (same behaviour as the in-app\ntoggle) so the reminder worker never fires steps for a disabled workflow.",
        "operationId": "toggle_workflow_appointments_workflows__workflow_id__toggle_post",
        "parameters": [
          {
            "description": "Workflow integer ID.",
            "in": "path",
            "name": "workflow_id",
            "required": true,
            "schema": {
              "description": "Workflow integer ID.",
              "minimum": 1,
              "title": "Workflow Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ToggleWorkflowRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Toggle Workflow Appointments Workflows  Workflow Id  Toggle Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Activate or deactivate a workflow",
        "tags": [
          "Appointments"
        ],
        "x-graph8-scope": "meetings:run",
        "x-graph8-tier": "external"
      }
    },
    "/audience-syncs": {
      "get": {
        "description": "List all audience sync configurations for the org.",
        "operationId": "list_audience_syncs_audience_syncs_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_AudienceSyncConfigResponse__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Audience Syncs",
        "tags": [
          "Audience Syncs"
        ],
        "x-graph8-scope": "integrations:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create a new audience sync configuration.",
        "operationId": "create_audience_sync_audience_syncs_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AudienceSyncCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_AudienceSyncConfigResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Audience Sync",
        "tags": [
          "Audience Syncs"
        ],
        "x-graph8-scope": "integrations:run",
        "x-graph8-tier": "external"
      }
    },
    "/audience-syncs/{config_id}": {
      "delete": {
        "description": "Soft delete a sync configuration.",
        "operationId": "delete_audience_sync_audience_syncs__config_id__delete",
        "parameters": [
          {
            "description": "Sync config ID",
            "in": "path",
            "name": "config_id",
            "required": true,
            "schema": {
              "description": "Sync config ID",
              "title": "Config Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Audience Sync",
        "tags": [
          "Audience Syncs"
        ],
        "x-graph8-scope": "integrations:delete",
        "x-graph8-tier": "destructive"
      },
      "get": {
        "description": "Get a sync configuration by ID.",
        "operationId": "get_audience_sync_audience_syncs__config_id__get",
        "parameters": [
          {
            "description": "Sync config ID",
            "in": "path",
            "name": "config_id",
            "required": true,
            "schema": {
              "description": "Sync config ID",
              "title": "Config Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_AudienceSyncConfigResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Audience Sync",
        "tags": [
          "Audience Syncs"
        ],
        "x-graph8-scope": "integrations:read",
        "x-graph8-tier": "read"
      },
      "patch": {
        "description": "Update a sync configuration (partial update).",
        "operationId": "update_audience_sync_audience_syncs__config_id__patch",
        "parameters": [
          {
            "description": "Sync config ID",
            "in": "path",
            "name": "config_id",
            "required": true,
            "schema": {
              "description": "Sync config ID",
              "title": "Config Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AudienceSyncUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_AudienceSyncConfigResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Audience Sync",
        "tags": [
          "Audience Syncs"
        ],
        "x-graph8-scope": "integrations:run",
        "x-graph8-tier": "external"
      }
    },
    "/audience-syncs/{config_id}/errors": {
      "get": {
        "description": "Get sync error logs for a configuration.",
        "operationId": "list_sync_errors_audience_syncs__config_id__errors_get",
        "parameters": [
          {
            "description": "Sync config ID",
            "in": "path",
            "name": "config_id",
            "required": true,
            "schema": {
              "description": "Sync config ID",
              "title": "Config Id",
              "type": "integer"
            }
          },
          {
            "description": "Max errors to return",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "Max errors to return",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_SyncErrorResponse__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Sync Errors",
        "tags": [
          "Audience Syncs"
        ],
        "x-graph8-scope": "integrations:read",
        "x-graph8-tier": "read"
      }
    },
    "/audience-syncs/{config_id}/runs": {
      "get": {
        "description": "Get sync run history for a configuration.",
        "operationId": "list_sync_runs_audience_syncs__config_id__runs_get",
        "parameters": [
          {
            "description": "Sync config ID",
            "in": "path",
            "name": "config_id",
            "required": true,
            "schema": {
              "description": "Sync config ID",
              "title": "Config Id",
              "type": "integer"
            }
          },
          {
            "description": "Max runs to return",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "Max runs to return",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_SyncRunResponse__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Sync Runs",
        "tags": [
          "Audience Syncs"
        ],
        "x-graph8-scope": "integrations:run",
        "x-graph8-tier": "billable"
      }
    },
    "/audience-syncs/{config_id}/trigger": {
      "post": {
        "description": "Manually trigger an audience sync.",
        "operationId": "trigger_audience_sync_audience_syncs__config_id__trigger_post",
        "parameters": [
          {
            "description": "Sync config ID",
            "in": "path",
            "name": "config_id",
            "required": true,
            "schema": {
              "description": "Sync config ID",
              "title": "Config Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Trigger Audience Sync",
        "tags": [
          "Audience Syncs"
        ],
        "x-graph8-scope": "integrations:run",
        "x-graph8-tier": "external"
      }
    },
    "/campaigns": {
      "get": {
        "description": "List campaigns for this organization.",
        "operationId": "list_campaigns_campaigns_get",
        "parameters": [
          {
            "description": "Page number",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "description": "Page number",
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "description": "Items per page",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Items per page",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_dict__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Campaigns",
        "tags": [
          "GTM Campaigns"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create a new campaign from scratch — full Studio \"Convert to Campaign\" parity.\n\nThe original handler only inserted ``cb_campaigns``. That left two\nStudio-side gaps:\n\n1. Studio's Campaigns workbench (``frontend/features/studio/components/\n   CampaignUnifiedTable.tsx``) filters ``cb_campaign_ideas`` WHERE\n   ``converted_to_campaign=true`` and joins back to ``cb_campaigns`` via\n   ``converted_campaign_id``. With no paired idea row, MCP-created\n   campaigns were invisible in the workbench (only the direct\n   ``/studio?campaignId=...`` URL worked).\n2. No documents were generated, so the campaign sat in \"Not Ready\" state\n   indefinitely. The launch flow silently produced empty sequences.\n\nThis handler now mirrors ``campaign_builder/routers/campaign_conversion.py\n:convert_idea_to_campaign`` end-to-end:\n\n* INSERT cb_campaigns (status=``copy_in_progress`` when generating, else ``draft``)\n* INSERT paired cb_campaign_ideas row with ``source='mcp'``,\n  ``converted_to_campaign=true``, ``converted_campaign_id=<new>``\n* INSERT cb_campaign_metadata with ``total_documents`` calculated from the\n  target channels\n* Scaffold ``sequence`` + ``step_catalog`` stub docs (idempotent)\n* Dispatch ``generate_campaign_files_from_idea.delay(...)`` to Celery\n\nBackwards-compatible: original 7-field callers still work AND see\nbyte-for-byte identical behavior because ``auto_generate_documents``\ndefaults to ``False``. All Studio-parity behavior (paired idea row,\nmetadata row, Celery dispatch, status='copy_in_progress') is opt-in\nvia ``auto_generate_documents=True``. The MCP ``g8_gtm_create_campaign``\ntool wrapper sets it to ``True`` so Daniel's GTM agent gets the fix\nwithout affecting any other direct API caller.",
        "operationId": "create_campaign_campaigns_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/developer_api__interfaces__v1__gtm_campaigns_router__CampaignCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Campaign",
        "tags": [
          "GTM Campaigns"
        ],
        "x-graph8-scope": "campaigns:run",
        "x-graph8-tier": "external"
      }
    },
    "/campaigns/ideas": {
      "get": {
        "description": "List saved campaign ideas for this organization.",
        "operationId": "list_campaign_ideas_campaigns_ideas_get",
        "parameters": [
          {
            "description": "Items per page",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Items per page",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Filter favorited ideas",
            "in": "query",
            "name": "favorited",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter favorited ideas",
              "title": "Favorited"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_dict__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Campaign Ideas",
        "tags": [
          "GTM Campaigns"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      }
    },
    "/campaigns/{campaign_id}": {
      "get": {
        "description": "Get details of a specific campaign including generated documents.",
        "operationId": "get_campaign_campaigns__campaign_id__get",
        "parameters": [
          {
            "description": "Campaign ID",
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "description": "Campaign ID",
              "title": "Campaign Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Campaign",
        "tags": [
          "GTM Campaigns"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      },
      "patch": {
        "description": "Update campaign content fields (name, brief, hook, persona, etc.).",
        "operationId": "update_campaign_campaigns__campaign_id__patch",
        "parameters": [
          {
            "description": "Campaign ID",
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "description": "Campaign ID",
              "title": "Campaign Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/developer_api__interfaces__v1__gtm_campaigns_router__CampaignUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Campaign",
        "tags": [
          "GTM Campaigns"
        ],
        "x-graph8-scope": "campaigns:run",
        "x-graph8-tier": "external"
      }
    },
    "/campaigns/{campaign_id}/ad-images": {
      "get": {
        "description": "List ad image creatives generated for this campaign.\n\nAd images live in `cb_website_images` with `category='ad'` and a\n`campaign_id` back-reference (the AI generator writes there, NOT into\n`cb_campaign_documents`). This endpoint gives the MCP HTML resource a\nsingle place to pull the creative grid without reaching into the\nStudio-private `/v1/website-images` path.",
        "operationId": "list_campaign_ad_images_campaigns__campaign_id__ad_images_get",
        "parameters": [
          {
            "description": "Campaign ID",
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "description": "Campaign ID",
              "title": "Campaign Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Campaign Ad Images",
        "tags": [
          "GTM Campaigns"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      }
    },
    "/campaigns/{campaign_id}/ad-images/{image_id}/hide": {
      "post": {
        "description": "Mark an ad image as hidden (feedback='down'), so it drops out of the\nMCP App grid and any future listing.\n\nIdempotent: re-posting against an already-hidden image is a no-op, still\nreturns 200. Returns 404 only if the image doesn't exist (or doesn't\nbelong to the caller's org / this campaign).\n\nThis is the interactive action on the `ui://campaigns/ad-images` MCP\nApp. The app calls `g8_hide_ad_image` over postMessage; that tool hits\nthis endpoint; the response tells the app which image id to drop from\nits local state.",
        "operationId": "hide_campaign_ad_image_campaigns__campaign_id__ad_images__image_id__hide_post",
        "parameters": [
          {
            "description": "Campaign ID",
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "description": "Campaign ID",
              "title": "Campaign Id",
              "type": "string"
            }
          },
          {
            "description": "Ad image ID (cb_website_images.id)",
            "in": "path",
            "name": "image_id",
            "required": true,
            "schema": {
              "description": "Ad image ID (cb_website_images.id)",
              "title": "Image Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Hide Campaign Ad Image",
        "tags": [
          "GTM Campaigns"
        ],
        "x-graph8-scope": "campaigns:run",
        "x-graph8-tier": "external"
      }
    },
    "/campaigns/{campaign_id}/audience": {
      "put": {
        "description": "Attach (or detach) a saved list to a campaign as its audience.\n\nThis is the missing link in Daniel's MCP flow: ``find list → create\ncampaign → attach audience → launch`` was previously a dead-end because\nno REST/MCP path could set ``cb_campaigns.audience_list_id`` (the FE\n\"Attach Audience\" dialog only went through an internal route).\n\nIdempotent — setting the same list twice is a 200, no error. Pass\n``list_id=null`` to detach. The launch endpoint reads\n``cb_campaigns.audience_list_id`` when enrolling contacts; without it,\nlaunch creates a sequence with zero enrollment.",
        "operationId": "attach_audience_to_campaign_campaigns__campaign_id__audience_put",
        "parameters": [
          {
            "description": "Campaign ID",
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "description": "Campaign ID",
              "title": "Campaign Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignAttachAudienceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Attach Audience To Campaign",
        "tags": [
          "GTM Campaigns"
        ],
        "x-graph8-scope": "campaigns:run",
        "x-graph8-tier": "external"
      }
    },
    "/campaigns/{campaign_id}/documents": {
      "get": {
        "description": "List document metadata for a campaign.",
        "operationId": "list_campaign_documents_campaigns__campaign_id__documents_get",
        "parameters": [
          {
            "description": "Campaign ID",
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "description": "Campaign ID",
              "title": "Campaign Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Campaign Documents",
        "tags": [
          "GTM Campaigns"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create a campaign document with content stored in metadata.\n\n``meta_data`` shape mirrors what the Celery doc-generator writes so the\nFE renders MCP-created docs identically: ``content`` (markdown body),\n``completed`` (mirrors status=='completed' so launch checklist counts\nit), and optional ``structured_data`` (parsed payload, e.g. sequence\nstep list).",
        "operationId": "create_campaign_document_campaigns__campaign_id__documents_post",
        "parameters": [
          {
            "description": "Campaign ID",
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "description": "Campaign ID",
              "title": "Campaign Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignDocumentCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Campaign Document",
        "tags": [
          "GTM Campaigns"
        ],
        "x-graph8-scope": "campaigns:run",
        "x-graph8-tier": "external"
      }
    },
    "/campaigns/{campaign_id}/documents/{document_id}": {
      "delete": {
        "description": "Delete a campaign document.",
        "operationId": "delete_campaign_document_campaigns__campaign_id__documents__document_id__delete",
        "parameters": [
          {
            "description": "Campaign ID",
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "description": "Campaign ID",
              "title": "Campaign Id",
              "type": "string"
            }
          },
          {
            "description": "Document ID",
            "in": "path",
            "name": "document_id",
            "required": true,
            "schema": {
              "description": "Document ID",
              "title": "Document Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Campaign Document",
        "tags": [
          "GTM Campaigns"
        ],
        "x-graph8-scope": "campaigns:delete",
        "x-graph8-tier": "destructive"
      },
      "get": {
        "description": "Get full content of a specific campaign document.",
        "operationId": "get_campaign_document_campaigns__campaign_id__documents__document_id__get",
        "parameters": [
          {
            "description": "Campaign ID",
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "description": "Campaign ID",
              "title": "Campaign Id",
              "type": "string"
            }
          },
          {
            "description": "Document ID",
            "in": "path",
            "name": "document_id",
            "required": true,
            "schema": {
              "description": "Document ID",
              "title": "Document Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Campaign Document",
        "tags": [
          "GTM Campaigns"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      },
      "put": {
        "description": "Update campaign document content and optional structured data.",
        "operationId": "update_campaign_document_campaigns__campaign_id__documents__document_id__put",
        "parameters": [
          {
            "description": "Campaign ID",
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "description": "Campaign ID",
              "title": "Campaign Id",
              "type": "string"
            }
          },
          {
            "description": "Document ID",
            "in": "path",
            "name": "document_id",
            "required": true,
            "schema": {
              "description": "Document ID",
              "title": "Document Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignDocumentUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Campaign Document",
        "tags": [
          "GTM Campaigns"
        ],
        "x-graph8-scope": "campaigns:run",
        "x-graph8-tier": "external"
      }
    },
    "/campaigns/{campaign_id}/full": {
      "get": {
        "description": "Get the **kitchen-sink** campaign payload in one round trip.\n\nIncludes: campaign row, attached audience list summary, ALL documents\n(with content), sequence + step catalog, and linked sequencer sequences\n(so the caller can tell at a glance whether the campaign has been\nlaunched yet).\n\nDesigned for the MCP \"load entire campaign for editing\" path so agents\ndon't have to chain ``GET /campaigns/{id}`` → ``/documents`` → ``/sequence``\njust to see the current state.",
        "operationId": "get_campaign_full_campaigns__campaign_id__full_get",
        "parameters": [
          {
            "description": "Campaign ID",
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "description": "Campaign ID",
              "title": "Campaign Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Campaign Full",
        "tags": [
          "GTM Campaigns"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      },
      "patch": {
        "description": "Apply a deep-update to a campaign in one round trip.\n\nBehavior:\n    - Campaign fields (name/brief/hook/etc.) update the row when present.\n    - ``audience_list_id`` attaches; ``detach_audience=true`` clears it.\n    - ``documents[*]`` either updates an existing doc by id, or creates a\n      new doc when id is omitted (file_type + display_name required).\n    - ``sequence_steps`` replaces the sequence ordering verbatim\n      (same semantics as PUT /sequence).\n\nReturns the full kitchen-sink payload (same shape as GET /full).\nBackwards-compat: omitting any field is a no-op. Existing single-purpose\nendpoints (PATCH /campaigns/{id}, PUT /audience, PUT /sequence, etc.)\nkeep working unchanged.",
        "operationId": "patch_campaign_full_campaigns__campaign_id__full_patch",
        "parameters": [
          {
            "description": "Campaign ID",
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "description": "Campaign ID",
              "title": "Campaign Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignFullPatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Patch Campaign Full",
        "tags": [
          "GTM Campaigns"
        ],
        "x-graph8-scope": "campaigns:run",
        "x-graph8-tier": "external"
      }
    },
    "/campaigns/{campaign_id}/launch": {
      "post": {
        "description": "Launch a campaign through the canonical Sequencer V2 workflow.\n\nThis does two things end-to-end:\n\n1. **Push** the campaign to the sequencer. The bridge loads the campaign's\n   generated documents (email/LinkedIn/phone/SMS copy), transforms them\n   into sequencer steps, and creates a new ``SeqSequence`` row with the\n   campaign content attached. A ``CampaignSequenceLink`` row links the two.\n2. **Run** the sequence through the same V2 workflow used by Sequencer.\n   The response reports ``live`` only after synchronous initialization has\n   completed, or ``scheduling`` with job details for background work.\n\nIdempotency: re-launching a campaign that already has an active sequence\nreturns 409 unless ``force`` is implied via a future query-param. This is\nconsistent with the UI's bridge/push behaviour.\n\nPre-flight is mandatory. The deprecated ``validate`` parameter is accepted\nonly as ``true``; ``false`` is rejected before any sequence is created.\n\nWARNING: this begins sending real outreach to real contacts.",
        "operationId": "launch_campaign_campaigns__campaign_id__launch_post",
        "parameters": [
          {
            "description": "Campaign ID",
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "description": "Campaign ID",
              "title": "Campaign Id",
              "type": "string"
            }
          },
          {
            "deprecated": true,
            "description": "Deprecated compatibility parameter. Readiness validation is always enforced; false is rejected before any sequence is created.",
            "in": "query",
            "name": "validate",
            "required": false,
            "schema": {
              "default": true,
              "deprecated": true,
              "description": "Deprecated compatibility parameter. Readiness validation is always enforced; false is rejected before any sequence is created.",
              "title": "Validate",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/CampaignLaunchRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Launch Campaign",
        "tags": [
          "GTM Campaigns"
        ]
      }
    },
    "/campaigns/{campaign_id}/metrics": {
      "get": {
        "description": "Get campaign execution metrics — sequence status + email sent/replied counts.\n\nThin wrapper around the existing ``campaigns.metrics`` handler. The\nhandler queries ClickHouse for per-sequence event aggregates and joins\nthem to the campaign's linked sequences via ``cb_campaign_sequence_links``.\n\nRead-only. Returns the same shape the handler produces; if ClickHouse is\nunreachable, ``email_metrics`` per campaign will be zero-filled but\n``is_running``/``sequence_count`` come from Postgres and remain accurate.",
        "operationId": "get_campaign_metrics_campaigns__campaign_id__metrics_get",
        "parameters": [
          {
            "description": "Campaign ID",
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "description": "Campaign ID",
              "title": "Campaign Id",
              "type": "string"
            }
          },
          {
            "description": "Lookback window in days",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "description": "Lookback window in days",
              "maximum": 365,
              "minimum": 1,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Campaign Metrics",
        "tags": [
          "GTM Campaigns"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      }
    },
    "/campaigns/{campaign_id}/sequence": {
      "get": {
        "description": "Get the campaign sequence and step catalog documents.",
        "operationId": "get_campaign_sequence_campaigns__campaign_id__sequence_get",
        "parameters": [
          {
            "description": "Campaign ID",
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "description": "Campaign ID",
              "title": "Campaign Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Campaign Sequence",
        "tags": [
          "GTM Campaigns"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      },
      "put": {
        "description": "Replace the campaign sequence ordering.",
        "operationId": "update_campaign_sequence_campaigns__campaign_id__sequence_put",
        "parameters": [
          {
            "description": "Campaign ID",
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "description": "Campaign ID",
              "title": "Campaign Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/developer_api__interfaces__v1__gtm_campaigns_router__UpdateSequenceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Campaign Sequence",
        "tags": [
          "GTM Campaigns"
        ],
        "x-graph8-scope": "campaigns:run",
        "x-graph8-tier": "external"
      }
    },
    "/campaigns/{campaign_id}/sequence/steps": {
      "post": {
        "description": "Create a step definition and append it to the campaign sequence.",
        "operationId": "create_campaign_step_campaigns__campaign_id__sequence_steps_post",
        "parameters": [
          {
            "description": "Campaign ID",
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "description": "Campaign ID",
              "title": "Campaign Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateStepRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Campaign Step",
        "tags": [
          "GTM Campaigns"
        ],
        "x-graph8-scope": "campaigns:run",
        "x-graph8-tier": "external"
      }
    },
    "/campaigns/{campaign_id}/sequence/steps/{step_id}": {
      "delete": {
        "description": "Remove a sequence step from the catalog and sequence order.",
        "operationId": "delete_campaign_step_campaigns__campaign_id__sequence_steps__step_id__delete",
        "parameters": [
          {
            "description": "Campaign ID",
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "description": "Campaign ID",
              "title": "Campaign Id",
              "type": "string"
            }
          },
          {
            "description": "Step ID",
            "in": "path",
            "name": "step_id",
            "required": true,
            "schema": {
              "description": "Step ID",
              "title": "Step Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Campaign Step",
        "tags": [
          "GTM Campaigns"
        ],
        "x-graph8-scope": "campaigns:delete",
        "x-graph8-tier": "destructive"
      },
      "put": {
        "description": "Update a sequence step definition and optional placement metadata.",
        "operationId": "update_campaign_step_campaigns__campaign_id__sequence_steps__step_id__put",
        "parameters": [
          {
            "description": "Campaign ID",
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "description": "Campaign ID",
              "title": "Campaign Id",
              "type": "string"
            }
          },
          {
            "description": "Step ID",
            "in": "path",
            "name": "step_id",
            "required": true,
            "schema": {
              "description": "Step ID",
              "title": "Step Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStepRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Campaign Step",
        "tags": [
          "GTM Campaigns"
        ],
        "x-graph8-scope": "campaigns:run",
        "x-graph8-tier": "external"
      }
    },
    "/clickhouse/mashup": {
      "post": {
        "description": "Enrich UP_IDs / HEMs / domains against the ClickHouse Cloud mashup tables.\n\nUse this for bulk enrichment workflows where the agent already has a\nprimary key (UP_ID from ``g8_opensearch_resolve_ids``, a HEM from a\nvisitor row, or a company domain from CRM). For free-form attribute\nsearch prefer ``g8_opensearch_search`` against ``mashup_contacts``.",
        "operationId": "clickhouse_mashup_clickhouse_mashup_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClickhouseMashupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ClickhouseMashupResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Clickhouse Mashup",
        "tags": [
          "ClickHouse"
        ],
        "x-graph8-scope": "search:write",
        "x-graph8-tier": "write"
      }
    },
    "/clickhouse/org-analytics": {
      "post": {
        "description": "Per-org visitor + intent analytics from ch3.\n\nThe database name is always derived from the authenticated user's\n``organization.id`` (lower-cased) — the request body never carries\nan org_id. The agent cannot reach another org's data even if it\ntries.",
        "operationId": "clickhouse_org_analytics_clickhouse_org_analytics_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClickhouseOrgAnalyticsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ClickhouseOrgAnalyticsResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Clickhouse Org Analytics",
        "tags": [
          "ClickHouse"
        ],
        "x-graph8-scope": "search:write",
        "x-graph8-tier": "write"
      }
    },
    "/companies": {
      "get": {
        "description": "List companies with optional filtering and pagination.",
        "operationId": "list_companies_companies_get",
        "parameters": [
          {
            "description": "Page number (1-indexed)",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "description": "Page number (1-indexed)",
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "description": "Items per page (max 200)",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Items per page (max 200)",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Filter by domain (exact match)",
            "in": "query",
            "name": "domain",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by domain (exact match)",
              "title": "Domain"
            }
          },
          {
            "description": "Filter by industry (partial match)",
            "in": "query",
            "name": "industry",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by industry (partial match)",
              "title": "Industry"
            }
          },
          {
            "description": "Filter by company name (partial match)",
            "in": "query",
            "name": "name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by company name (partial match)",
              "title": "Name"
            }
          },
          {
            "description": "Minimum employee count",
            "in": "query",
            "name": "employee_count_min",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "minimum": 0,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Minimum employee count",
              "title": "Employee Count Min"
            }
          },
          {
            "description": "Maximum employee count",
            "in": "query",
            "name": "employee_count_max",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "minimum": 0,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Maximum employee count",
              "title": "Employee Count Max"
            }
          },
          {
            "description": "Filter by country (exact match)",
            "in": "query",
            "name": "country",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by country (exact match)",
              "title": "Country"
            }
          },
          {
            "description": "Filter by state (exact match)",
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by state (exact match)",
              "title": "State"
            }
          },
          {
            "description": "Filter by city (partial match)",
            "in": "query",
            "name": "city",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by city (partial match)",
              "title": "City"
            }
          },
          {
            "description": "Filter by company description (partial match)",
            "in": "query",
            "name": "description",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by company description (partial match)",
              "title": "Description"
            }
          },
          {
            "description": "Minimum annual revenue",
            "in": "query",
            "name": "revenue_min",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "minimum": 0,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Minimum annual revenue",
              "title": "Revenue Min"
            }
          },
          {
            "description": "Maximum annual revenue",
            "in": "query",
            "name": "revenue_max",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "minimum": 0,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Maximum annual revenue",
              "title": "Revenue Max"
            }
          },
          {
            "description": "Minimum founding year",
            "in": "query",
            "name": "founded_year_min",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "minimum": 1800,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Minimum founding year",
              "title": "Founded Year Min"
            }
          },
          {
            "description": "Maximum founding year",
            "in": "query",
            "name": "founded_year_max",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 2100,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Maximum founding year",
              "title": "Founded Year Max"
            }
          },
          {
            "description": "Minimum LinkedIn followers",
            "in": "query",
            "name": "linkedin_followers_min",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "minimum": 0,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Minimum LinkedIn followers",
              "title": "Linkedin Followers Min"
            }
          },
          {
            "description": "Maximum LinkedIn followers",
            "in": "query",
            "name": "linkedin_followers_max",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "minimum": 0,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Maximum LinkedIn followers",
              "title": "Linkedin Followers Max"
            }
          },
          {
            "description": "When true, each company includes a `custom_fields` object of custom column values keyed by column slug. Default false keeps the legacy response shape and adds no extra query.",
            "in": "query",
            "name": "include_custom_fields",
            "required": false,
            "schema": {
              "default": false,
              "description": "When true, each company includes a `custom_fields` object of custom column values keyed by column slug. Default false keeps the legacy response shape and adds no extra query.",
              "title": "Include Custom Fields",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_CompanyListItem__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Companies",
        "tags": [
          "Companies"
        ],
        "x-graph8-scope": "companies:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create a company.\n\n``domain`` is required; the company is deduped by domain (an existing\ncompany with the same domain is reused rather than duplicated). Returns the\n``company_id`` (mashup_companies.id) — pass it to\n``g8_update_contact``/``company_id`` to attach the company to a contact, or\nuse it on a deal. Optionally add the company to a list via ``list_id``.\n\nRoutes to the same production ``CreateCompanyHandler`` the in-app \"add\ncompany\" flow uses (dedups, generates COMPANY_ID, creates the ABM/CRM\noverlay so the company is immediately pickable on a Deal).",
        "operationId": "create_company_companies_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CompanyCreateResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Company",
        "tags": [
          "Companies"
        ],
        "x-graph8-scope": "companies:write",
        "x-graph8-tier": "write"
      }
    },
    "/companies/assert": {
      "put": {
        "description": "Create or update a company. Matches by domain, then linkedin_url.",
        "operationId": "assert_company_companies_assert_put",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyAssertRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CompanyAssertResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Assert Company",
        "tags": [
          "Assert / Upsert"
        ],
        "x-graph8-scope": "contacts:write",
        "x-graph8-tier": "write"
      }
    },
    "/companies/assert/batch": {
      "put": {
        "description": "Batch create or update up to 100 companies. Matches by domain, then linkedin_url.",
        "operationId": "assert_companies_batch_companies_assert_batch_put",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchCompanyAssertRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_BatchAssertResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Assert Companies Batch",
        "tags": [
          "Assert / Upsert"
        ],
        "x-graph8-scope": "contacts:write",
        "x-graph8-tier": "write"
      }
    },
    "/companies/columns": {
      "get": {
        "description": "List custom company columns (table columns + global dynamic columns; +list-scoped if list_id given).",
        "operationId": "list_company_columns_companies_columns_get",
        "parameters": [
          {
            "description": "Optional list ID. When provided, list-specific dynamic columns are included alongside global ones.",
            "in": "query",
            "name": "list_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Optional list ID. When provided, list-specific dynamic columns are included alongside global ones.",
              "title": "List Id"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_Column__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Company Columns",
        "tags": [
          "Companies"
        ],
        "x-graph8-scope": "companies:read",
        "x-graph8-tier": "read"
      }
    },
    "/companies/columns/create": {
      "post": {
        "description": "Create a custom company column. Global if list_id is null, list-scoped otherwise.\n\nOptionally pass an `enrichment` block to provision a companion waterfall\npipeline in the same request — STRONGLY RECOMMENDED so the UI 'Enrich'\nbutton works out-of-the-box. Without it the column is created but isn't\nenrichable until a pipeline is provisioned via\nPOST /enrichment/waterfall/configs.",
        "operationId": "create_company_column_companies_columns_create_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCompanyColumnRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CreateCompanyColumnResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Company Column",
        "tags": [
          "Companies"
        ],
        "x-graph8-scope": "companies:write",
        "x-graph8-tier": "write"
      }
    },
    "/companies/columns/{column_id}": {
      "delete": {
        "description": "Soft-delete a custom company column (sets deleted_at; data is not physically removed).",
        "operationId": "delete_company_column_companies_columns__column_id__delete",
        "parameters": [
          {
            "description": "ID of the column to delete",
            "in": "path",
            "name": "column_id",
            "required": true,
            "schema": {
              "description": "ID of the column to delete",
              "title": "Column Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Company Column",
        "tags": [
          "Companies"
        ],
        "x-graph8-scope": "companies:delete",
        "x-graph8-tier": "destructive"
      }
    },
    "/companies/open-jobs": {
      "post": {
        "description": "What are these CRM companies hiring for, right now?\n\nA growth/buying signal: a company staffing up is a company with budget.\nUnrelated to `/marketplace/job-posts`, which publishes SDR roles you are\nrecruiting for - both are called \"jobs\" but they share no data.\n\n`company_ids` are `mashup_companies.id` values, NOT `linkedin_company_id`.\nBoth are bare ints, so passing the wrong one addresses a different company\nrather than erroring.\n\nResults split into `items` (resolved) and `unresolved`. An unresolved\ncompany is normal: it means the company could not be matched to a LinkedIn\ncompany page, not that it is not hiring. Read `lcid_confidence` before\ntrusting a match - 1.0 is an exact LinkedIn-URL match, 0.7 is a domain\nfallback that can mismatch on shared or parked domains. `open_jobs` counts\npostings seen within `window_days`; the source carries no open/closed state,\nso a filled role lingers until it ages out.\n\nOrg isolation is by Postgres schema, so ids belonging to another org come\nback as `unresolved` with no existence disclosure. Owner-level RBAC\n(`CompanyScopeFilter`) is deliberately not applied: it reads\n`user.permissions`, which an API-key user does not carry, so wiring it in\nwould resolve every API-key caller to scope \"none\" and return zero rows.",
        "operationId": "get_companies_open_jobs_companies_open_jobs_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompaniesOpenJobsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Companies Open Jobs",
        "tags": [
          "Companies"
        ],
        "x-graph8-scope": "companies:read",
        "x-graph8-tier": "read"
      }
    },
    "/companies/{company_id}": {
      "delete": {
        "description": "Soft-delete a company.",
        "operationId": "delete_company_companies__company_id__delete",
        "parameters": [
          {
            "description": "Company ID",
            "in": "path",
            "name": "company_id",
            "required": true,
            "schema": {
              "description": "Company ID",
              "title": "Company Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Company",
        "tags": [
          "Companies"
        ],
        "x-graph8-scope": "companies:delete",
        "x-graph8-tier": "destructive"
      },
      "get": {
        "description": "Get detailed information about a single company.",
        "operationId": "get_company_companies__company_id__get",
        "parameters": [
          {
            "description": "Company ID",
            "in": "path",
            "name": "company_id",
            "required": true,
            "schema": {
              "description": "Company ID",
              "title": "Company Id",
              "type": "integer"
            }
          },
          {
            "description": "When true, the response includes a `custom_fields` object of custom column values keyed by column slug. Default false omits it.",
            "in": "query",
            "name": "include_custom_fields",
            "required": false,
            "schema": {
              "default": false,
              "description": "When true, the response includes a `custom_fields` object of custom column values keyed by column slug. Default false omits it.",
              "title": "Include Custom Fields",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CompanyResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Company",
        "tags": [
          "Companies"
        ],
        "x-graph8-scope": "companies:read",
        "x-graph8-tier": "read"
      },
      "patch": {
        "description": "Update a company's fields (partial update).",
        "operationId": "update_company_companies__company_id__patch",
        "parameters": [
          {
            "description": "Company ID",
            "in": "path",
            "name": "company_id",
            "required": true,
            "schema": {
              "description": "Company ID",
              "title": "Company Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Company",
        "tags": [
          "Companies"
        ],
        "x-graph8-scope": "companies:write",
        "x-graph8-tier": "write"
      }
    },
    "/companies/{company_id}/contacts": {
      "get": {
        "description": "Get contacts belonging to a company.",
        "operationId": "get_company_contacts_companies__company_id__contacts_get",
        "parameters": [
          {
            "description": "Company ID",
            "in": "path",
            "name": "company_id",
            "required": true,
            "schema": {
              "description": "Company ID",
              "title": "Company Id",
              "type": "integer"
            }
          },
          {
            "description": "Items per page (max 200)",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "description": "Items per page (max 200)",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Offset for pagination",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "description": "Offset for pagination",
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_CompanyContactItem__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Company Contacts",
        "tags": [
          "Companies"
        ],
        "x-graph8-scope": "companies:read",
        "x-graph8-tier": "read"
      }
    },
    "/companies/{company_id}/deals": {
      "get": {
        "description": "Get all deals associated with a company.",
        "operationId": "get_company_deals_companies__company_id__deals_get",
        "parameters": [
          {
            "description": "Company ID",
            "in": "path",
            "name": "company_id",
            "required": true,
            "schema": {
              "description": "Company ID",
              "title": "Company Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_ContactDealResponse__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Company Deals",
        "tags": [
          "Deals"
        ],
        "x-graph8-scope": "deals:read",
        "x-graph8-tier": "read"
      }
    },
    "/companies/{company_id}/quotes": {
      "get": {
        "description": "List every quote attached to a given company (account view).",
        "operationId": "get_company_quotes_companies__company_id__quotes_get",
        "parameters": [
          {
            "description": "MashupCompany ID",
            "in": "path",
            "name": "company_id",
            "required": true,
            "schema": {
              "description": "MashupCompany ID",
              "title": "Company Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_QuoteDetail__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Company Quotes",
        "tags": [
          "Quotes"
        ],
        "x-graph8-scope": "quotes:read",
        "x-graph8-tier": "read"
      }
    },
    "/company-profile": {
      "get": {
        "description": "Read this org's company profile — the source Studio generation reads from.\n\nReturns the most recently updated profile (``_ordered_profile_candidates``\norders by ``updated_at`` desc, then ``created_at`` desc, then ``id`` desc, and\nthis takes the first row). It does NOT filter by a confirmed domain, so after a\ndomain change the row you get back is whichever profile was touched last — call\n``PUT /company-profile`` to set the correct one if the latest is stale.",
        "operationId": "get_company_profile_company_profile_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Company Profile",
        "tags": [
          "GTM Context"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      },
      "put": {
        "description": "Set this org's company profile (website + fields).\n\n**Why this exists.** The company profile is the source of truth for Studio\ngeneration. Self-serve orgs that sign up without a domain get a profile seeded\nwith graph8's own details, so every generated document describes the wrong\ncompany — and the only write path was ``POST /company-profile``, an internal\nJWT route absent from both the developer API and MCP. An agent could therefore\ndetect the problem but never fix it, and could not even read the field back to\nconfirm a human had fixed it.\n\nApproved profiles are immutable. Pass ``unapprove_if_approved: true`` to\ndeliberately unlock and overwrite one; otherwise this returns 409 rather than\nquietly discarding a human's approval.\n\nChanging the website does NOT regenerate existing Studio documents — they were\ngenerated from the old site. Follow with\n``POST /api/v1/global-context/regenerate``.",
        "operationId": "update_company_profile_company_profile_put",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyProfileUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Company Profile",
        "tags": [
          "GTM Context"
        ],
        "x-graph8-scope": "campaigns:write",
        "x-graph8-tier": "write"
      }
    },
    "/contacts": {
      "get": {
        "description": "List contacts with optional filtering and pagination.",
        "operationId": "list_contacts_contacts_get",
        "parameters": [
          {
            "description": "Page number (1-indexed)",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "description": "Page number (1-indexed)",
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "description": "Items per page (max 200)",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Items per page (max 200)",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Filter by work email (exact match)",
            "in": "query",
            "name": "email",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by work email (exact match)",
              "title": "Email"
            }
          },
          {
            "description": "Filter by list ID",
            "in": "query",
            "name": "list_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by list ID",
              "title": "List Id"
            }
          },
          {
            "description": "Filter by first or last name (partial match)",
            "in": "query",
            "name": "name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by first or last name (partial match)",
              "title": "Name"
            }
          },
          {
            "description": "Filter by job title (partial match)",
            "in": "query",
            "name": "job_title",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by job title (partial match)",
              "title": "Job Title"
            }
          },
          {
            "description": "Filter by seniority level (exact match)",
            "in": "query",
            "name": "seniority_level",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by seniority level (exact match)",
              "title": "Seniority Level"
            }
          },
          {
            "description": "Filter by company name (partial match)",
            "in": "query",
            "name": "company_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by company name (partial match)",
              "title": "Company Name"
            }
          },
          {
            "description": "Filter by company ID",
            "in": "query",
            "name": "company_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by company ID",
              "title": "Company Id"
            }
          },
          {
            "description": "Filter by country (exact match)",
            "in": "query",
            "name": "country",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by country (exact match)",
              "title": "Country"
            }
          },
          {
            "description": "Filter by state (exact match)",
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by state (exact match)",
              "title": "State"
            }
          },
          {
            "description": "Filter by city (partial match)",
            "in": "query",
            "name": "city",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by city (partial match)",
              "title": "City"
            }
          },
          {
            "description": "Filter by job department (partial match)",
            "in": "query",
            "name": "job_department",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by job department (partial match)",
              "title": "Job Department"
            }
          },
          {
            "description": "Filter by company industry (partial match)",
            "in": "query",
            "name": "industry",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by company industry (partial match)",
              "title": "Industry"
            }
          },
          {
            "description": "When true, each contact includes a `custom_fields` object of custom column values keyed by column slug. Default false keeps the legacy response shape and adds no extra query.",
            "in": "query",
            "name": "include_custom_fields",
            "required": false,
            "schema": {
              "default": false,
              "description": "When true, each contact includes a `custom_fields` object of custom column values keyed by column slug. Default false keeps the legacy response shape and adds no extra query.",
              "title": "Include Custom Fields",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_ContactListItem__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Contacts",
        "tags": [
          "Contacts"
        ],
        "x-graph8-scope": "contacts:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create a contact, optionally adding it to a list.\n\nThe contact is created independent of any list. When ``list_id`` is\nprovided, the contact is added to that list AFTER it is created; when\nomitted, the contact is created standalone. A company is resolved and\nattached from ``company_domain`` when supplied.\n\nDuplicate handling: when the submitted ``work_email`` / ``linkedin_url``\n(or the deterministic identity hash) already matches an existing contact,\nthe handler does NOT overwrite it — it writes nothing and skips the\n``list_id`` linkage. This endpoint mirrors the in-app create and responds\n``409 Conflict`` with the matched ``contact_id`` and a ``field_diff`` under\n``detail`` (rather than a misleading ``201`` success). The 409 is NOT\ncached under the ``Idempotency-Key``, so a later create of the same\nidentity is re-evaluated fresh.\n\nSupports optional Stripe-style idempotency via the ``Idempotency-Key``\nheader — a safe retry of the same key replays the first SUCCESSFUL response\n(flagged ``Idempotent-Replay: true``) rather than creating duplicate\ncontacts.",
        "operationId": "create_contacts_contacts_post",
        "parameters": [
          {
            "description": "Optional. Retrying a create with the same key returns the first response instead of creating a duplicate (cached 24h). Omit for the existing non-idempotent behavior.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Optional. Retrying a create with the same key returns the first response instead of creating a duplicate (cached 24h). Omit for the existing non-idempotent behavior.",
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ContactCreateResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Contacts",
        "tags": [
          "Contacts"
        ],
        "x-graph8-scope": "contacts:write",
        "x-graph8-tier": "write"
      }
    },
    "/contacts/assert": {
      "put": {
        "description": "Create or update a contact. Matches by work_email, then linkedin_url.",
        "operationId": "assert_contact_contacts_assert_put",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactAssertRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ContactAssertResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Assert Contact",
        "tags": [
          "Assert / Upsert"
        ],
        "x-graph8-scope": "contacts:write",
        "x-graph8-tier": "write"
      }
    },
    "/contacts/assert/batch": {
      "put": {
        "description": "Batch create or update up to 100 contacts. Matches by work_email, then linkedin_url.",
        "operationId": "assert_contacts_batch_contacts_assert_batch_put",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchContactAssertRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_BatchAssertResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Assert Contacts Batch",
        "tags": [
          "Assert / Upsert"
        ],
        "x-graph8-scope": "contacts:write",
        "x-graph8-tier": "write"
      }
    },
    "/contacts/columns": {
      "get": {
        "description": "List custom contact columns (table columns + global dynamic columns; +list-scoped if list_id given).",
        "operationId": "list_contact_columns_contacts_columns_get",
        "parameters": [
          {
            "description": "Optional list ID. When provided, list-specific dynamic columns are included alongside global ones.",
            "in": "query",
            "name": "list_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Optional list ID. When provided, list-specific dynamic columns are included alongside global ones.",
              "title": "List Id"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_Column__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Contact Columns",
        "tags": [
          "Contacts"
        ],
        "x-graph8-scope": "contacts:read",
        "x-graph8-tier": "read"
      }
    },
    "/contacts/columns/create": {
      "post": {
        "description": "Create a custom contact column. Global if list_id is null, list-scoped otherwise.\n\nOptionally pass an `enrichment` block to provision a companion waterfall\npipeline in the same request — STRONGLY RECOMMENDED so the UI 'Enrich'\nbutton works out-of-the-box. Without it the column is created but isn't\nenrichable until a pipeline is provisioned via\nPOST /enrichment/waterfall/configs.",
        "operationId": "create_contact_column_contacts_columns_create_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateContactColumnRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CreateContactColumnResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Contact Column",
        "tags": [
          "Contacts"
        ],
        "x-graph8-scope": "contacts:write",
        "x-graph8-tier": "write"
      }
    },
    "/contacts/columns/{column_id}": {
      "delete": {
        "description": "Soft-delete a custom contact column (sets deleted_at; data is not physically removed).",
        "operationId": "delete_contact_column_contacts_columns__column_id__delete",
        "parameters": [
          {
            "description": "ID of the column to delete",
            "in": "path",
            "name": "column_id",
            "required": true,
            "schema": {
              "description": "ID of the column to delete",
              "title": "Column Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Contact Column",
        "tags": [
          "Contacts"
        ],
        "x-graph8-scope": "contacts:delete",
        "x-graph8-tier": "destructive"
      }
    },
    "/contacts/{contact_id}": {
      "delete": {
        "description": "Soft-delete a contact.",
        "operationId": "delete_contact_contacts__contact_id__delete",
        "parameters": [
          {
            "description": "Contact ID",
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "description": "Contact ID",
              "title": "Contact Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Contact",
        "tags": [
          "Contacts"
        ],
        "x-graph8-scope": "contacts:delete",
        "x-graph8-tier": "destructive"
      },
      "get": {
        "description": "Get detailed information about a single contact.",
        "operationId": "get_contact_contacts__contact_id__get",
        "parameters": [
          {
            "description": "Contact ID",
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "description": "Contact ID",
              "title": "Contact Id",
              "type": "integer"
            }
          },
          {
            "description": "When true, the response includes a `custom_fields` object of custom column values keyed by column slug. Default false omits it.",
            "in": "query",
            "name": "include_custom_fields",
            "required": false,
            "schema": {
              "default": false,
              "description": "When true, the response includes a `custom_fields` object of custom column values keyed by column slug. Default false omits it.",
              "title": "Include Custom Fields",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ContactResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Contact",
        "tags": [
          "Contacts"
        ],
        "x-graph8-scope": "contacts:read",
        "x-graph8-tier": "read"
      },
      "patch": {
        "description": "Update a contact's fields (partial update).\n\nCompany link (both optional; a contact may have no company): ``company_id``\nattaches an EXISTING company (mashup_companies.id) directly; ``company_domain``\nresolves-or-creates a company from its domain. ``company_id`` wins if both\nare given. Every other field is a plain column update. Provide any subset;\nat least one field (plain or company) is required.",
        "operationId": "update_contact_contacts__contact_id__patch",
        "parameters": [
          {
            "description": "Contact ID",
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "description": "Contact ID",
              "title": "Contact Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Contact",
        "tags": [
          "Contacts"
        ],
        "x-graph8-scope": "contacts:write",
        "x-graph8-tier": "write"
      }
    },
    "/contacts/{contact_id}/deals": {
      "get": {
        "description": "Get all deals associated with a contact.",
        "operationId": "get_contact_deals_contacts__contact_id__deals_get",
        "parameters": [
          {
            "description": "Contact ID",
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "description": "Contact ID",
              "title": "Contact Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_ContactDealResponse__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Contact Deals",
        "tags": [
          "Deals"
        ],
        "x-graph8-scope": "deals:read",
        "x-graph8-tier": "read"
      }
    },
    "/contacts/{contact_id}/deals/assert": {
      "put": {
        "description": "Assert a deal-contact association. Idempotent — no error if already linked.",
        "operationId": "assert_deal_contact_contacts__contact_id__deals_assert_put",
        "parameters": [
          {
            "description": "Contact ID",
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "description": "Contact ID",
              "title": "Contact Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DealContactAssertRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Assert Deal Contact",
        "tags": [
          "Assert / Upsert"
        ],
        "x-graph8-scope": "contacts:write",
        "x-graph8-tier": "write"
      }
    },
    "/contacts/{contact_id}/notes": {
      "get": {
        "description": "List all notes on a contact.",
        "operationId": "list_notes_contacts__contact_id__notes_get",
        "parameters": [
          {
            "description": "Contact ID",
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "description": "Contact ID",
              "title": "Contact Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_NoteResponse__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Notes",
        "tags": [
          "Notes"
        ],
        "x-graph8-scope": "notes:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create a note on a contact.",
        "operationId": "create_note_contacts__contact_id__notes_post",
        "parameters": [
          {
            "description": "Contact ID",
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "description": "Contact ID",
              "title": "Contact Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NoteCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_NoteResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Note",
        "tags": [
          "Notes"
        ],
        "x-graph8-scope": "notes:write",
        "x-graph8-tier": "write"
      }
    },
    "/contacts/{contact_id}/quotes": {
      "get": {
        "description": "List quotes where this contact is the signer.",
        "operationId": "get_contact_quotes_contacts__contact_id__quotes_get",
        "parameters": [
          {
            "description": "MashupContact ID (the quote signer)",
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "description": "MashupContact ID (the quote signer)",
              "title": "Contact Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_QuoteDetail__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Contact Quotes",
        "tags": [
          "Quotes"
        ],
        "x-graph8-scope": "quotes:read",
        "x-graph8-tier": "read"
      }
    },
    "/contacts/{contact_id}/tasks": {
      "get": {
        "description": "List all tasks on a contact.",
        "operationId": "list_contact_tasks_contacts__contact_id__tasks_get",
        "parameters": [
          {
            "description": "Contact ID",
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "description": "Contact ID",
              "title": "Contact Id",
              "type": "integer"
            }
          },
          {
            "description": "Filter by status (open, completed)",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by status (open, completed)",
              "title": "Status"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_TaskResponse__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Contact Tasks",
        "tags": [
          "Tasks"
        ],
        "x-graph8-scope": "tasks:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create a task on a contact.",
        "operationId": "create_task_contacts__contact_id__tasks_post",
        "parameters": [
          {
            "description": "Contact ID",
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "description": "Contact ID",
              "title": "Contact Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_TaskResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Task",
        "tags": [
          "Tasks"
        ],
        "x-graph8-scope": "tasks:write",
        "x-graph8-tier": "write"
      }
    },
    "/crm-syncs": {
      "get": {
        "description": "List configured CRM integrations for the org.",
        "operationId": "list_crm_syncs_crm_syncs_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_CrmIntegrationResponse__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Crm Syncs",
        "tags": [
          "CRM Syncs"
        ],
        "x-graph8-scope": "integrations:read",
        "x-graph8-tier": "read"
      }
    },
    "/crm-syncs/{provider}/companies/push": {
      "post": {
        "description": "Push companies to an external CRM provider.",
        "operationId": "push_companies_to_crm_crm_syncs__provider__companies_push_post",
        "parameters": [
          {
            "description": "CRM provider",
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/CrmProvider",
              "description": "CRM provider"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmPushRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CrmPushResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Push Companies To Crm",
        "tags": [
          "CRM Syncs"
        ],
        "x-graph8-scope": "integrations:run",
        "x-graph8-tier": "external"
      }
    },
    "/crm-syncs/{provider}/contacts/push": {
      "post": {
        "description": "Push contacts to an external CRM provider.",
        "operationId": "push_contacts_to_crm_crm_syncs__provider__contacts_push_post",
        "parameters": [
          {
            "description": "CRM provider",
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/CrmProvider",
              "description": "CRM provider"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmPushRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CrmPushResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Push Contacts To Crm",
        "tags": [
          "CRM Syncs"
        ],
        "x-graph8-scope": "integrations:run",
        "x-graph8-tier": "external"
      }
    },
    "/crm-syncs/{provider}/fields": {
      "get": {
        "description": "Discover available fields for an entity type on a CRM provider.",
        "operationId": "get_crm_fields_crm_syncs__provider__fields_get",
        "parameters": [
          {
            "description": "CRM provider",
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/CrmProvider",
              "description": "CRM provider"
            }
          },
          {
            "description": "Entity type: contacts, companies, leads, deals",
            "in": "query",
            "name": "entity_type",
            "required": false,
            "schema": {
              "default": "contacts",
              "description": "Entity type: contacts, companies, leads, deals",
              "title": "Entity Type",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CrmFieldsResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Crm Fields",
        "tags": [
          "CRM Syncs"
        ],
        "x-graph8-scope": "integrations:read",
        "x-graph8-tier": "read"
      }
    },
    "/crm-syncs/{provider}/lists/push": {
      "post": {
        "description": "Modify CRM list memberships (add/remove contacts).",
        "operationId": "push_list_memberships_crm_syncs__provider__lists_push_post",
        "parameters": [
          {
            "description": "CRM provider",
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/CrmProvider",
              "description": "CRM provider"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmPushRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Push List Memberships",
        "tags": [
          "CRM Syncs"
        ],
        "x-graph8-scope": "integrations:run",
        "x-graph8-tier": "external"
      }
    },
    "/crm-syncs/{provider}/status": {
      "get": {
        "description": "Check connection health for a CRM provider.",
        "operationId": "get_crm_status_crm_syncs__provider__status_get",
        "parameters": [
          {
            "description": "CRM provider",
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/CrmProvider",
              "description": "CRM provider"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CrmStatusResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Crm Status",
        "tags": [
          "CRM Syncs"
        ],
        "x-graph8-scope": "integrations:read",
        "x-graph8-tier": "read"
      }
    },
    "/deals": {
      "get": {
        "description": "List all deals org-wide with optional filters and pagination.",
        "operationId": "list_deals_deals_get",
        "parameters": [
          {
            "description": "Page number",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "description": "Page number",
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "description": "Items per page",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Items per page",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Filter by stage ID",
            "in": "query",
            "name": "stage_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by stage ID",
              "title": "Stage Id"
            }
          },
          {
            "description": "Filter by pipeline ID",
            "in": "query",
            "name": "pipeline_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by pipeline ID",
              "title": "Pipeline Id"
            }
          },
          {
            "description": "Search by deal name",
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Search by deal name",
              "title": "Search"
            }
          },
          {
            "description": "Filter by owner ID",
            "in": "query",
            "name": "owner_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by owner ID",
              "title": "Owner Id"
            }
          },
          {
            "description": "Filter by owner email",
            "in": "query",
            "name": "owner_email",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by owner email",
              "title": "Owner Email"
            }
          },
          {
            "description": "Filter by deal outcome. A deal is won, lost, or open - exactly one. Prefer this over is_closed_won: the boolean's false branch means 'not won', which returns open AND unclassified deals alongside lost ones, and is the wrong cohort for closed-lost re-engagement.",
            "in": "query",
            "name": "outcome",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "won",
                    "lost",
                    "open"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by deal outcome. A deal is won, lost, or open - exactly one. Prefer this over is_closed_won: the boolean's false branch means 'not won', which returns open AND unclassified deals alongside lost ones, and is the wrong cohort for closed-lost re-engagement.",
              "title": "Outcome"
            }
          },
          {
            "description": "LEGACY - prefer outcome=. Retained for backwards compatibility with existing consumers. true means won; false means NOT won (open, lost and unclassified deals), which is rarely what a caller intends.",
            "in": "query",
            "name": "is_closed_won",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "LEGACY - prefer outcome=. Retained for backwards compatibility with existing consumers. true means won; false means NOT won (open, lost and unclassified deals), which is rarely what a caller intends.",
              "title": "Is Closed Won"
            }
          },
          {
            "description": "Only deals last touched before this timestamp",
            "in": "query",
            "name": "last_activity_before",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only deals last touched before this timestamp",
              "title": "Last Activity Before"
            }
          },
          {
            "description": "Deals last touched before this timestamp OR never touched at all. Union of last_activity_before and the no-activity cohort - use this for 'my stale deals' (last_activity_before alone excludes deals with no recorded activity, since NULL is never earlier-than).",
            "in": "query",
            "name": "stale_before",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Deals last touched before this timestamp OR never touched at all. Union of last_activity_before and the no-activity cohort - use this for 'my stale deals' (last_activity_before alone excludes deals with no recorded activity, since NULL is never earlier-than).",
              "title": "Stale Before"
            }
          },
          {
            "description": "Filter by whether the deal has recorded activity",
            "in": "query",
            "name": "has_activity",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by whether the deal has recorded activity",
              "title": "Has Activity"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_DealResponse__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Deals",
        "tags": [
          "Deals"
        ],
        "x-graph8-scope": "deals:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create a new deal. Defaults to the org's default pipeline and first stage if not specified.\n\n``background_tasks`` carries the ``deal.created`` event only (#16242). Like\nthe PATCH endpoint's stage fan-out it is injected, not a body field, so it\ndoes not appear in the OpenAPI schema and the request contract is unchanged.\nQueuing it there rather than publishing inline keeps the Redis round trip\noff the caller's latency budget and makes \"strictly after the commit\"\nstructural: the task is queued only once the session context has exited,\nand FastAPI attaches background tasks to the SUCCESS response, so a raise\nanywhere above publishes nothing.",
        "operationId": "create_deal_deals_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DealCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DealResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Deal",
        "tags": [
          "Deals"
        ],
        "x-graph8-scope": "deals:write",
        "x-graph8-tier": "write"
      }
    },
    "/deals/assert": {
      "put": {
        "description": "Create or update a deal. Matches by name + company_id.\n\nDeliberately NOT wired into the closed-stage gates or the completeness\nrule: assert is the sync-shaped surface (external systems pushing state,\nno human to answer a 400), the same category the internal router excludes\nfor POST /v1/deals/webhook/sync and the CRM pull worker (#15530\n\"Out of scope\"). Only input hygiene applies here: ids must exist and\nclose_date must parse.\n\n#16060: a stage move made here now emits ``deal.stage_changed`` and writes\n``cb_deal_stage_history``, like every other stage writer. ``background_tasks``\nis injected (not a body field, so the request schema is unchanged) and the\npublish is queued only after the session context has exited — a rolled-back\nassert publishes nothing. Because assert is the sync-shaped surface, the\nSAME stage arrives on every tick of the caller's poll loop: the event fires\nonly on an actual transition, never on a re-assert of the current stage.",
        "operationId": "assert_deal_deals_assert_put",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DealAssertRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DealAssertResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Assert Deal",
        "tags": [
          "Assert / Upsert"
        ],
        "x-graph8-scope": "contacts:write",
        "x-graph8-tier": "write"
      }
    },
    "/deals/pipelines": {
      "get": {
        "description": "List all deal pipelines and their stages.",
        "operationId": "list_pipelines_deals_pipelines_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_PipelineResponse__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Pipelines",
        "tags": [
          "Deals"
        ],
        "x-graph8-scope": "deals:read",
        "x-graph8-tier": "read"
      }
    },
    "/deals/{deal_id}": {
      "delete": {
        "description": "Delete a deal.\n\nTHE TOMBSTONE RULE (#16242): ``deal.deleted`` has to be self-contained,\nbecause by the time a consumer reads it the row is gone and ``deal_id``\nresolves to nothing. The payload therefore comes from ``RETURNING`` on the\nDELETE itself — one round trip, and no window in which a concurrent write\ncould change what a preceding SELECT had read. ``background_tasks`` is\ninjected (not a body field, so the OpenAPI schema is unchanged) for the\nsame reason as on PATCH.",
        "operationId": "delete_deal_deals__deal_id__delete",
        "parameters": [
          {
            "description": "Deal ID (UUID)",
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "description": "Deal ID (UUID)",
              "title": "Deal Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Deal",
        "tags": [
          "Deals"
        ],
        "x-graph8-scope": "deals:delete",
        "x-graph8-tier": "destructive"
      },
      "get": {
        "description": "Get a single deal by ID.",
        "operationId": "get_deal_deals__deal_id__get",
        "parameters": [
          {
            "description": "Deal ID (UUID)",
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "description": "Deal ID (UUID)",
              "title": "Deal Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DealResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Deal",
        "tags": [
          "Deals"
        ],
        "x-graph8-scope": "deals:read",
        "x-graph8-tier": "read"
      },
      "patch": {
        "description": "Update a deal (partial update).\n\n``background_tasks`` carries the ``deal.stage_changed`` fan-out only. It is\ninjected, not a body field, so it does not appear in the OpenAPI schema and\nthe request contract is unchanged (pinned by\n``developer_api/tests/test_deal_stage_events.py``). Publishing there rather\nthan inline keeps the Redis round trip off the caller's latency budget and\nmakes \"strictly after the commit\" structural: the task is queued only after\nthe session context has exited, and FastAPI attaches background tasks to the\nSUCCESS response, so a raise anywhere above publishes nothing.",
        "operationId": "update_deal_deals__deal_id__patch",
        "parameters": [
          {
            "description": "Deal ID (UUID)",
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "description": "Deal ID (UUID)",
              "title": "Deal Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DealUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DealResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Deal",
        "tags": [
          "Deals"
        ],
        "x-graph8-scope": "deals:write",
        "x-graph8-tier": "write"
      }
    },
    "/deliverability/metrics": {
      "get": {
        "description": "Deliverability capacity / sends / placement / warmup for the caller's org.\n\nRead-only, org-scoped (schema = ``str(org_id).lower()``). Reuses the admin\ndashboard's capacity+sends helpers (issue #14279) and the aggregator's\nhonest placement bucketing (issue #14278) so the numbers match the internal\ndashboard by construction. Every signal fails soft to ``null`` — a missing\nClickHouse / placement source degrades the field, never the whole response.",
        "operationId": "get_deliverability_metrics_deliverability_metrics_get",
        "parameters": [
          {
            "description": "Trailing window in days",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 7,
              "description": "Trailing window in days",
              "maximum": 30,
              "minimum": 1,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "description": "Drill into one mailbox's slice",
            "in": "query",
            "name": "mailbox_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Drill into one mailbox's slice",
              "title": "Mailbox Id"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Deliverability Metrics",
        "tags": [
          "GTM Deliverability"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      }
    },
    "/enablement/assets": {
      "post": {
        "description": "Upload an internal, org-scoped asset to Studio's Enablement library.",
        "operationId": "upload_enablement_asset_enablement_assets_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnablementAssetUploadRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Upload Enablement Asset",
        "tags": [
          "GTM Context"
        ],
        "x-graph8-scope": "campaigns:write",
        "x-graph8-tier": "write"
      }
    },
    "/enrichment/ai/configs": {
      "get": {
        "description": "List active AI enrichment configs runnable on a list.\n\nReturns configs where `list_id` matches OR `is_global=true`. Each\nsummary includes a `group_id` the caller passes back to\n`POST /enrichment/ai/enrich`. Empty list means the org has no AI\nconfigs and must create one in the UI before AI enrichment is usable.",
        "operationId": "list_ai_configs_enrichment_ai_configs_get",
        "parameters": [
          {
            "description": "List ID whose saved AI configs to return",
            "in": "query",
            "name": "list_id",
            "required": true,
            "schema": {
              "description": "List ID whose saved AI configs to return",
              "title": "List Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_AIConfigsResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Ai Configs",
        "tags": [
          "Enrichment"
        ],
        "x-graph8-scope": "enrichment:read",
        "x-graph8-tier": "read"
      }
    },
    "/enrichment/ai/enrich": {
      "post": {
        "description": "Run a saved AI enrichment config (web-research / content-gen) on records.\n\nDelegates to ``AIEnrichmentHandler`` (the same handler the UI uses).\nUnlike the waterfall endpoint - which queues an async job - this call\nruns synchronously: ``handler.run()`` blocks until every record has\nbeen processed (typical: 30-120 s for a handful of contacts on the\nweb-research usecase). The response therefore returns ``status=\"completed\"``\nwith the final counters inline, not a queued job_id to poll.\n\nThe job_id is still returned for audit / cross-reference - polling it\nvia ``GET /jobs/{job_id}`` works thanks to the DB fallback on that\nendpoint, but most callers will get everything they need from this\nresponse directly.\n\nCredits are charged up-front at the web-research baseline\n(``CREDITS_AI_ENRICH_ESTIMATE``). The handler does not charge\nadditionally, so this is the only credit deduction per call.",
        "operationId": "run_ai_enrichment_enrichment_ai_enrich_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunAIEnrichRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_EnrichJobResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Run Ai Enrichment",
        "tags": [
          "Enrichment"
        ],
        "x-graph8-scope": "enrichment:run",
        "x-graph8-tier": "billable"
      }
    },
    "/enrichment/enrich": {
      "post": {
        "description": "Start an async waterfall enrichment job. Returns a job_id to poll for results.",
        "operationId": "start_enrichment_enrichment_enrich_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnrichRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_EnrichJobResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Start Enrichment",
        "tags": [
          "Enrichment"
        ],
        "x-graph8-scope": "enrichment:run",
        "x-graph8-tier": "billable"
      }
    },
    "/enrichment/jobs/{job_id}": {
      "get": {
        "description": "Poll the status of an enrichment job.\n\nResolution order:\n    1. Redis ``job_state_cache`` (sub-millisecond, written by the\n       waterfall worker pipeline).\n    2. ``enrichment_jobs`` table in the org schema (written by every\n       enrichment handler including AI). DB fallback covers two cases:\n       Redis cache eviction for old waterfall jobs, AND AI jobs whose\n       handler isn't wired to the cache (see ``AIEnrichmentHandler``).\n\nReturning DB-resolved jobs also populates ``total`` / ``completed``\ncounters that Redis-only resolutions leave as ``None`` - so callers\npolling AI jobs see progress without a separate detail call.",
        "operationId": "get_enrichment_job_enrichment_jobs__job_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "title": "Job Id",
              "type": "string"
            }
          },
          {
            "description": "When true, include per-provider step errors (record_id, provider, error) from the job records, e.g. '<provider> API key is not configured'. Adds one DB read; off by default.",
            "in": "query",
            "name": "include_provider_errors",
            "required": false,
            "schema": {
              "default": false,
              "description": "When true, include per-provider step errors (record_id, provider, error) from the job records, e.g. '<provider> API key is not configured'. Adds one DB read; off by default.",
              "title": "Include Provider Errors",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_EnrichJobResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Enrichment Job",
        "tags": [
          "Enrichment"
        ],
        "x-graph8-scope": "enrichment:read",
        "x-graph8-tier": "read"
      }
    },
    "/enrichment/lookup/company": {
      "post": {
        "description": "Instant company lookup by domain or name.",
        "operationId": "lookup_company_enrichment_lookup_company_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyLookupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_LookupResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Lookup Company",
        "tags": [
          "Enrichment"
        ],
        "x-graph8-scope": "enrichment:run",
        "x-graph8-tier": "billable"
      }
    },
    "/enrichment/lookup/person": {
      "post": {
        "description": "Instant person lookup by email, LinkedIn URL, or name + company domain.",
        "operationId": "lookup_person_enrichment_lookup_person_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonLookupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_LookupResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Lookup Person",
        "tags": [
          "Enrichment"
        ],
        "x-graph8-scope": "enrichment:run",
        "x-graph8-tier": "billable"
      }
    },
    "/enrichment/providers": {
      "get": {
        "description": "List enrichment providers with their credential mode + credit cost.\n\nFor each provider: whether graph8 funds it with a system key (`system_funded`\n- usable with no setup but charges credits), whether the org has its own key\n(`byok_configured`), what `credential_mode='auto'` resolves to for this org\nright now (`default_credential_source`), and the per-action credit costs.\n\nThis is the programmatic equivalent of the UI's provider picker - call it\nbefore building a pipeline so you know which providers run on graph8's system\ncredentials by default and which require your own API key.",
        "operationId": "list_enrichment_providers_enrichment_providers_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ProviderCatalogResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Enrichment Providers",
        "tags": [
          "Enrichment"
        ],
        "x-graph8-scope": "enrichment:read",
        "x-graph8-tier": "read"
      }
    },
    "/enrichment/verify-email": {
      "post": {
        "description": "Verify a single email address and return its deliverability status.",
        "operationId": "verify_email_enrichment_verify_email_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyEmailRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_VerifyEmailResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Verify Email",
        "tags": [
          "Enrichment"
        ],
        "x-graph8-scope": "enrichment:run",
        "x-graph8-tier": "billable"
      }
    },
    "/enrichment/waterfall/configs": {
      "get": {
        "description": "List active waterfall pipelines saved for a list.\n\nReturns configs where `list_id` matches OR `is_global=true`. The UI treats\nthese as the \"runnable pipelines for this list\" set. Each summary includes\nthe `column_id` clients need for `POST /enrichment/waterfall/enrich`.\n\nEmpty list means the caller should auto-create one (see\n`POST /enrichment/waterfall/configs`).",
        "operationId": "list_waterfall_configs_enrichment_waterfall_configs_get",
        "parameters": [
          {
            "description": "List ID whose saved pipelines to return",
            "in": "query",
            "name": "list_id",
            "required": true,
            "schema": {
              "description": "List ID whose saved pipelines to return",
              "title": "List Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WaterfallConfigsResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Waterfall Configs",
        "tags": [
          "Enrichment"
        ],
        "x-graph8-scope": "enrichment:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create (or reuse) a waterfall pipeline on a list.\n\nThree call-styles (mutually exclusive between `providers[]` and `steps[]`):\n\n* **Bare** — pass only `list_id`. Builds a single-step graph8 lookup.\n* **By providers** — pass `providers=[\"hunter\",\"prospeo\"]`. Builds default\n  email-finder steps in that order.\n* **By steps** — pass `steps=[...]` with full step shapes. Persisted\n  verbatim (matches the canonical `WaterfallStepDto` shape the UI saves).\n\n`email_verification` may be combined with any call-style.\n\nIdempotent by `(list_id, name)`: if a pipeline with the same name already\nexists on this list, returns its column_id with `created=False` instead\nof creating a duplicate. Mirrors the dedup behaviour of the UI's\n`POST /enrichments/waterfall/save` endpoint.",
        "operationId": "create_default_waterfall_config_enrichment_waterfall_configs_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDefaultWaterfallConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CreateDefaultWaterfallConfigResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Default Waterfall Config",
        "tags": [
          "Enrichment"
        ],
        "x-graph8-scope": "enrichment:run",
        "x-graph8-tier": "billable"
      }
    },
    "/enrichment/waterfall/enrich": {
      "post": {
        "description": "Run a saved waterfall pipeline on specific records.\n\nThe handler loads the pipeline's step list from the DB by `column_id`,\nwhich means providers that require credentials (Prospeo, Dropcontact, etc.)\nuse whichever resolution the pipeline was saved with — the org's own API\nkeys OR graph8-managed system keys. Credits are deducted only for steps\nthat actually run.",
        "operationId": "run_waterfall_pipeline_enrichment_waterfall_enrich_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunWaterfallEnrichRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_EnrichJobResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Run Waterfall Pipeline",
        "tags": [
          "Enrichment"
        ],
        "x-graph8-scope": "enrichment:run",
        "x-graph8-tier": "billable"
      }
    },
    "/event-types": {
      "get": {
        "description": "Return the org's bookable event types (calendar links).\n\nEach row carries `id` (integer) and the booking-page metadata. Pass `id`\nback as `appointment_id` on `POST /campaigns/{id}/launch` or\n`PATCH /sequences/{id}` to wire the booking link onto a sequence so the\nCal.com short-link rewrite kicks in during send.\n\nBacked by the appointments `EventTypesHandler.handle_list` (same handler\npowering the in-app /appointments/event-types picker). We pass the\nauthenticated user through so per-user visibility rules apply identically\nto the in-app flow.",
        "operationId": "list_event_types_event_types_get",
        "parameters": [
          {
            "description": "Include event types marked `hidden` (unbookable publicly). Default False.",
            "in": "query",
            "name": "include_hidden",
            "required": false,
            "schema": {
              "default": false,
              "description": "Include event types marked `hidden` (unbookable publicly). Default False.",
              "title": "Include Hidden",
              "type": "boolean"
            }
          },
          {
            "description": "Filter by Cal.com scheduling type: managed | round_robin | collective. Omit to return all types including single-host (NULL).",
            "in": "query",
            "name": "scheduling_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by Cal.com scheduling type: managed | round_robin | collective. Omit to return all types including single-host (NULL).",
              "title": "Scheduling Type"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventTypesListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List bookable calendar event types (Cal.com appointments)",
        "tags": [
          "GTM Launch Helpers"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      }
    },
    "/fields": {
      "get": {
        "description": "List contact fields (base + custom). Optionally include list-specific custom fields.",
        "operationId": "list_contact_fields_fields_get",
        "parameters": [
          {
            "description": "List ID to include list-specific custom fields",
            "in": "query",
            "name": "list_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "List ID to include list-specific custom fields",
              "title": "List Id"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_FieldResponse__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Contact Fields",
        "tags": [
          "Fields"
        ],
        "x-graph8-scope": "fields:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create a new custom field (column) for contacts or companies.\n\nSet `list_id` to make the field specific to a single list, or omit it to\ncreate a global field available across every list in the org.\n\nOptionally pass an `enrichment` block to provision a companion waterfall\npipeline in the same request. Without this block the column exists but\nhas no enrichment plan, so `POST /enrichment/waterfall/enrich` later\nreturns 422 (`waterfall_config_missing`).",
        "operationId": "create_field_fields_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFieldRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CreateFieldResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Field",
        "tags": [
          "Fields"
        ],
        "x-graph8-scope": "fields:write",
        "x-graph8-tier": "write"
      }
    },
    "/fields/batch": {
      "post": {
        "description": "Create many custom columns (contacts or companies) in ONE request.\n\nBacked by a single DB transaction with ONE view rebuild for the whole batch\n— the efficient path for setting up a list with dozens of columns at once.\nThe single-column `POST /fields` is unchanged; this is purely additive.\n\nValidation is fail-fast: data_types, duplicate titles, and every `enrichment`\nblock are checked BEFORE any column is created, so a bad request creates\nnothing. Column creation itself is atomic (all columns or none).\n\nPer-column `enrichment` blocks are applied AFTER the columns commit; if a\ncompanion enrichment config fails for one column, that column still exists\nand its `results[]` entry reports `ok=false` with the error — the rest of\nthe batch is unaffected (mirrors the single endpoint's column-then-config\nordering, but per-field instead of failing the whole request).",
        "operationId": "create_fields_batch_fields_batch_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFieldsBatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CreateFieldsBatchResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Fields Batch",
        "tags": [
          "Fields"
        ],
        "x-graph8-scope": "fields:write",
        "x-graph8-tier": "write"
      }
    },
    "/fields/companies": {
      "get": {
        "description": "List company fields (base + custom). Optionally include list-specific custom fields.",
        "operationId": "list_company_fields_fields_companies_get",
        "parameters": [
          {
            "description": "List ID to include list-specific custom fields",
            "in": "query",
            "name": "list_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "List ID to include list-specific custom fields",
              "title": "List Id"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_FieldResponse__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Company Fields",
        "tags": [
          "Fields"
        ],
        "x-graph8-scope": "fields:read",
        "x-graph8-tier": "read"
      }
    },
    "/fields/values/batch": {
      "patch": {
        "description": "Write custom column values to one OR many rows in a single call.\n\nThe batch counterpart of ``PATCH /fields/{column_id}/values``. Each row\ncarries its own ``record_id`` and a list of ``{column_id, value}`` pairs;\nevery row shares the top-level ``entity``. A single-row update is just a\n``rows`` list of length one.\n\nPartial success: each row is applied inside its own SAVEPOINT, so a bad row\n(missing record, unknown column) is reported ``ok: false`` in ``results[]``\nwhile the remaining rows still commit. Pass ``value=null`` (or omit it) on a\npair to clear that column for the row.\n\nLimits: 1-500 rows per call; a ``record_id`` may appear only once per call\n(fold that record's writes into one row) - duplicates 400.\n\nEfficiency: all referenced ``column_id``s are resolved in one query and all\n``record_id``s are existence-checked in one query, then each row is written\nwith a single multi-column upsert (N+2 statements, not N*M).",
        "operationId": "set_field_values_batch_fields_values_batch_patch",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetFieldValuesBatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_SetFieldValuesBatchResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Set Field Values Batch",
        "tags": [
          "Fields"
        ],
        "x-graph8-scope": "fields:write",
        "x-graph8-tier": "write"
      }
    },
    "/fields/{column_id}": {
      "delete": {
        "description": "Soft-delete a custom field (column).\n\nAlways org-scoped (you can only delete columns in your own org). Pass\n``list_id`` to additionally require that the column belong to a specific\nlist — that's the safer default for list-scoped agents since the org may\nhave many custom columns across different lists.",
        "operationId": "delete_field_fields__column_id__delete",
        "parameters": [
          {
            "description": "Column ID to delete",
            "in": "path",
            "name": "column_id",
            "required": true,
            "schema": {
              "description": "Column ID to delete",
              "title": "Column Id",
              "type": "integer"
            }
          },
          {
            "description": "Target entity: 'contacts' or 'companies'",
            "in": "query",
            "name": "entity",
            "required": false,
            "schema": {
              "default": "contacts",
              "description": "Target entity: 'contacts' or 'companies'",
              "title": "Entity",
              "type": "string"
            }
          },
          {
            "description": "Optional list scope guard. If provided, the column must belong to this list or the request returns 404. Use this to prevent an agent with narrow intent from accidentally deleting a column on a different list in the same org.",
            "in": "query",
            "name": "list_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Optional list scope guard. If provided, the column must belong to this list or the request returns 404. Use this to prevent an agent with narrow intent from accidentally deleting a column on a different list in the same org.",
              "title": "List Id"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DeleteFieldResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Field",
        "tags": [
          "Fields"
        ],
        "x-graph8-scope": "fields:delete",
        "x-graph8-tier": "destructive"
      }
    },
    "/fields/{column_id}/values": {
      "get": {
        "description": "Read a single custom column value for one contact or company row.\n\nThe read-side counterpart of ``PATCH /fields/{column_id}/values``. Resolves\n``column_id`` to the underlying ``column_name_db`` from ``dynamic_columns``\n(scoped by ``object_type`` so a contacts column can't be read through the\ncompanies path), then selects that one value from ``mashup_contact_attrs``\n(or ``mashup_company_attrs`` for companies).\n\nReturns ``value: null`` when the column exists but has never been set for\nthat row. Returns 404 when the column or the record does not exist.\n\nBackwards-compat: this is a brand-new route; no existing surface changes.\nCustom column VALUES are also surfaced inline on the contact/company read\nendpoints when ``include_custom_fields=true`` is passed.",
        "operationId": "get_field_value_fields__column_id__values_get",
        "parameters": [
          {
            "description": "Column ID from g8_list_fields or g8_create_field",
            "in": "path",
            "name": "column_id",
            "required": true,
            "schema": {
              "description": "Column ID from g8_list_fields or g8_create_field",
              "title": "Column Id",
              "type": "integer"
            }
          },
          {
            "description": "Contact ID (entity='contacts') or company ID (entity='companies')",
            "in": "query",
            "name": "record_id",
            "required": true,
            "schema": {
              "description": "Contact ID (entity='contacts') or company ID (entity='companies')",
              "title": "Record Id",
              "type": "integer"
            }
          },
          {
            "description": "Target entity: 'contacts' or 'companies'",
            "in": "query",
            "name": "entity",
            "required": false,
            "schema": {
              "default": "contacts",
              "description": "Target entity: 'contacts' or 'companies'",
              "title": "Entity",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_GetFieldValueResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Field Value",
        "tags": [
          "Fields"
        ],
        "x-graph8-scope": "fields:read",
        "x-graph8-tier": "read"
      },
      "patch": {
        "description": "Write a custom column value to a single contact or company row.\n\nResolves ``column_id`` to the underlying ``column_name_db`` from\n``dynamic_columns``, then performs an ``INSERT ... ON CONFLICT DO UPDATE``\nagainst ``mashup_contact_attrs`` (or ``mashup_company_attrs`` for companies).\n\nPass ``value=null`` (or omit it) to clear the column for that row.\n\nNotes:\n    - The column must exist in ``dynamic_columns`` (not soft-deleted) for\n      this org and the matching entity. Returns 404 otherwise.\n    - The record (contact or company) must exist - the underlying foreign\n      key constraint enforces this; a missing record yields a 404.\n    - Custom column writes do NOT trigger view recreation; only column\n      creation does (see ``CdpMashupContactRepository.create_column``).",
        "operationId": "set_field_value_fields__column_id__values_patch",
        "parameters": [
          {
            "description": "Column ID from g8_list_fields or g8_create_field",
            "in": "path",
            "name": "column_id",
            "required": true,
            "schema": {
              "description": "Column ID from g8_list_fields or g8_create_field",
              "title": "Column Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetFieldValueRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_SetFieldValueResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Set Field Value",
        "tags": [
          "Fields"
        ],
        "x-graph8-scope": "fields:write",
        "x-graph8-tier": "write"
      }
    },
    "/global-context/documents": {
      "get": {
        "description": "List global context documents for the authenticated organization.\n\nEach row carries metadata (id, display_name, file_type, category,\nfolder_path, status, priority, version, timestamps). When\n``include_content`` is True (the default) the document body is included at\n``content`` (sourced from ``meta_data.content``) so callers can read what a\ndocument actually says; pass ``include_content=false`` to omit the body for\na cheaper listing. The default stays True for backwards compatibility — the\nMCP ``g8_gtm_get_global_context`` tool, the JS SDK ``studio.globalContext``\nclient, and the ``g8://global-context`` resource surfaces have always relied\non ``content`` being present.",
        "operationId": "list_global_context_documents_global_context_documents_get",
        "parameters": [
          {
            "description": "Filter by context category",
            "in": "query",
            "name": "category",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by context category",
              "title": "Category"
            }
          },
          {
            "description": "Include each document's body text at `content` (read from meta_data.content). Default True preserves historical behavior (this endpoint has always returned content); pass false for a lighter metadata-only listing.",
            "in": "query",
            "name": "include_content",
            "required": false,
            "schema": {
              "default": true,
              "description": "Include each document's body text at `content` (read from meta_data.content). Default True preserves historical behavior (this endpoint has always returned content); pass false for a lighter metadata-only listing.",
              "title": "Include Content",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_dict__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Global Context Documents",
        "tags": [
          "GTM Context"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      }
    },
    "/global-context/documents/{doc_id}": {
      "patch": {
        "description": "Update a Global Context (Studio) document's content and/or status.\n\nRead-side counterpart already exists (``GET /global-context/documents``);\nthis closes the long-standing \"read but can't update\" gap for the Context\nbucket. Each save creates a ``DocumentVersion`` snapshot, identical to the\ninternal Studio editor — so version history stays consistent regardless of\nwhether the edit came from the UI, the developer API, or MCP.\n\nPartial update: send ``content``, ``status``, or both. Returns 400 if\nneither is provided, 404 if the document does not exist in this org.\n\nNote: the Intelligence bucket (``cb_intelligence_data``) is intentionally\nread-only — it is machine-generated and has no manual-edit path.",
        "operationId": "update_global_context_document_global_context_documents__doc_id__patch",
        "parameters": [
          {
            "description": "Global context document ID (UUID)",
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "description": "Global context document ID (UUID)",
              "title": "Doc Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateGlobalContextRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Global Context Document",
        "tags": [
          "GTM Context"
        ],
        "x-graph8-scope": "campaigns:write",
        "x-graph8-tier": "write"
      }
    },
    "/global-context/regenerate": {
      "post": {
        "description": "Regenerate Studio (Global Context) documents against a website.\n\n**Why this exists.** Studio docs are generated once at onboarding from the\ncompany profile's website. If that profile was wrong at the time — the common\ncase for self-serve orgs, which seed graph8's own profile when no domain is\ngiven — every downstream ICP, persona, TAM and campaign is built on the wrong\ncompany, and there was no machine path to fix it:\n\n* the internal ``POST /global-context/generate-all`` refuses forever once the\n  first pipeline completes (``409 ... Contact support to reset and regenerate``);\n* ``POST /global-context/generate/{doc_type}`` has no such lock but was\n  JWT-only, so an agent or API key could not call it.\n\nThis endpoint wraps the per-document path, which means it is **not** subject to\nthe one-shot pipeline lock and can be run whenever the source of truth changes.\n\nRequires intelligence data for ``website_url`` to exist already — run the\nintelligence analyze step first for a newly-changed domain, otherwise this\nreturns 404 rather than regenerating stale content.",
        "operationId": "regenerate_global_context_global_context_regenerate_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegenerateContextRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Regenerate Global Context",
        "tags": [
          "GTM Context"
        ],
        "x-graph8-scope": "campaigns:write",
        "x-graph8-tier": "write"
      }
    },
    "/icps": {
      "get": {
        "description": "List campaign-builder ICPs for the authenticated organization.",
        "operationId": "list_icps_icps_get",
        "parameters": [
          {
            "description": "Filter by ICP status",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by ICP status",
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_dict__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Icps",
        "tags": [
          "GTM Context"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create a Studio ICP (manual - no AI generation).\n\nRead-side counterpart already exists (``GET /icps``); this closes the\n\"read but can't create\" gap for the ICP bucket. The new ICP is created with\nstatus 'active' and returned in the same shape as ``GET /icps``.",
        "operationId": "create_icp_icps_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateIcpRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Icp",
        "tags": [
          "GTM Context"
        ],
        "x-graph8-scope": "campaigns:write",
        "x-graph8-tier": "write"
      }
    },
    "/icps/{icp_id}": {
      "patch": {
        "description": "Update a Studio ICP's fields (partial update).\n\nSend at least one field. To archive an ICP use ``POST /icps/{icp_id}/archive``.\nReturns 400 if no field is provided, 404 if the ICP does not exist in this org.",
        "operationId": "update_icp_icps__icp_id__patch",
        "parameters": [
          {
            "description": "ICP ID (UUID)",
            "in": "path",
            "name": "icp_id",
            "required": true,
            "schema": {
              "description": "ICP ID (UUID)",
              "title": "Icp Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateIcpRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Icp",
        "tags": [
          "GTM Context"
        ],
        "x-graph8-scope": "campaigns:write",
        "x-graph8-tier": "write"
      }
    },
    "/icps/{icp_id}/archive": {
      "post": {
        "description": "Archive a Studio ICP (soft delete - sets status='archived').\n\nArchived ICPs drop out of the default ``GET /icps`` listing but remain fetchable\nvia ``?status=archived``. Returns 404 if the ICP does not exist.",
        "operationId": "archive_icp_icps__icp_id__archive_post",
        "parameters": [
          {
            "description": "ICP ID (UUID)",
            "in": "path",
            "name": "icp_id",
            "required": true,
            "schema": {
              "description": "ICP ID (UUID)",
              "title": "Icp Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Archive Icp",
        "tags": [
          "GTM Context"
        ],
        "x-graph8-scope": "campaigns:delete",
        "x-graph8-tier": "destructive"
      }
    },
    "/inbox": {
      "get": {
        "description": "List inbox threads across email, SMS, and LinkedIn channels.\n\n``status`` accepts ``SENT``, ``AI_RESPONDED`` or ``DRAFT`` (case-insensitive)\nand is forwarded to the channel handler; an unknown value returns 422.\n\nCAVEAT — ``assignee``: this cannot filter by an arbitrary email in this\nlayer. ``ChannelsService.get_channels`` only exposes ``assigned_to_me`` (a\nboolean bound to the *caller's* identity), so the value is used purely as a\ntrigger to return the caller's own assigned threads — NOT threads assigned\nto the requested email. For an org (machine) API key the caller identity is\nthe synthetic ``api-key@graph8.com``, which owns no threads, so the result\nis effectively empty. A true per-assignee filter needs an ``assignee_email``\nfield on the shared ``ChannelRequest`` (out of scope for the dev-API layer).",
        "operationId": "list_inbox_inbox_get",
        "parameters": [
          {
            "description": "Filter by channel: email, sms, linkedin",
            "in": "query",
            "name": "channel",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/InboxChannel"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by channel: email, sms, linkedin",
              "title": "Channel"
            }
          },
          {
            "description": "Filter by sequence (campaign) ID",
            "in": "query",
            "name": "sequence_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by sequence (campaign) ID",
              "title": "Sequence Id"
            }
          },
          {
            "description": "Filter by status",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by status",
              "title": "Status"
            }
          },
          {
            "description": "Filter by assignee email",
            "in": "query",
            "name": "assignee",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by assignee email",
              "title": "Assignee"
            }
          },
          {
            "description": "Filter by tag ID",
            "in": "query",
            "name": "tag",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by tag ID",
              "title": "Tag"
            }
          },
          {
            "description": "Page number",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "description": "Page number",
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "description": "Items per page",
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Items per page",
              "maximum": 100,
              "minimum": 1,
              "title": "Page Size",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_InboxThreadResponse__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Inbox",
        "tags": [
          "Inbox"
        ],
        "x-graph8-scope": "inbox:read",
        "x-graph8-tier": "read"
      }
    },
    "/inbox/hot-contacts": {
      "get": {
        "description": "Most-engaged ('hot') contacts ranked by recent INBOUND interaction\nevents (replies / opens / meeting RSVPs) — NOT a static score column.\n\nOrg-scoped to the authenticated key's organization. Registered before\n`/{reply_id}` so 'hot-contacts' isn't captured as an id.",
        "operationId": "hot_contacts_inbox_hot_contacts_get",
        "parameters": [
          {
            "description": "Lookback window in days",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "description": "Lookback window in days",
              "maximum": 365,
              "minimum": 1,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "description": "Max contacts to return",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "description": "Max contacts to return",
              "maximum": 50,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_HotContactsResult_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Hot Contacts",
        "tags": [
          "Inbox"
        ],
        "x-graph8-scope": "inbox:read",
        "x-graph8-tier": "read"
      }
    },
    "/inbox/meetings": {
      "get": {
        "description": "List meetings as compact summary cards.\n\nThe default visibility scope follows the caller's RBAC. Pass\n`participant_email` to scope down to a specific contact's meetings\n(matched across organizer + owner + attendees). Transcript content\nis returned only as a short summary preview; call the detail\nendpoint for full transcript text.",
        "operationId": "list_meetings_inbox_meetings_get",
        "parameters": [
          {
            "description": "Filter to meetings where ANY of the provided emails appears as organizer, owner, or attendee (case-insensitive, OR-matched). Repeat the param for multiple emails.",
            "in": "query",
            "name": "participant_email",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter to meetings where ANY of the provided emails appears as organizer, owner, or attendee (case-insensitive, OR-matched). Repeat the param for multiple emails.",
              "title": "Participant Email"
            }
          },
          {
            "description": "Visibility scope: 'my' (your meetings) or 'all' (org-wide, requires meetings:see_all)",
            "in": "query",
            "name": "scope",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Visibility scope: 'my' (your meetings) or 'all' (org-wide, requires meetings:see_all)",
              "title": "Scope"
            }
          },
          {
            "description": "'all', 'upcoming', or 'past' (default: past)",
            "in": "query",
            "name": "timeframe",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "'all', 'upcoming', or 'past' (default: past)",
              "title": "Timeframe"
            }
          },
          {
            "description": "True = transcript linked; False = no transcript",
            "in": "query",
            "name": "has_transcript",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "True = transcript linked; False = no transcript",
              "title": "Has Transcript"
            }
          },
          {
            "description": "Internal meeting visibility. 'include_internal' returns ALL meetings (team syncs, internal-only attendees). 'exclude_internal' drops any meeting with no external attendees. Omitting respects the org policy default (most orgs default to exclude_internal). Pass include_internal to see team/standup meetings the default would hide.",
            "in": "query",
            "name": "internal_mode",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Internal meeting visibility. 'include_internal' returns ALL meetings (team syncs, internal-only attendees). 'exclude_internal' drops any meeting with no external attendees. Omitting respects the org policy default (most orgs default to exclude_internal). Pass include_internal to see team/standup meetings the default would hide.",
              "title": "Internal Mode"
            }
          },
          {
            "description": "Match title or transcript text",
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Match title or transcript text",
              "title": "Search"
            }
          },
          {
            "description": "Page number",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "description": "Page number",
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "description": "Items per page",
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Items per page",
              "maximum": 100,
              "minimum": 1,
              "title": "Page Size",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_MeetingSummary__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Meetings",
        "tags": [
          "Meetings"
        ],
        "x-graph8-scope": "meetings:read",
        "x-graph8-tier": "read"
      }
    },
    "/inbox/meetings/booked": {
      "get": {
        "description": "Count + recent list of booked meetings (not cancelled, not deleted,\nnot private-sensitivity).\n\nOrg-scoped to the authenticated key's organization. Returns metadata\nonly (title / time / status / attendee count) — never transcript\ncontent. Finer per-user / `meetings:see_all` scoping is tracked as a\nfollow-up. Registered before `/{meeting_id}` so 'booked' isn't captured\nas an id.",
        "operationId": "meetings_booked_inbox_meetings_booked_get",
        "parameters": [
          {
            "description": "Lookback window in days",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 30,
              "description": "Lookback window in days",
              "maximum": 365,
              "minimum": 1,
              "title": "Days",
              "type": "integer"
            }
          },
          {
            "description": "Max meetings per page",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "Max meetings per page",
              "maximum": 50,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "1-based page over the booked list",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "description": "1-based page over the booked list",
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "description": "Only meetings from now forward",
            "in": "query",
            "name": "upcoming_only",
            "required": false,
            "schema": {
              "default": false,
              "description": "Only meetings from now forward",
              "title": "Upcoming Only",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MeetingsBookedResult_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Meetings Booked",
        "tags": [
          "Meetings"
        ],
        "x-graph8-scope": "meetings:read",
        "x-graph8-tier": "read"
      }
    },
    "/inbox/meetings/{meeting_id}": {
      "get": {
        "description": "Get a single meeting by ID with full transcript bundled inline.\n\nTranscript content is included when the caller is a participant or\nhas the `meetings:see_transcripts` permission. Otherwise the response\nsets `transcript_redacted=true` and omits the transcript body\n(status / IDs remain visible).",
        "operationId": "get_meeting_inbox_meetings__meeting_id__get",
        "parameters": [
          {
            "description": "Meeting ID (CalendarEvent.id)",
            "in": "path",
            "name": "meeting_id",
            "required": true,
            "schema": {
              "description": "Meeting ID (CalendarEvent.id)",
              "title": "Meeting Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MeetingDetail_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Meeting",
        "tags": [
          "Meetings"
        ],
        "x-graph8-scope": "meetings:read",
        "x-graph8-tier": "read"
      }
    },
    "/inbox/{reply_id}": {
      "get": {
        "description": "Get a single inbox thread by ID.",
        "operationId": "get_reply_inbox__reply_id__get",
        "parameters": [
          {
            "description": "Thread/reply ID",
            "in": "path",
            "name": "reply_id",
            "required": true,
            "schema": {
              "description": "Thread/reply ID",
              "title": "Reply Id",
              "type": "string"
            }
          },
          {
            "description": "Channel type",
            "in": "query",
            "name": "channel",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/InboxChannel",
              "default": "email",
              "description": "Channel type"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_InboxThreadResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Reply",
        "tags": [
          "Inbox"
        ],
        "x-graph8-scope": "inbox:read",
        "x-graph8-tier": "read"
      }
    },
    "/inbox/{reply_id}/assign": {
      "post": {
        "description": "Assign a user to an inbox thread.",
        "operationId": "assign_reply_inbox__reply_id__assign_post",
        "parameters": [
          {
            "description": "Thread/reply ID",
            "in": "path",
            "name": "reply_id",
            "required": true,
            "schema": {
              "description": "Thread/reply ID",
              "title": "Reply Id",
              "type": "string"
            }
          },
          {
            "description": "Channel type",
            "in": "query",
            "name": "channel",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/InboxChannel",
              "default": "email",
              "description": "Channel type"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Assign Reply",
        "tags": [
          "Inbox"
        ],
        "x-graph8-scope": "inbox:run",
        "x-graph8-tier": "external"
      }
    },
    "/inbox/{reply_id}/draft": {
      "get": {
        "description": "Generate an AI draft reply. Charges credits - returns 402 on insufficient balance.",
        "operationId": "get_draft_inbox__reply_id__draft_get",
        "parameters": [
          {
            "description": "Thread/reply ID",
            "in": "path",
            "name": "reply_id",
            "required": true,
            "schema": {
              "description": "Thread/reply ID",
              "title": "Reply Id",
              "type": "string"
            }
          },
          {
            "description": "Channel type",
            "in": "query",
            "name": "channel",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/InboxChannel",
              "default": "email",
              "description": "Channel type"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DraftResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Draft",
        "tags": [
          "Inbox"
        ],
        "x-graph8-scope": "inbox:read",
        "x-graph8-tier": "read"
      }
    },
    "/inbox/{reply_id}/send": {
      "post": {
        "description": "Send a reply through the specified channel (email, sms, or linkedin).",
        "operationId": "send_reply_inbox__reply_id__send_post",
        "parameters": [
          {
            "description": "Thread/reply ID",
            "in": "path",
            "name": "reply_id",
            "required": true,
            "schema": {
              "description": "Thread/reply ID",
              "title": "Reply Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_SendResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Send Reply",
        "tags": [
          "Inbox"
        ],
        "x-graph8-scope": "inbox:run",
        "x-graph8-tier": "external"
      }
    },
    "/inbox/{reply_id}/tag": {
      "post": {
        "description": "Attach tags to an inbox thread.",
        "operationId": "tag_reply_inbox__reply_id__tag_post",
        "parameters": [
          {
            "description": "Thread/reply ID",
            "in": "path",
            "name": "reply_id",
            "required": true,
            "schema": {
              "description": "Thread/reply ID",
              "title": "Reply Id",
              "type": "string"
            }
          },
          {
            "description": "Channel type",
            "in": "query",
            "name": "channel",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/InboxChannel",
              "default": "email",
              "description": "Channel type"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TagRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Tag Reply",
        "tags": [
          "Inbox"
        ],
        "x-graph8-scope": "inbox:run",
        "x-graph8-tier": "external"
      }
    },
    "/intelligence-data": {
      "get": {
        "description": "List intelligence-data documents (the ~16 docs in the Intelligence bucket).\n\nPart of the 44-document Studio Global Document Architecture (21 context +\n16 intelligence + 6 research + 1 brief). The MCP campaign-ideation path\nneeds this bucket — historically only the ``cb_global_contexts`` (Context)\nbucket was exposed via REST.",
        "operationId": "list_intelligence_data_intelligence_data_get",
        "parameters": [
          {
            "description": "Filter by data_type (website_scrape, company_enrichment, competitor_discovery, company_keywords, product_inventory, organic_keywords, paid_keywords, ...)",
            "in": "query",
            "name": "data_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by data_type (website_scrape, company_enrichment, competitor_discovery, company_keywords, product_inventory, organic_keywords, paid_keywords, ...)",
              "title": "Data Type"
            }
          },
          {
            "description": "Include the raw `data` JSONB blob (large; default omits)",
            "in": "query",
            "name": "include_content",
            "required": false,
            "schema": {
              "default": false,
              "description": "Include the raw `data` JSONB blob (large; default omits)",
              "title": "Include Content",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_dict__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Intelligence Data",
        "tags": [
          "GTM Context"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      }
    },
    "/intent/keywords/create-from-domain": {
      "post": {
        "description": "One-shot compete-tracking keyword create.\n\nUnder the hood:\n  1. `pages-by-domain` -> on-domain / subdomain URLs only\n  2. `contacts` -> pre-resolved people across those URLs\n  3. `save-from-search` -> persists the keyword row with both\n\nThe off-domain guard is strict: every page returned from step 1 is\nre-checked against `^(.+\\.)?<domain>$` before save, so nothing that\nisn't actually on the competitor's site can slip in.",
        "operationId": "keywords_create_from_domain_intent_keywords_create_from_domain_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KeywordCreateFromDomainRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_KeywordCreateFromDomainResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Keywords Create From Domain",
        "tags": [
          "Intent"
        ],
        "x-graph8-scope": "intent:run",
        "x-graph8-tier": "billable"
      }
    },
    "/intent/keywords/create-from-search": {
      "post": {
        "description": "Bulk-create compete-tracking keywords from free-text queries.\n\nThe array/free-text sibling of ``create-from-domain``. For EACH keyword\n(max 10, processed sequentially) it runs:\n\n  1. ``pages/search``            - text/semantic search of the intent index\n  2. ``contacts_for_urls``       - resolve people who visited those pages\n  3. ``save_keyword_from_search``- persist the keyword + URLs + contacts\n\nEach keyword is isolated: a failure on one yields ``status=\"error\"`` for\nthat item and never fails the whole batch. Empty / whitespace-only entries\nand in-request duplicates (case-insensitive, trimmed) are ``status=\"skipped\"``\nbefore any search/resolve work.\n\nNOTE - not idempotent across requests: re-posting the same keyword text in a\nLATER request replaces the prior saved row and returns a NEW ``keyword_id``\n(the underlying save is replace-on-save for an exact keyword+filters match).",
        "operationId": "keywords_create_from_search_intent_keywords_create_from_search_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KeywordsCreateFromSearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_KeywordsCreateFromSearchResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Keywords Create From Search",
        "tags": [
          "Intent"
        ],
        "x-graph8-scope": "intent:run",
        "x-graph8-tier": "billable"
      }
    },
    "/intent/keywords/list": {
      "post": {
        "description": "All compete-tracking keyword rows for the org.\n\nEach row carries `total_resolved_contacts` and\n`total_resolved_companies` so the caller can rank rows by actual\ncompete intelligence delivered.",
        "operationId": "keywords_list_intent_keywords_list_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KeywordsListRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Keywords List",
        "tags": [
          "Intent"
        ],
        "x-graph8-scope": "intent:run",
        "x-graph8-tier": "billable"
      }
    },
    "/intent/keywords/{keyword_id}": {
      "delete": {
        "description": "Soft-delete a compete-tracking keyword row.",
        "operationId": "keywords_delete_intent_keywords__keyword_id__delete",
        "parameters": [
          {
            "description": "Keyword row UUID.",
            "in": "path",
            "name": "keyword_id",
            "required": true,
            "schema": {
              "description": "Keyword row UUID.",
              "format": "uuid",
              "title": "Keyword Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Keywords Delete",
        "tags": [
          "Intent"
        ],
        "x-graph8-scope": "intent:delete",
        "x-graph8-tier": "destructive"
      }
    },
    "/intent/keywords/{keyword_id}/companies": {
      "post": {
        "description": "Companies resolved against a keyword's URL set (intent_resolved).",
        "operationId": "keyword_companies_intent_keywords__keyword_id__companies_post",
        "parameters": [
          {
            "in": "path",
            "name": "keyword_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Keyword Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KeywordDetailRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Keyword Companies",
        "tags": [
          "Intent"
        ],
        "x-graph8-scope": "intent:run",
        "x-graph8-tier": "billable"
      }
    },
    "/intent/keywords/{keyword_id}/contacts": {
      "post": {
        "description": "People resolved against a keyword's URL set (intent_resolved).",
        "operationId": "keyword_contacts_intent_keywords__keyword_id__contacts_post",
        "parameters": [
          {
            "in": "path",
            "name": "keyword_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Keyword Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KeywordDetailRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Keyword Contacts",
        "tags": [
          "Intent"
        ],
        "x-graph8-scope": "intent:run",
        "x-graph8-tier": "billable"
      }
    },
    "/intent/keywords/{keyword_id}/filters": {
      "post": {
        "description": "Replace a keyword's `search_filters` JSON.",
        "operationId": "keyword_update_filters_intent_keywords__keyword_id__filters_post",
        "parameters": [
          {
            "in": "path",
            "name": "keyword_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Keyword Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KeywordFiltersUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Keyword Update Filters",
        "tags": [
          "Intent"
        ],
        "x-graph8-scope": "intent:run",
        "x-graph8-tier": "billable"
      }
    },
    "/intent/keywords/{keyword_id}/urls": {
      "post": {
        "description": "URLs linked to a compete-tracking keyword (data4seo_task_results).",
        "operationId": "keyword_urls_intent_keywords__keyword_id__urls_post",
        "parameters": [
          {
            "in": "path",
            "name": "keyword_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Keyword Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KeywordDetailRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Keyword Urls",
        "tags": [
          "Intent"
        ],
        "x-graph8-scope": "intent:run",
        "x-graph8-tier": "billable"
      }
    },
    "/intent/pages-by-domain": {
      "post": {
        "description": "Every indexed page on a competitor domain (and its subdomains).\n\nQueries ClickHouse `intent.crawl_pages` directly via a\n`domain_root = X OR domain_root LIKE '%.X'` filter. Orders by\n`commercial_score DESC`. Primary consumer: compete-tracking keyword\nsetup - avoids polluting a keyword row with news articles that only\nmention the competitor.",
        "operationId": "pages_by_domain_intent_pages_by_domain_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PagesByDomainRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PagesByDomainResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Pages By Domain",
        "tags": [
          "Intent"
        ],
        "x-graph8-scope": "intent:run",
        "x-graph8-tier": "billable"
      }
    },
    "/intent/pages/contacts": {
      "post": {
        "description": "Aggregated, deduplicated resolved contacts across a URL list.\n\nOne batched HEM pull, then the 4-path identity fan-out. Used to\npre-populate the `contacts` array on a save-from-search keyword so the\nrow shows contact counts immediately (not after the daily resolver).",
        "operationId": "pages_contacts_intent_pages_contacts_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PagesContactsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Pages Contacts",
        "tags": [
          "Intent"
        ],
        "x-graph8-scope": "intent:run",
        "x-graph8-tier": "billable"
      }
    },
    "/intent/pages/search": {
      "post": {
        "description": "Text / semantic / hybrid search across the intent-enriched page index.\n\nHonors the same operator syntax the internal search box supports:\n`site:<domain>`, `intitle:X`, `inurl:X`, `type:blog`, `audience:b2b`,\n`-exclude`, or just a bare domain for domain-mode.",
        "operationId": "pages_search_intent_pages_search_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PagesSearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PagesSearchResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Pages Search",
        "tags": [
          "Intent"
        ],
        "x-graph8-scope": "intent:run",
        "x-graph8-tier": "billable"
      }
    },
    "/intent/pages/visitor-counts": {
      "post": {
        "description": "Batched unique-visitor count per page URL.\n\nReads the pre-aggregated `intent.url_visitor_counts` MV first; falls\nback to the raw `intent.optimized_signals_v1` if the MV doesn't exist\nyet. Fast enough to call with thousands of URLs.",
        "operationId": "pages_visitor_counts_intent_pages_visitor_counts_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PagesVisitorCountsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Pages Visitor Counts",
        "tags": [
          "Intent"
        ],
        "x-graph8-scope": "intent:run",
        "x-graph8-tier": "billable"
      }
    },
    "/intent/pages/visitors": {
      "post": {
        "description": "Resolve the people who visited a specific page URL.\n\nBacked by the same S1 -> S2 chain the FE drill-down uses. Returns\nHEM, profile fields (verified), and a `source` tier (verified / b2b /\nb2c / company / anonymous) so the caller can filter confidence.",
        "operationId": "pages_visitors_intent_pages_visitors_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PagesVisitorsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Pages Visitors",
        "tags": [
          "Intent"
        ],
        "x-graph8-scope": "intent:run",
        "x-graph8-tier": "billable"
      }
    },
    "/intent/stats": {
      "get": {
        "description": "Index-coverage stats: document count + size.\n\nUseful for health checks before committing to a compete-tracking program.",
        "operationId": "intent_stats_intent_stats_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Intent Stats",
        "tags": [
          "Intent"
        ],
        "x-graph8-scope": "intent:read",
        "x-graph8-tier": "read"
      }
    },
    "/intent/url-companies": {
      "post": {
        "description": "Companies whose people visited a single URL, with a B2B/B2C split.\n\nAggregated from `{org_id}.intent_resolved`. Contact-resolved companies\nonly - IP-only company resolution is a separate treatment and is not\nincluded here.\n\nThe response shape is field-for-field identical to the main-app\n`POST /intent-search/url-companies` that backs the FE drill-down; key\nparity between the two is locked by\n`developer_api/tests/test_intent_url_companies_api.py`.\n\nFailure semantics deliberately differ from that main-app route: it\nswallows lookup errors and returns an empty result, which over this\nsurface would be indistinguishable from \"nobody visited\". Consistent\nwith its `/intent/pages/*` siblings, this raises 503 instead so a caller\ncan tell a degraded backend from a genuine zero.",
        "operationId": "url_companies_intent_url_companies_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UrlCompaniesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Url Companies",
        "tags": [
          "Intent"
        ],
        "x-graph8-scope": "intent:read",
        "x-graph8-tier": "read"
      }
    },
    "/kb": {
      "get": {
        "description": "List all KB documents grouped by section.",
        "operationId": "list_kb_documents_kb_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_dict__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Kb Documents",
        "tags": [
          "GTM Knowledge Base"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      }
    },
    "/kb/search": {
      "post": {
        "description": "Search the GTM knowledge base using full-text search.",
        "operationId": "search_kb_kb_search_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KBSearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_dict__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Search Kb",
        "tags": [
          "GTM Knowledge Base"
        ],
        "x-graph8-scope": "campaigns:write",
        "x-graph8-tier": "write"
      }
    },
    "/knowledge": {
      "get": {
        "operationId": "list_knowledge_knowledge_get",
        "parameters": [
          {
            "in": "query",
            "name": "concept_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 100,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Concept Type"
            }
          },
          {
            "in": "query",
            "name": "lifecycle",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 32,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Lifecycle"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_dict__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Knowledge",
        "tags": [
          "Knowledge"
        ]
      }
    },
    "/knowledge/context": {
      "post": {
        "operationId": "assemble_knowledge_context_knowledge_context_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeContextRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Assemble Knowledge Context",
        "tags": [
          "Knowledge"
        ]
      }
    },
    "/knowledge/export": {
      "get": {
        "operationId": "export_knowledge_knowledge_export_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Export Knowledge",
        "tags": [
          "Knowledge"
        ]
      }
    },
    "/knowledge/search": {
      "get": {
        "operationId": "search_knowledge_knowledge_search_get",
        "parameters": [
          {
            "in": "query",
            "name": "query",
            "required": true,
            "schema": {
              "maxLength": 1000,
              "minLength": 1,
              "title": "Query",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 50,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_dict__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Search Knowledge",
        "tags": [
          "Knowledge"
        ]
      }
    },
    "/knowledge/{concept_id}": {
      "get": {
        "operationId": "get_knowledge_knowledge__concept_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "concept_id",
            "required": true,
            "schema": {
              "maxLength": 255,
              "minLength": 1,
              "title": "Concept Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Knowledge",
        "tags": [
          "Knowledge"
        ]
      }
    },
    "/knowledge/{concept_id}/related": {
      "get": {
        "operationId": "related_knowledge_knowledge__concept_id__related_get",
        "parameters": [
          {
            "in": "path",
            "name": "concept_id",
            "required": true,
            "schema": {
              "maxLength": 255,
              "minLength": 1,
              "title": "Concept Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "depth",
            "required": false,
            "schema": {
              "default": 1,
              "maximum": 3,
              "minimum": 1,
              "title": "Depth",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 25,
              "maximum": 50,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_dict__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Related Knowledge",
        "tags": [
          "Knowledge"
        ]
      }
    },
    "/knowledge/{concept_id}/sources": {
      "get": {
        "operationId": "knowledge_sources_knowledge__concept_id__sources_get",
        "parameters": [
          {
            "in": "path",
            "name": "concept_id",
            "required": true,
            "schema": {
              "maxLength": 255,
              "minLength": 1,
              "title": "Concept Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_dict__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Knowledge Sources",
        "tags": [
          "Knowledge"
        ]
      }
    },
    "/landing-pages/agent-sessions/{session_id}": {
      "get": {
        "description": "Return exact source for the draft bound to an edit session.",
        "operationId": "get_landing_page_source_landing_pages_agent_sessions__session_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_str__Any__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Landing Page Source",
        "tags": [
          "Landing Pages"
        ]
      }
    },
    "/landing-pages/agent-sessions/{session_id}/patch": {
      "post": {
        "description": "Submit an exact patch using the handoff's selected approval mode.",
        "operationId": "patch_landing_page_landing_pages_agent_sessions__session_id__patch_post",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LandingPagePatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_str__Any__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Patch Landing Page",
        "tags": [
          "Landing Pages"
        ]
      }
    },
    "/lists": {
      "get": {
        "description": "List all lists (audiences) in the organization.",
        "operationId": "list_lists_lists_get",
        "parameters": [
          {
            "description": "Page number (1-indexed)",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "description": "Page number (1-indexed)",
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "description": "Items per page (max 200)",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Items per page (max 200)",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_ListResponse__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Lists",
        "tags": [
          "Lists"
        ],
        "x-graph8-scope": "lists:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create a new empty list.",
        "operationId": "create_list_lists_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ListCreateResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create List",
        "tags": [
          "Lists"
        ],
        "x-graph8-scope": "lists:write",
        "x-graph8-tier": "write"
      }
    },
    "/lists/{list_id}": {
      "delete": {
        "description": "Soft-delete a list.",
        "operationId": "delete_list_lists__list_id__delete",
        "parameters": [
          {
            "description": "List ID",
            "in": "path",
            "name": "list_id",
            "required": true,
            "schema": {
              "description": "List ID",
              "title": "List Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete List",
        "tags": [
          "Lists"
        ],
        "x-graph8-scope": "lists:delete",
        "x-graph8-tier": "destructive"
      },
      "patch": {
        "description": "Rename a list (update its title).",
        "operationId": "update_list_lists__list_id__patch",
        "parameters": [
          {
            "description": "List ID",
            "in": "path",
            "name": "list_id",
            "required": true,
            "schema": {
              "description": "List ID",
              "title": "List Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ListResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update List",
        "tags": [
          "Lists"
        ],
        "x-graph8-scope": "lists:write",
        "x-graph8-tier": "write"
      }
    },
    "/lists/{list_id}/contacts": {
      "delete": {
        "description": "Remove contacts from a list.",
        "operationId": "remove_contacts_from_list_lists__list_id__contacts_delete",
        "parameters": [
          {
            "description": "List ID",
            "in": "path",
            "name": "list_id",
            "required": true,
            "schema": {
              "description": "List ID",
              "title": "List Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RemoveContactsFromListRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Remove Contacts From List",
        "tags": [
          "Lists"
        ],
        "x-graph8-scope": "lists:delete",
        "x-graph8-tier": "destructive"
      },
      "get": {
        "description": "Get contacts in a specific list.",
        "operationId": "get_list_contacts_lists__list_id__contacts_get",
        "parameters": [
          {
            "description": "List ID",
            "in": "path",
            "name": "list_id",
            "required": true,
            "schema": {
              "description": "List ID",
              "title": "List Id",
              "type": "integer"
            }
          },
          {
            "description": "Page number (1-indexed)",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "description": "Page number (1-indexed)",
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "description": "Items per page (max 200)",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Items per page (max 200)",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_ContactListItem__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get List Contacts",
        "tags": [
          "Lists"
        ],
        "x-graph8-scope": "lists:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Add contacts to a list by their IDs.",
        "operationId": "add_contacts_to_list_lists__list_id__contacts_post",
        "parameters": [
          {
            "description": "List ID",
            "in": "path",
            "name": "list_id",
            "required": true,
            "schema": {
              "description": "List ID",
              "title": "List Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddContactsToListRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add Contacts To List",
        "tags": [
          "Lists"
        ],
        "x-graph8-scope": "lists:write",
        "x-graph8-tier": "write"
      }
    },
    "/logs": {
      "get": {
        "description": "Recent API requests for the authenticated org (most recent first).\n\nUseful for debugging an integration: see your last calls, their status codes,\nand the request_id to correlate with the X-Request-Id header. Best-effort —\nentries are retained briefly and may be absent if logging was unavailable.",
        "operationId": "list_request_logs_logs_get",
        "parameters": [
          {
            "description": "Max entries to return (most recent first)",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Max entries to return (most recent first)",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_RequestLogEntry__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Request Logs",
        "tags": [
          "Logs"
        ],
        "x-graph8-scope": "analytics:read",
        "x-graph8-tier": "read"
      }
    },
    "/mailboxes": {
      "get": {
        "description": "List sending mailboxes the authenticated user can access in this org.\n\nBacks the MCP \"pick a mailbox before launching a campaign\" flow.\n\nSources from the canonical ``mailboxes`` table (NOT the\n``ai_inbox_email_cron_jobs`` table the FE picker previously used — that\ntable is the AI-inbox sync state, not the source of truth for which\nmailboxes exist). See ``.claude/agent-context/mailbox-picker-sources-cron-table.md``.\n\nTenant scope: ``mailboxes`` lives in the per-org schema (NOT public —\nthe earlier version of this comment was wrong; see\n``select to_regclass('public.mailboxes')`` returning null vs. the\nper-org row count). Binding the session to ``schema=<org>`` IS the\ntenant boundary; no further org-filter predicate is needed.\n\nPer-row RBAC (``ENFORCE_MAILBOX_PERMISSIONS`` soak flag) is NOT enforced\nhere yet — Phase 3b on issue #7180 — keeping symmetry with the FE\npicker. When that flag flips on, this endpoint will adopt the scope\nfilter alongside the cdp/mailboxes/fetch surface.\n\nHistorical bug (fixed 2026-05-22): the previous implementation appended\n``(t.org_id = :org_id OR m.created_by = :user_id)`` to the WHERE. Both\nhalves silently matched zero rows in prod — ``mailboxes.team_id`` is\nNULL on every row (no team pinning) and ``mailboxes.created_by`` stores\nemail strings, not propelauth UUIDs. Result: the endpoint returned an\nempty list for every caller. Dropping the predicate restores the\ncorrect per-org listing; tenant isolation comes from the schema bind.",
        "operationId": "list_mailboxes_mailboxes_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 500,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Include archived mailboxes",
            "in": "query",
            "name": "include_archived",
            "required": false,
            "schema": {
              "default": false,
              "description": "Include archived mailboxes",
              "title": "Include Archived",
              "type": "boolean"
            }
          },
          {
            "description": "Filter by connection_status (active|paused|disconnected|expired|...)",
            "in": "query",
            "name": "connection_status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by connection_status (active|paused|disconnected|expired|...)",
              "title": "Connection Status"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_dict__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Mailboxes",
        "tags": [
          "GTM Context"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      }
    },
    "/mailboxes/{mailbox_id}/warmup": {
      "get": {
        "description": "Get live warmup analytics for a single mailbox.\n\nWraps the existing ``GET /warmup/{mailbox_id}/analytics`` flow so MCP\n(API-key auth) can read warmup engagement / reputation without going\nthrough cookie-based session auth.\n\nBehavior:\n    - Looks up the mailbox in the API user's org schema. 404 if missing\n      or deleted. Tenant isolation comes from the per-org schema bind,\n      NOT from a row-level predicate.\n    - Hits the configured warmup provider (Instantly or SmartLead) over\n      HTTP — slow (~300-800ms typical). For warm bulk reads use\n      ``list_mailboxes`` and check the cheap DB-level ``warmup_status``.\n    - Returns ``{success, warmup_enabled, provider, analytics, warmup_settings}``\n      — same shape as the internal /warmup/{id}/analytics endpoint.\n\nBackwards-compat: this is a brand-new route. The internal\n/warmup/{id}/analytics (cookie auth) is unchanged.\n\nHistorical bug (fixed 2026-05-24, same root cause as list_mailboxes\nabove): the previous implementation appended\n``(t.org_id = :org_id OR m.created_by = :user_id)`` to the WHERE. Both\nhalves match zero rows in prod — ``mailboxes.team_id`` is NULL on every\nrow (no team pinning) and ``mailboxes.created_by`` stores email strings,\nnot propelauth UUIDs. Result: every warmup-analytics call 404'd even\nfor mailboxes that ``list_mailboxes`` happily returned. Dropping the\npredicate restores parity; schema bind is the tenant boundary.",
        "operationId": "get_mailbox_warmup_analytics_mailboxes__mailbox_id__warmup_get",
        "parameters": [
          {
            "in": "path",
            "name": "mailbox_id",
            "required": true,
            "schema": {
              "title": "Mailbox Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Mailbox Warmup Analytics",
        "tags": [
          "GTM Context"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      }
    },
    "/marketplace/admin/analytics/funnel": {
      "get": {
        "description": "SDR supply-side conversion funnel for the given window.",
        "operationId": "admin_funnel_marketplace_admin_analytics_funnel_get",
        "parameters": [
          {
            "description": "YYYY-MM-DD",
            "in": "query",
            "name": "from",
            "required": true,
            "schema": {
              "description": "YYYY-MM-DD",
              "title": "From",
              "type": "string"
            }
          },
          {
            "description": "YYYY-MM-DD",
            "in": "query",
            "name": "to",
            "required": true,
            "schema": {
              "description": "YYYY-MM-DD",
              "title": "To",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_str__Any__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Section A — SDR supply funnel (platform admin only)",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:read",
        "x-graph8-tier": "read"
      }
    },
    "/marketplace/admin/analytics/hires": {
      "get": {
        "operationId": "admin_hires_marketplace_admin_analytics_hires_get",
        "parameters": [
          {
            "description": "YYYY-MM-DD",
            "in": "query",
            "name": "from",
            "required": true,
            "schema": {
              "description": "YYYY-MM-DD",
              "title": "From",
              "type": "string"
            }
          },
          {
            "description": "YYYY-MM-DD",
            "in": "query",
            "name": "to",
            "required": true,
            "schema": {
              "description": "YYYY-MM-DD",
              "title": "To",
              "type": "string"
            }
          },
          {
            "description": "day | week | month",
            "in": "query",
            "name": "group_by",
            "required": false,
            "schema": {
              "default": "month",
              "description": "day | week | month",
              "title": "Group By",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_str__Any__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Section C — hire conversion, termination, rehire metrics",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:read",
        "x-graph8-tier": "read"
      }
    },
    "/marketplace/admin/analytics/operational": {
      "get": {
        "operationId": "admin_operational_marketplace_admin_analytics_operational_get",
        "parameters": [
          {
            "description": "YYYY-MM-DD",
            "in": "query",
            "name": "from",
            "required": true,
            "schema": {
              "description": "YYYY-MM-DD",
              "title": "From",
              "type": "string"
            }
          },
          {
            "description": "YYYY-MM-DD",
            "in": "query",
            "name": "to",
            "required": true,
            "schema": {
              "description": "YYYY-MM-DD",
              "title": "To",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_str__Any__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Section F — operational health (SLAs, disputes, payouts)",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:read",
        "x-graph8-tier": "read"
      }
    },
    "/marketplace/admin/analytics/revenue": {
      "get": {
        "operationId": "admin_revenue_marketplace_admin_analytics_revenue_get",
        "parameters": [
          {
            "description": "YYYY-MM-DD",
            "in": "query",
            "name": "from",
            "required": true,
            "schema": {
              "description": "YYYY-MM-DD",
              "title": "From",
              "type": "string"
            }
          },
          {
            "description": "YYYY-MM-DD",
            "in": "query",
            "name": "to",
            "required": true,
            "schema": {
              "description": "YYYY-MM-DD",
              "title": "To",
              "type": "string"
            }
          },
          {
            "description": "day | week | month",
            "in": "query",
            "name": "group_by",
            "required": false,
            "schema": {
              "default": "month",
              "description": "day | week | month",
              "title": "Group By",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_str__Any__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Section D — GMV, net commission, money-loop distribution",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:read",
        "x-graph8-tier": "read"
      }
    },
    "/marketplace/applications/{application_id}": {
      "patch": {
        "description": "Move an applicant through the review pipeline (status = viewed /\nshortlisted / rejected / offer_sent / hired) or link a created hiring.",
        "operationId": "patch_marketplace_application_marketplace_applications__application_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "application_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Application Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationPatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_str__Any__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update an applicant (shortlist / reject / link a hiring)",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:run",
        "x-graph8-tier": "billable"
      }
    },
    "/marketplace/job-posts": {
      "get": {
        "description": "List every role this org has posted (any status), newest first.",
        "operationId": "list_marketplace_job_posts_marketplace_job_posts_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_str__Any__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List the calling org's job posts",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create an Open Role under the calling key's org. The role's title,\ndescription (the client's JD), criteria, comp, and openings live in the\nbody. Send ``status=\"published\"`` to go live to talent immediately, or\n``\"draft\"`` (default) to stage it and publish later via PATCH.",
        "operationId": "create_marketplace_job_post_marketplace_job_posts_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JobPostCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_str__Any__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create a marketplace job post (Open Role)",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:run",
        "x-graph8-tier": "billable"
      }
    },
    "/marketplace/job-posts/{post_id}": {
      "delete": {
        "description": "Hard-delete a role plus its applications and role-match scores. Use for\ndraft/test or obsolete roles.\n\nGuarded: if the role has applications, this 409s unless ``force=true`` — so\nan automated caller can't wipe an applicant inbox by mistake. Pass\n``?force=true`` to confirm deletion of a role that already has applicants.",
        "operationId": "delete_marketplace_job_post_marketplace_job_posts__post_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "post_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Post Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "force",
            "required": false,
            "schema": {
              "default": false,
              "title": "Force",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete a job post the org owns",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:delete",
        "x-graph8-tier": "destructive"
      },
      "get": {
        "operationId": "get_marketplace_job_post_marketplace_job_posts__post_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "post_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Post Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_str__Any__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get one job post the org owns",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:read",
        "x-graph8-tier": "read"
      },
      "patch": {
        "description": "Partial update. Any subset of the role fields may be sent; only provided\nfields change. Set ``status`` to move the role through\ndraft → published → paused → closed | filled.",
        "operationId": "update_marketplace_job_post_marketplace_job_posts__post_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "post_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Post Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JobPostUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_str__Any__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Edit a job post or change its status (publish/pause/close/filled)",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:run",
        "x-graph8-tier": "billable"
      }
    },
    "/marketplace/job-posts/{post_id}/applications": {
      "get": {
        "description": "Applicant inbox for a role — each applicant with their role-scoped\nmatch scorecard and status (viewed / shortlisted / rejected / offer_sent /\nhired). This is how graph8 tracks everyone who applied.",
        "operationId": "list_marketplace_job_post_applications_marketplace_job_posts__post_id__applications_get",
        "parameters": [
          {
            "in": "path",
            "name": "post_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Post Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_str__Any__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List applicants for a job post (applicant inbox)",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:read",
        "x-graph8-tier": "read"
      }
    },
    "/marketplace/me/connect/status": {
      "get": {
        "description": "Returns the caller's Stripe Connect account state, enriched with\nlive Stripe data and self-healing for missed webhooks.",
        "operationId": "get_my_connect_status_marketplace_me_connect_status_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MarketplaceConnectStatusResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get the caller's Stripe Connect onboarding status",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:read",
        "x-graph8-tier": "read"
      }
    },
    "/marketplace/me/hirings": {
      "get": {
        "description": "List active hiring contracts where the caller is the SDR side.",
        "operationId": "list_my_marketplace_hirings_marketplace_me_hirings_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MarketplaceHiringsResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List the caller's active marketplace hirings",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:read",
        "x-graph8-tier": "read"
      }
    },
    "/marketplace/me/invoices": {
      "get": {
        "operationId": "list_my_marketplace_invoices_marketplace_me_invoices_get",
        "parameters": [
          {
            "in": "query",
            "name": "invoice_status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Invoice Status"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MarketplaceInvoicesResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List the caller's marketplace invoices",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Submit a monthly invoice. Computes meeting count + amounts via the\nexisting ``CreateSdrInvoiceHandler``, transitions to ``pending``, and\nstarts the client's 5-calendar-day review window.",
        "operationId": "submit_my_invoice_marketplace_me_invoices_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitInvoiceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_str__Any__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Submit a monthly invoice for a hiring contract",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:run",
        "x-graph8-tier": "billable"
      }
    },
    "/marketplace/me/invoices/{invoice_id}/approve": {
      "post": {
        "description": "SDR-side approve. Transitions ``sdr_review`` → ``pending``, sets\n``submitted_at`` and a 5-day ``due_date``. After due_date the\nauto-charge task fires on the client. Different surface from\n``/marketplace/org/invoices/{id}/approve`` (which the client uses\nto release payment immediately).",
        "operationId": "approve_my_invoice_marketplace_me_invoices__invoice_id__approve_post",
        "parameters": [
          {
            "in": "path",
            "name": "invoice_id",
            "required": true,
            "schema": {
              "title": "Invoice Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_str__Any__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "SDR approves their own draft invoice (sdr_review → pending)",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:run",
        "x-graph8-tier": "billable"
      }
    },
    "/marketplace/me/meetings": {
      "get": {
        "description": "List the caller's meetings across all hirings. Personal API key only.",
        "operationId": "list_my_meetings_marketplace_me_meetings_get",
        "parameters": [
          {
            "description": "Optional: restrict to one hiring",
            "in": "query",
            "name": "hiring_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Optional: restrict to one hiring",
              "title": "Hiring Id"
            }
          },
          {
            "description": "scheduled | taken | rescheduled | missed | cancelled",
            "in": "query",
            "name": "meeting_status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "scheduled | taken | rescheduled | missed | cancelled",
              "title": "Meeting Status"
            }
          },
          {
            "description": "YYYY-MM-DD inclusive",
            "in": "query",
            "name": "start_date",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "YYYY-MM-DD inclusive",
              "title": "Start Date"
            }
          },
          {
            "description": "YYYY-MM-DD inclusive",
            "in": "query",
            "name": "end_date",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "YYYY-MM-DD inclusive",
              "title": "End Date"
            }
          },
          {
            "description": "Match contact name / email / notes",
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Match contact name / email / notes",
              "title": "Search"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 500,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MarketplaceMeetingsResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List the caller's meetings across all hirings",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:read",
        "x-graph8-tier": "read"
      }
    },
    "/marketplace/me/meetings/{meeting_id}": {
      "get": {
        "operationId": "get_my_meeting_marketplace_me_meetings__meeting_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "meeting_id",
            "required": true,
            "schema": {
              "title": "Meeting Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MarketplaceMeetingDetail_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get a single meeting (SDR side)",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:read",
        "x-graph8-tier": "read"
      },
      "patch": {
        "description": "Employee-side meeting edit — notes + contact info only.\n\nLifecycle fields (status, meeting_date, meeting_type, hiring_id) are\nintentionally NOT editable here. Those are client-owned via the\ncalendar-driven sync.",
        "operationId": "update_my_meeting_marketplace_me_meetings__meeting_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "meeting_id",
            "required": true,
            "schema": {
              "title": "Meeting Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMyMeetingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MarketplaceMeetingDetail_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update meeting notes + contact info (SDR side)",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:run",
        "x-graph8-tier": "billable"
      }
    },
    "/marketplace/me/offers": {
      "get": {
        "description": "List pending hire offers sent to the caller's SDR profile, enriched\nwith the hiring org's display name. Requires a personal API key.",
        "operationId": "list_my_marketplace_offers_marketplace_me_offers_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MarketplaceOffersResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List the caller's pending marketplace hire offers",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:read",
        "x-graph8-tier": "read"
      }
    },
    "/marketplace/me/offers/{hiring_id}/accept": {
      "post": {
        "description": "Accept a pending hire offer.\n\nDelegates to ``marketplace.self_service_router.accept_offer`` so the\nfull side-effect chain runs intact: hiring transitions to ``active``,\nthe hiring-fee invoice is created, the SDR gains PropelAuth membership\nin the client org (Member role; ``service_provider`` for commission-only\nhires), the client gets a notification, and the EDA event fires.\n\nRequires a personal API key — the underlying handler scopes ownership\nvia the SDR profile resolved from the caller's email.",
        "operationId": "accept_my_offer_marketplace_me_offers__hiring_id__accept_post",
        "parameters": [
          {
            "in": "path",
            "name": "hiring_id",
            "required": true,
            "schema": {
              "title": "Hiring Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_str__Any__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Accept a pending marketplace hire offer (SDR side)",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:run",
        "x-graph8-tier": "billable"
      }
    },
    "/marketplace/me/offers/{hiring_id}/reject": {
      "post": {
        "description": "Reject a pending hire offer. Notifies the client and flips the\nhiring row to ``rejected``.",
        "operationId": "reject_my_offer_marketplace_me_offers__hiring_id__reject_post",
        "parameters": [
          {
            "in": "path",
            "name": "hiring_id",
            "required": true,
            "schema": {
              "title": "Hiring Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_str__Any__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Reject a pending marketplace hire offer (SDR side)",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:run",
        "x-graph8-tier": "billable"
      }
    },
    "/marketplace/me/payout-account": {
      "get": {
        "description": "Get the caller's payout account (Stripe Connect / Wise / fallback).",
        "operationId": "get_my_payout_account_marketplace_me_payout_account_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MarketplacePayoutAccountResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get the caller's payout account status",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:read",
        "x-graph8-tier": "read"
      }
    },
    "/marketplace/me/profile": {
      "get": {
        "description": "Return the caller's own marketplace SDR profile + ``is_complete`` flag.\n\nRequires a *personal* API key. Org-scoped keys 404.",
        "operationId": "get_my_marketplace_profile_marketplace_me_profile_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MarketplaceProfileResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get the caller's marketplace SDR profile",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:read",
        "x-graph8-tier": "read"
      }
    },
    "/marketplace/org/hirings": {
      "get": {
        "description": "List active hiring contracts where the caller's org is the client.",
        "operationId": "list_org_marketplace_hirings_marketplace_org_hirings_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MarketplaceHiringsResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List active SDR hirings for the caller's org",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:read",
        "x-graph8-tier": "read"
      }
    },
    "/marketplace/org/hirings/{hiring_id}": {
      "get": {
        "description": "Get one hiring contract for the caller's org, enriched with SDR\nprofile metadata.",
        "operationId": "get_org_hiring_marketplace_org_hirings__hiring_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "hiring_id",
            "required": true,
            "schema": {
              "title": "Hiring Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_str__Any__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get one hiring contract (org side)",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:read",
        "x-graph8-tier": "read"
      }
    },
    "/marketplace/org/hirings/{hiring_id}/terminate": {
      "post": {
        "description": "Terminate an active hiring. The SDR still receives a final\nprorated invoice at the next monthly billing run covering work\nthrough the termination date.\n\nAuth: requires a personal API key whose user has the Admin or Owner\nrole in the calling org (``require_org_admin``). Org-scoped (machine)\nkeys are refused — see ``developer_api.dependencies.admin``. The\nrationale: termination ends a paid commercial relationship and is not\nreversible from this surface (the client must send a fresh hire offer\nto re-engage). Restricting the trigger to org admins matches the\norg's intent that contract lifecycle is a leadership-level decision.",
        "operationId": "terminate_org_hiring_marketplace_org_hirings__hiring_id__terminate_post",
        "parameters": [
          {
            "in": "path",
            "name": "hiring_id",
            "required": true,
            "schema": {
              "title": "Hiring Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_str__Any__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Terminate an active hiring contract (org side)",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:run",
        "x-graph8-tier": "billable"
      }
    },
    "/marketplace/org/hirings/{hiring_id}/withdraw": {
      "post": {
        "description": "Withdraw an offer the talent has not yet accepted (``pending_acceptance``).\n\nThe recovery path for an offer sent to the wrong talent or with wrong\nterms. Voids the contract envelope so it can no longer be signed. No\ninvoice is generated — an unsigned offer never created a billable\nrelationship. Returns 409 if the offer is already active (terminate it\ninstead) or already terminated.\n\nAuth mirrors terminate: a personal API key with Admin/Owner role in the\ncalling org (``require_org_admin``); org-scoped machine keys are refused.\nContract lifecycle stays a leadership-level decision.",
        "operationId": "withdraw_org_hiring_marketplace_org_hirings__hiring_id__withdraw_post",
        "parameters": [
          {
            "in": "path",
            "name": "hiring_id",
            "required": true,
            "schema": {
              "title": "Hiring Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_str__Any__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Withdraw a pending hiring offer (org side)",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:run",
        "x-graph8-tier": "billable"
      }
    },
    "/marketplace/org/invoices": {
      "get": {
        "description": "List invoices sent to the caller's org by marketplace SDRs.",
        "operationId": "list_org_marketplace_invoices_marketplace_org_invoices_get",
        "parameters": [
          {
            "in": "query",
            "name": "invoice_status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Invoice Status"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MarketplaceInvoicesResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List SDR invoices owed by the caller's org",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:read",
        "x-graph8-tier": "read"
      }
    },
    "/marketplace/org/invoices/{invoice_id}": {
      "get": {
        "description": "Get full detail for one invoice owed by the caller's org. Includes\nSDR profile + hiring contract context, so an agent can render the\nfull \"approve or dispute\" UI from a single call.",
        "operationId": "get_org_invoice_marketplace_org_invoices__invoice_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "invoice_id",
            "required": true,
            "schema": {
              "title": "Invoice Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_str__Any__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get one SDR invoice (org side)",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:read",
        "x-graph8-tier": "read"
      }
    },
    "/marketplace/org/invoices/{invoice_id}/approve": {
      "post": {
        "description": "Approve an SDR invoice and trigger immediate charge via Stripe.\n\nDelegates to ``marketplace.org_invoice_router.approve_invoice`` so the\n``ChargeInvoiceHandler`` runs intact: status flips to ``charged``,\nStripe processes the transfer to the SDR's Connect account, and the\nSDR gets a \"your invoice was approved\" notification.\n\nAuth: requires a personal API key whose user has the Admin or Owner\nrole in the calling org (``require_org_admin``). Org-scoped (machine)\nkeys are refused — see ``developer_api.dependencies.admin``. The\nrationale: this call fires an immediate Stripe charge on the org's\ndefault payment method. Letting a non-admin or a machine key trigger\nthat would be a meaningful surface for unintended debits.",
        "operationId": "approve_org_invoice_marketplace_org_invoices__invoice_id__approve_post",
        "parameters": [
          {
            "in": "path",
            "name": "invoice_id",
            "required": true,
            "schema": {
              "title": "Invoice Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_str__Any__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Approve an SDR invoice → triggers immediate Stripe charge",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:run",
        "x-graph8-tier": "billable"
      }
    },
    "/marketplace/org/invoices/{invoice_id}/dispute": {
      "post": {
        "description": "Dispute an SDR invoice. Must be in ``pending`` state and within the\ngrace period (the 5-calendar-day review window after submission).\n\nAuth: requires a personal API key whose user has the Admin or Owner\nrole in the calling org (``require_org_admin``). MBM PR #8575\nround-7 review flagged that ``dispute_org_invoice`` is marked\n``_DESTRUCTIVE`` at the MCP layer (\"decide deliberately\") but had\nno developer_api gate. We gate it here for the same reason it's\nDESTRUCTIVE in MCP: opening a dispute notifies the SDR, escalates to\nops for resolution, damages the engagement, and there is no\nun-dispute API. Sibling consistency with ``approve_org_invoice`` and\n``terminate_org_hiring`` — every destructive ``/org/*`` route\nrequires the same role.",
        "operationId": "dispute_org_invoice_marketplace_org_invoices__invoice_id__dispute_post",
        "parameters": [
          {
            "in": "path",
            "name": "invoice_id",
            "required": true,
            "schema": {
              "title": "Invoice Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisputeInvoiceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_str__Any__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Dispute an SDR invoice within the grace period",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:run",
        "x-graph8-tier": "billable"
      }
    },
    "/marketplace/talent": {
      "get": {
        "description": "Browse marketplace talent.\n\nReturns visible (complete + active) profiles, with the caller's\nalready-hired SDRs filtered out. Anonymous profiles are masked unless\nthe caller's org has previously hired them. Optional ``match_score``\nis merged in from the per-org talent-match cache.",
        "operationId": "browse_talent_marketplace_talent_get",
        "parameters": [
          {
            "in": "query",
            "name": "country_code",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Country Code"
            }
          },
          {
            "in": "query",
            "name": "payout_track",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Payout Track"
            }
          },
          {
            "description": "sdr | ae | gtm_engineer",
            "in": "query",
            "name": "role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "sdr | ae | gtm_engineer",
              "title": "Role"
            }
          },
          {
            "description": "open | limited | fully_booked",
            "in": "query",
            "name": "availability",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "open | limited | fully_booked",
              "title": "Availability"
            }
          },
          {
            "description": "Certification tier (TitleCase, case-sensitive). AE tiers: 'Top Performer' | 'Leadership-track' | 'Senior' | 'Solid' | 'Transition'. SDR tiers: 'Strategic' | 'Data-Driven' | 'Independent' | 'Disciplined'. Canonical list lives in marketplace/usecases/admin_analytics/_shared.py::KNOWN_TIERS. Any other value silently returns an empty result set — that's the underlying DB filter behaviour, not a bug here.",
            "in": "query",
            "name": "tier",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Certification tier (TitleCase, case-sensitive). AE tiers: 'Top Performer' | 'Leadership-track' | 'Senior' | 'Solid' | 'Transition'. SDR tiers: 'Strategic' | 'Data-Driven' | 'Independent' | 'Disciplined'. Canonical list lives in marketplace/usecases/admin_analytics/_shared.py::KNOWN_TIERS. Any other value silently returns an empty result set — that's the underlying DB filter behaviour, not a bug here.",
              "title": "Tier"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 5000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_str__Any__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Browse available SDR/AE/GTM marketplace profiles",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:read",
        "x-graph8-tier": "read"
      }
    },
    "/marketplace/talent/{sdr_id}": {
      "get": {
        "description": "Get one talent profile. Anonymous profiles stay masked unless the\ncaller's org has previously hired this SDR (permanent reveal). Emits\na ``profile_view`` funnel event.",
        "operationId": "get_talent_profile_marketplace_talent__sdr_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "sdr_id",
            "required": true,
            "schema": {
              "title": "Sdr Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_str__Any__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get one talent profile (masked unless already hired)",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:read",
        "x-graph8-tier": "read"
      }
    },
    "/marketplace/talent/{sdr_id}/hire": {
      "post": {
        "description": "Send a hire offer.\n\nDelegates to ``HireSdrHandler`` so the full chain runs intact:\nSdrHiring row is created in ``pending_acceptance`` state, the contract\nis generated + e-signed inside graph8, the client's T&C acceptance is\nstamped in the same transaction, the SDR receives a \"you have a new\noffer\" notification, and the EDA event fires.\n\n409 if the caller already has an active contract with this SDR.\n400 if ``accepted_terms`` is empty (terms_not_accepted).",
        "operationId": "hire_talent_marketplace_talent__sdr_id__hire_post",
        "parameters": [
          {
            "in": "path",
            "name": "sdr_id",
            "required": true,
            "schema": {
              "title": "Sdr Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HireSdrRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_str__Any__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Send a hire offer to a talent profile",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:run",
        "x-graph8-tier": "billable"
      }
    },
    "/marketplace/talent/{sdr_id}/match": {
      "get": {
        "description": "Get the cached match score for this org × this talent.\n\nIf no score exists yet, dispatches an async compute and returns\n``{\"status\": \"generating\"}`` with a ``202 Accepted``. Subsequent calls\nreturn the computed score (200) once the worker lands.",
        "operationId": "get_talent_match_marketplace_talent__sdr_id__match_get",
        "parameters": [
          {
            "in": "path",
            "name": "sdr_id",
            "required": true,
            "schema": {
              "title": "Sdr Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_str__Any__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get the cached talent-org match score",
        "tags": [
          "Marketplace"
        ],
        "x-graph8-scope": "marketplace:read",
        "x-graph8-tier": "read"
      }
    },
    "/mcp/connection": {
      "get": {
        "description": "MCP connection facts for the authenticated org.\n\nTotal by construction: any tenant-schema trouble (table not yet created for\na brand-new org, transient DB error) answers the zero shape with\n``determined=False`` instead of 500 — the caller's collectors treat this\nroute as best-effort, and the flag keeps a DB blip from reading as positive\nnever-connected evidence.",
        "operationId": "get_mcp_connection_mcp_connection_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_McpConnectionStatus_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Mcp Connection",
        "tags": [
          "MCP"
        ],
        "x-graph8-scope": "account:read",
        "x-graph8-tier": "read"
      }
    },
    "/me": {
      "get": {
        "description": "Describe the API key making this call, and what it can reach.\n\nReturns the caller's OWN credential only. There is no disclosure boundary\ncrossed: the client already holds this key, and every field here is derived\nfrom it.",
        "operationId": "describe_current_key_me_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Describe Current Key",
        "tags": [
          "Me"
        ]
      }
    },
    "/newsletters": {
      "get": {
        "description": "List all newsletters for the org.",
        "operationId": "list_newsletters_newsletters_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Newsletters",
        "tags": [
          "Newsletter"
        ],
        "x-graph8-scope": "newsletter:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create a new newsletter (the parent container issues live under).",
        "operationId": "create_newsletter_newsletters_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewsletterCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_NewsletterDetail_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Newsletter",
        "tags": [
          "Newsletter"
        ],
        "x-graph8-scope": "newsletter:run",
        "x-graph8-tier": "external"
      }
    },
    "/newsletters/templates": {
      "get": {
        "description": "List org-level newsletter templates (reusable HTML scaffolds).",
        "operationId": "list_templates_newsletters_templates_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Templates",
        "tags": [
          "Newsletter"
        ],
        "x-graph8-scope": "newsletter:read",
        "x-graph8-tier": "read"
      }
    },
    "/newsletters/{newsletter_id}": {
      "get": {
        "description": "Get a single newsletter.",
        "operationId": "get_newsletter_newsletters__newsletter_id__get",
        "parameters": [
          {
            "description": "Newsletter UUID",
            "in": "path",
            "name": "newsletter_id",
            "required": true,
            "schema": {
              "description": "Newsletter UUID",
              "format": "uuid",
              "title": "Newsletter Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_NewsletterDetail_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Newsletter",
        "tags": [
          "Newsletter"
        ],
        "x-graph8-scope": "newsletter:read",
        "x-graph8-tier": "read"
      }
    },
    "/newsletters/{newsletter_id}/issues": {
      "get": {
        "description": "List all issues for a newsletter.",
        "operationId": "list_issues_newsletters__newsletter_id__issues_get",
        "parameters": [
          {
            "description": "Newsletter UUID",
            "in": "path",
            "name": "newsletter_id",
            "required": true,
            "schema": {
              "description": "Newsletter UUID",
              "format": "uuid",
              "title": "Newsletter Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Issues",
        "tags": [
          "Newsletter"
        ],
        "x-graph8-scope": "newsletter:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create a draft newsletter issue.",
        "operationId": "create_issue_newsletters__newsletter_id__issues_post",
        "parameters": [
          {
            "description": "Newsletter UUID",
            "in": "path",
            "name": "newsletter_id",
            "required": true,
            "schema": {
              "description": "Newsletter UUID",
              "format": "uuid",
              "title": "Newsletter Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IssueCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IssueDetail_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Issue",
        "tags": [
          "Newsletter"
        ],
        "x-graph8-scope": "newsletter:run",
        "x-graph8-tier": "external"
      }
    },
    "/newsletters/{newsletter_id}/issues/{issue_id}": {
      "get": {
        "description": "Get a single newsletter issue with stats.",
        "operationId": "get_issue_newsletters__newsletter_id__issues__issue_id__get",
        "parameters": [
          {
            "description": "Newsletter UUID",
            "in": "path",
            "name": "newsletter_id",
            "required": true,
            "schema": {
              "description": "Newsletter UUID",
              "format": "uuid",
              "title": "Newsletter Id",
              "type": "string"
            }
          },
          {
            "description": "Issue id",
            "in": "path",
            "name": "issue_id",
            "required": true,
            "schema": {
              "description": "Issue id",
              "title": "Issue Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IssueDetail_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Issue",
        "tags": [
          "Newsletter"
        ],
        "x-graph8-scope": "newsletter:read",
        "x-graph8-tier": "read"
      },
      "put": {
        "description": "Update a draft issue in place. Only fields sent are changed. Rejects\nwith 400 for issues no longer in a draft-editable state (mirrors the\ninternal handler's own ValueError -> 400 mapping).",
        "operationId": "update_issue_newsletters__newsletter_id__issues__issue_id__put",
        "parameters": [
          {
            "description": "Newsletter UUID",
            "in": "path",
            "name": "newsletter_id",
            "required": true,
            "schema": {
              "description": "Newsletter UUID",
              "format": "uuid",
              "title": "Newsletter Id",
              "type": "string"
            }
          },
          {
            "description": "Issue id",
            "in": "path",
            "name": "issue_id",
            "required": true,
            "schema": {
              "description": "Issue id",
              "title": "Issue Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IssueUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IssueDetail_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Issue",
        "tags": [
          "Newsletter"
        ],
        "x-graph8-scope": "newsletter:run",
        "x-graph8-tier": "external"
      }
    },
    "/newsletters/{newsletter_id}/issues/{issue_id}/analytics/kpis": {
      "get": {
        "description": "Bucketed KPI counters for a sent issue (opens, clicks, bounces, ...).\n\nHonors the stale-flag pattern: a backend read failure returns HTTP 200\nwith ``stale=true`` and an empty ``kpis`` bucket rather than a 500, so\ncallers can distinguish \"genuinely zero engagement yet\" from \"read\nfailed\" without a try/except.",
        "operationId": "get_issue_analytics_kpis_newsletters__newsletter_id__issues__issue_id__analytics_kpis_get",
        "parameters": [
          {
            "description": "Newsletter UUID",
            "in": "path",
            "name": "newsletter_id",
            "required": true,
            "schema": {
              "description": "Newsletter UUID",
              "format": "uuid",
              "title": "Newsletter Id",
              "type": "string"
            }
          },
          {
            "description": "Issue id",
            "in": "path",
            "name": "issue_id",
            "required": true,
            "schema": {
              "description": "Issue id",
              "title": "Issue Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IssueAnalyticsKpis_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Issue Analytics Kpis",
        "tags": [
          "Newsletter"
        ],
        "x-graph8-scope": "newsletter:read",
        "x-graph8-tier": "read"
      }
    },
    "/newsletters/{newsletter_id}/issues/{issue_id}/duplicate": {
      "post": {
        "description": "Duplicate any issue as a new draft.",
        "operationId": "duplicate_issue_newsletters__newsletter_id__issues__issue_id__duplicate_post",
        "parameters": [
          {
            "description": "Newsletter UUID",
            "in": "path",
            "name": "newsletter_id",
            "required": true,
            "schema": {
              "description": "Newsletter UUID",
              "format": "uuid",
              "title": "Newsletter Id",
              "type": "string"
            }
          },
          {
            "description": "Source issue id (any status)",
            "in": "path",
            "name": "issue_id",
            "required": true,
            "schema": {
              "description": "Source issue id (any status)",
              "title": "Issue Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IssueDetail_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Duplicate Issue",
        "tags": [
          "Newsletter"
        ],
        "x-graph8-scope": "newsletter:run",
        "x-graph8-tier": "external"
      }
    },
    "/newsletters/{newsletter_id}/issues/{issue_id}/send": {
      "post": {
        "description": "Enqueue or schedule a newsletter issue for sending.\n\n202 Accepted: the request is validated and handed to the send worker\n(or persisted as scheduled) — actual SES delivery happens\nasynchronously. Poll ``g8_newsletter_get_issue`` to observe completion.\n``scheduled_at`` omitted/null sends immediately; a malformed\n``scheduled_at`` string returns 422 (not 500).",
        "operationId": "send_issue_newsletters__newsletter_id__issues__issue_id__send_post",
        "parameters": [
          {
            "description": "Newsletter UUID",
            "in": "path",
            "name": "newsletter_id",
            "required": true,
            "schema": {
              "description": "Newsletter UUID",
              "format": "uuid",
              "title": "Newsletter Id",
              "type": "string"
            }
          },
          {
            "description": "Issue id",
            "in": "path",
            "name": "issue_id",
            "required": true,
            "schema": {
              "description": "Issue id",
              "title": "Issue Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IssueSendRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Send Issue",
        "tags": [
          "Newsletter"
        ],
        "x-graph8-scope": "newsletter:run",
        "x-graph8-tier": "external"
      }
    },
    "/newsletters/{newsletter_id}/issues/{issue_id}/send-test": {
      "post": {
        "description": "Send a test email for a newsletter issue to a single address.",
        "operationId": "send_test_email_newsletters__newsletter_id__issues__issue_id__send_test_post",
        "parameters": [
          {
            "description": "Newsletter UUID",
            "in": "path",
            "name": "newsletter_id",
            "required": true,
            "schema": {
              "description": "Newsletter UUID",
              "format": "uuid",
              "title": "Newsletter Id",
              "type": "string"
            }
          },
          {
            "description": "Issue id",
            "in": "path",
            "name": "issue_id",
            "required": true,
            "schema": {
              "description": "Issue id",
              "title": "Issue Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IssueSendTestRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Send Test Email",
        "tags": [
          "Newsletter"
        ],
        "x-graph8-scope": "newsletter:run",
        "x-graph8-tier": "external"
      }
    },
    "/newsletters/{newsletter_id}/subscribers": {
      "get": {
        "description": "Paginated subscriber list for a newsletter.",
        "operationId": "list_subscribers_newsletters__newsletter_id__subscribers_get",
        "parameters": [
          {
            "description": "Newsletter UUID",
            "in": "path",
            "name": "newsletter_id",
            "required": true,
            "schema": {
              "description": "Newsletter UUID",
              "format": "uuid",
              "title": "Newsletter Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "default": 25,
              "maximum": 100,
              "minimum": 1,
              "title": "Page Size",
              "type": "integer"
            }
          },
          {
            "description": "Free-text search over email/name",
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Free-text search over email/name",
              "title": "Search"
            }
          },
          {
            "description": "Comma-separated status filter (e.g. 'subscribed,bounced')",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma-separated status filter (e.g. 'subscribed,bounced')",
              "title": "Status"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_SubscriberListResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Subscribers",
        "tags": [
          "Newsletter"
        ],
        "x-graph8-scope": "newsletter:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Add a single subscriber (staff action, status=subscribed). Also\ncreates/links a first-class CRM contact so the subscriber joins the\ncentral suppression model (mirrors the manual public subscribe form).",
        "operationId": "add_subscriber_newsletters__newsletter_id__subscribers_post",
        "parameters": [
          {
            "description": "Newsletter UUID",
            "in": "path",
            "name": "newsletter_id",
            "required": true,
            "schema": {
              "description": "Newsletter UUID",
              "format": "uuid",
              "title": "Newsletter Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubscriberAddRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_SubscriberSummary_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add Subscriber",
        "tags": [
          "Newsletter"
        ],
        "x-graph8-scope": "newsletter:run",
        "x-graph8-tier": "external"
      }
    },
    "/newsletters/{newsletter_id}/subscribers/{subscriber_id}/unsubscribe": {
      "patch": {
        "description": "Soft-unsubscribe a subscriber (sets status, preserves the row —\ndoes NOT hard-delete).",
        "operationId": "unsubscribe_subscriber_newsletters__newsletter_id__subscribers__subscriber_id__unsubscribe_patch",
        "parameters": [
          {
            "description": "Newsletter UUID",
            "in": "path",
            "name": "newsletter_id",
            "required": true,
            "schema": {
              "description": "Newsletter UUID",
              "format": "uuid",
              "title": "Newsletter Id",
              "type": "string"
            }
          },
          {
            "description": "Subscriber id",
            "in": "path",
            "name": "subscriber_id",
            "required": true,
            "schema": {
              "description": "Subscriber id",
              "title": "Subscriber Id",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Unsubscribe Subscriber",
        "tags": [
          "Newsletter"
        ],
        "x-graph8-scope": "newsletter:run",
        "x-graph8-tier": "external"
      }
    },
    "/notes/{note_id}": {
      "delete": {
        "description": "Delete a note.",
        "operationId": "delete_note_notes__note_id__delete",
        "parameters": [
          {
            "description": "Note ID",
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "description": "Note ID",
              "title": "Note Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Note",
        "tags": [
          "Notes"
        ],
        "x-graph8-scope": "notes:delete",
        "x-graph8-tier": "destructive"
      },
      "patch": {
        "description": "Update a note's content.",
        "operationId": "update_note_notes__note_id__patch",
        "parameters": [
          {
            "description": "Note ID",
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "description": "Note ID",
              "title": "Note Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NoteUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_NoteResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Note",
        "tags": [
          "Notes"
        ],
        "x-graph8-scope": "notes:write",
        "x-graph8-tier": "write"
      }
    },
    "/opensearch/aggregate": {
      "post": {
        "description": "Generic, allowlist-bounded GROUP BY over a whitelisted mashup index.\n\nTranslates ``group_by`` into nested OpenSearch ``terms`` aggregations with\nmetric sub-aggs, then applies ``having`` / ``sort`` / ``limit`` to the\nflattened groups. This is the matrix-walk primitive for TAM design (e.g.\ncount companies by NAICS x state x employee band in one call).\n\nGuardrails: group_by depth is capped at 3, per-level bucket size tapers by\ndepth (``_AGG_TERMS_SIZE_BY_DEPTH``), the agg list is capped at 10, and\nreturned groups at ``limit`` (<=1000). Counts from ``terms`` /\n``cardinality`` are APPROXIMATE on a sharded index. Since\n``mashup_companies``/``mashup_contacts`` share one contact-grained index,\nuse ``uniqExact`` on ``COMPANY_ID`` for true unique-company counts. Mashup\naggregations automatically apply the organization's deliverability policy.",
        "operationId": "opensearch_aggregate_opensearch_aggregate_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenSearchAggregateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_OpenSearchAggregateResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Opensearch Aggregate",
        "tags": [
          "OpenSearch"
        ],
        "x-graph8-scope": "search:write",
        "x-graph8-tier": "write"
      }
    },
    "/opensearch/count": {
      "post": {
        "description": "Exact match count for one of the whitelisted mashup indices.\n\nSame ``index`` + ``filters`` shape as ``/opensearch/search`` but returns\nonly the count via the native OpenSearch ``_count`` API, so it is NOT\ncapped at the 10000 ``track_total_hits`` ceiling that ``/search``'s\n``total`` saturates at. This is the right call for TAM cell-sizing.\n\nNote: ``mashup_companies`` and ``mashup_contacts`` are the same physical,\ncontact-grained index — a count over ``mashup_companies`` counts contact\nrows, not unique companies. For a unique-company total use\n``/opensearch/aggregate`` with ``uniqExact`` on ``COMPANY_ID``. Mashup\ncounts automatically apply the organization's deliverability policy.",
        "operationId": "opensearch_count_opensearch_count_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenSearchCountRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_OpenSearchCountResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Opensearch Count",
        "tags": [
          "OpenSearch"
        ],
        "x-graph8-scope": "search:write",
        "x-graph8-tier": "write"
      }
    },
    "/opensearch/resolve": {
      "post": {
        "description": "Bulk HEM -> CONTACT_ID or IP -> COMPANY_ID resolution.\n\nBacked by the existing ``MashupService`` which already batches the OpenSearch\nrequest in chunks of 10k. Returns a dense ``{input: matched_id | null}``\nmapping so the caller can iterate the inputs without re-querying for misses.",
        "operationId": "opensearch_resolve_opensearch_resolve_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenSearchResolveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_OpenSearchResolveResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Opensearch Resolve",
        "tags": [
          "OpenSearch"
        ],
        "x-graph8-scope": "search:write",
        "x-graph8-tier": "write"
      }
    },
    "/opensearch/search": {
      "post": {
        "description": "Structured search across one of the whitelisted mashup OpenSearch indices.\n\nUse this when the LLM needs to look up enriched person / company records\nby attribute (domain, industry, country, hem). For the hot HEM-or-IP\nresolve path, prefer ``/opensearch/resolve`` — it's a single round trip\nand friendlier to cache. Contact/company mashup searches automatically\napply the authenticated organization's deliverability protection policy.",
        "operationId": "opensearch_search_opensearch_search_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenSearchSearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_OpenSearchSearchResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Opensearch Search",
        "tags": [
          "OpenSearch"
        ],
        "x-graph8-scope": "search:write",
        "x-graph8-tier": "write"
      }
    },
    "/personas": {
      "get": {
        "description": "List campaign-builder personas for the authenticated organization.",
        "operationId": "list_personas_personas_get",
        "parameters": [
          {
            "description": "Filter by persona status",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by persona status",
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_dict__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Personas",
        "tags": [
          "GTM Context"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create a Studio buyer persona (manual - no AI generation).\n\nRead-side counterpart already exists (``GET /personas``); this closes the\n\"read but can't create\" gap for the Persona bucket. The new persona is created\nwith status 'active' and returned in the same shape as ``GET /personas``.",
        "operationId": "create_persona_personas_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonaRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Persona",
        "tags": [
          "GTM Context"
        ],
        "x-graph8-scope": "campaigns:write",
        "x-graph8-tier": "write"
      }
    },
    "/personas/{persona_id}": {
      "patch": {
        "description": "Update a Studio persona's fields and/or status (partial update).\n\nSend at least one field. Passing ``status='archived'`` is equivalent to\n``POST /personas/{persona_id}/archive``. Returns 400 if no field is provided,\n404 if the persona does not exist in this org.",
        "operationId": "update_persona_personas__persona_id__patch",
        "parameters": [
          {
            "description": "Persona ID (UUID)",
            "in": "path",
            "name": "persona_id",
            "required": true,
            "schema": {
              "description": "Persona ID (UUID)",
              "title": "Persona Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePersonaRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Persona",
        "tags": [
          "GTM Context"
        ],
        "x-graph8-scope": "campaigns:write",
        "x-graph8-tier": "write"
      }
    },
    "/personas/{persona_id}/archive": {
      "post": {
        "description": "Archive a Studio persona (soft delete - sets status='archived').\n\nArchived personas drop out of the default ``GET /personas`` listing but remain\nfetchable via ``?status=archived``. Returns 404 if the persona does not exist.",
        "operationId": "archive_persona_personas__persona_id__archive_post",
        "parameters": [
          {
            "description": "Persona ID (UUID)",
            "in": "path",
            "name": "persona_id",
            "required": true,
            "schema": {
              "description": "Persona ID (UUID)",
              "title": "Persona Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Archive Persona",
        "tags": [
          "GTM Context"
        ],
        "x-graph8-scope": "campaigns:delete",
        "x-graph8-tier": "destructive"
      }
    },
    "/pipelines": {
      "get": {
        "description": "List all deal pipelines for the org, with stages including v2 fields.",
        "operationId": "list_pipelines_pipelines_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_PipelineResponse__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Pipelines",
        "tags": [
          "CLI Pipelines"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create a new pipeline, auto-seeded with the appropriate target's default stages.",
        "operationId": "create_pipeline_pipelines_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PipelineCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PipelineResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Pipeline",
        "tags": [
          "CLI Pipelines"
        ],
        "x-graph8-scope": "campaigns:write",
        "x-graph8-tier": "write"
      }
    },
    "/pipelines/evidence-library": {
      "get": {
        "description": "Return the canonical 8 stage evidence keys + human-readable labels.",
        "operationId": "list_stage_evidence_library_pipelines_evidence_library_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_dict__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Stage Evidence Library",
        "tags": [
          "CLI Pipelines"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      }
    },
    "/pipelines/from-suggestion": {
      "post": {
        "description": "Persist a (possibly edited) PipelineSuggestion as a real pipeline.\n\nValidates evidence keys against STAGE_EVIDENCE_LIBRARY, sanitizes\nchannel_scripts, and creates the pipeline + stages atomically. No\ndedup — the caller is responsible for not posting the same draft twice.",
        "operationId": "create_pipeline_from_suggestion_pipelines_from_suggestion_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "title": "Suggestion",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Pipeline From Suggestion",
        "tags": [
          "CLI Pipelines"
        ],
        "x-graph8-scope": "campaigns:write",
        "x-graph8-tier": "write"
      }
    },
    "/pipelines/suggest": {
      "post": {
        "description": "Generate an AI-suggested pipeline draft grounded in the org's global context.\n\nReturns the draft dict (PipelineSuggestion shape) — does NOT persist.\nCharges credits at the g8_t2 (Sonnet) tier per call. On Anthropic API\nfailure or empty global context, returns a generic target-appropriate\nfallback with `context_sources: []`.",
        "operationId": "suggest_pipeline_pipelines_suggest_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SuggestRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Suggest Pipeline",
        "tags": [
          "CLI Pipelines"
        ],
        "x-graph8-scope": "campaigns:run",
        "x-graph8-tier": "billable"
      }
    },
    "/pipelines/{pipeline_id}": {
      "delete": {
        "description": "Delete a pipeline. Fails if it has deals or is the org's only pipeline.",
        "operationId": "delete_pipeline_pipelines__pipeline_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "pipeline_id",
            "required": true,
            "schema": {
              "title": "Pipeline Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Pipeline",
        "tags": [
          "CLI Pipelines"
        ],
        "x-graph8-scope": "campaigns:delete",
        "x-graph8-tier": "destructive"
      },
      "get": {
        "description": "Get one pipeline by ID, with stages including v2 fields.",
        "operationId": "get_pipeline_pipelines__pipeline_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "pipeline_id",
            "required": true,
            "schema": {
              "title": "Pipeline Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PipelineResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Pipeline",
        "tags": [
          "CLI Pipelines"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      },
      "put": {
        "description": "Rename, retarget, and/or promote a pipeline to default.",
        "operationId": "update_pipeline_pipelines__pipeline_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "pipeline_id",
            "required": true,
            "schema": {
              "title": "Pipeline Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PipelineUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PipelineResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Pipeline",
        "tags": [
          "CLI Pipelines"
        ],
        "x-graph8-scope": "campaigns:write",
        "x-graph8-tier": "write"
      }
    },
    "/pipelines/{pipeline_id}/stages": {
      "post": {
        "description": "Add a new stage to a pipeline, with v2 checklist + scripts fields.",
        "operationId": "create_stage_pipelines__pipeline_id__stages_post",
        "parameters": [
          {
            "in": "path",
            "name": "pipeline_id",
            "required": true,
            "schema": {
              "title": "Pipeline Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StageCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PipelineStageResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Stage",
        "tags": [
          "CLI Pipelines"
        ],
        "x-graph8-scope": "campaigns:write",
        "x-graph8-tier": "write"
      }
    },
    "/pipelines/{pipeline_id}/stages/reorder": {
      "put": {
        "description": "Reorder stages by passing the full ordered list of stage IDs.",
        "operationId": "reorder_stages_pipelines__pipeline_id__stages_reorder_put",
        "parameters": [
          {
            "in": "path",
            "name": "pipeline_id",
            "required": true,
            "schema": {
              "title": "Pipeline Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StageReorderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_PipelineStageResponse__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Reorder Stages",
        "tags": [
          "CLI Pipelines"
        ],
        "x-graph8-scope": "campaigns:write",
        "x-graph8-tier": "write"
      }
    },
    "/pipelines/{pipeline_id}/stages/{stage_id}": {
      "delete": {
        "description": "Delete a stage. Fails if it has deals or pipeline would drop below 2 stages.",
        "operationId": "delete_stage_pipelines__pipeline_id__stages__stage_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "pipeline_id",
            "required": true,
            "schema": {
              "title": "Pipeline Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "stage_id",
            "required": true,
            "schema": {
              "title": "Stage Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Stage",
        "tags": [
          "CLI Pipelines"
        ],
        "x-graph8-scope": "campaigns:delete",
        "x-graph8-tier": "destructive"
      },
      "put": {
        "description": "Update a stage. All parameters optional.",
        "operationId": "update_stage_pipelines__pipeline_id__stages__stage_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "pipeline_id",
            "required": true,
            "schema": {
              "title": "Pipeline Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "stage_id",
            "required": true,
            "schema": {
              "title": "Stage Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StageUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PipelineStageResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Stage",
        "tags": [
          "CLI Pipelines"
        ],
        "x-graph8-scope": "campaigns:write",
        "x-graph8-tier": "write"
      }
    },
    "/public/copilot/chat": {
      "post": {
        "description": "Send a message to the graph8 copilot using write key auth.\n\nThis is a simplified, non-streaming version for the SDK widget.\nResponses come from the org's knowledge base (global context docs,\nbrand brief, FAQs, etc.) — no admin tools are available.\n\nUsed by g8.copilot.ask().",
        "operationId": "public_copilot_chat_public_copilot_chat_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-Write-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Write-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCopilotRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PublicCopilotResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Public Copilot Chat",
        "tags": [
          "Public - Copilot"
        ]
      }
    },
    "/public/enrich/lookup": {
      "post": {
        "description": "Look up a contact by email using write key authentication.\n\nUsed by the <G8Form /> progressive form component to determine which\nfields graph8 already knows (and can hide) vs which fields to ask the user.\n\nSearches the mashup (OpenSearch) index for enrichment data.",
        "operationId": "public_enrich_lookup_public_enrich_lookup_post",
        "parameters": [
          {
            "in": "header",
            "name": "X-Write-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Write-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicEnrichRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PublicEnrichResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Public Enrich Lookup",
        "tags": [
          "Public"
        ]
      }
    },
    "/public/signals/company": {
      "get": {
        "description": "Get intent signals for a company domain.\n\nAnalyzes visitor behavior from the org's ClickHouse events to determine\nbuying intent. Used by g8.signals.company().",
        "operationId": "public_signals_company_public_signals_company_get",
        "parameters": [
          {
            "in": "query",
            "name": "domain",
            "required": true,
            "schema": {
              "title": "Domain",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Write-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Write-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IntentSignalsResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Public Signals Company",
        "tags": [
          "Public - Signals"
        ]
      }
    },
    "/public/visitors/company": {
      "get": {
        "description": "Resolve the current visitor's IP address to a company.\n\nUses the ip_2_company ClickHouse table to identify which company\nthe visitor belongs to based on their IP address. Used by g8.visitors.identify().",
        "operationId": "public_visitor_company_public_visitors_company_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-Write-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Write-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_VisitorCompanyResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Public Visitor Company",
        "tags": [
          "Public - Visitors"
        ]
      }
    },
    "/public/visitors/score": {
      "get": {
        "description": "Get engagement score for the current visitor.\n\nScores are based on page views, time on site, and actions taken.\nUsed by g8.visitors.score().",
        "operationId": "public_visitor_score_public_visitors_score_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-Write-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Write-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_VisitorScoreResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Public Visitor Score",
        "tags": [
          "Public - Visitors"
        ]
      }
    },
    "/quotable-products": {
      "get": {
        "description": "List products available for quote line items (Stripe catalog + org manual catalog).",
        "operationId": "list_quotable_products_quotable_products_get",
        "parameters": [
          {
            "description": "Filter prices to this currency code (e.g. USD)",
            "in": "query",
            "name": "currency",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 3,
                  "minLength": 3,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter prices to this currency code (e.g. USD)",
              "title": "Currency"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 500,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_QuotableProductsResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Quotable Products",
        "tags": [
          "Quotes"
        ],
        "x-graph8-scope": "quotes:read",
        "x-graph8-tier": "read"
      }
    },
    "/quote-settings": {
      "get": {
        "description": "Get org quote settings (branding, default terms, sender identity).\n\nAuto-creates default settings if none exist for the org.",
        "operationId": "get_quote_settings_quote_settings_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_QuoteSettingsResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Quote Settings",
        "tags": [
          "Quotes"
        ],
        "x-graph8-scope": "quotes:read",
        "x-graph8-tier": "read"
      }
    },
    "/quotes": {
      "get": {
        "description": "List quotes for the org with optional status / company / deal / owner filters.",
        "operationId": "list_quotes_quotes_get",
        "parameters": [
          {
            "description": "Filter by quote status: draft, sent, viewed, accepted, declined, voided, expired",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by quote status: draft, sent, viewed, accepted, declined, voided, expired",
              "title": "Status"
            }
          },
          {
            "description": "Filter quotes for a specific company",
            "in": "query",
            "name": "mashup_company_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter quotes for a specific company",
              "title": "Mashup Company Id"
            }
          },
          {
            "description": "Filter quotes linked to a specific deal (UUID)",
            "in": "query",
            "name": "deal_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter quotes linked to a specific deal (UUID)",
              "title": "Deal Id"
            }
          },
          {
            "description": "Filter quotes owned by a specific user (email)",
            "in": "query",
            "name": "owner_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter quotes owned by a specific user (email)",
              "title": "Owner Id"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_QuoteListResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Quotes",
        "tags": [
          "Quotes"
        ],
        "x-graph8-scope": "quotes:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create a new quote in `draft` status. Always creates — never sends.",
        "operationId": "create_quote_quotes_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_QuoteDetail_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Quote",
        "tags": [
          "Quotes"
        ],
        "x-graph8-scope": "quotes:run",
        "x-graph8-tier": "external"
      }
    },
    "/quotes/{quote_id}": {
      "delete": {
        "description": "Delete a draft quote. 400s on any non-draft status (legal-record preservation).",
        "operationId": "delete_quote_quotes__quote_id__delete",
        "parameters": [
          {
            "description": "Quote UUID",
            "in": "path",
            "name": "quote_id",
            "required": true,
            "schema": {
              "description": "Quote UUID",
              "title": "Quote Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Quote",
        "tags": [
          "Quotes"
        ],
        "x-graph8-scope": "quotes:delete",
        "x-graph8-tier": "destructive"
      },
      "get": {
        "description": "Get full quote detail: line items, activity log, envelope tracking, resolved contact/company names.",
        "operationId": "get_quote_quotes__quote_id__get",
        "parameters": [
          {
            "description": "Quote UUID",
            "in": "path",
            "name": "quote_id",
            "required": true,
            "schema": {
              "description": "Quote UUID",
              "title": "Quote Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_QuoteDetail_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Quote",
        "tags": [
          "Quotes"
        ],
        "x-graph8-scope": "quotes:read",
        "x-graph8-tier": "read"
      },
      "patch": {
        "description": "Update a quote in place (``PUT`` or ``PATCH`` — both accepted).\n\nAll fields are optional; only the ones you send change. Draft quotes edit\ndirectly. A ``sent`` / ``viewed`` quote is recalled to draft first (voiding\nits live signing link) while keeping the same row + quote number; terminal\nquotes (accepted/declined/voided/expired) reject the update.\n\n``owner_id`` reassigns the quote's AE (a blank value is ignored — it never\nnulls an existing owner). ``billing_legal_name`` / ``billing_email`` /\n``billing_primary_email`` / ``billing_address`` set the customer's billing\nidentity. Passing ``line_items`` replaces the entire line-item set (and\nre-runs quotable-product authorization). Totals recalculate automatically.",
        "operationId": "update_quote_quotes__quote_id__patch",
        "parameters": [
          {
            "description": "Quote UUID",
            "in": "path",
            "name": "quote_id",
            "required": true,
            "schema": {
              "description": "Quote UUID",
              "title": "Quote Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_QuoteDetail_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Quote",
        "tags": [
          "Quotes"
        ],
        "x-graph8-scope": "quotes:run",
        "x-graph8-tier": "external"
      },
      "put": {
        "description": "Update a quote in place (``PUT`` or ``PATCH`` — both accepted).\n\nAll fields are optional; only the ones you send change. Draft quotes edit\ndirectly. A ``sent`` / ``viewed`` quote is recalled to draft first (voiding\nits live signing link) while keeping the same row + quote number; terminal\nquotes (accepted/declined/voided/expired) reject the update.\n\n``owner_id`` reassigns the quote's AE (a blank value is ignored — it never\nnulls an existing owner). ``billing_legal_name`` / ``billing_email`` /\n``billing_primary_email`` / ``billing_address`` set the customer's billing\nidentity. Passing ``line_items`` replaces the entire line-item set (and\nre-runs quotable-product authorization). Totals recalculate automatically.",
        "operationId": "update_quote_quotes__quote_id__put",
        "parameters": [
          {
            "description": "Quote UUID",
            "in": "path",
            "name": "quote_id",
            "required": true,
            "schema": {
              "description": "Quote UUID",
              "title": "Quote Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_QuoteDetail_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Quote",
        "tags": [
          "Quotes"
        ],
        "x-graph8-scope": "quotes:run",
        "x-graph8-tier": "external"
      }
    },
    "/quotes/{quote_id}/duplicate": {
      "post": {
        "description": "Clone any quote into a new draft. Title gets ``(Copy)`` suffix.",
        "operationId": "duplicate_quote_quotes__quote_id__duplicate_post",
        "parameters": [
          {
            "description": "Source quote UUID (any status)",
            "in": "path",
            "name": "quote_id",
            "required": true,
            "schema": {
              "description": "Source quote UUID (any status)",
              "title": "Quote Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_QuoteDetail_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Duplicate Quote",
        "tags": [
          "Quotes"
        ],
        "x-graph8-scope": "quotes:run",
        "x-graph8-tier": "external"
      }
    },
    "/quotes/{quote_id}/edit-as-draft": {
      "post": {
        "description": "Convert a sent quote back into an editable draft via void+clone.\n\nVoids the existing signing envelope (so the recipient's link stops\nresolving), marks the source ``voided``, and creates a fresh ``draft``\nwith all the line items copied across. Returns\n``{new_quote_id, new_quote_number, voided_envelope_id, source_quote_id}``.\nThe caller should navigate to / update the new draft.",
        "operationId": "edit_quote_as_draft_quotes__quote_id__edit_as_draft_post",
        "parameters": [
          {
            "description": "Source quote UUID (must be in 'sent' status)",
            "in": "path",
            "name": "quote_id",
            "required": true,
            "schema": {
              "description": "Source quote UUID (must be in 'sent' status)",
              "title": "Quote Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Edit Quote As Draft",
        "tags": [
          "Quotes"
        ],
        "x-graph8-scope": "quotes:run",
        "x-graph8-tier": "external"
      }
    },
    "/quotes/{quote_id}/send": {
      "post": {
        "description": "Send the quote for e-signature (or resend if it's already in flight).\n\nSide effects: creates / reuses a signing envelope, sends the\ncustomer-facing email via SES, logs to the universal inbox, rolls\nquote status forward to ``sent``. Recipient is resolved from\n``signer_contact_id`` or ``signer_email`` (one must be set).\n\nIdempotent for resend: when the quote already has an envelope in\n``sent`` or ``viewed`` state, the existing envelope is re-emailed\nand the recipient keeps the original signing link.",
        "operationId": "send_quote_quotes__quote_id__send_post",
        "parameters": [
          {
            "description": "Quote UUID (must be in draft or sent status)",
            "in": "path",
            "name": "quote_id",
            "required": true,
            "schema": {
              "description": "Quote UUID (must be in draft or sent status)",
              "title": "Quote Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteSendRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_QuoteDetail_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Send Quote",
        "tags": [
          "Quotes"
        ],
        "x-graph8-scope": "quotes:run",
        "x-graph8-tier": "external"
      }
    },
    "/radar/aeo": {
      "get": {
        "description": "Answer-engine share-of-voice: mention/citation rate, SoV, leaderboard.\n\n``engine`` is passed through as a RESOLVED value. Called directly (not via\nFastAPI), an omitted param would keep its ``Query(default=None)`` sentinel,\nwhich the cb handler reads as a truthy unsupported engine and rejects with a\n400 on every call - so the value must be forwarded explicitly.",
        "operationId": "aeo_overview_radar_aeo_get",
        "parameters": [
          {
            "description": "Filter to one answer engine (e.g. claude, perplexity).",
            "in": "query",
            "name": "engine",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter to one answer engine (e.g. claude, perplexity).",
              "title": "Engine"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Aeo Overview",
        "tags": [
          "Radar"
        ],
        "x-graph8-scope": "radar:read",
        "x-graph8-tier": "read"
      }
    },
    "/radar/aeo/probes": {
      "get": {
        "description": "List the org's tracked AEO buyer-intent probes.",
        "operationId": "aeo_probes_radar_aeo_probes_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Aeo Probes",
        "tags": [
          "Radar"
        ],
        "x-graph8-scope": "radar:read",
        "x-graph8-tier": "read"
      }
    },
    "/radar/aeo/run": {
      "post": {
        "description": "BILLABLE: trigger an AEO run (one paid LLM call per probe, Celery).\n\nThe cb function declares a settings:write dependency; we pass _=None so the\ngate is satisfied at the public surface (RBAC specs out of scope).",
        "operationId": "aeo_run_radar_aeo_run_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Aeo Run",
        "tags": [
          "Radar"
        ]
      }
    },
    "/radar/alerts/dispatch": {
      "post": {
        "description": "Detect + deliver new competitor-move alerts now. Returns {delivered}.\n\nThe cb function declares a settings:write dependency; we pass _=None so the\ngate is satisfied at the public surface (RBAC specs out of scope).",
        "operationId": "dispatch_alerts_radar_alerts_dispatch_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Dispatch Alerts",
        "tags": [
          "Radar"
        ]
      }
    },
    "/radar/competitors": {
      "get": {
        "description": "Every tracked competitor profile (active + inactive), tier then domain.",
        "operationId": "list_competitors_radar_competitors_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Competitors",
        "tags": [
          "Radar"
        ],
        "x-graph8-scope": "radar:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Add one competitor to track. 409 if already tracked, 422 at the cap.",
        "operationId": "create_competitor_radar_competitors_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCompetitorRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Competitor",
        "tags": [
          "Radar"
        ]
      }
    },
    "/radar/competitors/bulk": {
      "post": {
        "description": "Add many competitors at once (normalize + dedup + 20-competitor cap).",
        "operationId": "bulk_add_competitors_radar_competitors_bulk_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkCompetitorsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Bulk Add Competitors",
        "tags": [
          "Radar"
        ]
      }
    },
    "/radar/competitors/suggestions": {
      "get": {
        "description": "Detected-but-untracked competitors from intelligence + global docs.",
        "operationId": "competitor_suggestions_radar_competitors_suggestions_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Competitor Suggestions",
        "tags": [
          "Radar"
        ],
        "x-graph8-scope": "radar:read",
        "x-graph8-tier": "read"
      }
    },
    "/radar/competitors/{competitor_id}": {
      "delete": {
        "description": "Deactivate a tracked competitor while retaining its evidence history.",
        "operationId": "delete_competitor_radar_competitors__competitor_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "competitor_id",
            "required": true,
            "schema": {
              "title": "Competitor Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Competitor",
        "tags": [
          "Radar"
        ]
      },
      "get": {
        "description": "Single-competitor aggregation: profile + pages-tracked + recent changes + gaps.",
        "operationId": "get_competitor_radar_competitors__competitor_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "competitor_id",
            "required": true,
            "schema": {
              "title": "Competitor Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Competitor",
        "tags": [
          "Radar"
        ],
        "x-graph8-scope": "radar:read",
        "x-graph8-tier": "read"
      },
      "patch": {
        "description": "Update a competitor profile (tier, active flag, name, or scan_config).",
        "operationId": "update_competitor_radar_competitors__competitor_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "competitor_id",
            "required": true,
            "schema": {
              "title": "Competitor Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchCompetitorRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Competitor",
        "tags": [
          "Radar"
        ]
      }
    },
    "/radar/competitors/{competitor_id}/ads": {
      "get": {
        "description": "Captured ad creatives for one competitor (durable snapshot corpus).",
        "operationId": "get_competitor_ads_radar_competitors__competitor_id__ads_get",
        "parameters": [
          {
            "in": "path",
            "name": "competitor_id",
            "required": true,
            "schema": {
              "title": "Competitor Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Competitor Ads",
        "tags": [
          "Radar"
        ],
        "x-graph8-scope": "radar:read",
        "x-graph8-tier": "read"
      }
    },
    "/radar/competitors/{competitor_id}/battle-card": {
      "get": {
        "description": "Sales-enablement battle card composed from existing Radar intel (no LLM).",
        "operationId": "competitor_battle_card_radar_competitors__competitor_id__battle_card_get",
        "parameters": [
          {
            "in": "path",
            "name": "competitor_id",
            "required": true,
            "schema": {
              "title": "Competitor Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Competitor Battle Card",
        "tags": [
          "Radar"
        ],
        "x-graph8-scope": "radar:read",
        "x-graph8-tier": "read"
      }
    },
    "/radar/competitors/{competitor_id}/discover-pages": {
      "get": {
        "description": "Discover a competitor's pages (Firecrawl /map) for the tracked-pages picker.",
        "operationId": "discover_competitor_pages_radar_competitors__competitor_id__discover_pages_get",
        "parameters": [
          {
            "in": "path",
            "name": "competitor_id",
            "required": true,
            "schema": {
              "title": "Competitor Id",
              "type": "string"
            }
          },
          {
            "description": "Bypass the cached page inventory and re-map the site (paid).",
            "in": "query",
            "name": "refresh",
            "required": false,
            "schema": {
              "default": false,
              "description": "Bypass the cached page inventory and re-map the site (paid).",
              "title": "Refresh",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Discover Competitor Pages",
        "tags": [
          "Radar"
        ]
      }
    },
    "/radar/competitors/{competitor_id}/engagers": {
      "get": {
        "description": "Steal-Their-Audience: known-to-us people who engage this rival's content.\n\nThe cb function declares a deals-read permission dependency; here we pass a\nsynthesized org-admin principal (``_=True``) so the gate is satisfied at the\npublic surface (RBAC specs out of scope by decision).",
        "operationId": "get_competitor_engagers_radar_competitors__competitor_id__engagers_get",
        "parameters": [
          {
            "in": "path",
            "name": "competitor_id",
            "required": true,
            "schema": {
              "title": "Competitor Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Competitor Engagers",
        "tags": [
          "Radar"
        ],
        "x-graph8-scope": "radar:read",
        "x-graph8-tier": "read"
      }
    },
    "/radar/competitors/{competitor_id}/pages": {
      "get": {
        "description": "Distinct tracked pages for one competitor (latest snapshot per URL).",
        "operationId": "get_competitor_pages_radar_competitors__competitor_id__pages_get",
        "parameters": [
          {
            "in": "path",
            "name": "competitor_id",
            "required": true,
            "schema": {
              "title": "Competitor Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Competitor Pages",
        "tags": [
          "Radar"
        ],
        "x-graph8-scope": "radar:read",
        "x-graph8-tier": "read"
      }
    },
    "/radar/competitors/{competitor_id}/posts": {
      "get": {
        "description": "LinkedIn posts for one competitor (listener store, then corpus fallback).",
        "operationId": "get_competitor_posts_radar_competitors__competitor_id__posts_get",
        "parameters": [
          {
            "in": "path",
            "name": "competitor_id",
            "required": true,
            "schema": {
              "title": "Competitor Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Competitor Posts",
        "tags": [
          "Radar"
        ],
        "x-graph8-scope": "radar:read",
        "x-graph8-tier": "read"
      }
    },
    "/radar/competitors/{competitor_id}/scan": {
      "post": {
        "description": "BILLABLE: enqueue a fresh scan of one competitor (Celery). Returns {task_id}.",
        "operationId": "scan_competitor_radar_competitors__competitor_id__scan_post",
        "parameters": [
          {
            "in": "path",
            "name": "competitor_id",
            "required": true,
            "schema": {
              "title": "Competitor Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Scan Competitor",
        "tags": [
          "Radar"
        ]
      }
    },
    "/radar/competitors/{competitor_id}/traffic": {
      "get": {
        "description": "Traffic detail for one competitor: current estimate + trend + ETV history.",
        "operationId": "get_competitor_traffic_radar_competitors__competitor_id__traffic_get",
        "parameters": [
          {
            "in": "path",
            "name": "competitor_id",
            "required": true,
            "schema": {
              "title": "Competitor Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Competitor Traffic",
        "tags": [
          "Radar"
        ],
        "x-graph8-scope": "radar:read",
        "x-graph8-tier": "read"
      }
    },
    "/radar/feature-matrix": {
      "get": {
        "description": "Capability/feature comparison matrix across the tracked competitor set.",
        "operationId": "feature_matrix_radar_feature_matrix_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Feature Matrix",
        "tags": [
          "Radar"
        ],
        "x-graph8-scope": "radar:read",
        "x-graph8-tier": "read"
      }
    },
    "/radar/gaps": {
      "get": {
        "description": "List competitive gaps, optionally filtered by lens / status / competitor.",
        "operationId": "list_gaps_radar_gaps_get",
        "parameters": [
          {
            "in": "query",
            "name": "lens",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Lens"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "competitor_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Competitor Id"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Gaps",
        "tags": [
          "Radar"
        ],
        "x-graph8-scope": "radar:read",
        "x-graph8-tier": "read"
      }
    },
    "/radar/gaps/analyze": {
      "post": {
        "description": "BILLABLE: enqueue gap analysis across the tracked set (LLM, Celery).",
        "operationId": "analyze_gaps_radar_gaps_analyze_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnalyzeGapsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Analyze Gaps",
        "tags": [
          "Radar"
        ]
      }
    },
    "/radar/gaps/{gap_id}": {
      "patch": {
        "description": "Update a gap's status (open / dismissed / converted).",
        "operationId": "update_gap_radar_gaps__gap_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "gap_id",
            "required": true,
            "schema": {
              "title": "Gap Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchGapRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Gap",
        "tags": [
          "Radar"
        ]
      }
    },
    "/radar/initiatives": {
      "get": {
        "description": "List radar initiatives (converted opportunities under execution).",
        "operationId": "list_initiatives_radar_initiatives_get",
        "parameters": [
          {
            "in": "query",
            "name": "lane",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Lane"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Initiatives",
        "tags": [
          "Radar"
        ],
        "x-graph8-scope": "radar:read",
        "x-graph8-tier": "read"
      }
    },
    "/radar/initiatives/measure": {
      "post": {
        "description": "Run the performance loopback now (free, DB-only). Returns {measured}.\n\nThe cb function declares a settings:write dependency; we pass _=None so the\ngate is satisfied at the public surface (RBAC specs out of scope).",
        "operationId": "measure_initiatives_radar_initiatives_measure_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Measure Initiatives",
        "tags": [
          "Radar"
        ]
      }
    },
    "/radar/keyword-gap": {
      "get": {
        "description": "Keywords each rival ranks for that the org does NOT (\"what you're missing\").",
        "operationId": "keyword_gap_radar_keyword_gap_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Keyword Gap",
        "tags": [
          "Radar"
        ]
      }
    },
    "/radar/monitoring/ads": {
      "get": {
        "description": "Ads & keywords: durable ad_creative corpus + persisted organic/paid keywords.",
        "operationId": "monitoring_ads_radar_monitoring_ads_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Monitoring Ads",
        "tags": [
          "Radar"
        ]
      }
    },
    "/radar/monitoring/ads/{ad_id}": {
      "get": {
        "description": "One ad's full detail (copy / headline / image / dates) + rival context.",
        "operationId": "monitoring_ad_detail_radar_monitoring_ads__ad_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "ad_id",
            "required": true,
            "schema": {
              "maxLength": 256,
              "title": "Ad Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Monitoring Ad Detail",
        "tags": [
          "Radar"
        ],
        "x-graph8-scope": "radar:read",
        "x-graph8-tier": "read"
      }
    },
    "/radar/monitoring/content": {
      "get": {
        "description": "Competitor content-change feed with the same filters as the cb route.",
        "operationId": "monitoring_content_radar_monitoring_content_get",
        "parameters": [
          {
            "in": "query",
            "name": "competitor_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Competitor Id"
            }
          },
          {
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Kind"
            }
          },
          {
            "in": "query",
            "name": "change_category",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Change Category"
            }
          },
          {
            "in": "query",
            "name": "change_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Change Type"
            }
          },
          {
            "in": "query",
            "name": "min_significance",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 100,
                  "minimum": 0,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Min Significance"
            }
          },
          {
            "in": "query",
            "name": "date_from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date From"
            }
          },
          {
            "in": "query",
            "name": "date_to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date To"
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 200,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Monitoring Content",
        "tags": [
          "Radar"
        ],
        "x-graph8-scope": "radar:read",
        "x-graph8-tier": "read"
      }
    },
    "/radar/monitoring/linkedin": {
      "get": {
        "description": "Competitor LinkedIn posts (listener store first, then corpus fallback).\n\nEvery filter is forwarded as a RESOLVED value. Called directly (not via\nFastAPI), omitted ``date_from``/``date_to`` params would keep their\n``Query`` sentinels, and the cb handler's ``date_from > date_to`` guard then\nraises ``TypeError`` (Query vs Query) -> a 500 on every call. Passing the\ncoerced ``date``/``None`` values instead lets the guard emit a clean 422 on\nan inverted range and exposes the page/domain/date filters the cb route\nsupports.",
        "operationId": "monitoring_linkedin_radar_monitoring_linkedin_get",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "maximum": 1000,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "competitor_domain",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 255,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Competitor Domain"
            }
          },
          {
            "in": "query",
            "name": "date_from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date From"
            }
          },
          {
            "in": "query",
            "name": "date_to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date To"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Monitoring Linkedin",
        "tags": [
          "Radar"
        ],
        "x-graph8-scope": "radar:read",
        "x-graph8-tier": "read"
      }
    },
    "/radar/monitoring/page-history": {
      "get": {
        "description": "Full capture history for one page (competitor + url), newest-first.",
        "operationId": "page_history_radar_monitoring_page_history_get",
        "parameters": [
          {
            "in": "query",
            "name": "url",
            "required": true,
            "schema": {
              "maxLength": 2048,
              "title": "Url",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "competitor_id",
            "required": true,
            "schema": {
              "title": "Competitor Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 50,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Page History",
        "tags": [
          "Radar"
        ],
        "x-graph8-scope": "radar:read",
        "x-graph8-tier": "read"
      }
    },
    "/radar/opportunities": {
      "get": {
        "description": "List opportunities - the scored OPEN gaps, optionally filtered by lane.",
        "operationId": "list_opportunities_radar_opportunities_get",
        "parameters": [
          {
            "in": "query",
            "name": "lane",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Lane"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Opportunities",
        "tags": [
          "Radar"
        ],
        "x-graph8-scope": "radar:read",
        "x-graph8-tier": "read"
      }
    },
    "/radar/opportunities/approve-all": {
      "post": {
        "description": "Bulk-approve opportunities in one lane - currently FAIL-CLOSED (HTTP 409).\n\ncampaign_builder deliberately rejects bulk approval until an item-by-item\nreview contract exists: ``approve_all_opportunities`` raises 409 'Bulk\napproval requires review' on every call (campaign_builder/routers/radar.py).\nThis bridge forwards to that handler so the 409 is surfaced honestly instead\nof fabricating a 200 - it never mutates or bills. Approve opportunities one\nat a time via ``POST /radar/opportunities/{gap_id}/approve``.\n\nProduct gap (out of this bridge's scope): the developer-api reference\n(docs/developer-api-reference.md ~L3799-3800) and the MCP tool\ng8_radar_approve_all_opportunities still advertise a working 'top-50 drain'\nand must be re-documented to the 409 contract, or the cb handler must gain a\nreal bulk-review flow.",
        "operationId": "approve_all_opportunities_radar_opportunities_approve_all_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApproveAllRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Approve All Opportunities",
        "tags": [
          "Radar"
        ]
      }
    },
    "/radar/opportunities/{gap_id}/approve": {
      "post": {
        "description": "Approve one scored opportunity - converts it into an initiative + stubs.",
        "operationId": "approve_opportunity_radar_opportunities__gap_id__approve_post",
        "parameters": [
          {
            "in": "path",
            "name": "gap_id",
            "required": true,
            "schema": {
              "title": "Gap Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApproveOpportunityRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Approve Opportunity",
        "tags": [
          "Radar"
        ]
      }
    },
    "/radar/optimization-runs": {
      "get": {
        "description": "Radar-spawned content-refresh grids with lean score aggregates.",
        "operationId": "optimization_runs_radar_optimization_runs_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Optimization Runs",
        "tags": [
          "Radar"
        ],
        "x-graph8-scope": "radar:read",
        "x-graph8-tier": "read"
      }
    },
    "/radar/overview": {
      "get": {
        "description": "Radar dashboard summary: tracked counts, 7-day moves, the threat board,\nrecent moves, pipeline funnel, and derived alerts.",
        "operationId": "overview_radar_overview_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Overview",
        "tags": [
          "Radar"
        ],
        "x-graph8-scope": "radar:read",
        "x-graph8-tier": "read"
      }
    },
    "/radar/own-traffic-estimate": {
      "get": {
        "description": "Estimated own-domain traffic (DataForSEO) - Traffic & market fallback.",
        "operationId": "own_traffic_estimate_radar_own_traffic_estimate_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Own Traffic Estimate",
        "tags": [
          "Radar"
        ]
      }
    },
    "/radar/scan-all": {
      "post": {
        "description": "BILLABLE: enqueue a scan for every active competitor (Celery).",
        "operationId": "scan_all_competitors_radar_scan_all_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Scan All Competitors",
        "tags": [
          "Radar"
        ]
      }
    },
    "/radar/settings": {
      "get": {
        "description": "Read the org's Radar settings (cadence, alert toggles, channels, ad_source).",
        "operationId": "get_settings_radar_settings_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Settings",
        "tags": [
          "Radar"
        ],
        "x-graph8-scope": "radar:read",
        "x-graph8-tier": "read"
      },
      "put": {
        "description": "Replace the org's Radar settings (full object).",
        "operationId": "put_settings_radar_settings_put",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RadarSettings"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Put Settings",
        "tags": [
          "Radar"
        ]
      }
    },
    "/radar/snapshots/{snapshot_id}/compare": {
      "get": {
        "description": "Before/after diff for one page snapshot (vs prior capture or `against`).",
        "operationId": "compare_snapshot_radar_snapshots__snapshot_id__compare_get",
        "parameters": [
          {
            "in": "path",
            "name": "snapshot_id",
            "required": true,
            "schema": {
              "title": "Snapshot Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "against",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Against"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Compare Snapshot",
        "tags": [
          "Radar"
        ],
        "x-graph8-scope": "radar:read",
        "x-graph8-tier": "read"
      }
    },
    "/radar/traffic": {
      "get": {
        "description": "Traffic & market view: per-competitor visit estimates + trend (self marked).",
        "operationId": "traffic_radar_traffic_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Traffic",
        "tags": [
          "Radar"
        ],
        "x-graph8-scope": "radar:read",
        "x-graph8-tier": "read"
      }
    },
    "/repos": {
      "get": {
        "description": "List all connected repositories in the organization.",
        "operationId": "list_repos_repos_get",
        "parameters": [
          {
            "description": "Page number (1-indexed)",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "description": "Page number (1-indexed)",
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "description": "Items per page (max 200)",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Items per page (max 200)",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_RepoResponse__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Repos",
        "tags": [
          "Repos"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Connect a repository to the organization.",
        "operationId": "connect_repo_repos_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectRepoRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepoResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Connect Repo",
        "tags": [
          "Repos"
        ],
        "x-graph8-scope": "campaigns:write",
        "x-graph8-tier": "write"
      }
    },
    "/repos/{repo_id}": {
      "delete": {
        "description": "Disconnect a repository from the organization.",
        "operationId": "delete_repo_repos__repo_id__delete",
        "parameters": [
          {
            "description": "Repository ID",
            "in": "path",
            "name": "repo_id",
            "required": true,
            "schema": {
              "description": "Repository ID",
              "title": "Repo Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Repo",
        "tags": [
          "Repos"
        ],
        "x-graph8-scope": "campaigns:delete",
        "x-graph8-tier": "destructive"
      },
      "get": {
        "description": "Get details of a connected repository.",
        "operationId": "get_repo_repos__repo_id__get",
        "parameters": [
          {
            "description": "Repository ID",
            "in": "path",
            "name": "repo_id",
            "required": true,
            "schema": {
              "description": "Repository ID",
              "title": "Repo Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepoResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Repo",
        "tags": [
          "Repos"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      }
    },
    "/repos/{repo_id}/campaigns": {
      "get": {
        "description": "List campaigns generated for a connected repository.",
        "operationId": "list_campaigns_repos__repo_id__campaigns_get",
        "parameters": [
          {
            "description": "Repository ID",
            "in": "path",
            "name": "repo_id",
            "required": true,
            "schema": {
              "description": "Repository ID",
              "title": "Repo Id",
              "type": "string"
            }
          },
          {
            "description": "Page number",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "description": "Page number",
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "description": "Items per page",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Items per page",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_dict__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Campaigns",
        "tags": [
          "CLI Campaigns"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create a new campaign from scratch.",
        "operationId": "create_campaign_repos__repo_id__campaigns_post",
        "parameters": [
          {
            "description": "Repository ID",
            "in": "path",
            "name": "repo_id",
            "required": true,
            "schema": {
              "description": "Repository ID",
              "title": "Repo Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/developer_api__interfaces__v1__cli_campaigns_router__CampaignCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Campaign",
        "tags": [
          "CLI Campaigns"
        ],
        "x-graph8-scope": "campaigns:write",
        "x-graph8-tier": "write"
      }
    },
    "/repos/{repo_id}/campaigns/{campaign_id}": {
      "get": {
        "description": "Get details of a specific campaign including generated documents.",
        "operationId": "get_campaign_repos__repo_id__campaigns__campaign_id__get",
        "parameters": [
          {
            "description": "Repository ID",
            "in": "path",
            "name": "repo_id",
            "required": true,
            "schema": {
              "description": "Repository ID",
              "title": "Repo Id",
              "type": "string"
            }
          },
          {
            "description": "Campaign ID",
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "description": "Campaign ID",
              "title": "Campaign Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Campaign",
        "tags": [
          "CLI Campaigns"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      },
      "patch": {
        "description": "Update campaign content fields (name, brief, hook, persona, etc.).",
        "operationId": "update_campaign_repos__repo_id__campaigns__campaign_id__patch",
        "parameters": [
          {
            "description": "Repository ID",
            "in": "path",
            "name": "repo_id",
            "required": true,
            "schema": {
              "description": "Repository ID",
              "title": "Repo Id",
              "type": "string"
            }
          },
          {
            "description": "Campaign ID",
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "description": "Campaign ID",
              "title": "Campaign Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/developer_api__interfaces__v1__cli_campaigns_router__CampaignUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Campaign",
        "tags": [
          "CLI Campaigns"
        ],
        "x-graph8-scope": "campaigns:write",
        "x-graph8-tier": "write"
      }
    },
    "/repos/{repo_id}/campaigns/{campaign_id}/documents/{document_id}": {
      "get": {
        "description": "Get full content of a specific campaign document.",
        "operationId": "get_campaign_document_repos__repo_id__campaigns__campaign_id__documents__document_id__get",
        "parameters": [
          {
            "description": "Repository ID",
            "in": "path",
            "name": "repo_id",
            "required": true,
            "schema": {
              "description": "Repository ID",
              "title": "Repo Id",
              "type": "string"
            }
          },
          {
            "description": "Campaign ID",
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "description": "Campaign ID",
              "title": "Campaign Id",
              "type": "string"
            }
          },
          {
            "description": "Document ID",
            "in": "path",
            "name": "document_id",
            "required": true,
            "schema": {
              "description": "Document ID",
              "title": "Document Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Campaign Document",
        "tags": [
          "CLI Campaigns"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      }
    },
    "/repos/{repo_id}/campaigns/{campaign_id}/launch": {
      "post": {
        "description": "Launch a campaign via the sequencer bridge.\n\nSame behaviour as ``POST /api/v1/campaigns/{campaign_id}/launch`` — this\nis the repo-scoped variant used by the CLI. See the GTM router docstring\nfor the full push-then-run flow.\n\nWARNING: begins sending real outreach to real contacts.",
        "operationId": "launch_campaign_repos__repo_id__campaigns__campaign_id__launch_post",
        "parameters": [
          {
            "description": "Repository ID",
            "in": "path",
            "name": "repo_id",
            "required": true,
            "schema": {
              "description": "Repository ID",
              "title": "Repo Id",
              "type": "string"
            }
          },
          {
            "description": "Campaign ID",
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "description": "Campaign ID",
              "title": "Campaign Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Launch Campaign",
        "tags": [
          "CLI Campaigns"
        ]
      }
    },
    "/repos/{repo_id}/install": {
      "post": {
        "description": "Generate a patch set describing the changes needed to install the GTM spine.\n\nServer-side only: returns a ``PatchSetResponse`` whose ``patches`` array\ndescribes the file changes (new files, modifications, snippets to add).\n**The caller is responsible for applying them to the local filesystem** —\ntypically the `g8` CLI, but any MCP client can consume the patch array\ndirectly. Follow up with ``POST /install/apply`` once patches are on disk.",
        "operationId": "generate_install_repos__repo_id__install_post",
        "parameters": [
          {
            "description": "Repository ID",
            "in": "path",
            "name": "repo_id",
            "required": true,
            "schema": {
              "description": "Repository ID",
              "title": "Repo Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PatchSetResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Generate Install",
        "tags": [
          "Install"
        ],
        "x-graph8-scope": "integrations:write",
        "x-graph8-tier": "write"
      }
    },
    "/repos/{repo_id}/install/apply": {
      "post": {
        "description": "Record that the latest patch set has been applied client-side.\n\nThis is a bookkeeping call. The server flips ``patch_sets.status`` from\n``PREVIEW`` to ``APPLIED`` so follow-up scans know the install is live;\nno files are written by this endpoint. The actual filesystem write must\nbe performed by the caller (typically the `g8` CLI) before calling this.",
        "operationId": "apply_install_repos__repo_id__install_apply_post",
        "parameters": [
          {
            "description": "Repository ID",
            "in": "path",
            "name": "repo_id",
            "required": true,
            "schema": {
              "description": "Repository ID",
              "title": "Repo Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ApplyResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Apply Install",
        "tags": [
          "Install"
        ],
        "x-graph8-scope": "integrations:write",
        "x-graph8-tier": "write"
      }
    },
    "/repos/{repo_id}/install/status": {
      "get": {
        "description": "Get the latest patch set status for a repository.",
        "operationId": "get_install_status_repos__repo_id__install_status_get",
        "parameters": [
          {
            "description": "Repository ID",
            "in": "path",
            "name": "repo_id",
            "required": true,
            "schema": {
              "description": "Repository ID",
              "title": "Repo Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PatchSetResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Install Status",
        "tags": [
          "Install"
        ],
        "x-graph8-scope": "integrations:read",
        "x-graph8-tier": "read"
      }
    },
    "/repos/{repo_id}/kb": {
      "get": {
        "description": "List all KB documents grouped by section.",
        "operationId": "list_kb_documents_repos__repo_id__kb_get",
        "parameters": [
          {
            "description": "Repository ID",
            "in": "path",
            "name": "repo_id",
            "required": true,
            "schema": {
              "description": "Repository ID",
              "title": "Repo Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_dict__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Kb Documents",
        "tags": [
          "Knowledge Base"
        ],
        "x-graph8-scope": "knowledge:read",
        "x-graph8-tier": "read"
      }
    },
    "/repos/{repo_id}/kb/search": {
      "post": {
        "description": "Search the GTM knowledge base using full-text search.",
        "operationId": "search_kb_repos__repo_id__kb_search_post",
        "parameters": [
          {
            "description": "Repository ID",
            "in": "path",
            "name": "repo_id",
            "required": true,
            "schema": {
              "description": "Repository ID",
              "title": "Repo Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KBSearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_dict__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Search Kb",
        "tags": [
          "Knowledge Base"
        ],
        "x-graph8-scope": "knowledge:write",
        "x-graph8-tier": "write"
      }
    },
    "/repos/{repo_id}/rollback": {
      "post": {
        "description": "Rollback the last applied patch set.",
        "operationId": "rollback_install_repos__repo_id__rollback_post",
        "parameters": [
          {
            "description": "Repository ID",
            "in": "path",
            "name": "repo_id",
            "required": true,
            "schema": {
              "description": "Repository ID",
              "title": "Repo Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PatchSetResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Rollback Install",
        "tags": [
          "Install"
        ],
        "x-graph8-scope": "integrations:write",
        "x-graph8-tier": "write"
      }
    },
    "/repos/{repo_id}/scan": {
      "get": {
        "description": "Get the latest scan results for a repository.",
        "operationId": "get_scan_repos__repo_id__scan_get",
        "parameters": [
          {
            "description": "Repository ID",
            "in": "path",
            "name": "repo_id",
            "required": true,
            "schema": {
              "description": "Repository ID",
              "title": "Repo Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ScanResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Scan",
        "tags": [
          "Scans"
        ],
        "x-graph8-scope": "search:run",
        "x-graph8-tier": "billable"
      },
      "post": {
        "description": "Record pre-computed repository scan results.\n\nThis endpoint does **not** scan a repository server-side — it persists a\nscan produced by the `g8` CLI (or any MCP client that walks the filesystem\nitself). Required fields in the body: ``tech_stack``, ``api_routes``,\n``gtm_readiness``. The server stores the results and links them to the\nrepo so subsequent ``/install`` calls can derive a patch set.",
        "operationId": "create_scan_repos__repo_id__scan_post",
        "parameters": [
          {
            "description": "Repository ID",
            "in": "path",
            "name": "repo_id",
            "required": true,
            "schema": {
              "description": "Repository ID",
              "title": "Repo Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScanResultsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ScanResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Scan",
        "tags": [
          "Scans"
        ],
        "x-graph8-scope": "search:run",
        "x-graph8-tier": "billable"
      }
    },
    "/repos/{repo_id}/snippet": {
      "get": {
        "description": "Get the JavaScript tracking snippet for a connected repository.\n\nIf the repo already has a write key stored, returns the snippet immediately.\nOtherwise, pass `stream_id` (from GET /streams) to select which stream to use.\nThe selected write key is stored on the repo for future lookups.",
        "operationId": "get_snippet_repos__repo_id__snippet_get",
        "parameters": [
          {
            "description": "Repository ID",
            "in": "path",
            "name": "repo_id",
            "required": true,
            "schema": {
              "description": "Repository ID",
              "title": "Repo Id",
              "type": "string"
            }
          },
          {
            "description": "Stream ID to use. List available via GET /streams.",
            "in": "query",
            "name": "stream_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Stream ID to use. List available via GET /streams.",
              "title": "Stream Id"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_SnippetResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Snippet",
        "tags": [
          "Install"
        ],
        "x-graph8-scope": "integrations:read",
        "x-graph8-tier": "read"
      }
    },
    "/repos/{repo_id}/streams": {
      "get": {
        "description": "List available tracking streams (sites) for this organization.\n\nReturns each stream's ID, user-friendly name (domain or label),\nassociated domains, and write key. The caller should select one\nand pass its `id` to the snippet endpoint.",
        "operationId": "list_streams_repos__repo_id__streams_get",
        "parameters": [
          {
            "description": "Repository ID",
            "in": "path",
            "name": "repo_id",
            "required": true,
            "schema": {
              "description": "Repository ID",
              "title": "Repo Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_StreamInfoResponse__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Streams",
        "tags": [
          "Install"
        ],
        "x-graph8-scope": "integrations:read",
        "x-graph8-tier": "read"
      }
    },
    "/research-reports": {
      "get": {
        "description": "List research-report documents (the 6 docs in the Research bucket).\n\nPart of the 44-document Studio Global Document Architecture (21 context +\n16 intelligence + 6 research + 1 brief). The MCP ideation path needs this\nbucket alongside ``/intelligence-data`` to surface the full picture.",
        "operationId": "list_research_reports_research_reports_get",
        "parameters": [
          {
            "description": "Filter by report_type (buyer_psychology, competitive_teardown, gtm_channel, industry_analyst, review_sentiment, voice_of_customer)",
            "in": "query",
            "name": "report_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by report_type (buyer_psychology, competitive_teardown, gtm_channel, industry_analyst, review_sentiment, voice_of_customer)",
              "title": "Report Type"
            }
          },
          {
            "description": "Include the structured `content` JSONB blob + markdown (large)",
            "in": "query",
            "name": "include_content",
            "required": false,
            "schema": {
              "default": false,
              "description": "Include the structured `content` JSONB blob + markdown (large)",
              "title": "Include Content",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_dict__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Research Reports",
        "tags": [
          "GTM Context"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      }
    },
    "/research-reports/{report_id}": {
      "patch": {
        "description": "Update a Research report's markdown content and/or status.\n\nRead-side counterpart already exists (``GET /research-reports``); this\ncloses the \"read but can't update\" gap for the Research bucket. On a content\nchange it creates a ``DocumentVersion`` snapshot AND re-indexes the report to\nthe RAG knowledge base — identical to the internal Studio editor, so search\nnever goes stale relative to an API-driven edit.\n\nPartial update: send ``markdown_content``, ``status``, or both. Returns 400\nif neither is provided, 404 if the report does not exist in this org. A\nreport already 'completed'/'approved' can only move between those two states.",
        "operationId": "update_research_report_research_reports__report_id__patch",
        "parameters": [
          {
            "description": "Research report ID (UUID)",
            "in": "path",
            "name": "report_id",
            "required": true,
            "schema": {
              "description": "Research report ID (UUID)",
              "title": "Report Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateResearchReportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Research Report",
        "tags": [
          "GTM Context"
        ],
        "x-graph8-scope": "campaigns:run",
        "x-graph8-tier": "billable"
      }
    },
    "/sandbox/failure-injection": {
      "delete": {
        "operationId": "sandbox_clear_failure_rules_sandbox_failure_injection_delete",
        "parameters": [
          {
            "description": "Clear one channel only; omit for all",
            "in": "query",
            "name": "channel",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Clear one channel only; omit for all",
              "title": "Channel"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FailureRulesResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Clear failure rules",
        "tags": [
          "sandbox"
        ],
        "x-graph8-scope": "sandbox:delete",
        "x-graph8-tier": "destructive"
      },
      "get": {
        "operationId": "sandbox_list_failure_rules_sandbox_failure_injection_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FailureRulesResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List failure rules",
        "tags": [
          "sandbox"
        ],
        "x-graph8-scope": "sandbox:read",
        "x-graph8-tier": "read"
      },
      "put": {
        "description": "Make the next simulated sends on a channel fail the way you choose (M3-5).",
        "operationId": "sandbox_set_failure_rule_sandbox_failure_injection_put",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FailureRuleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FailureRulesResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Set a failure rule",
        "tags": [
          "sandbox"
        ],
        "x-graph8-scope": "sandbox:write",
        "x-graph8-tier": "write"
      }
    },
    "/sandbox/fixtures/reset": {
      "post": {
        "description": "Delete all seeded fixture rows for your org and reseed a fresh set.",
        "operationId": "sandbox_reset_fixtures_sandbox_fixtures_reset_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FixtureActionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Reset fixture data",
        "tags": [
          "sandbox"
        ],
        "x-graph8-scope": "sandbox:delete",
        "x-graph8-tier": "destructive"
      }
    },
    "/sandbox/fixtures/restore": {
      "post": {
        "description": "Restore the fixture rows to a previously saved snapshot.\n\nOnly sandbox-fixture rows (``meta.sandbox_fixture = true``) are replaced —\nany records you created through normal API calls in this sandbox are left\nuntouched. Snapshots are taken over the same fixture-scoped set, so a\nrestore round-trips exactly what ``/fixtures/snapshot`` captured.",
        "operationId": "sandbox_restore_sandbox_fixtures_restore_post",
        "parameters": [
          {
            "in": "query",
            "name": "name",
            "required": false,
            "schema": {
              "default": "default",
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_\\-]+$",
              "title": "Name",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotActionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Restore a snapshot",
        "tags": [
          "sandbox"
        ],
        "x-graph8-scope": "sandbox:delete",
        "x-graph8-tier": "destructive"
      }
    },
    "/sandbox/fixtures/seed": {
      "post": {
        "description": "Insert the standard sandbox fixture set into your org. Idempotent.",
        "operationId": "sandbox_seed_fixtures_sandbox_fixtures_seed_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FixtureActionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Seed sample data",
        "tags": [
          "sandbox"
        ],
        "x-graph8-scope": "sandbox:write",
        "x-graph8-tier": "write"
      }
    },
    "/sandbox/fixtures/snapshot": {
      "post": {
        "description": "Save the current contents of the fixture tables under a named snapshot.",
        "operationId": "sandbox_snapshot_sandbox_fixtures_snapshot_post",
        "parameters": [
          {
            "in": "query",
            "name": "name",
            "required": false,
            "schema": {
              "default": "default",
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_\\-]+$",
              "title": "Name",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotActionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Snapshot fixture tables",
        "tags": [
          "sandbox"
        ],
        "x-graph8-scope": "sandbox:write",
        "x-graph8-tier": "write"
      }
    },
    "/sandbox/outbox": {
      "get": {
        "description": "Every simulated outbound side effect for your org, newest first.",
        "operationId": "sandbox_outbox_sandbox_outbox_get",
        "parameters": [
          {
            "description": "Filter by channel",
            "in": "query",
            "name": "channel",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by channel",
              "title": "Channel"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OutboxListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List simulated outbox",
        "tags": [
          "sandbox"
        ],
        "x-graph8-scope": "sandbox:read",
        "x-graph8-tier": "read"
      }
    },
    "/sandbox/status": {
      "get": {
        "description": "Confirm this is the developer sandbox and which org the key acts as.",
        "operationId": "sandbox_status_sandbox_status_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxStatusResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Sandbox status",
        "tags": [
          "sandbox"
        ],
        "x-graph8-scope": "sandbox:read",
        "x-graph8-tier": "read"
      }
    },
    "/schedules": {
      "get": {
        "description": "Return the org's send-window schedules.\n\nEach row carries `id`, `name`, `timezone`, and a flattened per-day\n`windows` list. Pass `id` back as `schedule_id` on\n`POST /campaigns/{id}/launch` or `PATCH /sequences/{id}` to attach the\nschedule before the scheduler starts queueing sends.\n\nThe underlying sequencer route is `GET /schedules` (unprefixed inside the\nsequencer app); this dev-API route is a thin org-scoped proxy that\nrewraps the rows into the launch-helper DTO shape and returns a\n`{data: [...]}` envelope for consistency with the rest of the dev API.",
        "operationId": "list_schedules_schedules_get",
        "parameters": [
          {
            "description": "Include archived schedules in the response. Default False matches the sequencer schedule picker.",
            "in": "query",
            "name": "include_archived",
            "required": false,
            "schema": {
              "default": false,
              "description": "Include archived schedules in the response. Default False matches the sequencer schedule picker.",
              "title": "Include Archived",
              "type": "boolean"
            }
          },
          {
            "description": "Substring filter on schedule name + description. Case-insensitive on the underlying SQL.",
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Substring filter on schedule name + description. Case-insensitive on the underlying SQL.",
              "title": "Search"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchedulesListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List sending schedules (send windows + timezone)",
        "tags": [
          "GTM Launch Helpers"
        ],
        "x-graph8-scope": "campaigns:read",
        "x-graph8-tier": "read"
      }
    },
    "/search/companies": {
      "post": {
        "description": "Search open company data with the org's deliverability policy applied.",
        "operationId": "search_companies_search_companies_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_SearchCompanyItem__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Search Companies",
        "tags": [
          "Search"
        ],
        "x-graph8-scope": "search:run",
        "x-graph8-tier": "billable"
      }
    },
    "/search/companies/save": {
      "post": {
        "description": "Search companies and save matching results to a new list.",
        "operationId": "save_company_search_search_companies_save_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchSaveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_SearchSaveResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Save Company Search",
        "tags": [
          "Search"
        ],
        "x-graph8-scope": "search:run",
        "x-graph8-tier": "billable"
      }
    },
    "/search/contacts": {
      "post": {
        "description": "Search open contact data with the org's deliverability policy applied.",
        "operationId": "search_contacts_search_contacts_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_SearchContactItem__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Search Contacts",
        "tags": [
          "Search"
        ],
        "x-graph8-scope": "search:run",
        "x-graph8-tier": "billable"
      }
    },
    "/search/contacts/save": {
      "post": {
        "description": "Search protected contact data and save matching results to a new list.",
        "operationId": "save_contact_search_search_contacts_save_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchSaveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_SearchSaveResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Save Contact Search",
        "tags": [
          "Search"
        ],
        "x-graph8-scope": "search:run",
        "x-graph8-tier": "billable"
      }
    },
    "/sequences": {
      "get": {
        "description": "List all sequences with optional status / sequence_kind filters.",
        "operationId": "list_sequences_sequences_get",
        "parameters": [
          {
            "description": "Page number",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "description": "Page number",
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "description": "Items per page",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Items per page",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Filter by status",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by status",
              "title": "Status"
            }
          },
          {
            "description": "Filter by sequence kind ('cold_outbound' or 'nurture'). Omit to list all kinds.",
            "in": "query",
            "name": "sequence_kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by sequence kind ('cold_outbound' or 'nurture'). Omit to list all kinds.",
              "title": "Sequence Kind"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_SequenceListItem__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Sequences",
        "tags": [
          "Sequences"
        ],
        "x-graph8-scope": "sequences:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create a new sequence with optional steps and channels.",
        "operationId": "create_sequence_sequences_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SequenceCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_SequenceCreateResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Sequence",
        "tags": [
          "Sequence Lifecycle"
        ],
        "x-graph8-scope": "sequences:run",
        "x-graph8-tier": "external"
      }
    },
    "/sequences/generate-spintax": {
      "post": {
        "description": "One-time AI generation: rewrite a manual email into spintax.\n\nReturns the subject + body rewritten with (possibly nested)\n``{{option a|option b}}`` blocks; the sequencer's per-contact resolver\nthen sends a different-looking variant to each lead. Content-level and\nsequence-agnostic: paste the result into any sequence or campaign email\nstep as a MANUAL_TEMPLATE.\n\nRequires an active subscription and consumes credits (token-metered;\n402 on either failure). Synchronous, up to ~2 minutes; per-worker\nconcurrency is capped (429 + Retry-After when saturated). Output is\nvalidated server-side (balanced braces, ``{{variables}}`` and links\npreserved) - invalid model output surfaces as 422, never as silently\nbroken content.",
        "operationId": "generate_sequence_spintax_sequences_generate_spintax_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateSpintaxRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_GenerateSpintaxResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Generate Sequence Spintax",
        "tags": [
          "Sequences"
        ],
        "x-graph8-scope": "sequences:run",
        "x-graph8-tier": "external"
      }
    },
    "/sequences/{sequence_id}": {
      "delete": {
        "description": "Soft-delete (archive) a sequence. Sets is_archived=True.",
        "operationId": "delete_sequence_sequences__sequence_id__delete",
        "parameters": [
          {
            "description": "Sequence ID",
            "in": "path",
            "name": "sequence_id",
            "required": true,
            "schema": {
              "description": "Sequence ID",
              "title": "Sequence Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_SequenceActionResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Sequence",
        "tags": [
          "Sequence Lifecycle"
        ],
        "x-graph8-scope": "sequences:delete",
        "x-graph8-tier": "destructive"
      },
      "get": {
        "description": "Get detailed information about a sequence.",
        "operationId": "get_sequence_sequences__sequence_id__get",
        "parameters": [
          {
            "description": "Sequence ID",
            "in": "path",
            "name": "sequence_id",
            "required": true,
            "schema": {
              "description": "Sequence ID",
              "title": "Sequence Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_SequenceDetailResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Sequence",
        "tags": [
          "Sequences"
        ],
        "x-graph8-scope": "sequences:read",
        "x-graph8-tier": "read"
      },
      "patch": {
        "description": "Update sequence metadata. Rejects PATCH when status is transitional (409).",
        "operationId": "update_sequence_sequences__sequence_id__patch",
        "parameters": [
          {
            "description": "Sequence ID",
            "in": "path",
            "name": "sequence_id",
            "required": true,
            "schema": {
              "description": "Sequence ID",
              "title": "Sequence Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SequenceUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_SequenceActionResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Sequence",
        "tags": [
          "Sequence Lifecycle"
        ],
        "x-graph8-scope": "sequences:run",
        "x-graph8-tier": "external"
      }
    },
    "/sequences/{sequence_id}/analytics": {
      "get": {
        "description": "Get comprehensive analytics for a sequence.",
        "operationId": "get_sequence_analytics_sequences__sequence_id__analytics_get",
        "parameters": [
          {
            "description": "Sequence ID",
            "in": "path",
            "name": "sequence_id",
            "required": true,
            "schema": {
              "description": "Sequence ID",
              "title": "Sequence Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_SequenceAnalyticsResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Sequence Analytics",
        "tags": [
          "Sequence Lifecycle"
        ],
        "x-graph8-scope": "sequences:read",
        "x-graph8-tier": "read"
      }
    },
    "/sequences/{sequence_id}/contacts": {
      "get": {
        "description": "List contacts in a sequence with pagination.",
        "operationId": "list_sequence_contacts_sequences__sequence_id__contacts_get",
        "parameters": [
          {
            "description": "Sequence ID",
            "in": "path",
            "name": "sequence_id",
            "required": true,
            "schema": {
              "description": "Sequence ID",
              "title": "Sequence Id",
              "type": "string"
            }
          },
          {
            "description": "Page number",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "description": "Page number",
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "description": "Items per page",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Items per page",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Filter by contact state",
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by contact state",
              "title": "State"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_SequenceContactItem__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Sequence Contacts",
        "tags": [
          "Sequences"
        ],
        "x-graph8-scope": "sequences:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Add contacts to a live or drafted sequence using V2 queuing.",
        "operationId": "add_contacts_to_sequence_sequences__sequence_id__contacts_post",
        "parameters": [
          {
            "description": "Sequence ID",
            "in": "path",
            "name": "sequence_id",
            "required": true,
            "schema": {
              "description": "Sequence ID",
              "title": "Sequence Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddSequenceContactsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_SequenceActionResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add Contacts To Sequence",
        "tags": [
          "Sequences"
        ],
        "x-graph8-scope": "sequences:run",
        "x-graph8-tier": "external"
      }
    },
    "/sequences/{sequence_id}/pause": {
      "post": {
        "description": "Pause a live sequence.",
        "operationId": "pause_sequence_sequences__sequence_id__pause_post",
        "parameters": [
          {
            "description": "Sequence ID",
            "in": "path",
            "name": "sequence_id",
            "required": true,
            "schema": {
              "description": "Sequence ID",
              "title": "Sequence Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_SequenceActionResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Pause Sequence",
        "tags": [
          "Sequences"
        ],
        "x-graph8-scope": "sequences:run",
        "x-graph8-tier": "external"
      }
    },
    "/sequences/{sequence_id}/preview": {
      "get": {
        "description": "Load a sequence with its steps and channels — read-only, no enrollment.",
        "operationId": "preview_sequence_sequences__sequence_id__preview_get",
        "parameters": [
          {
            "description": "Sequence ID",
            "in": "path",
            "name": "sequence_id",
            "required": true,
            "schema": {
              "description": "Sequence ID",
              "title": "Sequence Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_SequencePreviewResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Preview Sequence",
        "tags": [
          "Sequence Lifecycle"
        ],
        "x-graph8-scope": "sequences:read",
        "x-graph8-tier": "read"
      }
    },
    "/sequences/{sequence_id}/resume": {
      "post": {
        "description": "Resume a paused sequence.",
        "operationId": "resume_sequence_sequences__sequence_id__resume_post",
        "parameters": [
          {
            "description": "Sequence ID",
            "in": "path",
            "name": "sequence_id",
            "required": true,
            "schema": {
              "description": "Sequence ID",
              "title": "Sequence Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_SequenceActionResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Resume Sequence",
        "tags": [
          "Sequences"
        ],
        "x-graph8-scope": "sequences:run",
        "x-graph8-tier": "external"
      }
    },
    "/sequences/{sequence_id}/run": {
      "post": {
        "description": "Run/start a drafted sequence using V2 orchestration.",
        "operationId": "run_sequence_sequences__sequence_id__run_post",
        "parameters": [
          {
            "description": "Sequence ID",
            "in": "path",
            "name": "sequence_id",
            "required": true,
            "schema": {
              "description": "Sequence ID",
              "title": "Sequence Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_SequenceActionResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Run Sequence",
        "tags": [
          "Sequences"
        ],
        "x-graph8-scope": "sequences:run",
        "x-graph8-tier": "external"
      }
    },
    "/sequences/{sequence_id}/steps/{step_id}": {
      "patch": {
        "description": "Update a single step within a sequence.",
        "operationId": "update_sequence_step_sequences__sequence_id__steps__step_id__patch",
        "parameters": [
          {
            "description": "Sequence ID",
            "in": "path",
            "name": "sequence_id",
            "required": true,
            "schema": {
              "description": "Sequence ID",
              "title": "Sequence Id",
              "type": "string"
            }
          },
          {
            "description": "Step ID",
            "in": "path",
            "name": "step_id",
            "required": true,
            "schema": {
              "description": "Step ID",
              "title": "Step Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StepUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_SequenceActionResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Sequence Step",
        "tags": [
          "Sequence Lifecycle"
        ],
        "x-graph8-scope": "sequences:run",
        "x-graph8-tier": "external"
      }
    },
    "/skills": {
      "get": {
        "description": "List skills owned by the org. When ``runtime_type`` is omitted we\nmake two voice calls (one for llm, one for api) and merge the results,\nso the public surface always returns just the two allowed runtimes\nand never leaks workflows/scripts even if voice's filter logic drifts.",
        "operationId": "list_skills_skills_get",
        "parameters": [
          {
            "description": "Filter to a single runtime (llm or api). Omit to see both.",
            "in": "query",
            "name": "runtime_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "pattern": "^(llm|api)$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter to a single runtime (llm or api). Omit to see both.",
              "title": "Runtime Type"
            }
          },
          {
            "description": "Filter by enabled flag.",
            "in": "query",
            "name": "enabled",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by enabled flag.",
              "title": "Enabled"
            }
          },
          {
            "description": "Filter by category.",
            "in": "query",
            "name": "category",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by category.",
              "title": "Category"
            }
          },
          {
            "description": "Filter by entity type the skill targets.",
            "in": "query",
            "name": "object_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "pattern": "^(Company|Contact|Deal|Campaign)$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by entity type the skill targets.",
              "title": "Object Type"
            }
          },
          {
            "description": "Include shared system-default skills alongside org-owned ones.",
            "in": "query",
            "name": "include_system",
            "required": false,
            "schema": {
              "default": true,
              "description": "Include shared system-default skills alongside org-owned ones.",
              "title": "Include System",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Skills Skills Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List skills (LLM + API) for the caller's org",
        "tags": [
          "Skills"
        ],
        "x-graph8-scope": "workflows:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create a new skill. Pins ``org_id`` server-side and rejects any\nruntime_type other than ``llm`` or ``api``.\n\nBody must include ``name``, ``runtime_type`` (``llm`` or ``api``),\nand the matching ``llm_config`` or ``api_config`` block.\n\nThis is the SAME endpoint that ``g8_skill_create_from_node`` (lift)\nroutes through, so lifted skills are byte-identical to authored ones.",
        "operationId": "create_skill_skills_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "description": "Skill create payload (voice ActionCreateRequest).",
                "title": "Body",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Create Skill Skills Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create a skill (LLM or API runtime)",
        "tags": [
          "Skills"
        ],
        "x-graph8-scope": "workflows:write",
        "x-graph8-tier": "write"
      }
    },
    "/skills/from-node": {
      "post": {
        "description": "Two-step lift (per PRD lock):\n  1) Fetch the workflow + locate the named node.\n  2) Resolve the referenced action_id, fetch its full config, then\n     POST to the SAME ``/api/v1/actions/create`` endpoint with a\n     derived name. The new action_id is returned.\n\nThis is the route ``g8_skill_create_from_node`` MCP tool calls. It\nguarantees lift skills are byte-identical to authored skills.\n\nDoes NOT modify the workflow — the lift is a copy, not a move. If\nthe caller wants the workflow node to reference the new skill, they\nupdate the workflow themselves with ``g8_workflow_update_node``.",
        "operationId": "create_from_node_skills_from_node_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "description": "``{workflow_id: str, node_id: str, name?: str}``. Reads the workflow's action node config and creates a new standalone skill with the same config, then returns the new skill.",
                "title": "Body",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Create From Node Skills From Node Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Lift a workflow action node into a standalone skill",
        "tags": [
          "Skills"
        ],
        "x-graph8-scope": "workflows:write",
        "x-graph8-tier": "write"
      }
    },
    "/skills/from-template": {
      "post": {
        "description": "Instantiate a skill from a template. Forwards to voice's\n``POST /from-template/{template_id}`` with the caller's org_id pinned.\n\nPost-creation we re-fetch the new action and 404 if the resulting\nruntime_type is not a skill — guards against templates of workflow\nor script runtime sneaking into the skill surface.",
        "operationId": "create_from_template_skills_from_template_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "description": "``{template_id: str, name: str, overrides?: dict}``",
                "title": "Body",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Create From Template Skills From Template Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create a skill from a template",
        "tags": [
          "Skills"
        ],
        "x-graph8-scope": "workflows:write",
        "x-graph8-tier": "write"
      }
    },
    "/skills/models": {
      "get": {
        "description": "Return the static catalog of LLM model ids the create/update\nendpoints accept. Voice ultimately decides which models route to\nwhich provider — this catalog is a hint for MCP clients filling in\nthe ``model`` field of ``g8_skill_create_llm``.",
        "operationId": "list_models_skills_models_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Models Skills Models Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List supported LLM model identifiers",
        "tags": [
          "Skills"
        ],
        "x-graph8-scope": "workflows:read",
        "x-graph8-tier": "read"
      }
    },
    "/skills/templates": {
      "get": {
        "description": "List skill templates available in the caller's org plus shared\nsystem templates. Workflow templates are filtered out client-side.\n\nVoice's ``GET /templates/{org_id}/list`` returns all template rows\n(including workflow templates). We filter post-fetch so the public\nsurface stays sealed to skills only.",
        "operationId": "list_templates_skills_templates_get",
        "parameters": [
          {
            "description": "Filter by category.",
            "in": "query",
            "name": "category",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by category.",
              "title": "Category"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Templates Skills Templates Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List skill templates",
        "tags": [
          "Skills"
        ],
        "x-graph8-scope": "workflows:read",
        "x-graph8-tier": "read"
      }
    },
    "/skills/validate": {
      "post": {
        "description": "Dry-run template validator. Returns extracted variables plus\nwarnings about common mistakes (double-brace usage, unmatched braces).\n\nPer the PRD lock (Q3): warn-only. We never block creation on warnings\nhere — the user is the source of truth and a double-brace pattern is\nvalid Jinja that voice's runtime may handle differently from skills.\n\nAccepts two shapes:\n  1) ``{\"template\": \"Hello {name}\"}`` — one string in, vars out.\n  2) ``{\"runtime_type\": \"llm\", \"llm_config\": {...}}`` — full skill\n     shape, scans every template field the matching runtime would use.",
        "operationId": "validate_template_skills_validate_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "description": "Template validation payload. ``{template: str}`` or ``{runtime_type, llm_config|api_config}``.",
                "title": "Body",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Validate Template Skills Validate Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Validate a skill template (extract + warn on common mistakes)",
        "tags": [
          "Skills"
        ],
        "x-graph8-scope": "workflows:write",
        "x-graph8-tier": "write"
      }
    },
    "/skills/{action_id}": {
      "delete": {
        "description": "Delete a skill. Pre-flight GET enforces the target is a skill\nbefore forwarding the DELETE.\n\nNOTE: this is a hard delete at the voice layer. Per the PRD lock,\nthe skills surface does NOT do MCP-only soft-delete reference checks\nhere — that logic lives in the MCP tool layer (where we can read\nworkflow node references and refuse the delete).",
        "operationId": "delete_skill_skills__action_id__delete",
        "parameters": [
          {
            "description": "Skill action_id.",
            "in": "path",
            "name": "action_id",
            "required": true,
            "schema": {
              "description": "Skill action_id.",
              "minLength": 1,
              "title": "Action Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Delete Skill Skills  Action Id  Delete",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete a skill",
        "tags": [
          "Skills"
        ],
        "x-graph8-scope": "workflows:delete",
        "x-graph8-tier": "destructive"
      },
      "get": {
        "description": "Return the full skill record (llm_config / api_config + metadata).\n\nReturns 404 for workflow / script rows even if voice has them —\nthe skill surface is sealed.",
        "operationId": "get_skill_skills__action_id__get",
        "parameters": [
          {
            "description": "Skill action_id.",
            "in": "path",
            "name": "action_id",
            "required": true,
            "schema": {
              "description": "Skill action_id.",
              "minLength": 1,
              "title": "Action Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Get Skill Skills  Action Id  Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get a skill's full configuration",
        "tags": [
          "Skills"
        ],
        "x-graph8-scope": "workflows:read",
        "x-graph8-tier": "read"
      },
      "put": {
        "description": "Update an existing skill. Pre-flight GET enforces the action is\nactually a skill (not a workflow/script) before forwarding the PUT.",
        "operationId": "update_skill_skills__action_id__put",
        "parameters": [
          {
            "description": "Skill action_id.",
            "in": "path",
            "name": "action_id",
            "required": true,
            "schema": {
              "description": "Skill action_id.",
              "minLength": 1,
              "title": "Action Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "description": "Partial update (voice ActionUpdateRequest).",
                "title": "Body",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Update Skill Skills  Action Id  Put",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update a skill",
        "tags": [
          "Skills"
        ],
        "x-graph8-scope": "workflows:write",
        "x-graph8-tier": "write"
      }
    },
    "/skills/{action_id}/execute": {
      "post": {
        "description": "Run a skill once and return the execution result.\n\nPre-flight GET enforces the action is a skill (not a workflow) so\nthe skill execute surface stays sealed. ``org_id`` is pinned;\n``triggered_by`` defaults to the caller's user id.",
        "operationId": "execute_skill_skills__action_id__execute_post",
        "parameters": [
          {
            "description": "Skill action_id.",
            "in": "path",
            "name": "action_id",
            "required": true,
            "schema": {
              "description": "Skill action_id.",
              "minLength": 1,
              "title": "Action Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "description": "ExecutionCreateRequest body.",
                "title": "Body",
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Execute Skill Skills  Action Id  Execute Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Execute a skill once",
        "tags": [
          "Skills"
        ],
        "x-graph8-scope": "workflows:run",
        "x-graph8-tier": "external"
      }
    },
    "/skills/{action_id}/variables": {
      "get": {
        "description": "Return the deduplicated, first-seen-order list of ``{variable}``\nplaceholders extracted from the skill's templates.\n\nFor LLM skills we scan ``llm_config.prompt_template``.\nFor API skills we scan ``api_config.endpoint``, ``api_config.body_template``,\nevery header value, and every query param value.\n\nSingle-brace regex only — ``{{double_brace}}`` patterns are ignored\nto avoid pulling Jinja control structures out as variables.",
        "operationId": "extract_variables_skills__action_id__variables_get",
        "parameters": [
          {
            "description": "Skill action_id.",
            "in": "path",
            "name": "action_id",
            "required": true,
            "schema": {
              "description": "Skill action_id.",
              "minLength": 1,
              "title": "Action Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Extract Variables Skills  Action Id  Variables Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Extract {variable} placeholders from a skill's templates",
        "tags": [
          "Skills"
        ],
        "x-graph8-scope": "workflows:read",
        "x-graph8-tier": "read"
      }
    },
    "/snippet": {
      "get": {
        "description": "Get the tracking snippet for the authenticated organization.\n\nReturns the write key and pre-built snippets without requiring a\nconnected repository. Uses the org's first available tracking stream.",
        "operationId": "get_org_snippet_snippet_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_SnippetResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Org Snippet",
        "tags": [
          "Snippet"
        ],
        "x-graph8-scope": "integrations:read",
        "x-graph8-tier": "read"
      }
    },
    "/snippet/form": {
      "get": {
        "description": "Generate a ready-to-embed lead-capture HTML form.\n\nReturns a self-contained HTML snippet with:\n- Name + work email + company fields\n- Client-side validation\n- Tracking hook that calls ``window.graph8.track('form_submitted', ...)``\n  so the submission is captured alongside page views and other events\n\nDrop the returned ``html`` into any page that already loads the tracking\nsnippet (see ``GET /snippet``). The form POSTs to your tracking host by\ndefault, but you can override ``action`` to route submissions to your own\nbackend.",
        "operationId": "get_form_template_snippet_form_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Form Template",
        "tags": [
          "Snippet"
        ],
        "x-graph8-scope": "integrations:read",
        "x-graph8-tier": "read"
      }
    },
    "/support/contact": {
      "post": {
        "description": "Send a message to graph8's human support team.\n\nThe reply channel is email: support answers to ``contact_email`` when\nprovided, otherwise to the authenticated user's own address.",
        "operationId": "contact_support_support_contact_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactSupportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ContactSupportResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Contact Support",
        "tags": [
          "Support"
        ],
        "x-graph8-scope": "account:write",
        "x-graph8-tier": "write"
      }
    },
    "/tasks": {
      "get": {
        "description": "List all tasks org-wide with optional filters.\n\nThe backend list is unpaginated; ``limit``/``offset`` bound the response\nhere (same approach as the MCP ``g8_get_tasks`` tool) so an org with many\ntasks can't return an unbounded payload. Ordering is deterministic\n(``due_date`` asc nulls-last, then ``created_at`` desc), so paging is stable.",
        "operationId": "list_all_tasks_tasks_get",
        "parameters": [
          {
            "description": "Filter by status (open, completed)",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by status (open, completed)",
              "title": "Status"
            }
          },
          {
            "description": "Filter by priority",
            "in": "query",
            "name": "priority",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 4,
                  "minimum": 0,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by priority",
              "title": "Priority"
            }
          },
          {
            "description": "Filter by assignee user ID",
            "in": "query",
            "name": "assignee_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by assignee user ID",
              "title": "Assignee Id"
            }
          },
          {
            "description": "Filter by creator (email or user ID)",
            "in": "query",
            "name": "created_by",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by creator (email or user ID)",
              "title": "Created By"
            }
          },
          {
            "description": "Filter by task type (call, email, meeting, ...)",
            "in": "query",
            "name": "task_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by task type (call, email, meeting, ...)",
              "title": "Task Type"
            }
          },
          {
            "description": "Filter by linked entity type (contact, company, deal, team_member)",
            "in": "query",
            "name": "entity_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by linked entity type (contact, company, deal, team_member)",
              "title": "Entity Type"
            }
          },
          {
            "description": "Filter by linked entity ID (pair with entity_type)",
            "in": "query",
            "name": "entity_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by linked entity ID (pair with entity_type)",
              "title": "Entity Id"
            }
          },
          {
            "description": "Filter to tasks from a specific meeting",
            "in": "query",
            "name": "source_meeting_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter to tasks from a specific meeting",
              "title": "Source Meeting Id"
            }
          },
          {
            "description": "Search by task title",
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Search by task title",
              "title": "Search"
            }
          },
          {
            "description": "Max tasks to return (default 100, max 200)",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "description": "Max tasks to return (default 100, max 200)",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Number of tasks to skip",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "description": "Number of tasks to skip",
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_TaskResponse__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List All Tasks",
        "tags": [
          "Tasks"
        ],
        "x-graph8-scope": "tasks:read",
        "x-graph8-tier": "read"
      }
    },
    "/tasks/{task_id}": {
      "delete": {
        "description": "Delete a task.",
        "operationId": "delete_task_tasks__task_id__delete",
        "parameters": [
          {
            "description": "Task ID",
            "in": "path",
            "name": "task_id",
            "required": true,
            "schema": {
              "description": "Task ID",
              "title": "Task Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Task",
        "tags": [
          "Tasks"
        ],
        "x-graph8-scope": "tasks:delete",
        "x-graph8-tier": "destructive"
      },
      "patch": {
        "description": "Update a task.",
        "operationId": "update_task_tasks__task_id__patch",
        "parameters": [
          {
            "description": "Task ID",
            "in": "path",
            "name": "task_id",
            "required": true,
            "schema": {
              "description": "Task ID",
              "title": "Task Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_TaskResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Task",
        "tags": [
          "Tasks"
        ],
        "x-graph8-scope": "tasks:write",
        "x-graph8-tier": "write"
      }
    },
    "/usage": {
      "get": {
        "description": "Current credit balance for the authenticated org — total, held, available, and lifetime totals.",
        "operationId": "get_usage_usage_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_UsageBalanceResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Usage",
        "tags": [
          "Usage"
        ]
      }
    },
    "/usage/transactions": {
      "get": {
        "description": "Paginated credit-transaction ledger for the authenticated org (most recent first).\n\nSupports both page-number pagination (`page`/`limit`) and opaque cursor\npagination (`cursor`). When `cursor` is supplied it wins; the response always\nreturns `next_cursor` for forward iteration.",
        "operationId": "list_usage_transactions_usage_transactions_get",
        "parameters": [
          {
            "description": "Page number (ignored when `cursor` is supplied)",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "description": "Page number (ignored when `cursor` is supplied)",
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "description": "Items per page",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Items per page",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Opaque pagination cursor from a prior response's `next_cursor`. When supplied it takes precedence over `page`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Opaque pagination cursor from a prior response's `next_cursor`. When supplied it takes precedence over `page`.",
              "title": "Cursor"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_UsageTransactionResponse__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Usage Transactions",
        "tags": [
          "Usage"
        ]
      }
    },
    "/voice/dialer/agents": {
      "get": {
        "description": "List voice agents that can be assigned to a parallel-dialer session.\n\nThe chat layer uses this to populate the picker before calling\n``POST /voice/dialer/sessions`` - feed the returned ``agent_id`` into\nthe create body.\n\nReturns up to ``_AGENT_LIST_CAP`` rows (no pagination on the public\nsurface; the picker is meant to fit in one chat turn).",
        "operationId": "list_dialer_agents_voice_dialer_agents_get",
        "parameters": [
          {
            "description": "Filter by agent role (e.g. \"SDR\", \"AE\", \"Receptionist\", \"CSM\").",
            "in": "query",
            "name": "role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by agent role (e.g. \"SDR\", \"AE\", \"Receptionist\", \"CSM\").",
              "title": "Role"
            }
          },
          {
            "description": "Filter by status (e.g. \"active\"). Defaults to all.",
            "in": "query",
            "name": "agent_status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by status (e.g. \"active\"). Defaults to all.",
              "title": "Agent Status"
            }
          },
          {
            "description": "\"agent\" or \"twin\". Defaults to all.",
            "in": "query",
            "name": "entity_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "\"agent\" or \"twin\". Defaults to all.",
              "title": "Entity Type"
            }
          },
          {
            "description": "Substring match on agent name.",
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Substring match on agent name.",
              "title": "Search"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DialerAgentsListResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List voice agents available for a dialer session",
        "tags": [
          "Voice"
        ],
        "x-graph8-scope": "voice:read",
        "x-graph8-tier": "read"
      }
    },
    "/voice/dialer/calls": {
      "get": {
        "description": "Return up to ``limit`` recent dialer call summaries.\n\nAt least ONE of (contact_id, user_email, parallel_session_id) MUST\nbe supplied - org id alone is not a valid filter (would firehose\nthe entire org's call history). 422 otherwise.\n\nSummary rows do NOT include the transcript blob (5-50 KB each).\nUse ``has_transcript`` to decide whether to fetch the full\ntranscript via ``GET /voice/dialer/calls/{room_name}/transcript``.\n\nOrg isolation is enforced server-side by the voice route: the org id\non the API key is forwarded as a required query param, so a call row\nfrom another tenant cannot leak into the response.",
        "operationId": "list_calls_for_contact_voice_dialer_calls_get",
        "parameters": [
          {
            "description": "CDP contact id (string form of mashup_contacts.id). If you only have a CRM-overlay id (cb_contact_extensions.id), resolve it via the contacts endpoint first. Optional - supply at least one of contact_id, user_email, or parallel_session_id.",
            "in": "query",
            "name": "contact_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "CDP contact id (string form of mashup_contacts.id). If you only have a CRM-overlay id (cb_contact_extensions.id), resolve it via the contacts endpoint first. Optional - supply at least one of contact_id, user_email, or parallel_session_id.",
              "title": "Contact Id"
            }
          },
          {
            "description": "SDR email. Returns dialer calls where the parent ParallelDialSession.user_email matches. Use for incremental ingestion of one SDR's call history.",
            "in": "query",
            "name": "user_email",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "SDR email. Returns dialer calls where the parent ParallelDialSession.user_email matches. Use for incremental ingestion of one SDR's call history.",
              "title": "User Email"
            }
          },
          {
            "description": "Filter to a single ParallelDialSession.session_id.",
            "in": "query",
            "name": "parallel_session_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter to a single ParallelDialSession.session_id.",
              "title": "Parallel Session Id"
            }
          },
          {
            "description": "ISO-8601 timestamp. Only return calls with created_at >= this value. Use for incremental polling (pass the max created_at from the previous page on the next call).",
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "ISO-8601 timestamp. Only return calls with created_at >= this value. Use for incremental polling (pass the max created_at from the previous page on the next call).",
              "title": "Created After"
            }
          },
          {
            "description": "Max calls to return, newest first. Capped at 100.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "Max calls to return, newest first. Capped at 100.",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CallsListResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List dialer calls (filter by contact, SDR, or session)",
        "tags": [
          "Voice"
        ],
        "x-graph8-scope": "voice:read",
        "x-graph8-tier": "read"
      }
    },
    "/voice/dialer/calls/{room_name}/grading": {
      "get": {
        "description": "Return the AI-generated grading payload for a dialer call.\n\nReturns ``status=\"pending\"`` when grading is still being computed\n(voice responds 204). Returns 404 if the call does not exist for the\ncaller's org.",
        "operationId": "get_call_grading_voice_dialer_calls__room_name__grading_get",
        "parameters": [
          {
            "description": "LiveKit room / call identifier (`livekit_room_name`).",
            "in": "path",
            "name": "room_name",
            "required": true,
            "schema": {
              "description": "LiveKit room / call identifier (`livekit_room_name`).",
              "title": "Room Name",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CallGradingResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get AI call grading for a single dialer call",
        "tags": [
          "Voice"
        ],
        "x-graph8-scope": "voice:read",
        "x-graph8-tier": "read"
      }
    },
    "/voice/dialer/calls/{room_name}/transcript": {
      "get": {
        "description": "Return the speaker-segmented transcript for a dialer call.\n\n``status=\"empty\"`` indicates the call row exists but the transcript\nhas not yet been flushed to the database (the call may still be in\nprogress, or the persistor may be in-flight). 404 is raised if the\ncall does not exist for the caller's org.\n\nThe voice service is org-scoped server-side: we forward the caller's\norg id so any cross-tenant row is treated as not-found.",
        "operationId": "get_call_transcript_voice_dialer_calls__room_name__transcript_get",
        "parameters": [
          {
            "description": "LiveKit room / call identifier (`livekit_room_name`).",
            "in": "path",
            "name": "room_name",
            "required": true,
            "schema": {
              "description": "LiveKit room / call identifier (`livekit_room_name`).",
              "title": "Room Name",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CallTranscriptResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get the persisted transcript for a single dialer call",
        "tags": [
          "Voice"
        ],
        "x-graph8-scope": "voice:read",
        "x-graph8-tier": "read"
      }
    },
    "/voice/dialer/missed-callbacks": {
      "get": {
        "description": "Inbound calls that were not picked up, with caller / contact info.",
        "operationId": "list_missed_callbacks_voice_dialer_missed_callbacks_get",
        "parameters": [
          {
            "description": "Max rows to return.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Max rows to return.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MissedCallbacksResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List missed inbound callbacks",
        "tags": [
          "Voice"
        ],
        "x-graph8-scope": "voice:read",
        "x-graph8-tier": "read"
      }
    },
    "/voice/dialer/numbers": {
      "get": {
        "description": "List phone numbers available to the dialer for this org.\n\nEach row carries seven-day usage stats (``calls_today``, ``calls_7d``,\n``connect_rate_7d``) and the ``daily_limit`` so an agent can choose\nthe next number to use without a follow-up call.",
        "operationId": "list_dialer_numbers_voice_dialer_numbers_get",
        "parameters": [
          {
            "description": "Optional - restrict to numbers assigned to a specific SDR.",
            "in": "query",
            "name": "user_email",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Optional - restrict to numbers assigned to a specific SDR.",
              "title": "User Email"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DialerNumbersListResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List dialer-eligible phone numbers",
        "tags": [
          "Voice"
        ],
        "x-graph8-scope": "voice:read",
        "x-graph8-tier": "read"
      }
    },
    "/voice/dialer/sessions": {
      "get": {
        "description": "List parallel dialer sessions for the authenticated org.\n\nForwards to the voice service's ``GET /api/parallel-calls/sessions``\nendpoint with ``org_id`` pinned to the API key's org. All filtering /\npaging arguments map 1:1 to the upstream contract.",
        "operationId": "list_dialer_sessions_voice_dialer_sessions_get",
        "parameters": [
          {
            "description": "Page number (1-indexed).",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "description": "Page number (1-indexed).",
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "description": "Sessions per page (max 200).",
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Sessions per page (max 200).",
              "maximum": 200,
              "minimum": 1,
              "title": "Page Size",
              "type": "integer"
            }
          },
          {
            "description": "Comma-separated session statuses (e.g. \"ACTIVE,PAUSED\").",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma-separated session statuses (e.g. \"ACTIVE,PAUSED\").",
              "title": "Status"
            }
          },
          {
            "description": "Filter by SDR email (substring).",
            "in": "query",
            "name": "user_email",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by SDR email (substring).",
              "title": "User Email"
            }
          },
          {
            "description": "Filter by session name (substring).",
            "in": "query",
            "name": "name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by session name (substring).",
              "title": "Name"
            }
          },
          {
            "description": "Filter by campaign id (substring).",
            "in": "query",
            "name": "campaign_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by campaign id (substring).",
              "title": "Campaign Id"
            }
          },
          {
            "description": "Filter by list id stored in session metadata.",
            "in": "query",
            "name": "list_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by list id stored in session metadata.",
              "title": "List Id"
            }
          },
          {
            "description": "Filter by list title (substring).",
            "in": "query",
            "name": "list_name",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by list title (substring).",
              "title": "List Name"
            }
          },
          {
            "description": "ISO timestamp - sessions created on/after.",
            "in": "query",
            "name": "date_from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "ISO timestamp - sessions created on/after.",
              "title": "Date From"
            }
          },
          {
            "description": "ISO timestamp - sessions created on/before.",
            "in": "query",
            "name": "date_to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "ISO timestamp - sessions created on/before.",
              "title": "Date To"
            }
          },
          {
            "description": "Column to sort on (e.g. \"created_at\", \"updated_at\", \"total_calls\").",
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Column to sort on (e.g. \"created_at\", \"updated_at\", \"total_calls\").",
              "title": "Sort By"
            }
          },
          {
            "description": "\"asc\" or \"desc\". Defaults to desc.",
            "in": "query",
            "name": "sort_order",
            "required": false,
            "schema": {
              "default": "desc",
              "description": "\"asc\" or \"desc\". Defaults to desc.",
              "title": "Sort Order",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DialerSessionsListResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List parallel dialer sessions",
        "tags": [
          "Voice"
        ],
        "x-graph8-scope": "voice:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create a new parallel-dialer session bound to the caller's org.\n\nThe session is created in ``PAUSED`` state - no calls are placed\nuntil the SDR opens the dialer UI and joins the Twilio conference.\nThe chat caller can then use ``PATCH /voice/dialer/sessions/{id}/status``\nor any frontend control to pause / resume / stop later.\n\nOrg and user are pinned server-side from the API key. The caller\ncannot override them.",
        "operationId": "create_dialer_session_voice_dialer_sessions_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DialerSessionCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DialerSessionCreateResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create a parallel-dialer session in PAUSED state",
        "tags": [
          "Voice"
        ],
        "x-graph8-scope": "voice:run",
        "x-graph8-tier": "external"
      }
    },
    "/voice/dialer/sessions/{session_id}/resume": {
      "post": {
        "description": "Resume a PAUSED parallel-dialer session.\n\nThe voice service's ``PATCH /sessions/{id}/status`` rejects\n``ACTIVE`` - the real resume flow is to call ``start-session`` again\nwith the existing ``session_id`` and a fresh batch of contacts. This\nroute does the lookup + filtering + forwarding in one shot so an MCP\ncaller only has to supply the session id (and optionally a batch\nsize).\n\nSteps performed server-side:\n\n1. Fetch the session via ``GET /api/parallel-calls/sessions``\n   (filtered to the caller's org). Voice has no per-id GET, so we\n   page with ``page_size=200`` and find the row.\n2. Verify the session belongs to the caller's org and is in the\n   ``PAUSED`` state. ACTIVE / COMPLETED sessions return 422.\n3. Read ``list_id`` and the ``list_offset`` cursor from\n   ``session_metadata``. Sessions created without a ``list_id``\n   (ad-hoc / campaign-mode) cannot be resumed via this route and\n   return 422.\n4. Page contacts out of the source list starting at the cursor,\n   skipping rows already in ``session.contact_ids`` and rows that\n   have no usable phone field.\n5. Forward up to ``max_contacts`` rows to voice's\n   ``/api/parallel-calls/start-session`` with the existing\n   ``session_id``. Voice de-duplicates active calls within the\n   session and auto-promotes status to ACTIVE on success.\n\nThe ``list_offset`` we send back to voice is advanced by the total\nnumber of rows we read from the list (called + skipped + dialed) so\na future resume picks up where we left off, not where the previous\npause cursor sat.",
        "operationId": "resume_dialer_session_voice_dialer_sessions__session_id__resume_post",
        "parameters": [
          {
            "description": "Session UUID.",
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "description": "Session UUID.",
              "minLength": 1,
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DialerSessionResumeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DialerSessionResumeResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Resume a paused parallel-dialer session by auto-fetching next batch",
        "tags": [
          "Voice"
        ],
        "x-graph8-scope": "voice:run",
        "x-graph8-tier": "external"
      }
    },
    "/voice/dialer/sessions/{session_id}/status": {
      "patch": {
        "description": "Lifecycle hook for a dialer session.\n\n- ``PAUSED`` pauses an active session.\n- ``COMPLETED`` ends the session (one-way; reopen requires the\n  voice frontend's manual-dial flow).\n\nTo RESUME a paused session use ``POST /voice/dialer/sessions/{id}/resume``\n— the voice service rejects a PATCH to ``ACTIVE`` (the resume flow is a\nfresh start-session call), so ``ACTIVE`` is rejected here with a 422 that\npoints at the correct endpoint rather than forwarding an opaque 400.\n\n``FAILED`` is reserved for system use and is rejected here.",
        "operationId": "update_dialer_session_status_voice_dialer_sessions__session_id__status_patch",
        "parameters": [
          {
            "description": "Session UUID.",
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "description": "Session UUID.",
              "minLength": 1,
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DialerSessionStatusUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DialerSessionStatusUpdateResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Pause, resume, or stop a parallel-dialer session",
        "tags": [
          "Voice"
        ],
        "x-graph8-scope": "voice:run",
        "x-graph8-tier": "external"
      }
    },
    "/voice/dialer/stats": {
      "get": {
        "description": "Return aggregated dialer metrics for the caller's org.\n\nOrg scoping is enforced server-side: the voice service accepts a\n``user_email`` filter but the org is always pinned to the API key.",
        "operationId": "get_dialer_stats_voice_dialer_stats_get",
        "parameters": [
          {
            "description": "Filter to a single session.",
            "in": "query",
            "name": "session_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter to a single session.",
              "title": "Session Id"
            }
          },
          {
            "description": "Filter to one SDR's calls.",
            "in": "query",
            "name": "user_email",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter to one SDR's calls.",
              "title": "User Email"
            }
          },
          {
            "description": "Start date \"YYYY-MM-DD\".",
            "in": "query",
            "name": "date_from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Start date \"YYYY-MM-DD\".",
              "title": "Date From"
            }
          },
          {
            "description": "End date \"YYYY-MM-DD\".",
            "in": "query",
            "name": "date_to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "End date \"YYYY-MM-DD\".",
              "title": "Date To"
            }
          },
          {
            "description": "\"DAILY\" for per-day rows, \"TOTAL\" for one summary row.",
            "in": "query",
            "name": "aggregation",
            "required": false,
            "schema": {
              "default": "DAILY",
              "description": "\"DAILY\" for per-day rows, \"TOTAL\" for one summary row.",
              "title": "Aggregation",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DialerStatsResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Parallel dialer analytics report",
        "tags": [
          "Voice"
        ],
        "x-graph8-scope": "voice:read",
        "x-graph8-tier": "read"
      }
    },
    "/webhooks": {
      "get": {
        "description": "List all webhook subscriptions for the organization.",
        "operationId": "list_webhooks_webhooks_get",
        "parameters": [
          {
            "description": "Filter by active status",
            "in": "query",
            "name": "is_active",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by active status",
              "title": "Is Active"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_WebhookResponse__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Webhooks",
        "tags": [
          "Webhooks"
        ],
        "x-graph8-scope": "webhooks:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create a new webhook subscription. Returns the secret (only shown once).",
        "operationId": "create_webhook_webhooks_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WebhookResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Webhook",
        "tags": [
          "Webhooks"
        ],
        "x-graph8-scope": "webhooks:run",
        "x-graph8-tier": "external"
      }
    },
    "/webhooks/events": {
      "get": {
        "description": "List all available webhook event types, each with a category + description.",
        "operationId": "list_webhook_events_webhooks_events_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_WebhookEventResponse__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Webhook Events",
        "tags": [
          "Webhooks"
        ],
        "x-graph8-scope": "webhooks:read",
        "x-graph8-tier": "read"
      }
    },
    "/webhooks/{webhook_id}": {
      "delete": {
        "description": "Delete a webhook subscription.",
        "operationId": "delete_webhook_webhooks__webhook_id__delete",
        "parameters": [
          {
            "description": "Webhook subscription ID",
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "description": "Webhook subscription ID",
              "title": "Webhook Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Webhook",
        "tags": [
          "Webhooks"
        ],
        "x-graph8-scope": "webhooks:delete",
        "x-graph8-tier": "destructive"
      },
      "get": {
        "description": "Get webhook subscription details (secret is not returned).",
        "operationId": "get_webhook_webhooks__webhook_id__get",
        "parameters": [
          {
            "description": "Webhook subscription ID",
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "description": "Webhook subscription ID",
              "title": "Webhook Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WebhookResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Webhook",
        "tags": [
          "Webhooks"
        ],
        "x-graph8-scope": "webhooks:read",
        "x-graph8-tier": "read"
      },
      "patch": {
        "description": "Update a webhook subscription.",
        "operationId": "update_webhook_webhooks__webhook_id__patch",
        "parameters": [
          {
            "description": "Webhook subscription ID",
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "description": "Webhook subscription ID",
              "title": "Webhook Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WebhookResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Webhook",
        "tags": [
          "Webhooks"
        ],
        "x-graph8-scope": "webhooks:run",
        "x-graph8-tier": "external"
      }
    },
    "/webhooks/{webhook_id}/deliveries": {
      "get": {
        "description": "List delivery attempts for a webhook subscription.",
        "operationId": "list_webhook_deliveries_webhooks__webhook_id__deliveries_get",
        "parameters": [
          {
            "description": "Webhook subscription ID",
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "description": "Webhook subscription ID",
              "title": "Webhook Id",
              "type": "string"
            }
          },
          {
            "description": "Page number",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "description": "Page number",
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "description": "Items per page",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Items per page",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Filter by delivery status",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by delivery status",
              "title": "Status"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_list_WebhookDeliveryResponse__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Webhook Deliveries",
        "tags": [
          "Webhooks"
        ],
        "x-graph8-scope": "webhooks:read",
        "x-graph8-tier": "read"
      }
    },
    "/webhooks/{webhook_id}/rotate-secret": {
      "post": {
        "description": "Rotate the signing secret for a webhook subscription. Returns the new secret (shown once).",
        "operationId": "rotate_webhook_secret_webhooks__webhook_id__rotate_secret_post",
        "parameters": [
          {
            "description": "Webhook subscription ID",
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "description": "Webhook subscription ID",
              "title": "Webhook Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WebhookResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Rotate Webhook Secret",
        "tags": [
          "Webhooks"
        ],
        "x-graph8-scope": "webhooks:run",
        "x-graph8-tier": "external"
      }
    },
    "/workflows": {
      "get": {
        "description": "List workflow actions (``runtime_type='workflow'``) owned by the org.\n\nVoice's underlying ``GET /list/{org_id}`` lists all actions; we pin\n``runtime_type=workflow`` so the public surface returns workflows\nonly. Raw action listing (LLM/API/script skills) is intentionally\nnot exposed here.",
        "operationId": "list_workflows_workflows_get",
        "parameters": [
          {
            "description": "Filter by enabled flag.",
            "in": "query",
            "name": "enabled",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by enabled flag.",
              "title": "Enabled"
            }
          },
          {
            "description": "Filter by category.",
            "in": "query",
            "name": "category",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by category.",
              "title": "Category"
            }
          },
          {
            "description": "Templates only when true.",
            "in": "query",
            "name": "is_template",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Templates only when true.",
              "title": "Is Template"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Workflows Workflows Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List workflows for the caller's org",
        "tags": [
          "Workflows"
        ],
        "x-graph8-scope": "workflows:read",
        "x-graph8-tier": "read"
      },
      "post": {
        "description": "Create a new workflow. Pins ``org_id`` and ``runtime_type='workflow'``\nserver-side - the body cannot override either.\n\nTranslates the public ``config`` field to voice's internal\n``skill_config`` before forwarding (see module docstring).",
        "operationId": "create_workflow_workflows_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "description": "Workflow create payload (voice ActionCreateRequest).",
                "title": "Body",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Create Workflow Workflows Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create a workflow",
        "tags": [
          "Workflows"
        ],
        "x-graph8-scope": "workflows:run",
        "x-graph8-tier": "external"
      }
    },
    "/workflows/dispositions": {
      "get": {
        "description": "Return every disposition value accepted by ``disposition_filters`` on the\n``new_call_disposition`` trigger - system values AND the caller org's own\ncustom dispositions.\n\nEach entry carries ``origin``: ``system`` for the built-in vocabulary,\n``custom`` for an org-defined one (whose ``value`` is the stored\n``custom_{id}`` key, never the display name). ``category`` keeps its\nexisting meaning: ``sdr_selectable`` a rep can pick it, ``system_set`` only\nthe dialer backend writes it.\n\nAuthority for the system half is voice's ``SDR_SELECTABLE_DISPOSITIONS``\n(``voice/graph8_livekit/schemas/dispositions.py``) plus the two system-set\nvalues the dialer also emits (``sdr_hangup``, ``failed``). That half is\ninlined here and a parity test\n(``developer_api/tests/test_workflow_dispositions.py``) fails the build if\nvoice adds a value that is not mirrored - the previous \"mirror the change\nhere\" comment was not enforced and silently went stale when ``busy`` was\nadded.\n\nThe custom half comes from voice's ``GET /api/dialer/dispositions/{org_id}``,\nwith the org pinned server-side from the authenticated caller and echoed in\nthe ``X-Org-Id`` header voice's tenant gate requires. Nothing about the\nrequest body or query can influence which org is read.\n\nDegraded mode: if voice is unreachable or errors, this returns the system\nvocabulary alone with ``source='static_fallback'`` and logs a warning,\nrather than failing the whole call. An agent that sees\n``source='static_fallback'`` should say it could not confirm custom\ndispositions instead of asserting none exist.\n\nLegacy aliases (``positive``/``neutral``/``negative``) are deliberately\nabsent: ``normalize_disposition`` rewrites them before storage, so a filter\non them could never match.",
        "operationId": "list_dispositions_workflows_dispositions_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Dispositions Workflows Dispositions Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List valid call disposition values (system + this org's custom)",
        "tags": [
          "Workflows"
        ],
        "x-graph8-scope": "workflows:read",
        "x-graph8-tier": "read"
      }
    },
    "/workflows/executions": {
      "get": {
        "description": "List this org's workflow executions, newest first, with SQL-side\npagination - the recovery path for a lost ``execution_id`` (the single\n``GET /workflows/executions/{execution_id}`` read below needs an id you\nno longer have).\n\nOrg is pinned server-side from the authenticated caller and passed to\nvoice in the PATH; a client-supplied ``org_id`` query param is ignored,\nso one tenant can never list another tenant's executions (the voice\nbacking route trusts its path ``org_id``, so pinning here is the tenant\nboundary - getting it wrong is a cross-org IDOR). ``runtime_type`` is\npinned to ``workflow`` so only workflow runs surface here, matching the\nsibling ``GET /workflows`` which does not expose raw LLM/API/script\naction runs.\n\nProxies voice's ``GET /api/v1/executions/list/{org_id}`` and returns its\n``ExecutionListResponse`` shape unchanged - ``{executions: [...],\ntotal_count: int}`` - consistent with this router's pass-through\nconvention (voice owns the execution DTO; re-declaring its ~20 fields\nhere would only drift). Voice also clamps ``limit`` to 1..200 SQL-side;\nthe bounds here reject an out-of-range page with a clean 422 before the\nround-trip.\n\nRead-only and additive: nothing is created, and no existing route changes.",
        "operationId": "list_workflow_executions_workflows_executions_get",
        "parameters": [
          {
            "description": "Filter to a single workflow's executions.",
            "in": "query",
            "name": "action_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter to a single workflow's executions.",
              "title": "Action Id"
            }
          },
          {
            "description": "Filter by execution status (equality match — one status per call). The backend writes seven values: pending|running|completed|failed|paused|pending_approval|stopped. The four terminal-or-early states are pending, running, completed, failed; paused and pending_approval are resumable, stopped is terminal.",
            "in": "query",
            "name": "status_filter",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by execution status (equality match — one status per call). The backend writes seven values: pending|running|completed|failed|paused|pending_approval|stopped. The four terminal-or-early states are pending, running, completed, failed; paused and pending_approval are resumable, stopped is terminal.",
              "title": "Status Filter"
            }
          },
          {
            "description": "Filter by the identity that started the run (user email, agent id, 'api', ...).",
            "in": "query",
            "name": "triggered_by",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by the identity that started the run (user email, agent id, 'api', ...).",
              "title": "Triggered By"
            }
          },
          {
            "description": "Page size (1..200).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Page size (1..200).",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Rows to skip for pagination.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "description": "Rows to skip for pagination.",
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Workflow Executions Workflows Executions Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List workflow executions for the caller's org (recover a lost execution_id)",
        "tags": [
          "Workflows"
        ],
        "x-graph8-scope": "workflows:read",
        "x-graph8-tier": "read"
      }
    },
    "/workflows/executions/{execution_id}": {
      "get": {
        "description": "Return execution status + output_data + token / cost telemetry.\n\nThe MCP polling pattern: call this until ``status`` reaches a TERMINAL\nvalue — ``completed``, ``failed`` or ``stopped``. A run can also sit in\n``paused`` or ``pending_approval`` (both non-terminal and resumable via\nthe lifecycle routes below), so a poller must treat those as \"keep\nwaiting\", not \"done\" — polling only for completed/failed hangs forever on\na paused or approval-gated run. The full set voice writes is\n``pending|running|completed|failed|paused|pending_approval|stopped``.\nVoice's GET enforces tenant isolation natively so no pre-flight is needed\nfor the read path.",
        "operationId": "get_execution_workflows_executions__execution_id__get",
        "parameters": [
          {
            "description": "Execution UUID.",
            "in": "path",
            "name": "execution_id",
            "required": true,
            "schema": {
              "description": "Execution UUID.",
              "minLength": 1,
              "title": "Execution Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Get Execution Workflows Executions  Execution Id  Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get execution status / result",
        "tags": [
          "Workflows"
        ],
        "x-graph8-scope": "workflows:read",
        "x-graph8-tier": "read"
      }
    },
    "/workflows/executions/{execution_id}/pause": {
      "post": {
        "description": "Pause a running workflow execution. Pre-flight enforces that the\nexecution belongs to the caller's org before forwarding to voice.",
        "operationId": "pause_execution_workflows_executions__execution_id__pause_post",
        "parameters": [
          {
            "description": "Execution UUID.",
            "in": "path",
            "name": "execution_id",
            "required": true,
            "schema": {
              "description": "Execution UUID.",
              "minLength": 1,
              "title": "Execution Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "description": "{reason?, message?}",
                "title": "Body",
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Pause Execution Workflows Executions  Execution Id  Pause Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Pause a running execution (tenant-checked)",
        "tags": [
          "Workflows"
        ],
        "x-graph8-scope": "workflows:run",
        "x-graph8-tier": "external"
      }
    },
    "/workflows/executions/{execution_id}/resume": {
      "post": {
        "description": "Resume a paused execution. Pre-flight enforces tenant ownership.",
        "operationId": "resume_execution_workflows_executions__execution_id__resume_post",
        "parameters": [
          {
            "description": "Execution UUID.",
            "in": "path",
            "name": "execution_id",
            "required": true,
            "schema": {
              "description": "Execution UUID.",
              "minLength": 1,
              "title": "Execution Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "description": "{from_step?, skip_failed?}",
                "title": "Body",
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Resume Execution Workflows Executions  Execution Id  Resume Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Resume a paused execution (tenant-checked)",
        "tags": [
          "Workflows"
        ],
        "x-graph8-scope": "workflows:run",
        "x-graph8-tier": "external"
      }
    },
    "/workflows/executions/{execution_id}/stop": {
      "post": {
        "description": "Stop an execution permanently. Pre-flight enforces tenant ownership.",
        "operationId": "stop_execution_workflows_executions__execution_id__stop_post",
        "parameters": [
          {
            "description": "Execution UUID.",
            "in": "path",
            "name": "execution_id",
            "required": true,
            "schema": {
              "description": "Execution UUID.",
              "minLength": 1,
              "title": "Execution Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "description": "{reason?, save_partial_results?, message?}",
                "title": "Body",
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Stop Execution Workflows Executions  Execution Id  Stop Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Permanently stop an execution (tenant-checked)",
        "tags": [
          "Workflows"
        ],
        "x-graph8-scope": "workflows:run",
        "x-graph8-tier": "external"
      }
    },
    "/workflows/forms/{form_id}/fields": {
      "get": {
        "description": "Sample recent submissions for a form and return the unique field names.\n\nUse this to populate the ``form_fields[]`` array on a\n``new_form_submitted`` trigger node config at create time, mirroring\nwhat ``NodeConfigPanel.handleFormSelect`` does on the frontend when\nthe user selects a form in the dropdown.\n\nWithout these names pre-populated, downstream nodes cannot reference\nsubmitted values via ``${<trigger_node_id>.<field>}`` until the user\nre-selects the form in the UI.\n\nCalls ``forms`` handlers in-process (no voice round-trip). Forms data\nlives in ClickHouse via ``apps.forms()`` — sampled submissions are\npaginated server-side; we only ever read ``per_page=10`` here.\n\nReturns ``{form_id, fields: [str], sample_size: int}``. Empty\n``fields`` means no submissions exist yet — the caller should fall\nback to asking the user for the field list, or accept that\n``${trigger.<field>}`` references will only resolve once a real\nsubmission arrives.",
        "operationId": "describe_form_fields_workflows_forms__form_id__fields_get",
        "parameters": [
          {
            "description": "HTML form id (form_tag_id)",
            "in": "path",
            "name": "form_id",
            "required": true,
            "schema": {
              "description": "HTML form id (form_tag_id)",
              "title": "Form Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Describe Form Fields Workflows Forms  Form Id  Fields Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Discover form field names from recent submissions (resolver helper)",
        "tags": [
          "Workflows"
        ],
        "x-graph8-scope": "workflows:read",
        "x-graph8-tier": "read"
      }
    },
    "/workflows/inbox-tags": {
      "get": {
        "description": "Resolve human tag descriptions (\"out of office\", \"interested\", \"referred\nme to a colleague\") into the concrete tag IDs required by the\n``new_inbox_tag_set`` trigger's ``tag_filters``.\n\nThis is the resolver that makes reply-intent workflows authorable. Without\nit an agent has no way to turn a tag NAME into a tag ID, so it falls back to\na ``new_email_reply`` trigger plus a condition node grepping the body text -\nwhich is both fragile and duplicates work the inbox AI agent already did\nwhen it tagged the message on arrival.\n\n``ai_applicable_only=true`` narrows to tags whose ``ai_can_apply`` is set,\ni.e. the ones an agent applies automatically the moment an email lands.\nThose are the tags a ``new_inbox_tag_set`` trigger will actually fire on\nwithout a human touching anything.\n\nCalls the ``ai_inbox`` tag service in-process (no voice round-trip). Org is\npinned from the authenticated caller and used as the Postgres tenant schema;\nnothing client-supplied selects the tenant.\n\nReturns ``{tags: [{id, name, description, color, ai_can_apply}], total}``.",
        "operationId": "list_inbox_tags_workflows_inbox_tags_get",
        "parameters": [
          {
            "description": "Return only tags an AI agent is allowed to apply automatically.",
            "in": "query",
            "name": "ai_applicable_only",
            "required": false,
            "schema": {
              "default": false,
              "description": "Return only tags an AI agent is allowed to apply automatically.",
              "title": "Ai Applicable Only",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Inbox Tags Workflows Inbox Tags Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List AI Inbox tags for the org (resolver helper)",
        "tags": [
          "Workflows"
        ],
        "x-graph8-scope": "workflows:read",
        "x-graph8-tier": "read"
      }
    },
    "/workflows/integrations/roam/groups": {
      "get": {
        "description": "Return Roam groups for ``send_roam_notification.recipient_id`` resolution.",
        "operationId": "list_roam_groups_workflows_integrations_roam_groups_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Roam Groups Workflows Integrations Roam Groups Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Roam groups connected to the org (resolver helper)",
        "tags": [
          "Workflows"
        ],
        "x-graph8-scope": "workflows:read",
        "x-graph8-tier": "read"
      }
    },
    "/workflows/integrations/roam/users": {
      "get": {
        "description": "Return Roam users for ``send_roam_notification.user_ids`` resolution.",
        "operationId": "list_roam_users_workflows_integrations_roam_users_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Roam Users Workflows Integrations Roam Users Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Roam users connected to the org (resolver helper)",
        "tags": [
          "Workflows"
        ],
        "x-graph8-scope": "workflows:read",
        "x-graph8-tier": "read"
      }
    },
    "/workflows/integrations/slack/channels": {
      "get": {
        "description": "Return Slack channels for ``send_slack_notification.channel_id`` resolution.",
        "operationId": "list_slack_channels_workflows_integrations_slack_channels_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Slack Channels Workflows Integrations Slack Channels Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Slack channels for the org (resolver helper)",
        "tags": [
          "Workflows"
        ],
        "x-graph8-scope": "workflows:read",
        "x-graph8-tier": "read"
      }
    },
    "/workflows/integrations/slack/users": {
      "get": {
        "description": "Return Slack workspace users for ``send_slack_notification.user_id`` resolution.",
        "operationId": "list_slack_users_workflows_integrations_slack_users_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Slack Users Workflows Integrations Slack Users Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Slack users for the org (resolver helper)",
        "tags": [
          "Workflows"
        ],
        "x-graph8-scope": "workflows:read",
        "x-graph8-tier": "read"
      }
    },
    "/workflows/mcp-servers": {
      "get": {
        "description": "Return MCP servers (with their tool lists) for ``tool.mcp_server_id`` resolution.\n\n``org_id`` is REQUIRED by voice (``voice/graph8_livekit/routers/mcp_servers.py``\ndeclares ``list_mcp_servers(org_id: str)`` with no default), so omitting it makes\nvoice answer 422, not an empty list. This route previously sat below the\n``/{action_id}`` catch-all and was unreachable, which hid the missing parameter -\nun-shadowing it turned a 404 into a 422 until this was fixed.\n\nThe org is pinned from the authenticated caller and is never read from the request,\nso a client cannot enumerate another tenant's MCP servers.",
        "operationId": "list_mcp_servers_workflows_mcp_servers_get",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Mcp Servers Workflows Mcp Servers Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List MCP servers connected to the org (resolver helper)",
        "tags": [
          "Workflows"
        ],
        "x-graph8-scope": "workflows:read",
        "x-graph8-tier": "read"
      }
    },
    "/workflows/node-types/schema": {
      "get": {
        "description": "Catalog every node type with its config schema, trigger output schemas,\nresolver-tool hints, and worked examples. Cached (LRU + 1h Cache-Control)\non voice's side - context-cheap to call repeatedly from MCP clients.",
        "operationId": "get_node_types_schema_workflows_node_types_schema_get",
        "parameters": [
          {
            "description": "\"slim\" returns name+type per field; \"full\" includes Pydantic JSON schema.",
            "in": "query",
            "name": "detail",
            "required": false,
            "schema": {
              "default": "slim",
              "description": "\"slim\" returns name+type per field; \"full\" includes Pydantic JSON schema.",
              "pattern": "^(slim|full)$",
              "title": "Detail",
              "type": "string"
            }
          },
          {
            "description": "If provided, return just one entry instead of the full catalog.",
            "in": "query",
            "name": "node_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "If provided, return just one entry instead of the full catalog.",
              "title": "Node Type"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Get Node Types Schema Workflows Node Types Schema Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Catalog of all workflow node types and their config schemas",
        "tags": [
          "Workflows"
        ],
        "x-graph8-scope": "workflows:read",
        "x-graph8-tier": "read"
      }
    },
    "/workflows/plan": {
      "post": {
        "description": "Compute a normalized plan for a graph that is NOT yet saved. Accepts\neither ``{config: {...}}`` or a raw graph ``{nodes, edges, start_node_id}``\ndirectly. Read-only: nothing is persisted or executed.",
        "operationId": "plan_inline_workflow_workflows_plan_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "description": "{config: {nodes, edges, ...}, include_cost?, include_audience_size?}",
                "title": "Body",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Plan Inline Workflow Workflows Plan Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Preview a normalized execution plan for an inline workflow graph",
        "tags": [
          "Workflows"
        ],
        "x-graph8-scope": "workflows:read",
        "x-graph8-tier": "read"
      }
    },
    "/workflows/validate": {
      "post": {
        "description": "Validate a workflow without saving. Returns errors + warnings +\nmissing_references so an MCP client can repair before retrying create.\n\nThe inner ``config`` is normalized the same way create/update do so\na caller can validate hybrid/ReactFlow shapes and get a clean answer\ninstead of a structural error from a key the validator didn't expect.",
        "operationId": "validate_workflow_workflows_validate_post",
        "parameters": [
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "description": "WorkflowValidateRequest: {config: {nodes, edges, start_node_id}}.",
                "title": "Body",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Validate Workflow Workflows Validate Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Validate a workflow graph (structural + reference resolution)",
        "tags": [
          "Workflows"
        ],
        "x-graph8-scope": "workflows:run",
        "x-graph8-tier": "external"
      }
    },
    "/workflows/{action_id}": {
      "delete": {
        "description": "Delete a workflow. Voice's delete returns ``{\"success\": true, ...}``\non success and 403 for system defaults - both pass through.",
        "operationId": "delete_workflow_workflows__action_id__delete",
        "parameters": [
          {
            "description": "Workflow action_id.",
            "in": "path",
            "name": "action_id",
            "required": true,
            "schema": {
              "description": "Workflow action_id.",
              "minLength": 1,
              "title": "Action Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Delete Workflow Workflows  Action Id  Delete",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete a workflow",
        "tags": [
          "Workflows"
        ],
        "x-graph8-scope": "workflows:delete",
        "x-graph8-tier": "destructive"
      },
      "get": {
        "description": "Return the full workflow graph (nodes + edges + trigger config).\n\nTranslates voice's internal ``skill_config`` field to public\n``config`` on the way out (see module docstring).",
        "operationId": "get_workflow_workflows__action_id__get",
        "parameters": [
          {
            "description": "Workflow action_id.",
            "in": "path",
            "name": "action_id",
            "required": true,
            "schema": {
              "description": "Workflow action_id.",
              "minLength": 1,
              "title": "Action Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Get Workflow Workflows  Action Id  Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get a workflow's full graph",
        "tags": [
          "Workflows"
        ],
        "x-graph8-scope": "workflows:read",
        "x-graph8-tier": "read"
      },
      "put": {
        "description": "Update a workflow. The voice update endpoint takes ``org_id`` as a\nquery param and the partial body in JSON, so we forward both.\n\nTranslates the public ``config`` field to voice's internal\n``skill_config`` before forwarding (see module docstring).",
        "operationId": "update_workflow_workflows__action_id__put",
        "parameters": [
          {
            "description": "Workflow action_id.",
            "in": "path",
            "name": "action_id",
            "required": true,
            "schema": {
              "description": "Workflow action_id.",
              "minLength": 1,
              "title": "Action Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "description": "Partial update payload (voice ActionUpdateRequest).",
                "title": "Body",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Update Workflow Workflows  Action Id  Put",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update a workflow's graph",
        "tags": [
          "Workflows"
        ],
        "x-graph8-scope": "workflows:run",
        "x-graph8-tier": "external"
      }
    },
    "/workflows/{action_id}/execute": {
      "post": {
        "description": "Trigger a workflow run. Returns ``execution_id`` for polling.\n\nPins ``org_id`` server-side; the caller cannot override which org's\nexecution row is created. ``triggered_by`` defaults to the caller's\nuser id when not supplied.",
        "operationId": "execute_workflow_workflows__action_id__execute_post",
        "parameters": [
          {
            "description": "Workflow action_id.",
            "in": "path",
            "name": "action_id",
            "required": true,
            "schema": {
              "description": "Workflow action_id.",
              "minLength": 1,
              "title": "Action Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "description": "ExecutionCreateRequest body.",
                "title": "Body",
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Execute Workflow Workflows  Action Id  Execute Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Execute a workflow",
        "tags": [
          "Workflows"
        ],
        "x-graph8-scope": "workflows:run",
        "x-graph8-tier": "external"
      }
    },
    "/workflows/{action_id}/plan": {
      "post": {
        "description": "Fetch a saved workflow's graph and compute its normalized plan. Org is\npinned server-side; the caller cannot preview another tenant's workflow.\nRead-only.",
        "operationId": "plan_workflow_workflows__action_id__plan_post",
        "parameters": [
          {
            "description": "Workflow action_id.",
            "in": "path",
            "name": "action_id",
            "required": true,
            "schema": {
              "description": "Workflow action_id.",
              "minLength": 1,
              "title": "Action Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "description": "{include_cost?, include_audience_size?}",
                "title": "Body",
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Plan Workflow Workflows  Action Id  Plan Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Preview a normalized execution plan for a saved workflow",
        "tags": [
          "Workflows"
        ],
        "x-graph8-scope": "workflows:read",
        "x-graph8-tier": "read"
      }
    },
    "/workflows/{action_id}/trigger-reset": {
      "post": {
        "description": "Stop reprocessing old events - sets the trigger cursor to now().",
        "operationId": "reset_trigger_cursor_workflows__action_id__trigger_reset_post",
        "parameters": [
          {
            "description": "Workflow action_id.",
            "in": "path",
            "name": "action_id",
            "required": true,
            "schema": {
              "description": "Workflow action_id.",
              "minLength": 1,
              "title": "Action Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Reset Trigger Cursor Workflows  Action Id  Trigger Reset Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Reset the trigger cursor to now",
        "tags": [
          "Workflows"
        ],
        "x-graph8-scope": "workflows:run",
        "x-graph8-tier": "external"
      }
    },
    "/workflows/{action_id}/trigger-status": {
      "get": {
        "description": "Return whether the workflow has a trigger, its type, and last cursor.",
        "operationId": "get_trigger_status_workflows__action_id__trigger_status_get",
        "parameters": [
          {
            "description": "Workflow action_id.",
            "in": "path",
            "name": "action_id",
            "required": true,
            "schema": {
              "description": "Workflow action_id.",
              "minLength": 1,
              "title": "Action Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "in": "header",
            "name": "X-Target-Org-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Target-Org-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Get Trigger Status Workflows  Action Id  Trigger Status Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Trigger status (cursor + config) for a workflow",
        "tags": [
          "Workflows"
        ],
        "x-graph8-scope": "workflows:read",
        "x-graph8-tier": "read"
      }
    }
  },
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "servers": [
    {
      "description": "Production",
      "url": "https://be.graph8.com/api/v1"
    },
    {
      "description": "QA",
      "url": "https://be.qa.graph8.com/api/v1"
    }
  ]
}
