> ## 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.

# Approve a review

> Approves a draft, or copy_override in its place, and returns the reviews still waiting. A reply is sent at once on the channel the person last wrote on; a sequence message goes out in the next send window, within the sender's limits, and the lead's sequence moves on. Send an Idempotency-Key header to make a retry safe.

## OpenAPI

```json
{
  "openapi": "3.2.0",
  "info": {
    "title": "Bavlio API",
    "version": "1.0.0"
  },
  "paths": {
    "/reviews/{id}/approve": {
      "post": {
        "tags": [
          "Reviews"
        ],
        "operationId": "reviews.approveReview",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string",
              "description": "Review id, from the review queue."
            },
            "required": true
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "schema": {
              "type": "string",
              "description": "Any unique string of 1 to 255 characters, such as a UUID, that makes a retry safe: a repeat with the same key and input does nothing again and returns the current state, while the same key with another input, or before the first request finished, is refused. Keys last 24 hours per workspace."
            },
            "required": false
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "reviews": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Review id; for a reply, the conversation id."
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "first_message",
                              "follow_up",
                              "reply"
                            ],
                            "description": "first_message: a sequence message that opens the conversation. follow_up: a later sequence message. reply: a reply to a person who answered."
                          },
                          "person": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Lead id."
                              },
                              "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 person'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 person's company."
                              },
                              "location": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "City, state and country, comma-separated; null when unknown."
                              },
                              "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"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "title",
                              "company",
                              "industry",
                              "headcount",
                              "location",
                              "email",
                              "linkedin_url",
                              "photo_url"
                            ],
                            "additionalProperties": false,
                            "description": "The lead the message goes to."
                          },
                          "campaign": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "additionalProperties": false,
                            "description": "Campaign the lead is in."
                          },
                          "sender": {
                            "type": "string",
                            "description": "Who the message goes out as: the name of the campaign's LinkedIn sender (the workspace name when it has none), or the inbox address for an email reply."
                          },
                          "signals": {
                            "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."
                          },
                          "moment": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The buying moment that surfaced the lead, in one sentence; null when none."
                          },
                          "step": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "description": "Id of the sequence step that drafted the message."
                                  },
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "template",
                                      "ai"
                                    ],
                                    "description": "template: filled in from the step's template. ai: written by AI from its brief."
                                  }
                                },
                                "required": [
                                  "id",
                                  "mode"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Sequence step that drafted the message; null for a reply."
                          },
                          "intent": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "interested",
                                  "meeting_booked",
                                  "question",
                                  "referral",
                                  "not_now",
                                  "not_interested"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "How Bavlio read the person's reply; null for sequence messages and replies not read yet."
                          },
                          "channel": {
                            "type": "string",
                            "enum": [
                              "linkedin",
                              "email"
                            ],
                            "description": "Where the message goes out."
                          },
                          "subject": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Subject of an email; null on LinkedIn."
                          },
                          "draft": {
                            "type": "string",
                            "description": "The drafted copy, sent on approval unless copy_override replaces it; empty when a reply is not drafted yet."
                          },
                          "max_length": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991,
                            "description": "Most characters the copy may have.",
                            "allOf": [
                              {
                                "minimum": 0
                              }
                            ]
                          },
                          "messages": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "author": {
                                  "type": "string",
                                  "enum": [
                                    "lead",
                                    "campaign",
                                    "you"
                                  ],
                                  "description": "Who wrote it: lead (the other person), campaign (sent by one of your campaigns) or you (your side, sent from Bavlio or straight from LinkedIn or the mailbox)."
                                },
                                "channel": {
                                  "type": "string",
                                  "enum": [
                                    "linkedin",
                                    "email"
                                  ],
                                  "description": "Where it was sent: linkedin or email."
                                },
                                "body": {
                                  "type": "string"
                                },
                                "sent_at": {
                                  "type": "string",
                                  "description": "When the message was sent, ISO 8601."
                                },
                                "linkedin_message_id": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "The message's id on LinkedIn; null for email, and when it is unknown."
                                },
                                "email": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "subject": {
                                          "type": "string"
                                        },
                                        "from": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "description": "The address the email came from; null when unknown."
                                        },
                                        "opened_at": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "description": "When the email was first opened, ISO 8601; null when no open was recorded, and always for emails outside campaigns."
                                        },
                                        "clicked_at": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "description": "When a link in the email was first clicked, ISO 8601; null when no click was recorded, and always for emails outside campaigns."
                                        },
                                        "problem": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "bounced",
                                                    "complained",
                                                    "failed"
                                                  ],
                                                  "description": "What went wrong: bounced (rejected for good by the receiving server), complained (the person marked it as spam) or failed (it could not be delivered)."
                                                },
                                                "detail": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ],
                                                  "description": "The mail provider's detail, such as the bounce type or error message; null when none was given."
                                                }
                                              },
                                              "required": [
                                                "kind",
                                                "detail"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "description": "Why the email did not land; null when there was no problem."
                                        }
                                      },
                                      "required": [
                                        "subject",
                                        "from",
                                        "opened_at",
                                        "clicked_at",
                                        "problem"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "The email's details; null for a LinkedIn message."
                                }
                              },
                              "required": [
                                "id",
                                "author",
                                "channel",
                                "body",
                                "sent_at",
                                "linkedin_message_id",
                                "email"
                              ],
                              "additionalProperties": false
                            },
                            "description": "The conversation with the lead so far, oldest first."
                          },
                          "created_at": {
                            "type": "string",
                            "description": "When the message was drafted; for a reply, when the conversation's last message was sent (ISO 8601)."
                          }
                        },
                        "required": [
                          "id",
                          "kind",
                          "person",
                          "campaign",
                          "sender",
                          "signals",
                          "moment",
                          "step",
                          "intent",
                          "channel",
                          "subject",
                          "draft",
                          "max_length",
                          "messages",
                          "created_at"
                        ],
                        "additionalProperties": false
                      },
                      "description": "Up to 50 reviews: replies first, then sequence messages, each group oldest first."
                    },
                    "count": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991,
                      "description": "How many reviews are waiting; can be more than the reviews returned.",
                      "allOf": [
                        {
                          "minimum": 0
                        }
                      ]
                    }
                  },
                  "required": [
                    "reviews",
                    "count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "ReviewUnsendable | LinkedInLoginRejected | LinkedInCheckpointFailed | MailRequestRejected | RequestIdempotencyKeyReused | RequestInvalidBody",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ReviewUnsendableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/LinkedInLoginRejectedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/LinkedInCheckpointFailedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MailRequestRejectedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/RequestIdempotencyKeyReusedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/RequestInvalidBodyEncoded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "AuthMissing | AuthInvalid",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AuthMissingEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/AuthInvalidEncoded"
                    }
                  ]
                }
              }
            }
          },
          "402": {
            "description": "LinkedInSeatUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkedInSeatUnavailableEncoded"
                }
              }
            }
          },
          "404": {
            "description": "WorkspaceNotFound | ReviewNotFound | LinkedInNotPending | LinkedInSenderNotFound | InboxNotFound",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/WorkspaceNotFoundEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/ReviewNotFoundEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/LinkedInNotPendingEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/LinkedInSenderNotFoundEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/InboxNotFoundEncoded"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "ReviewSettled | LinkedInCheckpointExpired | LinkedInAlreadyConnected | LinkedInMemberMismatch | LinkedInMemberInUse | LinkedInAccountDisconnected | LinkedInCheckpointRequired | LinkedInActionRejected | LinkedInRefused | LinkedInCountryRefused | MailNotConnected | MailAccountRestricted | RequestIdempotencyKeyInUse",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ReviewSettledEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/LinkedInCheckpointExpiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/LinkedInAlreadyConnectedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/LinkedInMemberMismatchEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/LinkedInMemberInUseEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/LinkedInAccountDisconnectedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/LinkedInCheckpointRequiredEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/LinkedInActionRejectedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/LinkedInRefusedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/LinkedInCountryRefusedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MailNotConnectedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MailAccountRestrictedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/RequestIdempotencyKeyInUseEncoded"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "RequestRateLimited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestRateLimitedEncoded"
                }
              }
            }
          },
          "502": {
            "description": "LinkedInOutcomeUnknown | LinkedInFailed | MailFailed",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/LinkedInOutcomeUnknownEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/LinkedInFailedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MailFailedEncoded"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "LinkedInRateLimited | LinkedInInviteLimitReached | LinkedInUnavailable | MailUnavailable",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/LinkedInRateLimitedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/LinkedInInviteLimitReachedEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/LinkedInUnavailableEncoded"
                    },
                    {
                      "$ref": "#/components/schemas/MailUnavailableEncoded"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Approves a draft, or copy_override in its place, and returns the reviews still waiting. A reply is sent at once on the channel the person last wrote on; a sequence message goes out in the next send window, within the sender's limits, and the lead's sequence moves on. Send an Idempotency-Key header to make a retry safe.",
        "summary": "Approve a review",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "copy_override": {
                    "type": "string",
                    "description": "Text to send instead of the draft, at most the review's max_length characters; surrounding spaces are trimmed. Needed when a reply has no draft yet."
                  }
                },
                "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
      },
      "MailFailedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "MailFailed"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              502
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "mail_failed"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "MailUnavailableEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "MailUnavailable"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              503
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "mail_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
      },
      "MailRequestRejectedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "MailRequestRejected"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              400
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "mail_request_rejected"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "MailAccountRestrictedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "MailAccountRestricted"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              409
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "mail_account_restricted"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "MailNotConnectedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "MailNotConnected"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              409
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "mail_not_connected"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "Email is not set up: connect Bavimail in Settings first"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "InboxNotFoundEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "InboxNotFound"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              404
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "mail_inbox_not_found"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "There is no such email inbox in this workspace"
            ]
          }
        },
        "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
      },
      "LinkedInFailedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "LinkedInFailed"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              502
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "linkedin_failed"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "LinkedInOutcomeUnknownEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "LinkedInOutcomeUnknown"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              502
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "linkedin_outcome_unknown"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "LinkedInUnavailableEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "LinkedInUnavailable"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              503
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "linkedin_unavailable"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "LinkedInInviteLimitReachedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "LinkedInInviteLimitReached"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              503
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "linkedin_invite_limit_reached"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "LinkedInRateLimitedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "LinkedInRateLimited"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              503
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "linkedin_rate_limited"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "LinkedInSeatUnavailableEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "LinkedInSeatUnavailable"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              402
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "linkedin_seat_unavailable"
            ]
          },
          "message": {
            "type": "string"
          },
          "granted": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message",
          "granted"
        ],
        "additionalProperties": false
      },
      "LinkedInCountryRefusedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "LinkedInCountryRefused"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              409
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "linkedin_country_refused"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "LinkedIn did not accept the account from that country, so nothing changed: disconnect it and sign in again choosing that country"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "LinkedInRefusedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "LinkedInRefused"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              409
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "linkedin_refused"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "LinkedInActionRejectedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "LinkedInActionRejected"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              409
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "linkedin_action_rejected"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "LinkedInCheckpointRequiredEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "LinkedInCheckpointRequired"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              409
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "linkedin_checkpoint_required"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "LinkedInAccountDisconnectedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "LinkedInAccountDisconnected"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              409
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "linkedin_account_disconnected"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "LinkedInMemberInUseEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "LinkedInMemberInUse"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              409
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "linkedin_member_in_use"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "This LinkedIn member is already connected as another sender"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "LinkedInMemberMismatchEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "LinkedInMemberMismatch"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              409
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "linkedin_member_mismatch"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "This sender is another LinkedIn member: sign in with that person's account, or add a new sender"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "LinkedInAlreadyConnectedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "LinkedInAlreadyConnected"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              409
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "linkedin_already_connected"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "This LinkedIn account is already connected: disconnect it first"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "LinkedInCheckpointExpiredEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "LinkedInCheckpointExpired"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              409
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "linkedin_checkpoint_expired"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "The LinkedIn sign-in expired: sign in again"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "LinkedInCheckpointFailedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "LinkedInCheckpointFailed"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              400
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "linkedin_checkpoint_failed"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "LinkedInLoginRejectedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "LinkedInLoginRejected"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              400
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "linkedin_login_rejected"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "LinkedInSenderNotFoundEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "LinkedInSenderNotFound"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              404
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "linkedin_sender_not_found"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "No LinkedIn sender with this id belongs to the workspace"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "LinkedInNotPendingEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "LinkedInNotPending"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              404
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "linkedin_not_pending"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "No LinkedIn sign-in is waiting to be confirmed: sign in first"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "RequestRateLimitedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "RequestRateLimited"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              429
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "rate_limited"
            ]
          },
          "message": {
            "type": "string"
          },
          "retryAfterSeconds": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message",
          "retryAfterSeconds"
        ],
        "additionalProperties": false
      },
      "RequestIdempotencyKeyReusedEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "RequestIdempotencyKeyReused"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              400
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "idempotency_key_reused"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "This Idempotency-Key was already used for a different request: send a new key with each new request"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "ReviewUnsendableEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "ReviewUnsendable"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              400
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "review_unsendable"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "RequestIdempotencyKeyInUseEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "RequestIdempotencyKeyInUse"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              409
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "idempotency_key_in_use"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "ReviewSettledEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "ReviewSettled"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              409
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "review_settled"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "This message was already approved, or its person left the sequence"
            ]
          }
        },
        "required": [
          "_tag",
          "statusCode",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "ReviewNotFoundEncoded": {
        "type": "object",
        "properties": {
          "_tag": {
            "type": "string",
            "enum": [
              "ReviewNotFound"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              404
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "review_not_found"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "No message waiting for review with this id belongs to the workspace"
            ]
          }
        },
        "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"
    }
  ]
}
```
