> ## Documentation Index
> Fetch the complete documentation index at: https://bavlio.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Find leads for a campaign

> Finds new people for the campaign, signal matches first, adds them to it and returns only the leads added. The campaign's ICP needs at least one value. Without a subscription the workspace gets 5 preview leads in total; with one, each lead found spends credits.

## OpenAPI

```json
{
  "openapi": "3.2.0",
  "info": {
    "title": "Bavlio API",
    "version": "1.0.0"
  },
  "paths": {
    "/campaigns/{id}/leads": {
      "post": {
        "tags": [
          "Campaigns"
        ],
        "operationId": "campaigns.findCampaignLeads",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string",
              "description": "Campaign id."
            },
            "required": true
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "leads": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Lead id; {@lead_id} in a sequence template fills it in."
                          },
                          "name": {
                            "type": "string"
                          },
                          "title": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "company": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "industry": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Industry of the lead's company."
                          },
                          "headcount": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "1",
                                  "2-10",
                                  "11-50",
                                  "51-200",
                                  "201-500",
                                  "501-1000",
                                  "1001-5000",
                                  "5001-10000",
                                  "10001+"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Employee-count band of the lead's company."
                          },
                          "city": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "state": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "country": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "email": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Verified email address; null when none is known."
                          },
                          "linkedin_url": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "photo_url": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "moment": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The buying moment that surfaced the lead, in one sentence; null for ICP matches."
                          },
                          "reasons": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "signal": {
                                  "type": "string",
                                  "enum": [
                                    "keyword_posts",
                                    "engagement",
                                    "new_role",
                                    "hiring",
                                    "company_change",
                                    "list_activity",
                                    "recent_posts"
                                  ],
                                  "description": "Kind of signal that fired."
                                },
                                "sentence": {
                                  "type": "string",
                                  "description": "What happened, in one sentence."
                                },
                                "occurred_on": {
                                  "type": "string",
                                  "description": "When it happened, YYYY-MM-DD; the first of the month when precision is month."
                                },
                                "precision": {
                                  "type": "string",
                                  "enum": [
                                    "day",
                                    "month"
                                  ],
                                  "description": "How exact occurred_on is: to the day or to the month."
                                },
                                "source_url": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "Where it was seen, such as a post or a job listing; null when unknown."
                                }
                              },
                              "required": [
                                "signal",
                                "sentence",
                                "occurred_on",
                                "precision",
                                "source_url"
                              ],
                              "additionalProperties": false
                            },
                            "description": "The signals that surfaced the lead; empty for ICP matches."
                          },
                          "stage": {
                            "type": "string",
                            "enum": [
                              "found",
                              "visited",
                              "liked",
                              "emailed",
                              "invited",
                              "accepted",
                              "messaged",
                              "replied",
                              "meeting"
                            ],
                            "description": "Furthest stage the lead has reached, in order: found, visited, liked, emailed, invited, accepted, messaged, replied, meeting."
                          },
                          "fit": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991,
                            "description": "How well the lead matches the ICP, from 1 (loose) to 3 (strong).",
                            "allOf": [
                              {
                                "minimum": 1,
                                "maximum": 3
                              }
                            ]
                          },
                          "added_at": {
                            "type": "string",
                            "description": "When the lead was added (ISO 8601)."
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "title",
                          "company",
                          "industry",
                          "headcount",
                          "city",
                          "state",
                          "country",
                          "email",
                          "linkedin_url",
                          "photo_url",
                          "moment",
                          "reasons",
                          "stage",
                          "fit",
                          "added_at"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "leads"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "CampaignIcpIncomplete | IcpInvalidCenter | SignalInvalidTerms | SignalIcpUnspoken | RequestInvalidBody",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/CampaignIcpIncompleteEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/IcpInvalidCenterEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SignalInvalidTermsEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SignalIcpUnspokenEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/RequestInvalidBodyEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthMissing | AuthInvalid",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthMissingEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthInvalidEncoded"
                    }
                  ]
                }
              }
            }
          },
          "402": {
            "description": "SubscriptionRequired | CreditsExhausted | PricingCeilingExceeded | PricingBudgetExhausted | ProviderCreditsExhausted",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SubscriptionRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/CreditsExhaustedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PricingCeilingExceededEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PricingBudgetExhaustedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ProviderCreditsExhaustedEncoded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "WorkspaceNotFound | CampaignNotFound | IcpNotFound | SignalNotFound | PricingQuoteNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/WorkspaceNotFoundEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/CampaignNotFoundEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/IcpNotFoundEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SignalNotFoundEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PricingQuoteNotFoundEncoded"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "CampaignArchived | IcpArchived | SignalArchived | PricingQuoteExpired | PricingIdempotencyKeyConflict | PricingOperationUnsettled | PricingOrganizationOffboarded",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/CampaignArchivedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/IcpArchivedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/SignalArchivedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PricingQuoteExpiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PricingIdempotencyKeyConflictEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PricingOperationUnsettledEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/PricingOrganizationOffboardedEncoded"
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "BillingFailed | ProviderFailed",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/BillingFailedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ProviderFailedEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "BillingUnavailable | ProviderUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/BillingUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ProviderUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Finds new people for the campaign, signal matches first, adds them to it and returns only the leads added. The campaign's ICP needs at least one value. Without a subscription the workspace gets 5 preview leads in total; with one, each lead found spends credits.",
        "summary": "Find leads for a campaign",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991,
                    "description": "How many new leads to find; fewer come back when fewer match.",
                    "allOf": [
                      {
                        "minimum": 1,
                        "maximum": 50
                      }
                    ]
                  }
                },
                "required": [
                  "count"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AuthInvalidEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "AuthInvalid"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              401
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "auth_invalid"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "Bearer credential rejected"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "AuthMissingEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "AuthMissing"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              401
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "auth_missing"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "Bearer credential required"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "BillingFailedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "BillingFailed"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              502
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "billing_failed"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "BillingUnavailableEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "BillingUnavailable"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              503
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "billing_unavailable"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "RequestInvalidBodyEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "RequestInvalidBody"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              400
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "invalid_body"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "WorkspaceNotFoundEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "WorkspaceNotFound"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              404
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "workspace_not_found"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "No such workspace for this account: save a company profile or pick a workspace you belong to"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "CampaignArchivedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "CampaignArchived"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              409
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "campaign_archived"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "The campaign is archived and takes no more changes"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "CampaignNotFoundEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "CampaignNotFound"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              404
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "campaign_not_found"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "No campaign with this id belongs to the workspace"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "SubscriptionRequiredEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "SubscriptionRequired"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              402
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "billing_subscription_required"
            ]
          },
          "message": {
            "type": "string"
          },
          "preview_leads": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "subscribe_method": {
            "type": "string",
            "enum": [
              "POST"
            ]
          },
          "subscribe_path": {
            "type": "string",
            "enum": [
              "/billing/subscriptions"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message",
          "preview_leads",
          "subscribe_method",
          "subscribe_path"
        ],
        "additionalProperties": false
      },
      "CampaignIcpIncompleteEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "CampaignIcpIncomplete"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              400
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "campaign_icp_incomplete"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "A campaign runs only with at least one job title in its ICP"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "ProviderCreditsExhaustedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "ProviderCreditsExhausted"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              402
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "provider_credits_exhausted"
            ]
          },
          "message": {
            "type": "string"
          },
          "provider": {
            "type": "string",
            "enum": [
              "reacher",
              "millionverifier",
              "crustdata",
              "openrouter",
              "voyage",
              "web",
              "harvestapi",
              "serper",
              "treg",
              "monid"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message",
          "provider"
        ],
        "additionalProperties": false
      },
      "PricingBudgetExhaustedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "PricingBudgetExhausted"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              402
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "pricing_budget_exhausted"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "The operation reached the maximum cost it was quoted"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "PricingCeilingExceededEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "PricingCeilingExceeded"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              402
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "pricing_ceiling_exceeded"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "CreditsExhaustedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "CreditsExhausted"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              402
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "billing_credits_exhausted"
            ]
          },
          "message": {
            "type": "string"
          },
          "remaining": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "subscribe_method": {
            "type": "string",
            "enum": [
              "POST"
            ]
          },
          "subscribe_path": {
            "type": "string",
            "enum": [
              "/billing/subscriptions"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message",
          "remaining",
          "subscribe_method",
          "subscribe_path"
        ],
        "additionalProperties": false
      },
      "ProviderFailedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "ProviderFailed"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              502
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "provider_failed"
            ]
          },
          "message": {
            "type": "string"
          },
          "provider": {
            "type": "string",
            "enum": [
              "reacher",
              "millionverifier",
              "crustdata",
              "openrouter",
              "voyage",
              "web",
              "harvestapi",
              "serper",
              "treg",
              "monid"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message",
          "provider"
        ],
        "additionalProperties": false
      },
      "ProviderUnavailableEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "ProviderUnavailable"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              503
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "provider_unavailable"
            ]
          },
          "message": {
            "type": "string"
          },
          "provider": {
            "type": "string",
            "enum": [
              "reacher",
              "millionverifier",
              "crustdata",
              "openrouter",
              "voyage",
              "web",
              "harvestapi",
              "serper",
              "treg",
              "monid"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message",
          "provider"
        ],
        "additionalProperties": false
      },
      "SignalIcpUnspokenEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "SignalIcpUnspoken"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              400
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "signal_icp_unspoken"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "SignalInvalidTermsEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "SignalInvalidTerms"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              400
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "signal_invalid_terms"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "IcpInvalidCenterEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "IcpInvalidCenter"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              400
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "icp_invalid_center"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "PricingOrganizationOffboardedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "PricingOrganizationOffboarded"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              409
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "pricing_organization_offboarded"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "The organization was offboarded; it can no longer quote or execute"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "PricingOperationUnsettledEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "PricingOperationUnsettled"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              409
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "pricing_operation_unsettled"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "The operation has not settled yet; replay with the same key later"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "PricingIdempotencyKeyConflictEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "PricingIdempotencyKeyConflict"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              409
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "pricing_idempotency_key_conflict"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "PricingQuoteExpiredEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "PricingQuoteExpired"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              409
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "pricing_quote_expired"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "The quote expired before it was executed; quote again"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "SignalArchivedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "SignalArchived"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              409
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "signal_archived"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "The signal is archived; it takes no new terms and no new allowance"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "IcpArchivedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "IcpArchived"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              409
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "icp_archived"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "The ICP is archived; it takes no new version and runs nothing"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "PricingQuoteNotFoundEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "PricingQuoteNotFound"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              404
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "pricing_quote_not_found"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "No quote with this id belongs to this organization"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "SignalNotFoundEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "SignalNotFound"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              404
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "signal_not_found"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "No signal with this id belongs to this organization"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "IcpNotFoundEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "IcpNotFound"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              404
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "icp_not_found"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "No ICP with this id belongs to this organization"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "bearer": {
        "description": "Send `Authorization: Bearer <token>`. The token is an API key, which starts with `bav_` and comes from creating an API key or starting a registration, or the access token of a Bavlio sign-in.",
        "type": "http",
        "scheme": "Bearer"
      }
    }
  },
  "security": [],
  "tags": [
    {
      "name": "Registration",
      "description": "Open a Bavlio account without signing in. Starting a registration returns an API key for a new ephemeral account, which becomes permanent once its email address is verified."
    },
    {
      "name": "Authentication",
      "description": "Identify the calling account, finish a registration and manage the account's API keys."
    },
    {
      "name": "Account",
      "description": "The account behind your sign-in, and deleting it."
    },
    {
      "name": "Workspaces",
      "description": "A workspace holds the company profile, outreach schedule, team, campaigns and billing Bavlio works with. Calls that act in a workspace use the one whose id is in the bavlio-workspace header, or the account's default workspace when the header is absent."
    },
    {
      "name": "Teams",
      "description": "Manage who belongs to a workspace: its members, their roles and the invitations to join it. Each workspace's plan sets how many team seats it has."
    },
    {
      "name": "Campaigns",
      "description": "A campaign finds leads that match an ideal customer profile (ICP) and buying signals, and reaches out to them through its sequence of LinkedIn and email steps."
    },
    {
      "name": "Lead imports",
      "description": "Bring your own leads: preview a CSV, confirm which column holds what, then import it into a campaign, where the leads go through the same sequence as the ones Bavlio finds."
    },
    {
      "name": "Sequences",
      "description": "A campaign's sequence is the steps Bavlio runs for each lead: profile visits, likes, invites, LinkedIn messages, emails, waits and conditions. Every message and email waits in the review queue for approval before it is sent."
    },
    {
      "name": "Inbox",
      "description": "Conversations with the people your campaigns reached and, for accounts that opt in, your other LinkedIn and email conversations: read them, reply to them and follow changes live."
    },
    {
      "name": "Reviews",
      "description": "Messages and emails go to a lead only after someone approves them. The review queue holds the replies Bavlio drafted for people who answered and the messages and emails it drafted for campaign sequences."
    },
    {
      "name": "Billing",
      "description": "The plans on offer and the workspace's subscription and usage. Plan changes, cancellation and the billing portal need the workspace owner or an admin."
    },
    {
      "name": "LinkedIn",
      "description": "Connect the LinkedIn accounts your campaigns send from, confirm their sign-ins, choose the country LinkedIn sees them from, and disconnect them."
    },
    {
      "name": "Meetings",
      "description": "Meetings booked through the workspace's calendar tool (Google Calendar, Calendly or Cal.com), and the calendar connection that imports them."
    },
    {
      "name": "Email",
      "description": "Connect a Bavimail account, add sending domains and tracking domains, and create the inboxes campaigns send email from."
    }
  ],
  "servers": [
    {
      "url": "https://api.bavlio.com"
    }
  ]
}
```
