{
  "openapi": "3.1.0",
  "info": {
    "title": "Vsyble API",
    "version": "1.0.0",
    "description": "Search for people and companies, enrich selected results, and manage outreach through scoped credentials. Requests and responses use JSON, and every operation requires a revocable Vsyble API key."
  },
  "externalDocs": {
    "description": "Vsyble API documentation",
    "url": "https://vsyble.com/docs/api"
  },
  "servers": [
    {
      "url": "https://api.vsyble.com",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Search",
      "description": "Find people or companies from public sources."
    },
    {
      "name": "Enrichment",
      "description": "Enrich explicitly selected, 1-based result numbers from a completed search made with this credential."
    }
  ],
  "security": [
    {
      "VsybleApiKey": []
    }
  ],
  "x-vsyble-rate-limits": {
    "perApiKey": {
      "limit": 60,
      "periodSeconds": 60
    },
    "perClientAddress": {
      "limit": 120,
      "periodSeconds": 60
    }
  },
  "paths": {
    "/v1/search": {
      "post": {
        "tags": ["Search"],
        "operationId": "search",
        "summary": "Search for people or companies",
        "description": "Choose a target or let Vsyble infer it from the query. Add structured filters for the selected target when needed.",
        "x-vsyble-allowance": {
          "name": "Search allowance",
          "description": "Search requests use the caller's Vsyble search allowance and are subject to credential spend controls.",
          "unit": "search request"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              },
              "examples": {
                "people": {
                  "value": {
                    "target": "people",
                    "query": "Revenue leaders at B2B software companies",
                    "limit": 5,
                    "search_type": "fast",
                    "filters": {
                      "seniority": "executive",
                      "requireLinkedIn": true
                    }
                  }
                },
                "companies": {
                  "value": {
                    "target": "companies",
                    "query": "AI infrastructure companies hiring sales leaders",
                    "limit": 10,
                    "search_type": "auto",
                    "filters": {
                      "employeeRange": "51-200",
                      "fundingStage": "series_a",
                      "hiringOnly": true,
                      "technology": "Kubernetes"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Search completed. Fewer results can be returned when the available public evidence does not satisfy the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponse"
                },
                "example": {
                  "request_id": "11111111-1111-4111-8111-111111111111",
                  "tool": "people_search",
                  "result_count": 1,
                  "duration_ms": 1840,
                  "people": [
                    {
                      "name": "Jordan Lee",
                      "jobTitle": "VP of Revenue",
                      "company": "Example Cloud",
                      "linkedinUrl": "https://www.linkedin.com/in/example-jordan-lee"
                    }
                  ],
                  "companies": [],
                  "search_results": [
                    {
                      "title": "Jordan Lee - VP of Revenue",
                      "url": "https://example.com/jordan-lee"
                    }
                  ],
                  "citations": ["https://example.com/jordan-lee"],
                  "model": "vsyble-people-fast"
                }
              }
            }
          },
          "400": {
            "description": "The JSON body or one of its fields is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "invalid_request",
                    "message": "limit must be an integer between 1 and 100",
                    "retry_after_seconds": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, expired, revoked, or unknown.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "The API key or account cannot use this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "insufficient_scope",
                    "message": "API key does not have the required permission",
                    "retry_after_seconds": 0
                  }
                }
              }
            }
          },
          "405": {
            "description": "The route only accepts POST requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "method_not_allowed",
                    "message": "Only POST is supported"
                  }
                }
              }
            }
          },
          "409": {
            "description": "The request ID conflicts with an existing search request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "duplicate_request",
                    "message": "This request ID has already been used",
                    "request_id": "33333333-3333-4333-8333-333333333333",
                    "retry_after_seconds": 0
                  }
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds 16 KiB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "request_too_large",
                    "message": "Request body is too large"
                  }
                }
              }
            }
          },
          "429": {
            "description": "An edge rate limit, account quota, or credential spend limit was reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "api_rate_limit_exceeded",
                    "message": "Too many Vsyble API requests",
                    "retry_after_seconds": 60
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying, when available.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              }
            }
          },
          "500": {
            "description": "The search failed unexpectedly. The response remains safe for callers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "The search could not be completed",
                    "request_id": "33333333-3333-4333-8333-333333333333",
                    "retry_after_seconds": 0
                  }
                }
              }
            }
          },
          "502": {
            "description": "The upstream search provider returned an unusable response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "search_provider_error",
                    "message": "The search provider could not complete the request",
                    "request_id": "33333333-3333-4333-8333-333333333333",
                    "retry_after_seconds": 0
                  }
                }
              }
            }
          },
          "503": {
            "description": "The gateway, credential verifier, quota service, or another required dependency is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "api_unavailable",
                    "message": "The Vsyble API is temporarily unavailable"
                  }
                }
              }
            }
          },
          "504": {
            "description": "The search provider did not finish before the request deadline.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "search_timeout",
                    "message": "The search provider did not respond before the timeout",
                    "request_id": "33333333-3333-4333-8333-333333333333",
                    "retry_after_seconds": 0
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/enrich": {
      "post": {
        "tags": ["Enrichment"],
        "operationId": "enrichSearchResults",
        "summary": "Enrich selected search results",
        "description": "Enrich only the requested 1-based result numbers from a completed search made with this API key. Pass its request_id to select that search; omission uses the latest completed search. After a people search, choose exactly one field: email, phone, or university. After a company search, omit field. Repeat the same request to continue work that is still running.",
        "x-vsyble-allowance": {
          "name": "Contact enrichment allowance",
          "description": "Each newly selected result—and, for people, its requested field—can use the caller's contact enrichment allowance. Repeating the same selection resumes or returns its existing work without reserving it again.",
          "unit": "new selected result"
        },
        "requestBody": {
          "required": true,
          "description": "Selected result numbers and, for people only, the single field to enrich.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnrichmentRequest"
              },
              "example": {
                "request_id": "11111111-1111-4111-8111-111111111111",
                "result_numbers": [1, 3],
                "field": "email"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The current enrichment state. A running response can be continued by repeating the same request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnrichmentResponse"
                },
                "example": {
                  "request_id": "11111111-1111-4111-8111-111111111111",
                  "tool": "people_search",
                  "entity_type": "person",
                  "status": "completed",
                  "done": true,
                  "result_count": 2,
                  "enriched_count": 2,
                  "results": [
                    {
                      "result_position": 0,
                      "result_number": 1,
                      "status": "completed",
                      "result": {
                        "name": "Jordan Lee",
                        "email": "jordan.lee@example.com"
                      }
                    },
                    {
                      "result_position": 2,
                      "result_number": 3,
                      "status": "completed",
                      "result": {
                        "name": "Taylor Morgan",
                        "email": "taylor.morgan@example.com"
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The JSON body or one of its fields is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "invalid_request",
                    "message": "limit must be an integer between 1 and 100",
                    "retry_after_seconds": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, expired, revoked, or unknown.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "The API key or account cannot use this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "insufficient_scope",
                    "message": "API key does not have the required permission",
                    "retry_after_seconds": 0
                  }
                }
              }
            }
          },
          "404": {
            "description": "No completed search exists for this API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "search_not_found",
                    "message": "Run a people or company search before enriching",
                    "retry_after_seconds": 0
                  }
                }
              }
            }
          },
          "405": {
            "description": "The route only accepts POST requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "method_not_allowed",
                    "message": "Only POST is supported"
                  }
                }
              }
            }
          },
          "409": {
            "description": "A selected result number is not available in the selected search.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "invalid_result_number",
                    "message": "Result 3 is not in the selected search",
                    "retry_after_seconds": 0
                  }
                }
              }
            }
          },
          "413": {
            "description": "The request body exceeds 16 KiB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "request_too_large",
                    "message": "Request body is too large"
                  }
                }
              }
            }
          },
          "429": {
            "description": "An edge rate limit, account quota, or credential spend limit was reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "api_rate_limit_exceeded",
                    "message": "Too many Vsyble API requests",
                    "retry_after_seconds": 60
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying, when available.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              }
            }
          },
          "500": {
            "description": "The enrichment failed unexpectedly. The response remains safe for callers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "The enrichment could not be completed",
                    "retry_after_seconds": 0
                  }
                }
              }
            }
          },
          "503": {
            "description": "The gateway, credential verifier, quota service, or another required dependency is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "api_unavailable",
                    "message": "The Vsyble API is temporarily unavailable"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/outreach": {
      "post": {
        "tags": ["Outreach"],
        "operationId": "manageOutreach",
        "summary": "Read or manage outreach",
        "description": "Uses outreach_read, outreach_manage or outreach_send according to the action. Inbox reads (attention, searchThreads, getThread, getEmail, getAttachment) use a key's opt-in vsyble.metadata or vsyble.readonly permission. Existing credentials gain no new permissions; reconnect or issue a new scoped key. Omit organizationId to use the current workspace. Sending actions require confirmSend: true after explicit user approval. Existing campaign authorization, revisions, administrator approvals, suppression, verification and sending limits remain authoritative. Never blindly retry a mutation whose outcome is uncertain.",
        "x-vsyble-allowance": {
          "name": "Outreach allowances",
          "description": "Campaign reads and controls use no model tokens. Preparation, fit scoring, recipient verification and delivery use the existing workflow's allowances and provider accounts. MCP adds no separate model charge.",
          "unit": "workflow operation"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "action": {
                        "type": "string",
                        "const": "workspace"
                      }
                    },
                    "required": ["action"],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "after": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "action": {
                        "type": "string",
                        "const": "list"
                      }
                    },
                    "required": ["action"],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "campaignId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "page": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 10000
                      },
                      "status": {
                        "type": "string",
                        "enum": ["all", "needs_review", "scheduled", "sent"]
                      },
                      "action": {
                        "type": "string",
                        "const": "detail"
                      }
                    },
                    "required": ["campaignId", "action"],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "campaignId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "expectedRevision": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 2147483647
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "status": {
                        "type": "string",
                        "enum": ["draft", "paused"]
                      },
                      "config": {
                        "type": "object",
                        "properties": {
                          "deliveryProvider": {
                            "default": "native",
                            "type": "string",
                            "enum": ["native", "instantly"]
                          },
                          "instantlyConnectionId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "mode": {
                            "type": "string",
                            "const": "review"
                          },
                          "timezone": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          },
                          "weekdays": {
                            "minItems": 1,
                            "maxItems": 7,
                            "type": "array",
                            "items": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 7
                            }
                          },
                          "startMinute": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 1439
                          },
                          "endMinute": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 1440
                          },
                          "dailyLimit": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 1000
                          },
                          "totalSendLimit": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 100000
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "senderIds": {
                            "maxItems": 200,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            }
                          },
                          "sequence": {
                            "minItems": 1,
                            "maxItems": 5,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "delayHours": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 2160
                                },
                                "subject": {
                                  "type": "string",
                                  "maxLength": 998
                                },
                                "body": {
                                  "type": "string",
                                  "maxLength": 100000
                                },
                                "agentDraftSource": {
                                  "type": "string",
                                  "enum": ["draft", "template"]
                                },
                                "attachmentIds": {
                                  "maxItems": 5,
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                  }
                                },
                                "writingGuide": {
                                  "type": "object",
                                  "properties": {
                                    "researchMode": {
                                      "type": "string",
                                      "const": "customer_account"
                                    },
                                    "id": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "name": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "subject": {
                                      "type": "string",
                                      "maxLength": 200
                                    },
                                    "content": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 12000
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "name",
                                    "subject",
                                    "content"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": ["delayHours", "subject", "body"],
                              "additionalProperties": false
                            }
                          },
                          "excludePreviousOutreach": {
                            "type": "boolean"
                          },
                          "excludeCustomers": {
                            "default": true,
                            "type": "boolean"
                          },
                          "excludeActiveOpportunities": {
                            "default": true,
                            "type": "boolean"
                          },
                          "cooldownDays": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 3650
                          },
                          "stopOnReply": {
                            "type": "boolean"
                          },
                          "stopCompanyOnReply": {
                            "type": "boolean"
                          },
                          "includeMailingAddress": {
                            "default": false,
                            "type": "boolean"
                          },
                          "icpId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "signatureMode": {
                            "default": "first_touch",
                            "type": "string",
                            "enum": ["first_touch", "full", "none"]
                          },
                          "openTrackingEnabled": {
                            "default": false,
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "mode",
                          "timezone",
                          "weekdays",
                          "startMinute",
                          "endMinute",
                          "dailyLimit",
                          "senderIds",
                          "sequence",
                          "excludePreviousOutreach",
                          "cooldownDays",
                          "stopOnReply",
                          "stopCompanyOnReply"
                        ],
                        "additionalProperties": false
                      },
                      "action": {
                        "type": "string",
                        "const": "save"
                      }
                    },
                    "required": [
                      "expectedRevision",
                      "name",
                      "status",
                      "config",
                      "action"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "campaignId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "expectedRevision": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 2147483647
                      },
                      "status": {
                        "type": "string",
                        "enum": ["active", "paused", "stopped"]
                      },
                      "confirmSend": {
                        "type": "boolean"
                      },
                      "action": {
                        "type": "string",
                        "const": "status"
                      }
                    },
                    "required": [
                      "campaignId",
                      "expectedRevision",
                      "status",
                      "action"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "after": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "personRecordIds": {
                        "minItems": 1,
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        }
                      },
                      "recipientEmails": {
                        "minItems": 1,
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "maxLength": 254,
                          "format": "email",
                          "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                        }
                      },
                      "action": {
                        "type": "string",
                        "const": "drafts"
                      }
                    },
                    "required": ["action"],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "personRecordIds": {
                        "minItems": 1,
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        }
                      },
                      "action": {
                        "type": "string",
                        "const": "draftsFromContacts"
                      }
                    },
                    "required": ["personRecordIds", "action"],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "campaignId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "campaignRevision": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 2147483647
                      },
                      "drafts": {
                        "minItems": 1,
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "draftId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "draftRevision": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 2147483647
                            }
                          },
                          "required": ["draftId", "draftRevision"],
                          "additionalProperties": false
                        }
                      },
                      "action": {
                        "type": "string",
                        "const": "enrollMany"
                      }
                    },
                    "required": [
                      "campaignId",
                      "campaignRevision",
                      "drafts",
                      "action"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "campaignId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "campaignRevision": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 2147483647
                      },
                      "targetCount": {
                        "default": 10,
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100
                      },
                      "addToCampaign": {
                        "default": false,
                        "type": "boolean"
                      },
                      "action": {
                        "type": "string",
                        "const": "findProspects"
                      }
                    },
                    "required": ["campaignId", "campaignRevision", "action"],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "people": {
                        "minItems": 1,
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "email": {
                              "type": "string",
                              "maxLength": 254,
                              "format": "email",
                              "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                            },
                            "title": {
                              "type": "string",
                              "maxLength": 200
                            },
                            "company": {
                              "type": "string",
                              "maxLength": 200
                            },
                            "companyDomain": {
                              "type": "string",
                              "maxLength": 253
                            },
                            "linkedinUrl": {
                              "type": "string",
                              "maxLength": 500,
                              "format": "uri"
                            },
                            "summary": {
                              "type": "string",
                              "maxLength": 2000
                            },
                            "evidence": {
                              "maxItems": 3,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "label": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 180
                                  },
                                  "url": {
                                    "type": "string",
                                    "maxLength": 2000,
                                    "format": "uri"
                                  },
                                  "observation": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 700
                                  },
                                  "publishedAt": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "format": "date",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": ["label", "url", "observation"],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": ["name", "email"],
                          "additionalProperties": false
                        }
                      },
                      "action": {
                        "type": "string",
                        "const": "importContacts"
                      }
                    },
                    "required": ["people", "action"],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "requestId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                        "description": "New UUID for this batch. Keep it unchanged when retrying the same companies."
                      },
                      "companies": {
                        "minItems": 1,
                        "maxItems": 500,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "domain": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 4096
                            },
                            "website": {
                              "type": "string",
                              "maxLength": 2000,
                              "format": "uri"
                            },
                            "description": {
                              "type": "string",
                              "maxLength": 2000
                            },
                            "industry": {
                              "type": "string",
                              "maxLength": 200
                            },
                            "city": {
                              "type": "string",
                              "maxLength": 200
                            },
                            "stateCode": {
                              "type": "string",
                              "maxLength": 200
                            },
                            "country": {
                              "type": "string",
                              "maxLength": 200
                            },
                            "linkedinUrl": {
                              "type": "string",
                              "maxLength": 500,
                              "format": "uri"
                            }
                          },
                          "required": ["name"],
                          "additionalProperties": false
                        }
                      },
                      "action": {
                        "type": "string",
                        "const": "importCompanies"
                      }
                    },
                    "required": ["requestId", "companies", "action"],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "campaignId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "campaignRevision": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 2147483647
                      },
                      "people": {
                        "minItems": 1,
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "email": {
                              "type": "string",
                              "maxLength": 320,
                              "format": "email",
                              "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                            },
                            "firstName": {
                              "type": "string",
                              "maxLength": 100
                            },
                            "title": {
                              "type": "string",
                              "maxLength": 200
                            },
                            "company": {
                              "type": "string",
                              "maxLength": 200
                            },
                            "companyDomain": {
                              "type": "string",
                              "maxLength": 253
                            },
                            "linkedinUrl": {
                              "type": "string",
                              "maxLength": 500,
                              "format": "uri"
                            },
                            "summary": {
                              "type": "string",
                              "maxLength": 2000
                            },
                            "evidence": {
                              "maxItems": 3,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "label": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 180
                                  },
                                  "url": {
                                    "type": "string",
                                    "maxLength": 2000,
                                    "format": "uri"
                                  },
                                  "observation": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 700
                                  },
                                  "publishedAt": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "format": "date",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": ["label", "url", "observation"],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": ["name", "email"],
                          "additionalProperties": false
                        }
                      },
                      "addToCampaign": {
                        "default": false,
                        "type": "boolean"
                      },
                      "action": {
                        "type": "string",
                        "const": "addProspects"
                      }
                    },
                    "required": [
                      "campaignId",
                      "campaignRevision",
                      "people",
                      "action"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "campaignId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "campaignRevision": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 2147483647
                      },
                      "all": {
                        "type": "boolean",
                        "const": true
                      },
                      "enrollmentId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "sourceRunId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "candidateKeys": {
                        "minItems": 1,
                        "maxItems": 15,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        }
                      },
                      "action": {
                        "type": "string",
                        "const": "prepareMessages"
                      }
                    },
                    "required": ["campaignId", "campaignRevision", "action"],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "runId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "campaignId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "action": {
                        "type": "string",
                        "const": "run"
                      }
                    },
                    "required": ["action"],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "messageId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "action": {
                        "type": "string",
                        "const": "message"
                      }
                    },
                    "required": ["messageId", "action"],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "messageId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "draftRevision": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 2147483647
                      },
                      "subject": {
                        "type": "string",
                        "maxLength": 998
                      },
                      "body": {
                        "type": "string",
                        "maxLength": 100000
                      },
                      "cc": {
                        "default": "",
                        "type": "string",
                        "maxLength": 3000
                      },
                      "bcc": {
                        "default": "",
                        "type": "string",
                        "maxLength": 3000
                      },
                      "action": {
                        "type": "string",
                        "const": "edit"
                      }
                    },
                    "required": [
                      "messageId",
                      "draftRevision",
                      "subject",
                      "body",
                      "action"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "campaignId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "campaignRevision": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 2147483647
                      },
                      "items": {
                        "minItems": 1,
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "draftId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 2147483647
                            }
                          },
                          "required": ["draftId", "revision"],
                          "additionalProperties": false
                        }
                      },
                      "action": {
                        "type": "string",
                        "const": "submit"
                      }
                    },
                    "required": [
                      "campaignId",
                      "campaignRevision",
                      "items",
                      "action"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "campaignId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "action": {
                        "type": "string",
                        "const": "submissions"
                      }
                    },
                    "required": ["campaignId", "action"],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "submissionId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "action": {
                        "type": "string",
                        "const": "submission"
                      }
                    },
                    "required": ["submissionId", "action"],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "submissionId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "approve": {
                        "type": "boolean"
                      },
                      "feedback": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "confirmSend": {
                        "type": "boolean"
                      },
                      "action": {
                        "type": "string",
                        "const": "decideSubmission"
                      }
                    },
                    "required": ["submissionId", "approve", "action"],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "campaignId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "campaignRevision": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 2147483647
                      },
                      "items": {
                        "minItems": 1,
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "draftId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 2147483647
                            }
                          },
                          "required": ["draftId", "revision"],
                          "additionalProperties": false
                        }
                      },
                      "confirmSend": {
                        "type": "boolean",
                        "const": true
                      },
                      "action": {
                        "type": "string",
                        "const": "review"
                      }
                    },
                    "required": [
                      "campaignId",
                      "campaignRevision",
                      "items",
                      "confirmSend",
                      "action"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "enrollmentId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "action": {
                        "type": "string",
                        "const": "cancel"
                      }
                    },
                    "required": ["enrollmentId", "action"],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "campaignId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "page": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 10000
                      },
                      "action": {
                        "type": "string",
                        "const": "replies"
                      }
                    },
                    "required": ["campaignId", "action"],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "action": {
                        "type": "string",
                        "const": "attention"
                      }
                    },
                    "required": ["action"],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "folder": {
                        "type": "string",
                        "enum": ["inbox", "sent", "needs_reply"]
                      },
                      "accountId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      "query": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "cursor": {
                        "type": "string",
                        "maxLength": 22000
                      },
                      "action": {
                        "type": "string",
                        "const": "searchThreads"
                      }
                    },
                    "required": ["action"],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "thread": {
                        "type": "object",
                        "properties": {
                          "account_id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          "thread_id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          "provider": {
                            "type": "string",
                            "enum": ["gmail", "outlook", "instantly"]
                          }
                        },
                        "required": ["account_id", "thread_id", "provider"],
                        "additionalProperties": false
                      },
                      "format": {
                        "type": "string",
                        "enum": ["metadata", "full"]
                      },
                      "before": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      "action": {
                        "type": "string",
                        "const": "getThread"
                      }
                    },
                    "required": ["thread", "action"],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "thread": {
                        "type": "object",
                        "properties": {
                          "account_id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          "thread_id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          "provider": {
                            "type": "string",
                            "enum": ["gmail", "outlook", "instantly"]
                          }
                        },
                        "required": ["account_id", "thread_id", "provider"],
                        "additionalProperties": false
                      },
                      "format": {
                        "type": "string",
                        "enum": ["metadata", "full"]
                      },
                      "messageId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      "action": {
                        "type": "string",
                        "const": "getEmail"
                      }
                    },
                    "required": ["thread", "messageId", "action"],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "thread": {
                        "type": "object",
                        "properties": {
                          "account_id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          "thread_id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          "provider": {
                            "type": "string",
                            "enum": ["gmail", "outlook", "instantly"]
                          }
                        },
                        "required": ["account_id", "thread_id", "provider"],
                        "additionalProperties": false
                      },
                      "messageId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      "attachmentId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 5000
                      },
                      "action": {
                        "type": "string",
                        "const": "getAttachment"
                      }
                    },
                    "required": [
                      "thread",
                      "messageId",
                      "attachmentId",
                      "action"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "description": "Workspace ID. Omit to use your current workspace.",
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "action": {
                        "type": "string",
                        "const": "scheduledReplies"
                      }
                    },
                    "required": ["action"],
                    "additionalProperties": false
                  }
                ]
              },
              "example": {
                "action": "list"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The existing campaign command's result, or the resolved workspace ID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "The JSON body or one of its fields is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "invalid_request",
                    "message": "limit must be an integer between 1 and 100",
                    "retry_after_seconds": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, expired, revoked, or unknown.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "The API key or account cannot use this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "insufficient_scope",
                    "message": "API key does not have the required permission",
                    "retry_after_seconds": 0
                  }
                }
              }
            }
          },
          "405": {
            "description": "The route only accepts POST requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "method_not_allowed",
                    "message": "Only POST is supported"
                  }
                }
              }
            }
          },
          "409": {
            "description": "The campaign or message changed. Read the current revision before trying again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "campaign_changed",
                    "message": "This campaign or message changed. Refresh it before trying again."
                  }
                }
              }
            }
          },
          "413": {
            "description": "The outreach request body exceeds 640 KiB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "request_too_large",
                    "message": "Request body is too large"
                  }
                }
              }
            }
          },
          "429": {
            "description": "An edge rate limit, account quota, or credential spend limit was reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "api_rate_limit_exceeded",
                    "message": "Too many Vsyble API requests",
                    "retry_after_seconds": 60
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying, when available.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              }
            }
          },
          "503": {
            "description": "The gateway, credential verifier, quota service, or another required dependency is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "api_unavailable",
                    "message": "The Vsyble API is temporarily unavailable"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "VsybleApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Vsyble-Api-Key",
        "description": "Create and revoke scoped API keys at https://app.vsyble.com/mcp. Keep each key outside source control and use a separate key per application or environment."
      }
    },
    "schemas": {
      "SearchRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": ["query", "limit"],
        "properties": {
          "query": {
            "type": "string",
            "minLength": 2,
            "maxLength": 500,
            "description": "Natural-language description of the people or companies to find.",
            "example": "Revenue leaders at B2B software companies"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "Exact requested number of results, from 1 to 100.",
            "example": 5
          },
          "target": {
            "type": "string",
            "enum": ["auto", "people", "companies"],
            "default": "auto",
            "description": "Specify the type of results or infer it from the query."
          },
          "search_type": {
            "type": "string",
            "enum": [
              "auto",
              "instant",
              "fast",
              "deep-lite",
              "deep",
              "deep-reasoning",
              "neural"
            ],
            "default": "auto",
            "description": "Search strategy. Auto is recommended; instant and fast prioritize latency, while deep modes add research depth. Neural is a legacy alias for auto."
          },
          "filters": {
            "type": "object",
            "additionalProperties": false,
            "description": "Optional structured filters for the selected target.",
            "properties": {
              "includeInternational": {
                "type": "boolean",
                "description": "False requires the United States or Canada, true allows global results, and omission follows the query."
              },
              "minYearsExperience": {
                "type": "integer",
                "minimum": 0,
                "maximum": 80,
                "description": "Minimum years of professional experience."
              },
              "seniority": {
                "type": "string",
                "enum": [
                  "any",
                  "founder",
                  "executive",
                  "manager",
                  "individual_contributor"
                ],
                "default": "any",
                "description": "Required seniority category."
              },
              "requireLinkedIn": {
                "type": "boolean",
                "default": false,
                "description": "Require each returned person to have a LinkedIn profile URL."
              },
              "employeeRange": {
                "type": "string",
                "enum": [
                  "any",
                  "1-10",
                  "11-50",
                  "51-200",
                  "201-500",
                  "501-1000",
                  "1001-5000",
                  "5001+"
                ],
                "default": "any",
                "description": "Required employee-count range."
              },
              "fundingStage": {
                "type": "string",
                "enum": [
                  "any",
                  "bootstrapped",
                  "seed",
                  "series_a",
                  "series_b_plus",
                  "public"
                ],
                "default": "any",
                "description": "Required funding stage."
              },
              "hiringOnly": {
                "type": "boolean",
                "default": false,
                "description": "Restrict results to companies with current hiring evidence."
              },
              "technology": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80,
                "description": "Technology that matching companies should use."
              }
            }
          }
        }
      },
      "EnrichmentRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": ["result_numbers"],
        "properties": {
          "request_id": {
            "type": "string",
            "format": "uuid",
            "description": "request_id returned by the completed search to enrich, made with this credential. Omit to use its latest completed search. Repeat the same ID when continuing enrichment."
          },
          "result_numbers": {
            "type": "array",
            "minItems": 1,
            "maxItems": 25,
            "uniqueItems": true,
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "Explicit 1-based result numbers from the selected search made with this API key.",
            "example": [1, 3]
          },
          "field": {
            "type": "string",
            "enum": ["email", "phone", "university"],
            "description": "Required after a people search and omitted after a company search. Only the selected category is requested from the provider.",
            "example": "email"
          }
        }
      },
      "SearchResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "request_id",
          "tool",
          "result_count",
          "duration_ms",
          "people",
          "companies",
          "search_results",
          "citations",
          "model"
        ],
        "properties": {
          "request_id": {
            "type": "string",
            "format": "uuid",
            "description": "Stable request identifier for support and request-scoped history."
          },
          "tool": {
            "type": "string",
            "enum": ["people_search", "company_search"]
          },
          "result_count": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of primary people or company results returned."
          },
          "duration_ms": {
            "type": "integer",
            "minimum": 0,
            "description": "End-to-end search duration in milliseconds."
          },
          "people": {
            "type": "array",
            "description": "People results. Empty when the result type is companies.",
            "items": {
              "$ref": "#/components/schemas/PublicResult"
            }
          },
          "companies": {
            "type": "array",
            "description": "Company results. Empty when the result type is people.",
            "items": {
              "$ref": "#/components/schemas/PublicResult"
            }
          },
          "search_results": {
            "type": "array",
            "description": "Supporting public-source result records returned by the search provider.",
            "items": {
              "$ref": "#/components/schemas/PublicResult"
            }
          },
          "citations": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            },
            "description": "Public evidence URLs supporting the results."
          },
          "model": {
            "type": ["string", "null"],
            "description": "Search model identifier, when reported."
          }
        }
      },
      "PublicResult": {
        "type": "object",
        "additionalProperties": true,
        "description": "A sanitized public-source result. Available fields vary with the entity and evidence returned."
      },
      "EnrichmentResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "request_id",
          "tool",
          "entity_type",
          "status",
          "done",
          "result_count",
          "enriched_count",
          "results"
        ],
        "properties": {
          "request_id": {
            "type": "string",
            "format": "uuid",
            "description": "Request ID of the source search being enriched."
          },
          "tool": {
            "type": "string",
            "enum": ["people_search", "company_search"]
          },
          "entity_type": {
            "type": "string",
            "enum": ["person", "company"]
          },
          "status": {
            "type": "string",
            "enum": ["running", "completed", "partial", "not_found", "failed"]
          },
          "done": {
            "type": "boolean",
            "description": "Whether every selected result reached a terminal state."
          },
          "result_count": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of selected results in this response."
          },
          "enriched_count": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of selected results enriched successfully."
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnrichmentResult"
            }
          }
        }
      },
      "EnrichmentResult": {
        "type": "object",
        "additionalProperties": false,
        "required": ["result_position", "result_number", "status", "result"],
        "properties": {
          "result_position": {
            "type": "integer",
            "minimum": 0,
            "maximum": 99,
            "description": "Zero-based stored position of the source result."
          },
          "result_number": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "One-based result number used in API requests."
          },
          "status": {
            "type": "string",
            "enum": ["queued", "running", "completed", "not_found", "failed"]
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicResult"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sanitized enrichment data when completed, otherwise null."
          }
        }
      },
      "Error": {
        "type": "object",
        "additionalProperties": false,
        "required": ["error"],
        "properties": {
          "error": {
            "type": "object",
            "additionalProperties": false,
            "required": ["code", "message"],
            "properties": {
              "code": {
                "type": "string",
                "description": "Stable machine-readable error code."
              },
              "message": {
                "type": "string",
                "description": "Concise, caller-safe description of the outcome."
              },
              "request_id": {
                "type": "string",
                "format": "uuid",
                "description": "Request identifier, when available."
              },
              "retry_after_seconds": {
                "type": "number",
                "minimum": 0,
                "description": "Recommended retry delay, when applicable."
              }
            }
          }
        }
      }
    }
  }
}
