{
  "openapi": "3.1.0",
  "info": {
    "title": "AdvisorPRO CRM vendor API",
    "version": "1",
    "description": "Called with a firm’s API key, or a Zapier connection’s access token, as a bearer token. See https://advisorprocrm.com/developers."
  },
  "servers": [
    {
      "url": "https://api.advisorprocrm.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "A firm’s API key (apk_…), or a Zapier connection’s access token"
      }
    }
  },
  "paths": {
    "/v1/contacts": {
      "get": {
        "operationId": "vendorListContacts",
        "summary": "Vendor API, with a Zapier connection’s access token: a page of the contacts the member may read, newest first, `limit` (1 to 100, 50 by default) at a time; `after` is the `next` of the page before. 403 without households.read",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "contacts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "firstName": {
                            "type": "string"
                          },
                          "lastName": {
                            "type": "string"
                          },
                          "preferredName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "client",
                              "co_client",
                              "family"
                            ]
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "phone": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "householdId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "familyName": {
                            "type": "string"
                          },
                          "stage": {
                            "type": "string",
                            "enum": [
                              "lead",
                              "prospect",
                              "client",
                              "former"
                            ]
                          },
                          "url": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "firstName",
                          "lastName",
                          "preferredName",
                          "role",
                          "email",
                          "phone",
                          "householdId",
                          "familyName",
                          "stage",
                          "url"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "next": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "contacts",
                    "next"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "An error with a stable code; invalid_request carries field issues whose messages are translation keys",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "vendorCreateContact",
        "summary": "Vendor API, with a Zapier connection’s access token: add a contact with a family of their own, as quick add does, the member as its advisor. 403 without households.create",
        "security": [
          {
            "bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "firstName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "lastName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "email": {
                    "default": "",
                    "anyOf": [
                      {
                        "type": "string",
                        "const": ""
                      },
                      {
                        "type": "string",
                        "format": "email",
                        "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                      }
                    ]
                  },
                  "phone": {
                    "type": "string"
                  }
                },
                "required": [
                  "firstName",
                  "lastName"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "firstName": {
                      "type": "string"
                    },
                    "lastName": {
                      "type": "string"
                    },
                    "preferredName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "client",
                        "co_client",
                        "family"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "householdId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "familyName": {
                      "type": "string"
                    },
                    "stage": {
                      "type": "string",
                      "enum": [
                        "lead",
                        "prospect",
                        "client",
                        "former"
                      ]
                    },
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "firstName",
                    "lastName",
                    "preferredName",
                    "role",
                    "email",
                    "phone",
                    "householdId",
                    "familyName",
                    "stage",
                    "url"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "An error with a stable code; invalid_request carries field issues whose messages are translation keys",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/contacts/{contactId}": {
      "get": {
        "operationId": "vendorGetContact",
        "summary": "Vendor API, with a Zapier connection’s access token: one contact the member may read, with their family and primary email address and phone number. 404 outside their scope",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "firstName": {
                      "type": "string"
                    },
                    "lastName": {
                      "type": "string"
                    },
                    "preferredName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "client",
                        "co_client",
                        "family"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "householdId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "familyName": {
                      "type": "string"
                    },
                    "stage": {
                      "type": "string",
                      "enum": [
                        "lead",
                        "prospect",
                        "client",
                        "former"
                      ]
                    },
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "firstName",
                    "lastName",
                    "preferredName",
                    "role",
                    "email",
                    "phone",
                    "householdId",
                    "familyName",
                    "stage",
                    "url"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "An error with a stable code; invalid_request carries field issues whose messages are translation keys",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "vendorUpdateContact",
        "summary": "Vendor API, with a Zapier connection’s access token: change a contact’s names given, and add an email address or phone number they lack as their primary; what is left out or empty stays. 403 without households.edit; 404 outside their scope",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "firstName": {
                    "default": "",
                    "type": "string",
                    "maxLength": 100
                  },
                  "lastName": {
                    "default": "",
                    "type": "string",
                    "maxLength": 100
                  },
                  "preferredName": {
                    "default": "",
                    "type": "string",
                    "maxLength": 100
                  },
                  "email": {
                    "default": "",
                    "anyOf": [
                      {
                        "type": "string",
                        "const": ""
                      },
                      {
                        "type": "string",
                        "format": "email",
                        "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                      }
                    ]
                  },
                  "phone": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "firstName": {
                      "type": "string"
                    },
                    "lastName": {
                      "type": "string"
                    },
                    "preferredName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "client",
                        "co_client",
                        "family"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "householdId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "familyName": {
                      "type": "string"
                    },
                    "stage": {
                      "type": "string",
                      "enum": [
                        "lead",
                        "prospect",
                        "client",
                        "former"
                      ]
                    },
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "firstName",
                    "lastName",
                    "preferredName",
                    "role",
                    "email",
                    "phone",
                    "householdId",
                    "familyName",
                    "stage",
                    "url"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "An error with a stable code; invalid_request carries field issues whose messages are translation keys",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/contacts/search": {
      "get": {
        "operationId": "vendorFindContacts",
        "summary": "Vendor API, with a Zapier connection’s access token: up to five contacts whose name or email address matches `query`, within the member’s households.read scope. 200 with an empty list when none match, or the query is shorter than two characters",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "firstName": {
                        "type": "string"
                      },
                      "lastName": {
                        "type": "string"
                      },
                      "preferredName": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "role": {
                        "type": "string",
                        "enum": [
                          "client",
                          "co_client",
                          "family"
                        ]
                      },
                      "email": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "phone": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "householdId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "familyName": {
                        "type": "string"
                      },
                      "stage": {
                        "type": "string",
                        "enum": [
                          "lead",
                          "prospect",
                          "client",
                          "former"
                        ]
                      },
                      "url": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "firstName",
                      "lastName",
                      "preferredName",
                      "role",
                      "email",
                      "phone",
                      "householdId",
                      "familyName",
                      "stage",
                      "url"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "default": {
            "description": "An error with a stable code; invalid_request carries field issues whose messages are translation keys",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/hooks": {
      "post": {
        "operationId": "vendorSubscribeHook",
        "summary": "Vendor API, called with a firm’s API key for webhooks or a Zapier connection’s access token as a bearer token: subscribe a public https address to one webhook event, as Zapier’s REST hook Subscribe does. Deliveries are signed, retried and logged as for any endpoint; a 410 removes the subscription, and ending the Zapier connection removes its subscriptions. 409 webhook_hooks_too_many past 100",
        "security": [
          {
            "bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "targetUrl": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "event": {
                    "type": "string",
                    "enum": [
                      "household.created",
                      "lead_form.received",
                      "seminar.registered",
                      "appointment.booked",
                      "questionnaire.submitted",
                      "household.stage_changed",
                      "appointment.held",
                      "appointment.no_show",
                      "appointment.cancelled",
                      "seminar.attended",
                      "task.completed",
                      "contact.created",
                      "contact.updated"
                    ]
                  }
                },
                "required": [
                  "targetUrl",
                  "event"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "event": {
                      "type": "string",
                      "enum": [
                        "household.created",
                        "lead_form.received",
                        "seminar.registered",
                        "appointment.booked",
                        "questionnaire.submitted",
                        "household.stage_changed",
                        "appointment.held",
                        "appointment.no_show",
                        "appointment.cancelled",
                        "seminar.attended",
                        "task.completed",
                        "contact.created",
                        "contact.updated"
                      ]
                    },
                    "targetUrl": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    }
                  },
                  "required": [
                    "id",
                    "event",
                    "targetUrl",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "An error with a stable code; invalid_request carries field issues whose messages are translation keys",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/hooks/{hookId}": {
      "delete": {
        "operationId": "vendorUnsubscribeHook",
        "summary": "Vendor API, with a firm’s API key for webhooks or a Zapier connection’s access token: remove a subscription made through /v1/hooks, as Zapier’s Unsubscribe does. 404 for any other endpoint",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "hookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "removed": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "id",
                    "removed"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "An error with a stable code; invalid_request carries field issues whose messages are translation keys",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/hooks/samples/{event}": {
      "get": {
        "operationId": "vendorHookSamples",
        "summary": "Vendor API, with a firm’s API key for webhooks or a Zapier connection’s access token: the firm’s latest three deliveries of the event, newest first, in exactly the delivered shape, for Zapier’s sample data; empty before the first",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "event",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "data": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      }
                    },
                    "required": [
                      "id",
                      "type",
                      "createdAt",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "default": {
            "description": "An error with a stable code; invalid_request carries field issues whose messages are translation keys",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/households": {
      "post": {
        "operationId": "vendorCreateHousehold",
        "summary": "Vendor API, with a Zapier connection’s access token: create a household with its client and any co-client, as the member, who becomes its advisor. 403 without households.create",
        "security": [
          {
            "bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "firstName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "lastName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "email": {
                    "default": "",
                    "anyOf": [
                      {
                        "type": "string",
                        "const": ""
                      },
                      {
                        "type": "string",
                        "format": "email",
                        "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                      }
                    ]
                  },
                  "coClientFirstName": {
                    "default": "",
                    "type": "string",
                    "maxLength": 100
                  },
                  "coClientLastName": {
                    "default": "",
                    "type": "string",
                    "maxLength": 100
                  },
                  "coClientEmail": {
                    "default": "",
                    "anyOf": [
                      {
                        "type": "string",
                        "const": ""
                      },
                      {
                        "type": "string",
                        "format": "email",
                        "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                      }
                    ]
                  }
                },
                "required": [
                  "firstName",
                  "lastName"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "displayName": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "displayName",
                    "url"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "An error with a stable code; invalid_request carries field issues whose messages are translation keys",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/households/{householdId}/notes": {
      "post": {
        "operationId": "vendorAddNote",
        "summary": "Vendor API, with a Zapier connection’s access token: write a plain-text note on a household the member may edit, as the member. 403 without households.edit; 404 for a household outside their scope",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "householdId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20000
                  }
                },
                "required": [
                  "text"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "householdId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    }
                  },
                  "required": [
                    "id",
                    "householdId",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "An error with a stable code; invalid_request carries field issues whose messages are translation keys",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/households/search": {
      "get": {
        "operationId": "vendorFindHouseholds",
        "summary": "Vendor API, with a Zapier connection’s access token: up to five households whose name, or a person’s name or email address, matches `query`, within the member’s households.read scope. 200 with an empty list when none match, or the query is shorter than two characters",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "displayName": {
                        "type": "string"
                      },
                      "url": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "displayName",
                      "url"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "default": {
            "description": "An error with a stable code; invalid_request carries field issues whose messages are translation keys",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/leads": {
      "post": {
        "operationId": "vendorLead",
        "summary": "Vendor API, called with a firm’s API key for leads as a bearer token: send a lead. It matches the person by email, then phone, and answers matched, leaving them as they are; else it creates a lead with medium integration, for the firm’s web lead team when it has one, with the campaign or lead source the body names, or none. The web lead member or team is told either way. 401 for a missing, unknown or revoked key; 403 for a key for another purpose",
        "security": [
          {
            "bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "firstName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "lastName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "email": {
                    "default": "",
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "emailOptIn": {
                    "default": false,
                    "type": "boolean"
                  },
                  "textOptIn": {
                    "default": false,
                    "type": "boolean"
                  },
                  "source": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "campaign": {
                    "type": "string",
                    "maxLength": 100
                  }
                },
                "required": [
                  "firstName",
                  "lastName"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "household": {
                      "type": "string",
                      "enum": [
                        "matched",
                        "created"
                      ]
                    }
                  },
                  "required": [
                    "household"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "An error with a stable code; invalid_request carries field issues whose messages are translation keys",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/me": {
      "get": {
        "operationId": "vendorMe",
        "summary": "Vendor API, with a Zapier connection’s access token: the member it acts as and their firm, for Zapier’s test request and connection label. 401 for an API key or an ended connection; 403 when the member no longer manages settings or lacks two-step verification the firm requires",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "member": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "email"
                      ],
                      "additionalProperties": false
                    },
                    "firm": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "member",
                    "firm"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "An error with a stable code; invalid_request carries field issues whose messages are translation keys",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/seminar-registrations": {
      "post": {
        "operationId": "vendorSeminarRegistration",
        "summary": "Vendor API, called with a firm’s API key for seminar registrations, or a Zapier connection’s access token, as a bearer token: register a person for a seminar session still to come. A key acts as the firm’s web lead member, and Zapier as its member. It matches them by email, then phone, else creates a lead with the seminar’s source and campaign and medium integration; they are registered, or waitlisted when the session lacks seats, and left as they are when already registered. 401 for a missing, unknown or revoked key",
        "security": [
          {
            "bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "sessionId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "firstName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "lastName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "email": {
                    "default": "",
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "guests": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10
                  },
                  "emailOptIn": {
                    "default": false,
                    "type": "boolean"
                  },
                  "textOptIn": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "sessionId",
                  "firstName",
                  "lastName"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "registered",
                        "waitlist",
                        "already_registered"
                      ]
                    },
                    "household": {
                      "type": "string",
                      "enum": [
                        "matched",
                        "created"
                      ]
                    }
                  },
                  "required": [
                    "status",
                    "household"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "An error with a stable code; invalid_request carries field issues whose messages are translation keys",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/seminar-sessions": {
      "get": {
        "operationId": "vendorSeminarSessions",
        "summary": "Vendor API, called with a firm’s API key for seminar registrations, or a Zapier connection’s access token, as a bearer token, not a sign-in: the firm’s seminar sessions still to come, soonest first, with their ids and the seats left. 401 for a missing, unknown or revoked key",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "sessionId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "seminarId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "seminar": {
                        "type": "string"
                      },
                      "startsAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                      },
                      "timeZone": {
                        "type": "string"
                      },
                      "venue": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "city": {
                                "type": "string"
                              },
                              "state": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "name",
                              "city",
                              "state"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "online": {
                        "type": "boolean"
                      },
                      "seatsLeft": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "sessionId",
                      "seminarId",
                      "seminar",
                      "startsAt",
                      "timeZone",
                      "venue",
                      "online",
                      "seatsLeft"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "default": {
            "description": "An error with a stable code; invalid_request carries field issues whose messages are translation keys",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/tasks": {
      "post": {
        "operationId": "vendorAddTask",
        "summary": "Vendor API, with a Zapier connection’s access token: add a task for the member, on a household they may edit or of its own, due on a day or not",
        "security": [
          {
            "bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "householdId": {
                    "default": "",
                    "anyOf": [
                      {
                        "type": "string",
                        "const": ""
                      },
                      {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      }
                    ]
                  },
                  "dueOn": {
                    "default": "",
                    "anyOf": [
                      {
                        "type": "string",
                        "const": ""
                      },
                      {
                        "type": "string",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                      }
                    ]
                  },
                  "priority": {
                    "default": "normal",
                    "type": "string",
                    "enum": [
                      "low",
                      "normal",
                      "high",
                      "urgent"
                    ]
                  }
                },
                "required": [
                  "title"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "title": {
                      "type": "string"
                    },
                    "householdId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dueOn": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "householdId",
                    "dueOn"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "An error with a stable code; invalid_request carries field issues whose messages are translation keys",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
