# Local Flywheel API > Run a sub-account from code or an AI assistant: leads, deal value and won/lost, pipeline stages, bookings and calendars, texts and emails, the inbox, calls, forms, automations and settings, over one REST API and one MCP server. ## Quick start Base URL: https://api.localflywheel.com (every path below starts with /v1) Auth: `Authorization: Bearer zu-...` (an admin of the sub-account creates a key in Settings → API). Envelope: every response is `{ "success": boolean, "data": object|null, "error": string|null }`. Sub-account: a key works inside its own sub-account only, so `workspace_id` can be left out. Setting the sub-account up: call GET /v1/setup-status first. It lists what is missing and names the endpoint (and MCP tool) that fixes each finding. ```bash curl "https://api.localflywheel.com/v1/leads?limit=5" -H "Authorization: Bearer $API_KEY" curl -X PATCH "https://api.localflywheel.com/v1/leads/LEAD_ID" -H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" \ -d '{"status":"won","deal_value_cents":250000}' ``` ## Conventions ### Authentication Send your key as `Authorization: Bearer zu-...`. Admins of a sub-account create keys in the CRM under Settings → API. A key works inside its own sub-account only: you can leave out `workspace_id` everywhere, a different one is ignored, and records of any other sub-account answer 404. Access levels: Read only, Read and write, or Full access (deleting things, team members and anything that sends lead data outside the account). Every call also follows the role of the person who made the key: a key keeps working only while they are an admin of the sub-account. ### Idempotency Every write (POST, PUT, PATCH, DELETE) accepts `Idempotency-Key: `. Replaying the same key with the same body within 24 hours returns the original response instead of doing the work twice (no second message, no second booking); the same key with a different body answers 409. Use a fresh key per logical operation, not per retry. ### Rate limits Every response carries `X-RateLimit-Limit` and `X-RateLimit-Remaining`. On 429 a `Retry-After` header (and `retry_after_seconds` in the body) tells you how long to wait. The limit is per key, per minute: 120 by default, adjustable from 1 to 600 in Settings → API. ### Pagination List endpoints accept `limit` (default 50, max 200) and return the newest rows first. GET /v1/messages is the one endpoint with a cursor: pass `cursor` (or `since`) and follow `next_cursor` to walk forward without duplicates. ### Messaging safety limits To protect number reputation, each sub-account can message at most 300 unique contacts per UTC day (plus per-minute burst and daily segment caps). Replying to a contact you already messaged that day does not consume another contact slot. Messaging endpoints return X-Contacts-Limit, X-Contacts-Used, X-Contacts-Remaining and X-Contacts-Reset; over the cap sends answer 429 with `code: "sms_limit"` and a `limit` object. Check the current state any time with GET /v1/messages/limits. Need a higher ceiling? Request a limit increase from Settings → Messaging and we'll review it. ### Responses and errors Success is `{ success: true, data, error: null }`. Errors are `{ success: false, data: null, error: string, details?: object }` with a matching HTTP status; scope, rate-limit and budget errors put a machine-readable code in `error` (`scope_denied`, `rate_limit_exceeded`, `credit_limit_exceeded`) and the explanation in `message`. Branch on the status and the code, not on message text. ## Endpoints ### CRM leads - `GET /v1/leads` — List and filter leads (scope leads:read) Newest first. Filter by tags (`tag_match=any` returns leads with at least one of the tags, `all` leads with every one), status, pipeline stage, assignee, State, leads or existing customers (`existing_customer`; both by default), people who only chatted (`chat_only`; both by default), a name / email / phone search and a created-since time. Each lead carries `existing_customer`, `chat_only` (only messaged from website chat, Instagram or Messenger and shared no phone or email yet: a conversation in Messages, left off the Leads page and every lead count), `inquiry` (the CRM's Inquiry column), `address`, `city`, `state`, `zip`, `custom_fields`, `tags` and `stage` (the pipeline stage it shows in). Page with `limit` and `offset`: `next_offset` is set while there are more. - query `tags` (string): Tag names, comma-separated (tags=VIP,Roof), or a JSON array (tags=["Roof, metal","VIP"]) when a name has a comma. Max 10. - query `tag_match` (string): any (default): at least one of the tags. all: every tag. - query `status` (string): One or more statuses, comma-separated: new, contacted, qualified, booked, won, lost, spam, partial. - query `stage_key` (string): Pipeline stage key from GET /v1/stages. - query `assigned_to` (string): A user id (GET /v1/members): leads assigned to them. "me": the key's own user. "unassigned": nobody's. - query `state` (string): State / province / region as saved on the lead, comma-separated (state=TX,FL), like Leads > Filter > State. A name finds its code too ("Texas" finds TX). "none": leads with no State. Max 20. - query `existing_customer` (boolean): true: only existing customers (the Leads page's Existing customers view). false: only leads. Leave out for both. - query `chat_only` (boolean): false: leave out people who only messaged (website chat, Instagram, Messenger) and shared no phone or email yet, as the Leads page does. true: only them. Leave out for both. - query `search` (string): The Leads page's search: every word (any order) must be somewhere in the lead: name, email, phone, campaign, ad, notes, address, answers or custom fields. A phone number matches however it's typed. - query `since` (string): ISO timestamp: only leads created at or after it. - query `limit` (number): Default 50, max 200. - query `offset` (number): Skip this many leads; pass next_offset from the previous page. - `GET /v1/leads/{lead_id}` — Get one lead (scope leads:read) The lead with every column, its raw_payload, the flattened `inquiry`, `address`, `city`, `state`, `zip`, `custom_fields`, `tags` and `stage`, plus its 50 most recent timeline events. - path `lead_id` (string, required): Lead id. - `POST /v1/leads` — Create a lead (scope leads:write) Needs workspace_id plus at least one of full_name, email or phone. Besides the lead's columns you can set `inquiry`, `address`, `city`, `state`, `zip`, `custom_fields` and `tags`. The lead and its tags are saved together, so automations that filter on tags see them; each tag fires the lead.tag_added automation trigger. A lead with the same phone (last 10 digits) or email already in the sub-account answers 409 with its `lead_id` and `matched_on` in `details`: update that lead instead. A field the API does not know answers 400 (it is never silently dropped). By default the intake doesn't run (no first text, follow-ups, team alert or Instant Lead Connect); `run_intake: true` works it like any new lead from a form and `intake` in the response says what ran. Either way it is a new lead to the rest of the CRM, as one added by hand is: automations that start on a new lead or a tag run, AI calling campaigns that take new leads pick it up, and the lead.created webhook fires. Not with `existing_customer: true`: a past customer is no new lead, so none of that runs, it stays out of the pipeline and the lead numbers, and `run_intake` is refused (400). Returns the lead as GET /v1/leads/{lead_id} shows it. - body `full_name` (string): Lead name. - body `email` (string): Email address. - body `phone` (string): 10-digit US number or + and a country code; stored as E.164. - body `phone_label` (string): The main phone's label: Mobile, Home, Work, Other or your own words (40 characters). - body `extra_phones` (array): The lead's other phone numbers, up to 10: numbers, or {phone, label} objects. Replaces the whole list; [] or null clears it. A text can go to any of them (POST /v1/messages to), and a text or call from one finds this lead. - body `source` (string): Where the lead came from. Defaults to api. - body `status` (string): Base lead status. To move a lead in the pipeline, send stage_key instead. - body `stage_key` (string): Pipeline stage key from GET /v1/stages. A stage also sets the status it stands for. - body `existing_customer` (boolean): true = someone who was already a customer (a past customer list), not a lead, like Leads > Import "Existing customers": out of the pipeline and every lead count, and adding them starts no new-lead automations, AI calls or webhooks. A new one is won with no sale date (so no sale is counted) unless you send status or stage_key. false moves them back to leads. Changing it never moves the stage. - body `score` (number): A number 0-100 that is yours to set, e.g. a counter your automations keep. Nothing writes it for you (AI lead scoring is off). - body `notes` (string): Internal notes. - body `assigned_to` (string): User id of someone in the sub-account (GET /v1/members). The agency owner only with the owner's own key (the app never offers them to the sub-account's people; a lead already on them may stay). null unassigns. A change is logged on the lead's timeline (Lead assigned / Lead unassigned), as in the app. - body `ad_name` (string): Ad the lead came from. - body `campaign_name` (string): Campaign the lead came from. - body `utm_source` (string): UTM source. - body `utm_medium` (string): UTM medium. - body `utm_campaign` (string): UTM campaign. - body `utm_term` (string): UTM term. - body `utm_content` (string): UTM content. - body `landing_url` (string): Page the lead converted on. - body `referrer_url` (string): Referring page. - body `attribution_channel` (string): e.g. meta, google, organic, direct. - body `gclid` (string): Google Ads click id. A lead with one is sent back to the sub-account's Google Ads by its click when it books or is won (CRM conversions). - body `gbraid` (string): Google Ads app-to-web click id. - body `wbraid` (string): Google Ads web-to-app click id. - body `fbclid` (string): Facebook click id. - body `msclkid` (string): Microsoft Ads click id. - body `deal_value_cents` (number): Deal value in cents: on a won job, what the customer paid (the Sales report's Sold, and the revenue sent to Meta). - body `deal_currency` (string): 3-letter currency code. Default USD. - body `deal_parts_cents` (number): Won job: what the parts cost, in cents (Sales report). - body `deal_tip_cents` (number): Won job: the tip the technician got, in cents. - body `deal_sold_by` (string): Won job: the user id of the technician credited with the sale (GET /v1/members). null = whoever the lead is assigned to. - body `deal_won_at` (string): When the job was won (ISO 8601). Set for you when status becomes won; send it to date a sale yourself. - body `deal_type` (string): Plans & memberships: what the customer bought, one_time (a job) or plan (a plan or membership that pays again). null = one-time. A deal_plan_cents sent alone makes it a plan; one_time clears the plan. - body `deal_plan_cents` (number): Plan: its price in cents, charged every deal_plan_interval. deal_value_cents is the first payment (the plan price when you leave it out). - body `deal_plan_interval` (string): Plan: how often it's charged. Default month. - body `deal_plan_start_date` (string): Plan: when it starts (YYYY-MM-DD). Default today. - body `deal_plan_months` (number): Plan: how many months it runs (1-600). null = no end date: the business's default length counts (12 months unless changed in Settings > Features). Leads return deal_monthly_cents and deal_expected_total_cents (first payment + the plan price for the rest of its length). - body `inquiry` (string): What the lead asked about: the Inquiry column in the CRM (max 500). Without it the CRM shows the form or ad offer, then General inquiry. - body `address` (string): Street address. - body `city` (string): City. - body `state` (string): State or region. A US state, Canadian province or Australian state is stored as its code ("Texas" -> "TX"), a Mexican state by name, like every other intake; the list follows the lead's country (its phone number, else the sub-account's country). Anything else is kept as sent. - body `zip` (string): ZIP or postal code. - body `custom_fields` (object): Custom field values keyed by field_key (GET /v1/custom-fields); a field's label also works. Values are checked against the field type: number/money/rating numbers, boolean true/false, date YYYY-MM-DD, datetime ISO 8601, select one of its options, multiselect a list of options. null or "" clears a value; fields you leave out keep their value. - body `tags` (array): Tag names. New names are created in the sub-account (matched ignoring case). Max 50. - body `run_intake` (boolean): Default false. true = work the lead like a new lead from a form: the first text (when Auto-greet is on; it waits while someone is on a call with the lead), follow-ups, team alert, Instant Lead Connect. - example body: {"workspace_id":"uuid","full_name":"Jane Doe","phone":"+14155550123","email":"jane@example.com","inquiry":"Roof replacement quote","address":"12 Main St","city":"Pittsburgh","state":"PA","zip":"15213","custom_fields":{"roof_type":"Metal","roof_age_years":18},"tags":["Spring promo","VIP"],"run_intake":true} - `PATCH /v1/leads/{lead_id}` — Update a lead (scope leads:write) Send only what changes; null or "" clears a value. `custom_fields` merges: values you leave out are kept. `tags` REPLACES all of the lead's tags; `add_tags` and `remove_tags` change only those (applied in that order: tags, add_tags, remove_tags). A body with only tag changes is fine. `stage_key` moves the lead in the pipeline and sets the status that stage stands for. A field the API does not know answers 400. Returns the updated lead. - path `lead_id` (string, required): Lead id. - body `full_name` (string): Lead name. - body `email` (string): Email address. - body `phone` (string): 10-digit US number or + and a country code; stored as E.164. - body `phone_label` (string): The main phone's label: Mobile, Home, Work, Other or your own words (40 characters). - body `extra_phones` (array): The lead's other phone numbers, up to 10: numbers, or {phone, label} objects. Replaces the whole list; [] or null clears it. A text can go to any of them (POST /v1/messages to), and a text or call from one finds this lead. - body `source` (string): Where the lead came from. Defaults to api. - body `status` (string): Base lead status. To move a lead in the pipeline, send stage_key instead. - body `stage_key` (string): Pipeline stage key from GET /v1/stages. A stage also sets the status it stands for. - body `existing_customer` (boolean): true = someone who was already a customer (a past customer list), not a lead, like Leads > Import "Existing customers": out of the pipeline and every lead count, and adding them starts no new-lead automations, AI calls or webhooks. A new one is won with no sale date (so no sale is counted) unless you send status or stage_key. false moves them back to leads. Changing it never moves the stage. - body `score` (number): A number 0-100 that is yours to set, e.g. a counter your automations keep. Nothing writes it for you (AI lead scoring is off). - body `notes` (string): Internal notes. - body `assigned_to` (string): User id of someone in the sub-account (GET /v1/members). The agency owner only with the owner's own key (the app never offers them to the sub-account's people; a lead already on them may stay). null unassigns. A change is logged on the lead's timeline (Lead assigned / Lead unassigned), as in the app. - body `ad_name` (string): Ad the lead came from. - body `campaign_name` (string): Campaign the lead came from. - body `utm_source` (string): UTM source. - body `utm_medium` (string): UTM medium. - body `utm_campaign` (string): UTM campaign. - body `utm_term` (string): UTM term. - body `utm_content` (string): UTM content. - body `landing_url` (string): Page the lead converted on. - body `referrer_url` (string): Referring page. - body `attribution_channel` (string): e.g. meta, google, organic, direct. - body `gclid` (string): Google Ads click id. A lead with one is sent back to the sub-account's Google Ads by its click when it books or is won (CRM conversions). - body `gbraid` (string): Google Ads app-to-web click id. - body `wbraid` (string): Google Ads web-to-app click id. - body `fbclid` (string): Facebook click id. - body `msclkid` (string): Microsoft Ads click id. - body `deal_value_cents` (number): Deal value in cents: on a won job, what the customer paid (the Sales report's Sold, and the revenue sent to Meta). - body `deal_currency` (string): 3-letter currency code. Default USD. - body `deal_parts_cents` (number): Won job: what the parts cost, in cents (Sales report). - body `deal_tip_cents` (number): Won job: the tip the technician got, in cents. - body `deal_sold_by` (string): Won job: the user id of the technician credited with the sale (GET /v1/members). null = whoever the lead is assigned to. - body `deal_won_at` (string): When the job was won (ISO 8601). Set for you when status becomes won; send it to date a sale yourself. - body `deal_type` (string): Plans & memberships: what the customer bought, one_time (a job) or plan (a plan or membership that pays again). null = one-time. A deal_plan_cents sent alone makes it a plan; one_time clears the plan. - body `deal_plan_cents` (number): Plan: its price in cents, charged every deal_plan_interval. deal_value_cents is the first payment (the plan price when you leave it out). - body `deal_plan_interval` (string): Plan: how often it's charged. Default month. - body `deal_plan_start_date` (string): Plan: when it starts (YYYY-MM-DD). Default today. - body `deal_plan_months` (number): Plan: how many months it runs (1-600). null = no end date: the business's default length counts (12 months unless changed in Settings > Features). Leads return deal_monthly_cents and deal_expected_total_cents (first payment + the plan price for the rest of its length). - body `inquiry` (string): What the lead asked about: the Inquiry column in the CRM (max 500). Without it the CRM shows the form or ad offer, then General inquiry. - body `address` (string): Street address. - body `city` (string): City. - body `state` (string): State or region. A US state, Canadian province or Australian state is stored as its code ("Texas" -> "TX"), a Mexican state by name, like every other intake; the list follows the lead's country (its phone number, else the sub-account's country). Anything else is kept as sent. - body `zip` (string): ZIP or postal code. - body `custom_fields` (object): Custom field values keyed by field_key (GET /v1/custom-fields); a field's label also works. Values are checked against the field type: number/money/rating numbers, boolean true/false, date YYYY-MM-DD, datetime ISO 8601, select one of its options, multiselect a list of options. null or "" clears a value; fields you leave out keep their value. - body `tags` (array): REPLACES all of the lead's tags ([] removes them all). To change only some, use add_tags / remove_tags. - body `add_tags` (array): Tag names to add; the lead's other tags stay. New names are created. - body `remove_tags` (array): Tag names to remove. - example body: {"add_tags":["Hot lead"],"remove_tags":["Cold"],"stage_key":"quote_sent","custom_fields":{"roof_type":"Tile"}} - `DELETE /v1/leads/{lead_id}` — Delete a lead (scope leads:admin) With delete_appointments=true its appointments go first, each the way the calendar deletes one: the synced Google / Outlook event, the customer's invite (cancelled if it was still on), its reminder texts, then the appointment; if one can't be deleted the lead is kept and the answer says how many went. Without it the appointments stay on the calendar with no lead, as before. - path `lead_id` (string, required): Lead id. - query `delete_appointments` (boolean): Also delete the lead's appointments (the app's "Also delete their appointments"). - `GET /v1/leads/{lead_id}/timeline` — Lead activity timeline (scope leads:read) - path `lead_id` (string, required): Lead id. - query `limit` (number): Default 50. - `POST /v1/leads/{lead_id}/notes` — Add a note to a lead (scope leads:write) mentions tags teammates like @Name in the app's note box: each one on the sub-account's team who can see the lead gets an email and a push with the note and a link to the conversation (replies go to you); the answer lists who was told and who was skipped and why (not_on_team, cant_see_lead). - path `lead_id` (string, required): Lead id. - body `body` (string, required): Note text. - body `actor_label` (string): Who the note is from. - body `mentions` (array): Up to 20 user ids to tag (GET /v1/members). - example body: {"body":"@Sam can you call her back after 5?","mentions":["uuid"]} - `POST /v1/leads/{lead_id}/stage` — Move a lead to a pipeline stage (scope leads:write) PATCH on the same path does the same. - path `lead_id` (string, required): Lead id. - body `stage_key` (string, required): Stage key from GET /v1/stages. - example body: {"stage_key":"booked"} - `GET /v1/stages` — List pipeline stages (scope leads:read) - `GET /v1/tags` — List lead tags (scope leads:read) Every tag in the sub-account and how many leads carry it. A tag is created automatically the first time you send its name in a lead's tags or add_tags. - `PATCH /v1/tags/{tag_id}` — Rename or recolor a tag (scope leads:write) Settings > Tags. A new name (60 characters, no commas, not another tag's name: merge them instead) and/or a color. A rename also rewrites every automation that names the tag (Add / Remove tag steps, the Tag added trigger, tag conditions) unless update_automations is false. Owners and admins. - path `tag_id` (string, required): The tag (GET /v1/tags). - body `name` (string): The new name. - body `color` (string): The tag's color. - body `update_automations` (boolean): Default true: automations that name the tag follow the rename. - example body: {"name":"Roof replacement","color":"amber"} - `POST /v1/tags/merge` — Merge tags into one (scope leads:write) Folds tags into the one you keep: their contacts get the kept tag and the others are deleted. Moving a tag is not adding it, so no "Tag added" automation starts. Automations that name a folded-in tag are rewritten to the kept one unless update_automations is false. Name tags by name or id. Owners and admins. - body `tags` (array, required): The tags to fold in (names or ids, up to 50). - body `into` (string, required): The tag to keep (name or id). - body `update_automations` (boolean): Default true. - example body: {"workspace_id":"uuid","tags":["roof","Roofing lead"],"into":"Roofing"} - `DELETE /v1/tags/{tag_id}` — Delete a tag (scope leads:write) Takes the tag off every contact for good. Automations that name it are left as they are. Owners and admins. - path `tag_id` (string, required): The tag (GET /v1/tags). ### Messaging - `POST /v1/messages` — Send an SMS, email, Instagram or Messenger message (scope messaging:write) Sends from the sub-account's own number / verified sending domain and logs the message on the lead timeline. Email requires a subject. Address the message with `lead_id`, or with a raw `to` (E.164 phone for SMS, email address for email) plus `workspace_id` — Local Flywheel matches an existing contact or creates one. Every send counts against the daily unique-contact safety limit (300 contacts per UTC day by default); replies to contacts already messaged today are free of the cap. Over the cap the call answers 429. Each message is billed at the platform rate and counts against the key's monthly credit budget, if it has one (402 when the budget is used up); a text through one of the sub-account's iMessage Macs is free. A text or email (and an email's subject) can use the lead's variables, as in the Inbox and automations: {first_name}, {full_name}, {business_name} and the rest listed by GET /v1/workspace-automations/reference are filled in for the lead before it goes. The message is sent as the key's user, as from the Inbox: the conversation names them, the Activity Log records them, the numbers and Macs they may text from apply, and an archived conversation comes back to the Inbox. With `send_at` the message is scheduled instead, exactly like the Inbox's "Schedule message": the call answers 201 with the scheduled message, and at that time it is sent from the lead's usual number or sender as the key's user, with the same opt-out, credit and limit checks as a send now (a refusal then marks it failed with the reason). A contact who opted out, or has no phone or email for the channel, is refused up front (400). A scheduled message counts against the key's credit budget when it is scheduled. See, change, cancel or send it early with /v1/scheduled-messages. With `channel` instagram or messenger the message is a reply in the Instagram or Messenger conversation the lead started with the business (`lead_id` only), exactly like replying from the Inbox: text only (Instagram up to 1,000 characters, Messenger 2,000), sent now, through the connected account the lead wrote to last, as the key's user. Instagram and Messenger only allow it within 24 hours of the person's last message there: after that the call answers 409 `window_closed` with `reply_window_ends_at`; also 409 when the lead never messaged there (`no_social_contact`) or the account is switched off or needs connecting again (`channel_disabled`, `needs_reconnect`), and 403 `not_enabled` when Instagram & Messenger is off for the account. It is free, uses none of the credit budget (still refused once the budget is used up) and isn't counted in the daily contact limit. The answer carries `message_id` and `account_id` (GET /v1/social/accounts). - body `lead_id` (string): Lead to message. Required for instagram and messenger. - body `to` (string): Without lead_id: raw destination (E.164 phone for sms, email address for email; requires workspace_id). With lead_id, sms only: which of the lead's numbers to text (phone or one of extra_phones); leave out for the main number. - body `channel` (string, required): sms, email, instagram or messenger. - body `body` (string, required): Message text. - body `subject` (string): Required for email. - body `name` (string): Contact name used when `to` creates a new lead. - body `media_urls` (array): Up to 10 MMS/attachment URLs. - body `actor_label` (string): Sender label shown in the timeline. - body `send_at` (string): Schedule instead of sending now: ISO 8601 with a time zone (Z or an offset), e.g. 2026-10-20T09:00:00-05:00. In the future and at most 365 days ahead. Answers 201 with `scheduled_message`. - body `send_as` (string): Texts, with an iMessage Mac connected (Beta): imessage sends a blue iMessage from one of the sub-account's iPhone numbers, sms from its business number, auto (default) lets the routing choose. The answer's `transport` says how it went (imessage, or mac_sms for the iPhone's own SMS). - body `imessage_line_id` (string): Texts: which Mac (iPhone number) sends it (GET /v1/imessage/lines). - body `audio_message` (boolean): Texts: the one media_urls file is a voice message. Through a Mac running Advanced mode it arrives as a real iMessage audio message; anywhere else as an audio attachment. Not with send_at. - example body: {"lead_id":"uuid","channel":"sms","body":"Hi Jane, are you still looking for a quote?"} - `GET /v1/scheduled-messages` — List scheduled texts and emails (scope messaging:read) Messages waiting to be sent later, scheduled in the Inbox or with POST /v1/messages and `send_at`. By default the upcoming ones (pending, sending, failed), soonest first, like the dashed bubbles at the end of a conversation; `status` = sent, cancelled or all lists history, newest first. A failed message carries `last_error`. Viewers limited to their own leads only see those leads' messages. - query `lead_id` (string): Only this lead's messages. - query `status` (string): Default upcoming (pending, sending, failed). - query `limit` (number): 1-100, default 25. - query `cursor` (string): next_cursor from the previous page. - `PATCH /v1/scheduled-messages/{scheduled_message_id}` — Change, cancel or restore a scheduled message (scope messaging:write) Like the Inbox's Edit, Cancel and Undo. Send any of body, subject (emails), scheduled_at and media_urls (texts) to change a pending or failed message: it goes back in the queue (status pending). `status: "cancelled"` (on its own) stops it; `status: "pending"` brings a cancelled one back (send a new scheduled_at when its time has passed). 409 when it is sending or already sent. Owners and admins only. - path `scheduled_message_id` (string, required): Scheduled message id. - body `body` (string): The new text. - body `subject` (string): The new subject (emails only). - body `scheduled_at` (string): ISO 8601 with a time zone, in the future and at most 365 days ahead. - body `media_urls` (array): Picture URLs for a text, max 10 (replaces the list). - body `status` (string): cancelled to cancel, pending to restore. - example body: {"scheduled_at":"2026-10-21T09:00:00-05:00","body":"Hi Jane, following up on your quote. Any questions?"} - `POST /v1/scheduled-messages/{scheduled_message_id}/send-now` — Send a scheduled message now (scope messaging:write; uses credits) The Inbox's "Send now": a pending or failed message goes out at once, as the teammate who scheduled it, with the usual opt-out, credit and limit checks, and is billed like any text or email. 200 = sent; 202 = a sending hiccup, it tries again by itself in a couple of minutes; 400 = refused, with the reason (the message is marked failed); 409 = cancelled, already sending or sent. Refused when the key's credit budget is used up. Owners and admins only. - path `scheduled_message_id` (string, required): Scheduled message id. - `GET /v1/messages` — List recent messages on this sub-account (scope messaging:read) Every SMS and email on the sub-account's Local Flywheel numbers and inboxes, and every Instagram and Messenger DM, newest first. A DM has `channel` instagram or messenger, no from / to / subject, its pictures and files in `media_urls` and `social` { account_id: the connected account (GET /v1/social/accounts), sent_by: user, ai, automation or page (sent from the Instagram or Facebook apps) on the business's side }. For polling, pass `cursor` (or `since`) — results then come oldest-first and `next_cursor` walks forward with no duplicates and no missed messages. Poll no more than once every 10 seconds, or subscribe to the `message.received` webhook instead. A text that went through one of the sub-account's iMessage Macs carries `transport` (imessage, or mac_sms for the iPhone's own green text) and `imessage` { line_id, from, service: imessage | sms | rcs, delivered_at, read_at }; a tapback carries `reaction` { by: them | you, type, emoji, reacts_to: the message it hangs on, removed }. - query `lead_id` (string): Only messages with this contact. - query `channel` (string): sms, email, instagram or messenger. - query `direction` (string): inbound or outbound. - query `since` (string): ISO-8601 timestamp; returns messages created after it, oldest-first. - query `cursor` (string): `next_cursor` from the previous poll. - query `limit` (number): Default 50, max 200. - `GET /v1/messages/{message_id}` — Read one message (scope messaging:read) - path `message_id` (string, required): Message id from GET /v1/messages. - `GET /v1/messages/limits` — Check today's contact-safety limits (scope messaging:read) Returns the daily unique-contact cap (default 300 per UTC day), how many contacts have been used, what's left, segment usage and the reset time. The same values ride on every messaging call as X-Contacts-Limit / -Used / -Remaining / -Reset headers. - `GET /v1/leads/{lead_id}/conversation` — Read the conversation with a lead (scope messaging:read) Texts, emails, Instagram and Messenger DMs, website chat, calls, voicemails and notes, newest first. - path `lead_id` (string, required): Lead id. - query `limit` (number): Default 50. - `GET /v1/imessage/lines` — List the sub-account's iMessage Macs (scope messaging:read) Every Mac connected to the sub-account for iMessage, the default first: its iPhone number, whose Mac it is, whether it's online, what the Mac reports about itself (`health`: Messages signed in, Full Disk Access, awake, lid closed allowed, iCloud still syncing, the number missing from or switched off in Messages), whether Advanced mode runs on it (`advanced_mode`: real audio messages and reactions), its settings (scope, create_leads, new_conversations, fallback, offline_minutes, ai_replies), who can text from it (access, allowed_user_ids, and can_use for you), its limits (new conversations a day and an hour, tries and length before someone first replies) and today's usage (new conversations today and this hour, messages waiting, every text it sent today, and how many other accounts share that iPhone's limit). `has_number` says whether the sub-account has a business number to fall back on; without one every text goes through a Mac. Any member. Connecting and disconnecting a Mac happen in the app. - `PATCH /v1/imessage/lines/{line_id}` — Change an iMessage Mac's settings (scope messaging:write) Send only what changes. The sub-account's owners and admins change any Mac; everyone else only their own; only owners and admins choose the default (is_default: true moves it from the old one). access: everyone, owner (only the person whose Mac it is) or selected (allowed_user_ids); owners, admins and the Mac's owner can always text from it, and AI replies and automations aren't limited. - path `line_id` (string, required): The Mac (GET /v1/imessage/lines). - body `label` (string): A name for it (max 80), or null. - body `is_default` (boolean): true makes it the default Mac. - body `access` (string): Who can text from it by hand. - body `allowed_user_ids` (array): With access selected: the team members who can. - body `scope` (string): crm: only conversations with people already in the CRM sync; all: every one-to-one conversation. - body `create_leads` (boolean): With scope all: someone new who texts in becomes a lead. - body `new_conversations` (string): How a first text to someone goes. - body `fallback` (string): When they aren't on iMessage or the Mac is offline: the business number, RCS or SMS from the iPhone through the Mac, the iPhone and then the business number (mac_then_number, the default), or nothing. - body `offline_minutes` (number): How long a message waits for an offline Mac before the fallback, 2-240. - body `ai_replies` (boolean): The AI texter may answer iMessages. - example body: {"access":"selected","allowed_user_ids":["uuid"],"new_conversations":"imessage"} - `POST /v1/messages/{message_id}/reaction` — React to an iMessage (tapback) (scope messaging:write) Puts a tapback (❤️ 👍 👎 😂 ‼️ ❓) on a text that went through one of the sub-account's Macs, like the Inbox's reaction picker; `remove: true` takes yours back. Only a Mac running Advanced mode can (`advanced_mode` on GET /v1/imessage/lines): otherwise 409 `advanced_off`. The reaction is queued (202) and shows on the message (its `reaction`, by you) once the Mac has sent it; if it can't, a note says why on the conversation. Anyone who can see the lead and text from that number. Free, like every text through a Mac. - path `message_id` (string, required): The text to react to (an id from GET /v1/messages or the lead's conversation). - body `reaction` (string, required): love, like, dislike, laugh, emphasize or question (or the emoji). - body `remove` (boolean): true takes your reaction back. - example body: {"reaction":"love"} - `PUT /v1/imessage/automated-texts` — Choose who automated texts send from (scope messaging:write) Settings > Phone's "Automated texts send from" (also on the Automations page): the way the texts the sub-account sends on its own go once it has a Mac connected. Automations, appointment confirmations and reminders, follow-ups and first texts follow it; an AI reply to a customer's own text still answers the way they wrote, and a step or send that names its own way keeps it. automatic lets each iPhone's iMessage settings decide, number sends from the business number, a line_id from that iPhone. GET /v1/imessage/lines returns the current choice as automated_texts_send_from. Owners and admins. - body `send_from` (string, required): automatic, number, or the line_id of a connected iPhone (GET /v1/imessage/lines). - example body: {"workspace_id":"uuid","send_from":"number"} - `GET /v1/social/accounts` — List the connected Instagram and Messenger accounts (scope messaging:read) The Instagram accounts and Facebook Pages (Messenger) connected in Settings > Instagram & Messenger: whether its DMs come into the Inbox (`enabled`; comment rules run either way), whether the AI answers its DMs (`ai_replies`), its connection (`status` connected, needs_reconnect or error, with `last_error`) and `live`: replies can go out through it. Any member. Connecting and switching accounts happen in the app. 403 `not_enabled` when Instagram & Messenger is off for the account. - `GET /v1/social/comments` — Instagram and Facebook comments the comment-to-DM rules saw (scope messaging:read) Recent comments in Settings > Instagram & Messenger: every comment a comment-to-DM rule matched, newest first, with the post, who wrote it, the rule, whether a public reply went under it, what happened to the DM (`dm_status` sent, failed with `error`, or skipped: that person already got it) and the lead it started a conversation with. `counts` has the number per result with every other filter applied; page with `offset` (`next_offset`). To answer someone, reply in their conversation with POST /v1/messages (channel instagram or messenger). Owners and admins. - query `status` (string): What happened to the DM. - query `account_id` (string): One connected account (GET /v1/social/accounts). - query `rule_id` (string): One comment-to-DM rule. - query `post_id` (string): One post or reel. - query `commenter_id` (string): Everything from one person (commenter.id). - query `search` (string): Commenter name or comment text contains (max 100). - query `from` (string): ISO date or time, comments on or after. - query `to` (string): ISO date or time, comments on or before. - query `oldest_first` (boolean): Default false (newest first). - query `limit` (number): 1-100, default 25. - query `offset` (number): next_offset from the previous page. - `GET /v1/social/settings` — Who goes into Leads from Instagram and Messenger (scope messaging:read) Settings > Instagram & Messenger > Who goes into Leads. `lead_mode` qualified (the default): someone who only sent a DM is a conversation in Messages, not a lead, until they share a phone number or email, book, or someone adds them to Leads (leads carry `chat_only` meanwhile and every lead count leaves them out). everyone: every new DM person is a lead right away. `dm_leads_to_move` (owners and admins; null for others): how many Instagram and Messenger people from before are still in Leads as New with no phone, email, booking or deal (POST /v1/social/move-dm-leads moves them). Any member reads the mode. 403 `not_enabled` when Instagram & Messenger is off for the account. - `PATCH /v1/social/settings` — Change who goes into Leads from Instagram and Messenger (scope messaging:write) qualified: only people who share a phone number or email, book, or are added by someone become leads (the rest stay conversations in Messages). everyone: every new DM person is a lead (and starts new-lead automations, webhooks and the field-service push like any new lead). Applies to people who message from now on; POST /v1/social/move-dm-leads tidies up the ones from before. Owners and admins. - body `lead_mode` (string, required): qualified or everyone. - example body: {"workspace_id":"uuid","lead_mode":"qualified"} - `POST /v1/social/move-dm-leads` — Move Instagram and Messenger people back to Messages (scope messaging:write) The settings' "Move them to Messages": Instagram and Messenger people who became New leads before (or while lead_mode was everyone) and never did anything a lead does (still New, no phone or email, no booking, deal or value, nobody added them to Leads) become conversations again. Silent: no automations, webhooks or field-service push; their conversations stay in Messages. apply false (the default) only counts them (`would_move`); apply true moves them (`moved`). Owners and admins. - body `apply` (boolean): true moves them; false (default) only counts. - example body: {"workspace_id":"uuid","apply":true} ### Bookings - `GET /v1/calendars` — List booking calendars (scope bookings:read) Every setting POST / PATCH /v1/calendars takes, read the way the booking page reads it: hours, length, buffers, hosts' mode, texts, pricing (with each option's and add-on's id, used by availability and bookings), design, duration_days (full-day jobs), schedule_group (shared schedule), fields and questions (the booking form), image_url, the payment settings, a summary (price_from_cents, price_to_cents, length_label such as "4-6 hr", has_options, takes_payment) and booking_path (/c/). - `GET /v1/calendars/{calendar_id}/availability` — Get open appointment slots (scope bookings:read) The times the calendar's booking page offers, worked out the same way: weekly hours and days off, the job length, buffers, capacity (slots_per_window jobs at one moment), calendars sharing its schedule, max per day, minimum notice, the booking window (max_days_ahead, up to a year) and the hosts' own calendars. A calendar with options times each one differently, so send option_id (400 lists the options otherwise) and any addon_ids; the answer carries a quote (option, add-ons, length, total, deposit, balance). Full-day calendars also return slot_ends (when each start's job is done). Always call this before creating a booking. - path `calendar_id` (string, required): Calendar id. - query `from` (string): A date (2026-11-03) or an ISO time; defaults to today. - query `days` (number): 1-42, default 7. - query `option_id` (string): The option picked (its id in GET /v1/calendars pricing.options). Required on a calendar with options. - query `addon_ids` (string): Add-on ids, comma-separated: they add their time to the job. - `GET /v1/bookings` — List appointments (scope bookings:read) Soonest first. Each appointment has the same fields as everywhere else in the API: id, lead_id, calendar_id, appointment_number (the sub-account's #1001 and up, as the calendar shows it), title, starts_at, ends_at, timezone, lead_timezone, location, notes, meeting_type, meeting_location, meeting_url, host_user_id, status, source, notify_lead, is_arrival_window (booked as an arrival window: starts_at to ends_at is the window), service_details (on a priced calendar: the service, option, add-ons, length, total_cents, deposit_cents, balance_cents and currency; null otherwise), created_at and updated_at. For owners and admins each also carries manage_url: the customer's own page for it (the {reschedule_link} of reminders, on the sub-account's CRM address), where they move or cancel it themselves; add ?cancel=1 to open on cancelling. - query `from` (string): ISO start. - query `to` (string): ISO end. - query `status` (string): Filter by status. - query `lead_id` (string): Filter by lead. - `GET /v1/appointment-emails` — The appointment emails leads get (scope bookings:read) The emails a lead gets when they book (confirmed), when the appointment moves (updated) and when it's cancelled, each with the calendar invite attached (Settings > Messaging > Appointment Reminders > Confirmation email). `enabled` false: leads get none (the team still gets its booking alert); `language` of our emails (en or es). For each kind `sends` says whether ours or the business's own HTML goes out, with its subject (`default_subject` when empty) and HTML. `variables` lists what the subject and HTML can use. Owners and admins. - `PUT /v1/appointment-emails` — Send appointment emails in the business's own HTML (scope bookings:write) Change any of the three (confirmed, updated, cancelled) field by field: html (the whole email, any design: a GoHighLevel or Mailchimp export works; scripts, frames, forms and javascript: links are removed), subject (up to 200 characters; empty uses the default) and on; starter: true starts from the built-in template; null puts our email back. New HTML goes out unless on is false; a kind without HTML is ours. Variables are filled for each lead, HTML-escaped: {first_name}, {full_name}, {when}, {date}, {time}, {location}, {join_link}, {reschedule_link}, {cancel_link}, {appointment_title}, {business}, {business_phone}, {agent}; a misspelled one stays as typed. Also enabled and language. The .ics invite is attached either way. Owners and admins. - body `confirmed` (object): { on, subject, html } or { starter: true }; null = our email. - body `updated` (object): Same, for a moved appointment. - body `cancelled` (object): Same, for a cancelled one. - body `enabled` (boolean): false: no appointment emails to leads at all. - body `language` (string): Our emails' language. - example body: {"workspace_id":"uuid","confirmed":{"subject":"You're booked, {first_name}","html":"

See you {when} at {location}.

Reschedule

"},"cancelled":null} - `POST /v1/bookings` — Book an appointment (scope bookings:write) Books like the app: rejects a second overlapping appointment for the same lead; calendar_id must be one of the sub-account's calendars (404 otherwise); ends_at must be after starts_at and at most 24 hours later. With a calendar, the slot's capacity is checked, calendars sharing its schedule included (409 with code slot_full; pick a time from GET /v1/calendars/{calendar_id}/availability, or send force: true) and the host is picked by the calendar's round robin. On a priced calendar, option_id and addon_ids set the job's length and price: the booking's notes start with the pick and its service_details carry the option, add-ons, total, deposit and balance; the lead's deal value is filled when it has none (the response adds a quote; a warning says when a calendar with options was booked without one). Bookings made through the API never take the deposit: to collect it, send the customer the booking link. A full-day calendar's job starts at opening time and ends at closing time on its last working day (400 not_a_start_time otherwise, unless ends_at is sent). By default the lead gets the confirmation and reminder texts and the calendar invite (notify_lead: false to skip them). Fires the appointment.booked outbound webhooks. - body `starts_at` (string, required): ISO 8601 start time. - body `ends_at` (string): ISO 8601 end time (instead of duration_minutes; at most 24 h after starts_at, 31 days on a full-day calendar). - body `lead_id` (string): Lead to book. - body `calendar_id` (string): One of the sub-account's calendars. - body `option_id` (string): The option booked (GET /v1/calendars pricing.options id), e.g. the vehicle size. - body `addon_ids` (array): Add-ons booked (pricing.addons ids). - body `duration_minutes` (number): 5-1440. Default: the option's length with its add-ons, else the calendar's, else 30. - body `timezone` (string): IANA timezone. - body `location` (string): Meeting location. - body `notes` (string): Internal notes. - body `notify_lead` (boolean): Default true: the lead gets the confirmation email with its calendar invite plus the confirmation and reminder texts. false books quietly, and later updates or cancels stay quiet too; the host still gets the booking alert. - body `force` (boolean): Skip the calendar's capacity check (the database still never double-books a person or a full calendar). - example body: {"workspace_id":"uuid","lead_id":"uuid","calendar_id":"uuid","starts_at":"2026-11-03T14:00:00Z","option_id":"opt-van","addon_ids":["add-pet"]} - `POST /v1/bookings/{booking_id}/reschedule` — Move an appointment (scope bookings:write) Re-times the reminder texts, updates the calendar mirror and the lead's invite, and fires the appointment.rescheduled outbound webhooks when the time changed. The appointment keeps its length; a full-day job runs to closing time on its new last working day. 409 slot_full when the new time is taken. - path `booking_id` (string, required): Booking id. - body `starts_at` (string, required): New ISO start time. - body `duration_minutes` (number): Optional new length, 5-1440. - `POST /v1/bookings/{booking_id}/cancel` — Cancel an appointment (scope bookings:write) DELETE /v1/bookings/{booking_id} does the same. - path `booking_id` (string, required): Booking id. - body `reason` (string): Cancellation reason. - `PATCH /v1/bookings/{booking_id}` — Change an appointment's outcome, title, notes, location, host, lead notifications or lead (scope bookings:write) Everything but the time (use reschedule for that). status records the outcome: completed, no_show or cancelled release the lead from Booked and stop its reminder texts; confirmed puts it back on. host_user_id must be someone on the sub-account's team (GET /v1/members). notify_lead: false silences the lead's remaining reminder texts and invite updates; true turns them back on (an upcoming appointment's reminders are queued again). lead_id links an appointment that has no lead yet (typed in by hand) to a lead of the same sub-account; one that already has a lead answers 409. Linking an upcoming scheduled appointment books it for the lead like a new booking: the lead is marked booked, its follow-ups and AI calls stop, and the confirmation and reminder texts and the invite go out (unless notify_lead is false). A past or finished appointment is only linked. - path `booking_id` (string, required): Booking id. - body `status` (string): The appointment's outcome. - body `title` (string): Max 200. - body `notes` (string): Max 2000. null clears them. - body `location` (string): Address or place, max 300. null clears it. - body `host_user_id` (string): Team member who takes it. null for nobody. - body `notify_lead` (boolean): false: the lead gets no more reminder texts or invite updates for this appointment. true: they do again. - body `lead_id` (string): Link an appointment with no lead to this lead (same sub-account). Cannot move an appointment from one lead to another. - example body: {"status":"completed","notes":"Signed the quote on site."} ### Members - `GET /v1/members` — List sub-account members and invites (scope members:read) Each member has user_id, role, email and full_name. Use user_id (or the email) to name a team member in busy blocks. Staff and Technicians, who have no Team page in the app, get names and roles only (no emails, no invitations). - `POST /v1/members` — Invite a member (scope members:admin) - body `email` (string, required): Invitee email. - body `role` (string): client_admin (Admin), client_viewer (Staff) or client_tech (Technician: only their own leads and appointments). Default client_viewer. - `PATCH /v1/members/{member_id}` — Change a member's role (scope members:admin) You cannot change your own role. - path `member_id` (string, required): Member id. - body `role` (string, required): client_admin (Admin), client_viewer (Staff) or client_tech (Technician: only their own leads and appointments). - `DELETE /v1/members/{member_id}` — Remove a member (scope members:admin) - path `member_id` (string, required): Member id. ### Smart forms - `GET /v1/smart-forms` — List smart forms (scope smart_forms:read) - `GET /v1/smart-forms/{form_id}/submissions` — List form submissions (scope smart_forms:read) - path `form_id` (string, required): Form id. - query `limit` (number): Default 50. ### CRM automations - `GET /v1/workspace-automations` — List sub-account automations (scope workspace_automations:read) - `POST /v1/workspace-automations/{automation_id}/enroll` — Enroll leads into an automation (scope workspace_automations:write) Can send real texts and emails. Confirm the lead list before calling. Leads are queued and start within the sub-account's daily contact limit. A lead already waiting in this automation's queue is not queued again (already_queued). ignore_filters defaults to false: a lead that fails the automation's only_if rules is skipped when the queue reaches it (the app's Enroll dialog defaults to true). - path `automation_id` (string, required): Automation id. - body `lead_ids` (array, required): Lead ids (max 5000). - body `ignore_filters` (boolean): Default false: leads that fail the automation's only_if rules are skipped. true = enroll them anyway. - example body: {"lead_ids":["uuid"],"ignore_filters":false} - `POST /v1/workspace-automations/{automation_id}/toggle` — Enable or disable a sub-account automation (scope workspace_automations:write) - path `automation_id` (string, required): Automation id. - body `enabled` (boolean): Omit to flip the current state. - `GET /v1/workspace-automations/reference` — Every trigger, step, filter and setting the builder accepts (scope workspace_automations:read) Read this before building: trigger types and their filters, step actions and their fields, entry-rule fields and operators (with every lead source), settings, message variables, and what this sub-account has for a definition to point at: stages, team, custom fields, phone numbers, review funnel, Facebook pages, Smart Forms, form names (for form_name rules), calendars and email senders. - `GET /v1/workspace-automations/email-design` — How a designed automation email is built (scope workspace_automations:read) The shape of a send_email step's design (format designed): its fields, every section (text, offer, image, features, steps, review, gallery, banner, questions, services, button, divider, custom HTML), the looks it can have, the rules (merge fields, [bracketed blanks], no invented facts) and a whole example step. A designed email is drawn in the business's own logo, name and address with a footer and Unsubscribe link, exactly as the Automations page's email designer shows it. The same for every sub-account. - `POST /v1/workspace-automations` — Build an automation (scope workspace_automations:admin) Saved exactly as the Automations page saves it, so it opens and edits in the app. Saved OFF unless enabled is true; once on, its texts and emails go to real leads through the normal quiet hours, opt-out and daily limits. Steps can send lead data out (webhooks, alerts), so this needs an admin-scoped key. Everything it points at (stages, team members, phone numbers, review pages, Facebook pages, Smart Forms, calendars, email senders) must be in the same sub-account; GET /v1/workspace-automations/reference lists them. Any step can take a label (its name on the step card). Steps include drip (let a number of leads through every period, the rest wait in line, within business hours if asked); triggers include custom_field_changed (a custom field changes, optionally to certain values or only by a person) and yearly_date (every year on a holiday or a date, at a time, for everyone matching only_if that day). An inbound_webhook automation comes back with its private inbound_url: POST JSON with a phone or email to start it (it must be on), and every field sent can be used in its messages as {field}. - body `name` (string, required): Up to 80 characters. - body `description` (string): Optional note. - body `trigger` (object, required): When it starts: {"type":"new_lead"}, {"type":"stage_changed","to_stages":["booked"]}, {"type":"tag_added","tags":["hot"]}, {"type":"leads_imported","tags":["Foreclosure list"]}, {"type":"smart_form_submitted","form_ids":["Free quote"]}, {"type":"appointment_booked","calendar_ids":["Estimate visit"]}, {"type":"inbound_webhook"}... Ids or names. See GET /v1/workspace-automations/reference. - body `only_if` (array): Entry rules, all must hold: [{"field":"tags","op":"has_none","value":["customer"]}]. - body `steps` (array, required): In order: [{"action":"send_text","message":"Hi {first_name}"},{"action":"wait","days":1},{"action":"send_email","subject":"Your quote","message":"..","from_sender_id":""},{"action":"if","conditions":[..],"then":[..],"else":[..]}]. A send_text step takes send_as (auto, imessage or sms) when the sub-account has an iMessage Mac, plus voice_note_url (an https audio file sent right after the message, only from a connected iPhone number, never the business number; the step is skipped when no iPhone is connected) and video_url (texted as a link under the message). A send_email step takes format: simple (the default, message as rich text), designed (a branded email built from sections: design {headline, heroImageUrl, greeting, blocks [{type:text, md} | offer | image | features | steps | quote | gallery | banner | faq | cards | button | divider], ctaLabel, ctaUrl ({booking_link}, {review_link}, {reschedule_link} or https), signoff, signerName, accent, design {template classic|bold|letter|flyer|newsletter|elegant|minimal|bright|fresh|blocks|retro|night|soft}}; GET /v1/workspace-automations/email-design has the whole shape and an example) or html (html: the whole email in your own HTML; {first_name}, {{contact.first_name}} and *|FNAME|* are filled). Designed and html emails need a subject, get the business's logo, address and an Unsubscribe link, and their split_test b is {subject, preheader}. - body `settings` (object): {"stop_on_reply":true,"sending_window":{"days":["mon","tue"],"start":"09:00","end":"18:00"}}. - body `enabled` (boolean): Default false. - example body: {"workspace_id":"uuid","name":"Speed to lead","trigger":{"type":"new_lead"},"steps":[{"action":"send_text","message":"Hi {first_name}, thanks for reaching out! When is a good time to talk?"},{"action":"wait","days":1},{"action":"send_text","message":"Still interested, {first_name}?"}],"settings":{"stop_on_reply":true}} - `GET /v1/workspace-automations/{automation_id}` — One automation as {trigger, only_if, steps, settings} (scope workspace_automations:read) The same shape create and update take (step names included), with a ref on every step so an update can keep steps unchanged ({"keep":""}). Webhook header values are hidden. An inbound_webhook automation includes its inbound_url; viewers see only its host, like webhook step links. - path `automation_id` (string, required): Automation id. - `GET /v1/workspace-automations/{automation_id}/results` — How an automation's texts and emails did (scope workspace_automations:read) Every Send text and Send email step with its sends, opens, clicks, hard bounces and replies within 7 days of each send, the numbers in the app's Stats view. Rates are fractions (0.25 = 25%). A text has no opens, clicks or bounces: those are null. A step with a split test also has split_test: each version's numbers and a verdict. status is too_early (fewer than 30 sends on a version; sends_needed says how many more), tie, leading (ahead, could still be chance) or winner (95% confidence); metric is what it is judged on (clicks for an email with at least 5 clicks, else opens; replies for a text); lift is how far ahead as a fraction, null when the other version's rate is 0. Steps are matched by their place in the automation; sends from a place that no longer holds that kind of step are in steps_no_longer_there. partial is true when the period has more runs than the 2,000 newest counted. - path `automation_id` (string, required): Automation id. - query `days` (number): The period: 7, 30 or 90. Default 30. - `PATCH /v1/workspace-automations/{automation_id}` — Change an automation (scope workspace_automations:admin) Send only what changes. steps replaces all steps: keep unchanged ones with {"keep":""} from GET. settings changes only the keys sent. enabled turns it on or off. - path `automation_id` (string, required): Automation id. - body `name` (string): New name. - body `trigger` (object): New trigger. - body `only_if` (array): New entry rules. - body `steps` (array): New steps (replaces all). - body `settings` (object): Settings to change. - body `enabled` (boolean): On or off. - `POST /v1/workspace-automations/{automation_id}/duplicate` — Copy an automation (scope workspace_automations:admin) The copy is saved OFF unless enabled is true. - path `automation_id` (string, required): Automation id. - body `name` (string): The copy's name. - body `enabled` (boolean): Default false. - `DELETE /v1/workspace-automations/{automation_id}` — Delete an automation (scope workspace_automations:admin) Leads inside it stop where they are. - path `automation_id` (string, required): Automation id. - `GET /v1/workspace-automations/folders` — List automation folders (scope workspace_automations:read) The folders on the Automations page in their order, the automations in each, and the ones at the top level. GET /v1/workspace-automations also takes folder_id (or none for the top level). - `POST /v1/workspace-automations/folders` — Create an automation folder (scope workspace_automations:write) Added after the existing folders. Owners and admins. - body `name` (string, required): Up to 60 characters. - example body: {"workspace_id":"uuid","name":"Reminders"} - `PATCH /v1/workspace-automations/folders/{folder_id}` — Rename an automation folder (scope workspace_automations:write) - path `folder_id` (string, required): The folder. - body `name` (string, required): Up to 60 characters. - example body: {"name":"Appointment reminders"} - `DELETE /v1/workspace-automations/folders/{folder_id}` — Delete an automation folder (scope workspace_automations:write) Its automations move to the top level, unchanged (nothing is turned off or deleted). - path `folder_id` (string, required): The folder. - `POST /v1/workspace-automations/move` — Move automations into a folder (scope workspace_automations:write) Puts the automations into the folder, or back to the top level with folder_id null. Only where they show on the page changes. - body `automation_ids` (array, required): Up to 100 automations of the sub-account. - body `folder_id` (string, required): The folder, or null for the top level. - example body: {"workspace_id":"uuid","automation_ids":["uuid"],"folder_id":"uuid"} - `GET /v1/workspace-automations/{automation_id}/enrollments` — Who is inside an automation right now (scope workspace_automations:read) Leads waiting on a step or mid-step, newest first, with the time their next step runs, plus how many are still waiting to be enrolled. - path `automation_id` (string, required): Automation id. - query `limit` (number): 1-100, default 100. - query `cursor` (string): next_cursor from the previous page. - `POST /v1/workspace-automations/{automation_id}/unenroll` — Take leads out of an automation (scope workspace_automations:write) Like Remove from workflow in the app: their run stops, queued steps (texts, emails) are cancelled and the lead's timeline notes it. Nothing is sent. - path `automation_id` (string, required): Automation id. - body `lead_ids` (array): Up to 500 lead ids. - body `all` (boolean): true = everyone in it (instead of lead_ids). - example body: {"lead_ids":["uuid"]} - `GET /v1/leads/{lead_id}/workflows` — The automations a lead is inside (scope workspace_automations:read) - path `lead_id` (string, required): Lead id. ### Workspaces - `GET /v1/workspaces` — List sub-accounts (scope workspaces:read) - `GET /v1/workspaces/{workspace_id}` — Get one sub-account (scope workspaces:read) - `PATCH /v1/workspaces/{workspace_id}` — Update a sub-account (scope workspaces:write) Changes a sub-account's settings. Send only what changes. Who can change what: - Owners and admins of the sub-account: `name`, `timezone`, `industry`, `logo_url`, `notify_on_appointments`, `enabled_features`. - Only the agency (the owner or an agency admin): `archived`, `brand_id`, `hidden_features`, `monthly_credit_limit`. Anyone else gets 403. enabled_features is Settings > Features: tools only some businesses use, off until turned on. Send { key: true | false }; only the keys sent change. - `sales`: the Sales page, and parts, tip and technician on won jobs. - `plans`: Plans & memberships on won jobs. - `pipelines`: More pipelines. - quote_templates: Quote templates on estimates. - new_numbers_in_messages: texts and calls from numbers the CRM doesn't know stay conversations in Messages (chat_only true on the lead) until they book or someone adds them to Leads. hidden_features is what the agency hides from the sub-account's own people. Client admins, Staff and Technicians lose those pages, and their API keys get 403 feature_off on those routes. Send { key: true | false }; only the keys sent change. - Pages: `leads`, `messages`, `appointments`, `calendars`, `smart_forms`, `media`, `campaigns`, `calls`, `ai_voice`, `automations`, `landing_pages`, `invoices`, `sales`, `reports`, `refer`, `activity`, `team`, `ad_insights`, `support`, `agent`, `contracts`, `proposals`. - `tools` hides the whole Tools page. One key per tool: `email_marketing`, `reward_games`, `loyalty_cards`, `short_links`, `website_analytics`, `click_guard`, `call_tracking`, `seo_tracker`, `offer_generator`, `website_widget`, `review_funnel`, `ai_visibility`, `listings`. - `google` hides every Google tool. One key each: `google_reviews`, `google_posts`, `google_optimizer`, `google_rankings`, `google_desk`, `google_reports`, `google_embeds`. - A sub-account on an agency plan also follows what the plan leaves out (Agency > Plans & add-ons). A key sent here is this sub-account's own choice. monthly_credit_limit is the most credits the sub-account may use in your billing period, every tool together. At the limit its texts, emails, AI and paid tools pause until the period renews; incoming texts and calls still come in. null means no limit. - body `name` (string): The sub-account's name, up to 120 characters. - body `timezone` (string): An IANA time zone, e.g. America/Chicago. - body `industry` (string): Up to 80 characters. - body `notify_on_appointments` (boolean): Alert the team when an appointment is booked. - body `archived` (boolean): Agency only. Archives the sub-account, or brings it back. - body `brand_id` (string): Agency only. One of your brands (GET /v1/brands), or null. - body `monthly_credit_limit` (number): Agency only. A whole number of credits, 0 to 10,000,000, or null for no limit. - body `logo_url` (string): Client logo URL, or null to remove it. - body `enabled_features` (object): Settings > Features, e.g. { "sales": true }. - body `hidden_features` (object): Hidden from the client's people, e.g. { "invoices": true, "team": false }. Owner or agency admin. - example body: {"name":"Delgado Garage Doors","timezone":"America/Chicago","enabled_features":{"sales":true}} - `POST /v1/workspaces/{workspace_id}/outreach` — Configure outreach (auto-greet, AI replies, sending identity) (scope workspaces:write) Sets a sub-account's outreach settings by their raw column names. PATCH on the same path does the same. Prefer PATCH /v1/ai-texting and /v1/nurture-sequence: they take friendly names and check every value. Here, unknown fields are ignored and text is capped at 20,000 characters. First text and email: - `auto_greet_new_leads`, `first_message_template`, `sms_template`, `sms_enabled`. - greet_delay_minutes_smart_form, greet_delay_minutes_default. - `email_enabled`, `email_from_address`, `email_from_name`, `email_subject`, `email_template`. AI replies: - ai_enabled, ai_system_prompt, ai_business_context, ai_agent_name, ai_booking_link. - ai_max_auto_replies, reply_delay_minutes, ai_auto_resume_minutes. - handoff_on_unknown, handoff_pause_ai, handoff_resume_days. - ai_can_cancel_appointments, ai_cancel_retention_enabled, ai_cancel_retention_note. When things may send: - greet_window_mode, greet_window_start, greet_window_end. - followup_window_mode, followup_window_start, followup_window_end. - respect_business_hours, quiet_hours_enabled, quiet_hours_start, quiet_hours_end. Follow-ups, missed calls and reminders: - `nurture_enabled`, `nurture_steps`. - missed_call_text_enabled, missed_call_text_body. - reminder_24h_enabled, reminder_24h_template, reminder_1h_enabled, reminder_1h_template. - reminder_5m_enabled, reminder_5m_template (the 5-minute reminder, off by default). - customer_confirmation_enabled, customer_confirmation_template. - appointment_email_enabled, appointment_email_language (en | es). Anyone who can manage the sub-account. - body `auto_greet_new_leads` (boolean): Text new leads automatically. - body `first_message_template` (string): The first text. - body `ai_enabled` (boolean): AI replies on or off. - body `ai_agent_name` (string): Name the AI texts as. - body `email_from_name` (string): Sender name on emails. - example body: {"auto_greet_new_leads":true,"ai_enabled":true,"ai_agent_name":"Sarah"} ### Setup - `GET /v1/setup-status` — What is set up, and what is missing (scope workspaces:read) Start here. Returns the sub-account's real configuration (numbers, AI texting, receptionist, calendars, forms, automations, offers, team, lead sources, integrations) and a severity-ranked list of findings. Each finding names the API call and MCP tool that fixes it, or says when it can only be done in the app (buying a number, SMS registration, connecting Google or Outlook). ### Offers - `GET /v1/offers` — List offers (scope workspaces:read) Offers (offer playbooks) tell the AI what this business sells to a lead: the first text, the follow-up sequence, notes for the AI and the booking link. - `POST /v1/offers` — Create an offer (scope workspaces:write) - body `name` (string, required): Internal name (max 80). - body `offer_label` (string): How the offer is described to the lead (max 200). - body `first_message_template` (string): First text to a new lead. Supports {{first_name}} (max 1600). - body `nurture_enabled` (boolean): null follows the sub-account's own follow-up setting. - body `nurture_steps` (array): Up to 12 follow-ups: { offset_minutes, body_template }. offset_minutes counts from the previous message. - body `ai_context_note` (string): What the AI should know about this offer (max 2000). - body `booking_link` (string): Public http(s) URL. - body `is_active` (boolean): Default true. - body `smart_first_text_enabled` (boolean): true: the AI writes the first text for these leads (first_message_template is the backup); false: first_message_template goes out as written; null (default) follows the sub-account's smart first text switch. - body `smart_first_text_instructions` (string): What the smart first text should do for these leads (max 1000). Empty uses the sub-account's instructions. - body `triggers` (array): Which leads get this offer: { type, value, label? }. type is meta_form, smart_form, webhook (a lead source id) or source (the lead's source text). Form and lead-source ids must belong to the sub-account. - example body: {"workspace_id":"uuid","name":"Free roof inspection","offer_label":"a free 20-point roof inspection","first_message_template":"Hi {{first_name}}, thanks for asking about a free roof inspection. What day works best?","nurture_steps":[{"offset_minutes":60,"body_template":"Still want that inspection?"}],"triggers":[{"type":"source","value":"Website form"}]} - `PATCH /v1/offers/{offer_id}` — Update an offer (scope workspaces:write) Send only what changes. `triggers`, when sent, replaces the whole list. - path `offer_id` (string, required): Offer id. - `DELETE /v1/offers/{offer_id}` — Delete an offer (scope workspaces:admin) - path `offer_id` (string, required): Offer id. ### Calendars & hours - `POST /v1/calendars` — Create a booking calendar (scope bookings:write) A new calendar has no host unless host_user_id or hosts is sent. Hosts must be members of the sub-account (GET /v1/members). The response is the calendar as GET /v1/calendars shows it, with its public booking path (/c/). Calendars are switched off with is_active=false rather than deleted. The booking page can show prices with options and add-ons and take a deposit (pricing), have its own look (design), book whole working days (duration_days), share one schedule with other calendars (schedule_group) and ask its own questions (questions). Taking money at booking needs Stripe, Authorize.net or Whop connected to the sub-account in the app first. - body `name` (string, required): Calendar name (max 80). - body `title` (string): Shown to the person booking. - body `duration_minutes` (number): 5-1440, default 30. - body `buffer_minutes` (number): 0-1440, default 0. Always saved as 0 on an arrival_window calendar (a window books the whole window and pads nothing), as in the app. - body `min_notice_minutes` (number): Default 60. - body `max_days_ahead` (number): 1-365, default 14. - body `timezone` (string): IANA zone, e.g. America/Chicago. Defaults to the sub-account's. - body `weekly_hours` (object): Per day, 24h HH:MM windows: {"mon":[["09:00","17:00"]],"sat":[]}. Default Mon-Fri 9-5. - body `date_overrides` (array): Days off or special hours: [{"date":"2026-12-25","pairs":[]}]. - body `assignment_mode` (string): Who takes the booking. Default unassigned (no host), or single when host_user_id is sent. - body `host_user_id` (string): Host of a single-host calendar (required for single). - body `hosts` (array): User ids sharing a round_robin / collective calendar. - body `meeting_type` (string): Default phone. in_person: the customer comes to meeting_location (studio, shop, office). customer_address: the team goes to the customer's home, and the booking page asks for their address. - body `scheduling_mode` (string): exact times, or an arrival window for trades. - body `arrival_window_minutes` (number): 15-720. - body `appointment_texts` (object): Confirmation and reminder texts for appointments on this calendar, keyed by confirmation, reminder_24h, reminder_1h, reminder_5m. Each takes {"mode":"custom","template":"..."} (this wording, sent even when the sub-account has that text off), {"mode":"off"} (never sent for this calendar), or null / {"mode":"inherit"} (the sub-account's text, the default). Only the texts you name change. - body `slots_per_window` (number): 1-50: how many jobs can run at the same moment (crews). - body `duration_days` (number): Full-day jobs, 1-14 working days: each booking runs from opening time on its first day to closing time on its last, skipping closed days. null = timed by duration_minutes. - body `schedule_group` (string): Shared schedule name (max 60): calendars with the same group count each other's bookings, so one crew's time is never sold twice across services. null = its own schedule. - body `booking_requests` (object): Bookings on this calendar are requests until someone confirms them, merged: {"on":true,"ai_confirms":true,"ai_rule":"They own the home and will be there","message":"We'll confirm within the hour."}. While on, a booking made by itself (booking page, Smart Form, the AI, this API) is saved held: the time is taken, but no confirmation, reminders or invite go out and "Appointment requested" automations run instead of "Appointment booked". The team confirms or declines it on Appointments; with ai_confirms (needs ai_rule, max 600) the AI texter may confirm it once the rule is met. message (max 300) is what the booking page says after a request. Bookings a person makes by hand and existing customers' are never requests. The API does not show the hold yet: a held request reads as status confirmed in GET /v1/bookings, and confirming or declining it is done on the Appointments page. null = off. - body `pricing` (object): Prices on the booking page. Merged into what the calendar has, except options and addons, which replace their lists (send each row's id to keep it; ids come back in GET /v1/calendars). Money in cents. { enabled, show_prices, price_cents (no options), price_note (max 160), options_label ("Vehicle size"), options: [{ id?, name (max 80), description?, price_cents, duration_minutes (5-1440, its own job length), duration_days (full-day calendars), image_url? }] (max 24; the customer picks one), addons_label, addons: [{ id?, name, description?, price_cents, extra_minutes (0-720), image_url? }] (max 24), deposit: { mode: none | fixed | percent | full, amount_cents, percent (1-100) } }. A calendar that never had pricing switches it on unless enabled is false; null clears it. A deposit needs a connected gateway. - body `design` (object): The booking page look, merged into the current design. { enabled, preset (clean, studio, showroom, midnight, clinic, fresh, warm, editorial, sunset, bold, ocean, builder, spa, lavender, mono, forest, graphite: applied first; it sets the whole look, layout included), mode: light | dark | auto, colors: { background, surface, text, button } (#rrggbb, merged), font, heading_font ("match" or a font), radius: sharp | soft | rounded | pill, button_style: solid | soft | outline, backdrop: solid | glow | gradient | dots | photo (the cover, needs cover_url) | image (needs background_url), layout: card | split (details beside the calendar on computers) | open (no card), header_align: left | center, logo_size: small | medium | large, day_style: tiles | strip | calendar (windows over three weeks always show the calendar), time_style: grid | list | pills, picked_style: tint | filled, shadow: none | soft | lifted, heading_case: normal | upper, logo_url, cover_url, background_url (https), hide_avatar, show_counts, group_times, labels: { pick_day (40), pick_time (40), done_title (60), done_text (240) } ("" = the usual words, merged), custom_css (max 12000) }. Fonts: inter, poppins, dm-sans, space-grotesk, manrope, outfit, figtree, plus-jakarta, work-sans, rubik, nunito-sans, montserrat, raleway, urbanist, sora, lexend, archivo, barlow, karla, public-sans, bricolage, bebas, anton, archivo-black, syne, clash, oswald, playfair, dm-serif, lora, libre-baskerville, cormorant, instrument-serif, fraunces, source-serif, merriweather, jetbrains-mono, space-mono, ibm-plex-mono, system. A page that never had a design switches it on unless enabled is false; null = the classic page. It carries into embeds and custom domains. - body `questions` (array): The calendar's own booking questions, up to 30, replacing the list: [{ key?, label (max 160), field_type: text | textarea | number | money | phone | email | url | select | multiselect | boolean | date | datetime | rating | file (photos or PDFs, up to 6), options (select / multiselect: 2-40), option_style?, required?, enabled?, save_to_crm? (never for file), placeholder?, helper_text? }]. Answers show on the appointment and the lead. - body `fields` (object): Contact fields on the booking form, merged: {"address":{"enabled":true,"required":true,"autocomplete":true},"email":{"required":false}}. Keys: full_name, first_name, last_name, email, phone, address, state, notes. Phone or email stays on; full_name or first_name + last_name. - body `image_url` (string): The service's photo (https): on its booking page and its service menu card. - body `currency` (string): Prices and payments in this currency. - body `payment_gateway` (string): Charge through this connected gateway; null = whichever is connected (Stripe first). - body `payment_hold_minutes` (number): 15-120: how long the time is held while they pay. - body `payment_label` (string): What the checkout calls the payment, e.g. "Deposit" (max 60). - example body: {"workspace_id":"uuid","name":"Triple T Interior + Exterior","duration_minutes":240,"assignment_mode":"unassigned","schedule_group":"Main crew","max_days_ahead":120,"pricing":{"options_label":"Vehicle size","options":[{"name":"Car","price_cents":31500,"duration_minutes":240},{"name":"SUV","price_cents":38500,"duration_minutes":300},{"name":"Van","price_cents":53500,"duration_minutes":360}],"addons":[{"name":"Pet hair","price_cents":4000,"extra_minutes":30}],"deposit":{"mode":"fixed","amount_cents":5000}},"design":{"preset":"showroom"},"questions":[{"label":"Vehicle year / make / model","field_type":"text","required":true},{"label":"Photos of the vehicle","field_type":"file"}]} - `PATCH /v1/calendars/{calendar_id}` — Update a booking calendar (scope bookings:write) Takes the same fields as create; send only what changes. `hosts`, when sent, replaces the pool; people who stay keep their place in the rotation. An arrival_window calendar always keeps buffer_minutes at 0 (a full-day one keeps its buffer). `appointment_texts` changes only the texts it names. pricing, design and fields merge; pricing.options, pricing.addons and questions replace their lists. Turning pricing off also stops taking payment at booking. - path `calendar_id` (string, required): Calendar id. - example body: {"pricing":{"deposit":{"mode":"percent","percent":20}},"design":{"colors":{"button":"#d4a63a"}}} - `POST /v1/calendars/{calendar_id}/copy-design` — Copy a calendar's design to others (scope bookings:write) The Design tab's "Use on other calendars": this calendar's design goes onto the calendars named (or every other calendar of the sub-account with all: true), switched on. A calendar that has its own cover photo keeps it. The calendar must have a design switched on. - path `calendar_id` (string, required): The calendar whose design is copied. - body `calendar_ids` (array): The calendars to copy it to. - body `all` (boolean): Every other calendar of the sub-account instead. - example body: {"all":true} - `POST /v1/calendars/{calendar_id}/design/generate` — Design a booking page with AI (scope bookings:write) The Design tab's AI designer: describe the look in one line and/or give the business's website (its colours, fonts and logo are read from it). Returns the design and a one-line summary, and saves it on the calendar unless save is false. readable says whether the text reads well on the card. No credits used. - path `calendar_id` (string, required): Calendar id. - body `instruction` (string): What it should look like, e.g. "black and gold, like a luxury showroom" (max 1200). - body `website_url` (string): The business's website. - body `save` (boolean): Default true. false only returns the design (send it later with PATCH design). - example body: {"instruction":"black and gold, like a luxury showroom","website_url":"https://example.com"} - `GET /v1/booking-menus` — List service menus (scope bookings:read) Service menus (Calendars → Booking tools → Service menu): one booking link (/c/, public_path) that lists several calendars in sections, with search, category chips and sorting; the customer picks a service and books it there. Each section lists its services with their price and length as the page shows them. warnings says when its services are on separate schedules (two customers could book the same time on different services) or switched off. - `POST /v1/booking-menus` — Create a service menu (scope bookings:write) Without sections it starts like the app's: one "Services" section with every calendar that is switched on, and a link named after the business. The link shares /c/ with calendars, so a slug a calendar or another menu uses answers 409. - body `title` (string): Heading customers see (max 120). Default "Book a service". - body `name` (string): Internal name (max 80). Default "All services". - body `description` (string): Under the heading (max 600). - body `slug` (string): Link name: /c/ (letters, numbers, dashes; max 40). - body `sections` (array): In order, replacing the list: [{ id?, title (max 80), description?, calendar_ids: [calendar ids, in the order shown] }]. Up to 30 sections; every calendar must belong to the sub-account. - body `options` (object): Merged: { show_prices, show_durations, search, filters (category chips), sorting, default_sort: featured | price_low | price_high | shortest | name }. All on by default. - body `design` (object): The page look, the same shape as a calendar's design. It carries into each service's booking flow opened from the menu. - body `is_active` (boolean): Default true. - example body: {"workspace_id":"uuid","title":"Book a detail","sections":[{"title":"Quick Services","calendar_ids":["uuid","uuid"]},{"title":"Detailing Packages","calendar_ids":["uuid"]}],"design":{"preset":"showroom"}} - `PATCH /v1/booking-menus/{menu_id}` — Update a service menu (scope bookings:write) Takes the same fields as create; send only what changes. sections replaces the list; options and design merge. - path `menu_id` (string, required): Menu id. - example body: {"options":{"default_sort":"price_low"}} - `DELETE /v1/booking-menus/{menu_id}` — Delete a service menu (scope bookings:write) Its link stops working; the calendars on it are not touched. - path `menu_id` (string, required): Menu id. - `POST /v1/booking-menus/{menu_id}/share-schedule` — Put a menu's services on one schedule (scope bookings:write) The menu editor's "Share one schedule": every calendar on the menu gets the same schedule_group, so a booking on any of them takes that time on all of them (one crew doing every service). group names it; by default the group one of them already has, else the menu's title. - path `menu_id` (string, required): Menu id. - body `group` (string): The shared schedule's name (max 60). - `POST /v1/booking-menus/{menu_id}/design/generate` — Design a service menu with AI (scope bookings:write) Same as POST /v1/calendars/{calendar_id}/design/generate, for a service menu's page. - path `menu_id` (string, required): Menu id. - body `instruction` (string): What it should look like. - body `website_url` (string): The business's website. - body `save` (boolean): Default true. - `GET /v1/availability` — Get business hours and booking defaults (scope bookings:read) - `PUT /v1/availability` — Set business hours and booking defaults (scope bookings:write) The AI uses these to decide when it may text and which times to offer. Setting the time zone also updates the sub-account's time zone. - body `timezone` (string): IANA zone. - body `weekly_hours` (object): Same shape as a calendar's. - body `date_overrides` (array): Days off or special hours. - body `slot_minutes` (number): 5-240. - body `buffer_minutes` (number): 0-120. Always saved as 0 when scheduling_mode is arrival_window. - body `default_calendar_id` (string): A calendar of this sub-account, or null. - example body: {"workspace_id":"uuid","timezone":"America/Chicago","weekly_hours":{"mon":[["08:00","17:00"]],"sat":[["09:00","13:00"]]}} - `GET /v1/calendar-routes` — List calendar routing rules (scope bookings:read) Calendar routing (Calendars -> Calendar routing in the app) sends each lead to the calendar that fits their answers: "Player group is Girls 13-14 -> Girls 13-14 calendar". Rules are checked in order (`position` 1 first); the first rule whose conditions ALL match the lead's custom fields or tags picks the calendar. Smart Forms with calendar_routing on, the AI texter and the AI caller follow them. Each rule comes with its calendar's name and a readable `summary`. Rules that are switched off, or whose calendar is off, are skipped. - `POST /v1/calendar-routes` — Add a calendar routing rule (scope bookings:write) Added last unless you send `position`. Conditions: a field condition reads a custom field by key (GET /v1/custom-fields) with op is, is_not or contains and `values` (any one matches), or op between with min and/or max for numbers ("11 years old" counts as 11); a tag condition (kind tag, op is or is_not) reads the lead's tags. Answers compare ignoring case, accents and punctuation. The calendar must belong to the sub-account. `warnings` explains a rule that may never fire (a key that is not a custom field, a calendar that is switched off). Owners and admins only; at most 200 rules. - body `calendar_id` (string, required): The calendar this rule books on (GET /v1/calendars). - body `conditions` (array, required): All must match, 1-20: [{"kind":"field","key":"player_group","op":"is","values":["Girls 13-14"]}], [{"kind":"field","key":"age","op":"between","min":9,"max":12}], [{"kind":"tag","op":"is","values":["VIP"]}]. - body `name` (string): Optional label, max 120. - body `is_active` (boolean): Default true. - body `position` (number): 1 = checked first. Default last. - example body: {"workspace_id":"uuid","calendar_id":"uuid","name":"Girls 13-14","conditions":[{"kind":"field","key":"player_group","op":"is","values":["Girls 13-14"]}]} - `PATCH /v1/calendar-routes/{route_id}` — Change a calendar routing rule (scope bookings:write) Send any of calendar_id, name, conditions (replaces the list) and is_active. To move a rule use POST /v1/calendar-routes/reorder. Owners and admins only. - path `route_id` (string, required): Rule id. - body `calendar_id` (string): Another calendar of the sub-account. - body `conditions` (array): Replaces the conditions (see create). - body `name` (string): Max 120. - body `is_active` (boolean): false keeps the rule but skips it. - example body: {"is_active":false} - `DELETE /v1/calendar-routes/{route_id}` — Delete a calendar routing rule (scope bookings:write) Owners and admins only. The other rules keep their order. - path `route_id` (string, required): Rule id. - `POST /v1/calendar-routes/reorder` — Set the order rules are checked in (scope bookings:write) The first rule that matches wins, so put narrower rules first. `order` lists every rule id of the sub-account exactly once, first to last. Answers the rules in their new order. Owners and admins only. - body `order` (array, required): Every rule id, first to last. - example body: {"workspace_id":"uuid","order":["uuid-rule-b","uuid-rule-a"]} - `GET /v1/calendar-routes/match` — Which calendar a lead routes to (scope bookings:read) Runs the rules the way the booking paths do (active rules on calendars that are on) against a lead's custom fields and tags, and/or `answers` you pass. status: matched (`calendar` and the `route` that won), pending (no rule matched yet but one still can: `missing_fields` are the answers to ask for before offering times), unmatched (no rule fits: the form's or the AI's own calendar applies), or no_rules. Viewers limited to their own leads only reach those leads. - query `lead_id` (string): The lead to route. Send lead_id, answers or both. - query `answers` (string): JSON object of field key to answer to try, laid over the lead's own, e.g. {"player_group":"Girls 13-14"}. ### Team busy times - `PUT /v1/busy-blocks/{external_id}` — Add or update a team member's busy block (scope bookings:write) For a schedule kept in other software (a field-service app, a dispatch board): the person is treated as booked for that time, so the AI (text, chat and phone), Smart Forms, booking pages and round robin only offer times when they are free. `external_id` is YOUR id for the block (a job or visit id, URL-encoded in the path); sending the same id again replaces the block, so it is safe to resend. A block can make several people busy (a two-tech job). Team members are named by user id or email (GET /v1/members); technicians must be invited as members first. Times need a time zone (Z or an offset). At most 31 days per block. 201 when created, 200 when replaced (changed: false when nothing differed). Owners and admins of the sub-account only. - path `external_id` (string, required): Your own id for the block: 1-200 letters, digits or . _ : ~ @ # | + = - - body `team_member` (string): The busy person: a team member's user id or email. Or team_members for several. - body `team_members` (array): Several busy people (user ids or emails), up to 50. - body `starts_at` (string, required): ISO 8601 with a zone, e.g. 2026-10-14T08:00:00-05:00. - body `ends_at` (string, required): ISO 8601 with a zone; after starts_at. - body `title` (string): Optional note shown to the team in the CRM calendar (never to leads or the AI), max 200. - example body: {"workspace_id":"uuid","team_member":"tech.alex@example.com","starts_at":"2026-10-14T08:00:00-05:00","ends_at":"2026-10-14T11:30:00-05:00","title":"Job #4821 water heater install"} - `DELETE /v1/busy-blocks/{external_id}` — Remove a busy block (scope bookings:write) By your own id; the time opens up again at once. 404 when there is no block with that id. - path `external_id` (string, required): Your id for the block (URL-encoded). - `GET /v1/busy-blocks` — List busy blocks (scope bookings:read) Blocks that overlap the window, earliest first. Default window: from yesterday, 60 days long; at most 366 days. - query `team_member` (string): Only this person's blocks (user id or email). - query `from` (string): ISO start with a zone. - query `to` (string): ISO end with a zone. - query `limit` (number): 1-500, default 100. - query `offset` (number): Skip this many (has_more says whether there are more). - `POST /v1/busy-blocks/sync` — Sync a time window in one call (scope bookings:write) Send your full list of busy blocks for a window: blocks in the list are added or replaced, and blocks you sent earlier that START inside [from, to) but are no longer in the list are removed (cancelled or moved jobs). With team_member, only that person's blocks are replaced and each block defaults to them; a removed block that also names other people keeps them. Up to 500 blocks per call. Good for a nightly or hourly full sync next to the per-block calls. Owners and admins only. - body `from` (string, required): Window start, ISO 8601 with a zone. - body `to` (string, required): Window end; at most 366 days after from. - body `team_member` (string): Sync one person only (user id or email). - body `blocks` (array, required): [{ external_id, team_member | team_members, starts_at, ends_at, title? }]. [] clears the window. - example body: {"workspace_id":"uuid","from":"2026-10-13T00:00:00-05:00","to":"2026-10-20T00:00:00-05:00","team_member":"tech.alex@example.com","blocks":[{"external_id":"job-4821","starts_at":"2026-10-14T08:00:00-05:00","ends_at":"2026-10-14T11:30:00-05:00"},{"external_id":"pto-2210","starts_at":"2026-10-17T00:00:00-05:00","ends_at":"2026-10-18T00:00:00-05:00","title":"Day off"}]} ### Pipeline & fields - `POST /v1/stages` — Add a pipeline stage (scope leads:write) `behavior` is what the stage means for reporting. The key is made from the label and never changes. - body `label` (string, required): Stage name (max 40). - body `behavior` (string): Default contacted. - body `color` (string): Defaults to the first unused colour. - body `manual_only` (boolean): Moving a lead here does not change its status. - example body: {"workspace_id":"uuid","label":"Quote sent","behavior":"contacted"} - `PATCH /v1/stages/{stage_id}` — Rename, recolour or hide a stage (scope leads:write) The five built-in stages (new, contacted, booked, won, lost) can only change label, color and hidden. - path `stage_id` (string, required): Stage id. - `DELETE /v1/stages/{stage_id}` — Delete a custom stage (scope leads:admin) Its leads move to the stage named in move_to. Built-in stages cannot be deleted; hide them instead. - path `stage_id` (string, required): Stage id. - query `move_to` (string, required): Key of the stage that takes over the leads. - `POST /v1/stages/reorder` — Reorder the pipeline (scope leads:write) - body `order` (array, required): Every stage id of the sub-account, first to last. - `GET /v1/pipelines` — List the extra pipelines (scope leads:read) Pipelines next to the main one (GET /v1/stages), each with its stages in order. A stage's kind is open, won or lost; lead_stage_key, when set, is the main stage a deal's lead moves to when the deal lands there. Needs More pipelines on in Settings > Features (PATCH /v1/workspaces/{workspace_id} with enabled_features.pipelines); while it's off this answers 403 feature_off. - `POST /v1/pipelines` — Add a pipeline (scope leads:write) Owners and admins. Without stages it starts with New, In progress, Won and Lost. Up to 20 pipelines, 30 stages each; names are unique per sub-account. Needs More pipelines on in Settings > Features (PATCH /v1/workspaces/{workspace_id} with enabled_features.pipelines); while it's off this answers 403 feature_off. - body `name` (string, required): Its name (max 60). - body `stages` (array): Stages in order: {label, color, kind (open | won | lost), lead_stage_key}. - example body: {"workspace_id":"uuid","name":"Projects","stages":[{"label":"Estimate sent","kind":"open"},{"label":"Done","kind":"won","lead_stage_key":"won"},{"label":"Lost","kind":"lost"}]} - `PATCH /v1/pipelines/{pipeline_id}` — Rename or move a pipeline (scope leads:write) - path `pipeline_id` (string, required): The pipeline. - body `name` (string): New name (max 60). - body `position` (number): Its place among the pipelines (0 first). - example body: {"name":"Jobs"} - `DELETE /v1/pipelines/{pipeline_id}` — Delete a pipeline (scope leads:admin) Its stages and deals are deleted. The leads stay, with their main pipeline stage. - path `pipeline_id` (string, required): The pipeline. - `POST /v1/pipelines/{pipeline_id}/stages` — Add a stage to a pipeline (scope leads:write) - path `pipeline_id` (string, required): The pipeline. - body `label` (string, required): Its name (max 40), unique in the pipeline. - body `color` (string): Default slate. - body `kind` (string): open (still worked, the default), won or lost (closed, in the win rate). - body `lead_stage_key` (string): A main stage key (GET /v1/stages): a deal landing here moves its lead there too, like a click in the app. null = never. - body `position` (number): Its place (0 first); default last. - example body: {"label":"Financing","color":"amber","kind":"open"} - `PATCH /v1/pipeline-stages/{stage_id}` — Change a pipeline stage (scope leads:write) Send only what changes. Turning a stage won or lost closes the deals already in it; back to open reopens them. - path `stage_id` (string, required): The stage (from GET /v1/pipelines). - body `label` (string): New name. - body `color` (string): New colour. - body `kind` (string): open, won or lost. - body `lead_stage_key` (string): A main stage key, or null to stop moving leads. - body `position` (number): Move it (0 first). - example body: {"lead_stage_key":"won"} - `DELETE /v1/pipeline-stages/{stage_id}` — Delete a pipeline stage (scope leads:admin) A stage with deals needs move_to_stage_id (another stage of the same pipeline). A pipeline keeps at least one stage. - path `stage_id` (string, required): The stage. - query `move_to_stage_id` (string): Where its deals go. - `GET /v1/deals` — List deals (scope leads:read) Deals in the extra pipelines, newest first, with their lead and stage. A Technician (or limited Staff) key sees only the deals of their own leads. Needs More pipelines on in Settings > Features (PATCH /v1/workspaces/{workspace_id} with enabled_features.pipelines); while it's off this answers 403 feature_off. - query `pipeline_id` (string): Only this pipeline. - query `stage_id` (string): Only this stage. - query `lead_id` (string): Only this lead's deals. - query `status` (string): open, closed, won or lost. - query `external_id` (string): The deal with this outside id. - query `limit` (number): 1-200, default 50. - query `cursor` (string): next_cursor from the previous page. - `POST /v1/deals` — Put a lead in a pipeline (scope leads:write) Owners and admins. Send stage_id, or pipeline_id to start in its first open stage. One lead can have several deals, even in the same pipeline. A stage with lead_stage_key moves the lead in the main pipeline too. - body `lead_id` (string, required): The lead. - body `stage_id` (string): Its stage. - body `pipeline_id` (string): Instead of stage_id: start in this pipeline's first open stage. - body `name` (string): What it is (max 120). Empty: the lead's name is shown. - body `value_cents` (number): Its value in cents. - body `assigned_to` (string): A team member's user id (GET /v1/members). - body `external_id` (string): Another system's id, unique per sub-account (409 when taken). - example body: {"workspace_id":"uuid","lead_id":"uuid","pipeline_id":"uuid","name":"Roof replacement","value_cents":980000} - `GET /v1/deals/{deal_id}` — Get a deal (scope leads:read) - path `deal_id` (string, required): The deal. - `PATCH /v1/deals/{deal_id}` — Move or change a deal (scope leads:write) stage_id moves it (any stage of the sub-account, so it can change pipeline). Moving into a won or lost stage closes it; a stage with lead_stage_key moves the lead too. - path `deal_id` (string, required): The deal. - body `stage_id` (string): Move it here. - body `name` (string): What it is, or null. - body `value_cents` (number): Its value in cents, or null. - body `assigned_to` (string): A team member's user id, or null. - body `external_id` (string): Another system's id, or null. - example body: {"stage_id":"uuid","value_cents":1050000} - `DELETE /v1/deals/{deal_id}` — Take a deal out of its pipeline (scope leads:write) The lead stays, with its main pipeline stage. - path `deal_id` (string, required): The deal. - `GET /v1/custom-fields` — List custom lead fields (scope leads:read) - query `include_archived` (boolean): Include archived fields. - `POST /v1/custom-fields` — Add a custom lead field (scope leads:write) field_key and field_type cannot change later, because stored lead values depend on them. - body `label` (string, required): Field label (max 80). - body `field_type` (string): Default text. - body `field_key` (string): Defaults to a key made from the label. - body `options` (array): Choices for select / multiselect. - body `required` (boolean): Default false. - body `show_in_list` (boolean): Show as a column in the leads list. - example body: {"workspace_id":"uuid","label":"Roof type","field_type":"select","options":["Shingle","Metal","Tile"]} - `PATCH /v1/custom-fields/{field_id}` — Update a custom field (scope leads:write) Send `archived: false` to restore an archived field. - path `field_id` (string, required): Field id. - `DELETE /v1/custom-fields/{field_id}` — Archive a custom field (scope leads:write) Hides the field. Values already stored on leads are kept. - path `field_id` (string, required): Field id. ### Routing & alerts - `GET /v1/lead-routing` — Get lead routing (round robin, Grab it) (scope workspaces:read) - `PUT /v1/lead-routing` — Set lead routing (round robin, Grab it) (scope workspaces:write) How NEW LEADS are handed to team members. Round robin assigns them in turn (a round-robin calendar is separate: it rotates appointment hosts): an empty eligible_member_ids list means everyone takes turns, and member_weights splits leads by percentage (80/20 gives one person 8 of every 10 leads, spread out); {} goes back to even turns. Grab it (grab_enabled) puts a Grab it link in every new-lead alert, and the first person to tap it gets the lead. Only one of the two is on at a time: turning one on turns the other off. - body `round_robin_enabled` (boolean): Turn the rotation on or off. - body `eligible_member_ids` (array): User ids from GET /v1/members. Empty = everyone. - body `member_weights` (object): Percentage split by user id (GET /v1/members): {"": 80, "": 20}. Whole percents 0-100; the shares above 0 must add up to exactly 100. Sets eligible_member_ids to the people with a share and restarts the rotation. {} = even turns (keeps who is in the rotation). - body `notify_assignee_only` (boolean): Alert only the person the lead went to. - body `skip_imported_leads` (boolean): Leave imported leads unassigned. - body `notify_on_reply` (boolean): Alert the assignee when the lead replies. - body `grab_enabled` (boolean): Grab it: a Grab it link in every new-lead alert; the first person to tap it gets the lead. Turns round robin off. - body `grab_member_ids` (array): Who can grab leads: user ids from GET /v1/members. Empty = everyone who works in the sub-account. - example body: {"workspace_id":"uuid","round_robin_enabled":true,"member_weights":{"user-uuid-a":80,"user-uuid-b":20}} - `GET /v1/alert-recipients` — List who is alerted about new leads and AI receptionist calls (scope workspaces:read) - `POST /v1/alert-recipients` — Add a lead alert recipient (scope workspaces:admin) Lead details are sent to this phone or inbox, so this needs an admin-scoped key. - body `channel` (string, required): sms or email. - body `destination` (string, required): Phone (US 10-digit or +country code; stored as E.164) or email address. - body `label` (string): e.g. Owner's cell. - body `notify_leads` (boolean): Gets new-lead, appointment and reply alerts. Default true. - body `notify_calls` (boolean): Gets a summary after every AI receptionist call (who called, the outcome, any message or booking, the transcript). Default false. - body `lead_sources` (array): Lead alerts only about leads from these sources, e.g. ["site_widget"] for Website chat leads: meta_lead_ad, smart_form (started forms too), website_form, site_widget, webhook, api, instagram, messenger, sms_inbound, email_inbound, calendly, acuity, review_funnel, manual, import, other. [] = every lead (default). Call summaries are never filtered. - example body: {"workspace_id":"uuid","channel":"sms","destination":"+14155550123","label":"Owner"} - `PATCH /v1/alert-recipients/{recipient_id}` — Update a lead alert recipient (scope workspaces:admin) Send any of label, destination, active, notify_leads, notify_calls, lead_sources ([] = every lead). A recipient keeps at least one of notify_leads or notify_calls. - path `recipient_id` (string, required): Recipient id. - `DELETE /v1/alert-recipients/{recipient_id}` — Remove a lead alert recipient (scope workspaces:admin) - path `recipient_id` (string, required): Recipient id. ### Lead sources & webhooks - `GET /v1/lead-sources` — List lead source links (scope workspaces:write) Each link is a private URL that accepts leads, so reading them takes write scope. Treat the URL as a secret. - `POST /v1/lead-sources` — Create a lead source link (scope workspaces:write) Returns a URL any website form, landing page tool or CRM can POST leads (or appointments) to. - body `name` (string, required): e.g. Website contact form. - body `field_mapping` (object): Their field name to ours: {"Full Name":"full_name","Roof size":"custom:roof_size"}. Targets: full_name, or first_name and last_name (saved together as the lead's name), email, phone, address, city, state, zip, inquiry, notes, appointment_*, utm_source, utm_medium, utm_campaign, utm_term (ad set), utm_content (ad) or custom:. A state is saved as its code ("Texas" becomes TX); utm_source sets the Leads page Source filter ("meta_ads" or "facebook" is Facebook). - body `default_source` (string): Source label stamped on these leads. - body `default_status` (string): Default new. - body `payload_kind` (string): Default auto. update = a form your own team fills in (e.g. during a call): its answers go onto the matching contact (lead_id, phone, then email; added quietly when nobody matches) and nothing is sent: no first text, team alert, Instant Lead Connect call or new-lead automation. - example body: {"workspace_id":"uuid","name":"Website contact form","default_source":"Website","field_mapping":{"Your name":"full_name","Phone number":"phone"}} - `PATCH /v1/lead-sources/{lead_source_id}` — Update a lead source link (scope workspaces:write) Links created by an integration (for example Typeform) are managed there and answer 409. - path `lead_source_id` (string, required): Lead source id. - `DELETE /v1/lead-sources/{lead_source_id}` — Delete a lead source link (scope workspaces:admin) - path `lead_source_id` (string, required): Lead source id. - `GET /v1/outbound-webhooks` — List outbound webhooks (scope workspaces:read) Never returns signing secrets or auth tokens. - `POST /v1/outbound-webhooks` — Create an outbound webhook (scope workspaces:admin) Pushes lead and appointment events to another system (Zapier, Make, a CRM). Lead data leaves the account, so every write needs an admin-scoped key and target_url must be https on a public host. The signing secret is returned once. - body `name` (string, required): e.g. Zapier: new leads. - body `target_url` (string, required): https:// URL that receives the POST. - body `events` (array): Default lead.created and appointment.booked. See the sub-account webhook events list. - body `enabled` (boolean): Default true. - body `preset` (string): Payload flavour. - body `auth_type` (string): Default none. Send auth_token (and auth_header_name or auth_username) with it. Write-only. - example body: {"workspace_id":"uuid","name":"Zapier: new leads","target_url":"https://hooks.zapier.com/hooks/catch/123/abc/","events":["lead.created"],"preset":"zapier"} - `PATCH /v1/outbound-webhooks/{webhook_id}` — Update an outbound webhook (scope workspaces:admin) - path `webhook_id` (string, required): Webhook id. - `DELETE /v1/outbound-webhooks/{webhook_id}` — Delete an outbound webhook (scope workspaces:admin) - path `webhook_id` (string, required): Webhook id. ### AI agent - `GET /v1/knowledge-base` — Read the AI's FAQ (scope workspaces:read) - `PUT /v1/knowledge-base` — Replace the AI's FAQ (scope workspaces:write) The FAQ is what the AI texting agent and AI receptionist answer from. Max 200 entries (question 300 characters, answer 2000). - body `entries` (array, required): [{ question, answer }]. Replaces the whole list. - `POST /v1/knowledge-base` — Add FAQ entries (scope workspaces:write) Merges into the existing list. The same question again replaces its answer. - body `entries` (array, required): [{ question, answer }]. - example body: {"workspace_id":"uuid","entries":[{"question":"Do you offer financing?","answer":"Yes, 0% for 12 months on approved credit."}]} - `GET /v1/ai-brain/photos` — AI Brain photos (scope workspaces:read) Photos of the business's work the AI may text a customer who asks to see some (up to 100): link, caption, the service it shows, on / off, how often it was sent. Owners and admins. - query `active` (boolean): Only on (true) or off (false). - `POST /v1/ai-brain/photos` — Add an AI Brain photo (scope workspaces:write) From a public link to a JPEG, PNG or WebP (10 MB at most), stored like an upload on the page. The AI writes the caption and service you leave out, which is how it picks the right photo. 409 at 100 photos. - body `image_url` (string, required): Public link to the image. - body `caption` (string): What it shows (max 300). - body `service` (string): The service (max 80), e.g. Roof repair. - body `active` (boolean): Default true. - example body: {"workspace_id":"uuid","image_url":"https://example.com/jobs/roof-after.jpg","service":"Roof repair"} - `PATCH /v1/ai-brain/photos/{photo_id}` — Change an AI Brain photo (scope workspaces:write) - path `photo_id` (string, required): Photo id. - body `caption` (string): What it shows (max 300). - body `service` (string): The service it shows (max 80). - body `active` (boolean): Off: the AI stops sending it. - `DELETE /v1/ai-brain/photos/{photo_id}` — Remove an AI Brain photo (scope workspaces:write) - path `photo_id` (string, required): Photo id. - `GET /v1/ai-brain/prices` — AI Brain prices (scope workspaces:read) The services and products the AI may quote in texts, emails, chat and on calls (up to 300), each with `price_text` as the AI says it, plus `note` (what it says with prices) and `currency`. Owners and admins. - query `include_price_book` (boolean): Also the invoice Price book items the AI isn't using (ai_enabled false). - `POST /v1/ai-brain/prices` — Add AI Brain prices (scope workspaces:write) One item, or `items` with up to 100. A name already in the Price book changes that item instead of adding a twin, and puts it on the AI's list. Prices are in cents. 409 past 300 items. - body `items` (array): Several at once: each takes the fields below. - body `name` (string): What it is (max 120). - body `kind` (string): service (default) or product. - body `category` (string): A group for it (max 60). - body `description` (string): What's included, sizes, conditions (max 500). - body `price_type` (string): fixed (default), from, range or quote (no set price). - body `unit_price_cents` (number): The price, or the bottom of a range, in cents. Required unless quote. - body `price_max_cents` (number): The top of a range, in cents. - body `price_unit` (string): e.g. per hour, each (max 30). - example body: {"workspace_id":"uuid","items":[{"name":"Spring replacement","category":"Repairs","price_type":"from","unit_price_cents":25000},{"name":"Custom door","price_type":"quote"}]} - `PATCH /v1/ai-brain/prices/{item_id}` — Change an AI Brain price (scope workspaces:write) Any field. `ai_enabled: true` puts an invoice Price book item on the AI's list. - path `item_id` (string, required): Item id. - body `name` (string): What it is (max 120). - body `kind` (string): service or product. - body `category` (string): A group for it (max 60). - body `description` (string): What's included (max 500). - body `price_type` (string): fixed, from, range or quote. - body `unit_price_cents` (number): The price, or the bottom of a range, in cents. - body `price_max_cents` (number): The top of a range, in cents. - body `price_unit` (string): e.g. per hour (max 30). - body `ai_enabled` (boolean): On the AI's list or not. - `DELETE /v1/ai-brain/prices/{item_id}` — Stop the AI quoting a price (scope workspaces:write) Takes it off the AI's list. It stays in the Price book for invoices and estimates. - path `item_id` (string, required): Item id. - `PUT /v1/ai-brain/prices/note` — What the AI says with prices (scope workspaces:write) For example, that prices don't include tax. Empty clears it. - body `note` (string, required): Max 1000 characters. - example body: {"workspace_id":"uuid","note":"Prices don't include tax."} - `GET /v1/ai-brain/waiting` — Questions waiting on you (scope workspaces:read) AI Brain > Waiting on you: questions customers asked (texts, chat, DMs, calls) that the AI couldn't answer and handed to the team, newest first, one row per question (times = how many customers asked, variants = how they wrote it). Answered and dismissed ones are left out. Owners and admins. - `POST /v1/ai-brain/waiting/answer` — Answer a waiting question (scope workspaces:write) As Answer it on the page: the answer becomes a saved answer (replacing one to the same question) that the AI texter and receptionist use from now on, the question leaves the list, and the AI turns back on for the leads it was paused on for that question. Nothing is sent to the customer. - body `question` (string, required): The question as listed. - body `answer` (string, required): What the AI should say (max 2000). - body `event_id` (string): The row's event_id. - example body: {"workspace_id":"uuid","event_id":"uuid","question":"Do you work on Sundays?","answer":"No, we're open Monday to Saturday, 8 to 6."} - `POST /v1/ai-brain/waiting/dismiss` — Dismiss waiting questions (scope workspaces:write) Takes questions off the list without teaching the AI (it still treats them as open); undo: true puts them back. - body `event_ids` (array): The rows' event_ids. - body `questions` (array): Or the questions themselves. - body `undo` (boolean): Put them back. - `GET /v1/ai-receptionist` — Read the AI receptionist settings (scope workspaces:read) Also returns the list of voices, and collect_fields as a list of keys. - `PUT /v1/ai-receptionist` — Configure the AI receptionist (scope workspaces:write) The AI that answers the sub-account's phone. Answered calls bill 1.5 credits per minute of AI conversation (15-second steps; time after a transfer to a person bills as phone minutes), and it needs a phone number on the sub-account to do anything (the response carries a warning when there is none). - body `enabled` (boolean): Turn it on or off. - body `mode` (string): Every call, or only outside business hours. - body `goal` (string): What it tries to do. - body `agent_name` (string): Max 40. - body `voice` (string): One of the voices returned by GET. - body `greeting` (string): Max 400. - body `after_hours_greeting` (string): Max 400. - body `extra_instructions` (string): Max 1200. - body `transfer_enabled` (boolean): Allow transfers to a person. - body `transfer_numbers` (array): Up to 8 phone numbers. - body `take_messages` (boolean): Take a message when nobody is available. - body `max_call_seconds` (number): 60-1800. - body `record_calls` (boolean): Record answered calls (billed per recorded minute). - body `update_contact_details` (boolean): Let it save the caller's name, email and address to the lead. - body `collect_fields` (array): Details it asks for before booking: "full_name", "phone", "email", "address" or custom field keys (GET /v1/custom-fields). Max 12. - example body: {"workspace_id":"uuid","enabled":true,"mode":"after_hours","goal":"book_and_support","agent_name":"Ava","collect_fields":["address","roof_type"]} ### Smart forms - `POST /v1/smart-forms` — Create a smart form (scope smart_forms:write) Starts unpublished with the same defaults as a form created in the app. The response includes its public path (/f/), qualifier_questions, custom_fields, qualification, calendar_routing, service_area and estimate. Questions can ask for photos (field_type file) and put a price on answers (option_prices) for the instant estimate: switched on with estimate, the answers' prices add up to a live total in the form's footer, saved on the lead with its total as the deal value. Qualification routes each lead to Qualified, Nurture or Not eligible: yes/no qualifier_questions (asked first when qualifier_enabled is on) and choice questions with disqualify_options or nurture_options. A service area (fields.address.service_area) only accepts addresses in chosen US states or within a radius: address suggestions stay inside it and an out-of-area visitor sees your message and cannot send the form; switching it on shows and requires the address, like the builder. Design and tracking pixels are edited in the app. - body `name` (string, required): Form name (max 80). - body `headline` (string): Max 160. - body `subheadline` (string): Max 300. - body `primary_color` (string): #rrggbb. - body `bullet_points` (array): Up to 8 short lines. - body `layout_mode` (string): The builder's Layout: single_step (one page, the default), multi_step (a step-by-step wizard), conversational (one question at a time, like a chat) or funnel (one big question per screen). - body `calendar_id` (string): Calendar used by the booking step. - body `calendar_routing` (boolean): Pick the calendar from the answers: the sub-account's calendar routing rules (/v1/calendar-routes) choose which calendar's times the form shows once the deciding question is answered; calendar_id is used when no rule fits. - body `booking_enabled` (boolean): Show the booking step. - body `fields` (object): Contact fields: {"email":{"required":false},"address":{"enabled":false}}. Keys: first_name, last_name, phone, email, address, state (a State / Province pick list), notes. Phone or email must stay on. address also takes service_area (merged): {"enabled":true,"mode":"states","states":["TX","OK"],"message":"Sorry, we only serve Texas and Oklahoma."}, or mode "radius" with "center":{"lat":32.7767,"lng":-96.797,"label":"Dallas, TX"} and "radius_miles" (1-500, default 25). A blank message shows "Sorry, we don't service this area yet."; null or enabled:false switches it off. - body `is_published` (boolean): Default false. - body `show_logo` (boolean): Off hides the logo above the headline and in the flow's header. - body `headline_size` (string): The headline's own size; auto is what the layout picks. - body `submit_note` (string): Small print right above the submit button (consent, a disclaimer), up to 400 characters; null removes it. - body `steps_hint` (boolean): Booking forms: "Complete the steps above to book." under the button. Off hides it. - body `details_heading_on` (boolean): Single page and step by step: the heading above the contact details ("1. Your information"). Off hides it; on by default. - body `details_heading` (string): That heading's words, up to 80 characters; null = "Your information" in the visitor's language. - body `section_numbers` (boolean): Single page: "1." "2." in front of each section's heading. Off drops them; on by default. - body `video` (object): A video sales letter at the top (Builder > Content > Video at the top): { url: a YouTube (watch, youtu.be, Shorts), Vimeo, Loom or Wistia link, or an https link to a video file; position: below (default) or above the headline; autoplay (muted, with a Tap for sound button); poster (a cover picture for a file); ratio (width / height, default the video's own); enabled }. A new url turns it on; fields left out keep what the form has; null turns it off and keeps the link. The response carries video. - body `qualifier_enabled` (boolean): Ask the qualifier_questions first. - body `qualifier_questions` (array): Up to 10, replaces the list: [{ text (max 200), disqualify_on: "yes" | "no" (default "no"), outcome: "not_eligible" | "nurture" (default "not_eligible") }]. - body `questions` (array): Custom questions, up to 30, replaces the list: [{ key?, label (max 160), field_type: text | textarea | number | money | phone | email | url | select | multiselect | boolean | date | datetime | rating | file (photos or PDFs, up to 6, shown on the lead), options (select / multiselect: 2-40), option_prices? (select / multiselect: cents per answer for the instant estimate, e.g. {"SUV": 8000}; left out keeps the saved prices, null removes them), disqualify_options? or nurture_options? (choice types; boolean answers "yes" / "no"; never both), placement?: "qualify" | "details" (qualify = choice types only), option_style?: dropdown | buttons | cards | auto, no_first? (boolean: show No before Yes), after_contact? (details questions: asked after name, phone and email, e.g. a Comments box at the bottom; left out keeps the saved spot), allow_other? (select / multiselect: an Other answer with a box for their own words; left out keeps the saved choice), required?, enabled?, save_to_crm? (never for file), placeholder?, helper_text? }]. - body `qualification` (object): Merged: { save_not_eligible: boolean, nurture_page: { headline, subheadline, cta_label, cta_url, redirect_url } }. - body `estimate` (object): The instant price estimate, merged: { enabled, label (default "Your estimate"), base_cents (added before any answer), note (e.g. "Final price after we see the job"), range_percent (0-50: shown as a range that far either side) }. null switches it off. - body `hidden_fields` (array): Values the visitor never sees, sent with each lead (the 20 at most; {key} and {cf_key} work in messages). Each { key, label, source, param, page, value }: source param reads ?= (default the key) on the form link or the page it is embedded on (or the embed code's data-field-); page reads the embedding page: page = year, make, model, price, vin, sku, condition, item, title, heading or url (the listing's schema.org data, the title, the main heading...), css: or meta:; fixed is always value (value is also the fallback when a param or page finds nothing). - example body: {"workspace_id":"uuid","name":"Roof quote","qualifier_enabled":true,"qualifier_questions":[{"text":"Do you own the home?","disqualify_on":"no","outcome":"not_eligible"}],"questions":[{"label":"When do you want to start?","field_type":"select","options":["This month","In 1-3 months","Just researching"],"nurture_options":["Just researching"],"placement":"qualify"},{"label":"Vehicle size","field_type":"select","options":["Car","SUV","Truck"],"option_prices":{"Car":31500,"SUV":38500,"Truck":45000}},{"label":"Photos of the damage","field_type":"file"}],"qualification":{"save_not_eligible":true},"estimate":{"enabled":true,"note":"Final price after we see the job","range_percent":10}} - `GET /v1/smart-forms/{form_id}` — Get one smart form, whole (scope smart_forms:read) Everything about one form, to read before changing it: the basics, questions, qualifier questions, fields, qualification, estimate and hidden fields (as POST /v1/smart-forms takes them), design (every Design tab setting with its current value), screens (flow, thank_you, disqualified_page), logo_url, favicon_url, offer_ids, views, submissions, public_url, and embed: snippet (a container plus the loader script, the recommended way to put it on a website), iframe (for site builders that strip scripts) and script_url. Any member of the sub-account. - path `form_id` (string, required): Form id. - `PATCH /v1/smart-forms/{form_id}/design` — Change a smart form's design (scope smart_forms:write) The builder's Design tab. Send only what changes; null puts a setting back to its default; a value that isn't allowed is refused with the allowed ones. Pick-one settings: font and heading_font (system, inter, poppins, manrope, outfit, figtree, rubik, montserrat, raleway, urbanist, sora, lexend, archivo, barlow, karla, bricolage, bebas, anton, syne, clash, oswald, playfair, lora, cormorant, fraunces, merriweather; heading_font also takes match), background (plain, soft, gradient, dark, spotlight), radius (sharp, soft, rounded, pill), hero (centered, left, compact), card (flat, bordered, elevated), scale (compact, normal, large, xl), heading_weight (normal, semibold, bold, black), heading_tracking (tight, normal, wide), button_style (solid, gradient, outline, soft), button_size (sm, md, lg), field_style (outline, filled, underline), density (compact, comfortable, spacious), width (narrow, normal, wide), hero_overlay (none, light, dark, heavy, gradient), hero_text (auto, light, dark), headline_size (auto, small, medium, large). Colors: primary_color, accent, hero_overlay_color (#rrggbb). Pictures (https links): logo_url, favicon_url, hero_image; logo_size 32-160; hero_blur 0-2. Words: hero_eyebrow, hero_badge, hero_note, submit_note, details_heading, footer_note. Switches: show_logo, steps_hint, details_heading_on, section_numbers. Page sections under the form: features { enabled, title, items: [{ icon, title, body, image_url }] } (up to 6; icons: check, dollar, bolt, home, shield, clock, star, phone, calendar, wrench, sun, leaf, heart, truck, award, users), reviews { enabled, title, subtitle, items: [{ quote, name, rating, image_url }] } (up to 6: real customers' own words only) and cta { enabled, headline, subheadline, button_label }; each merges, and its items replace the list. The video at the top is PATCH /v1/smart-forms/{form_id} (video). Answers the whole form. Owners and admins. - path `form_id` (string, required): Form id. - body `font` (string): Body font. - body `background` (string): plain, soft, gradient, dark or spotlight. - body `primary_color` (string): Brand color, #rrggbb. - body `hero_image` (string): https link to the hero photo; null removes it. - body `features` (object): The features section (merged). - body `reviews` (object): The reviews section (merged). - body `cta` (object): The closing call to action (merged). - example body: {"font":"poppins","background":"dark","radius":"pill","button_style":"gradient","primary_color":"#16a34a","hero_badge":"Rated 4.9 by 300+ homeowners","features":{"enabled":true,"title":"Why homeowners pick us","items":[{"icon":"shield","title":"Licensed and insured","body":"Every crew, every job."}]}} - `PATCH /v1/smart-forms/{form_id}/screens` — Change a smart form's screens (scope smart_forms:write) The words and behaviour of the screens around the questions (the builder's Screens tab). Send only what changes; null puts a setting back to its default. flow: welcome { enabled, cta_label, note }, contact { eyebrow, headline, subheadline, consent_label, consent_required }, booking { eyebrow, headline }, name { first (ask for their name on its own screen first), headline, subheadline }, progress (both, bar, counter, none), transition (slide, fade, none), question_numbers, keyboard_hints, recall_name, auto_advance, media { url, position: left | right } (the picture or video beside a conversational form), question_images { : https link } (replaces the map), footer_links [{ label, url }] (up to 4, replaces the list). thank_you: headline, subheadline, cta_label, cta_url, show_calendar_links, calendar_description. disqualified_page (who the form screens out lands here): headline, subheadline, cta_label, cta_url. The questions themselves are PATCH /v1/smart-forms/{form_id} (questions, qualifier_questions). Answers the whole form. Owners and admins. - path `form_id` (string, required): Form id. - body `flow` (object): Welcome, contact, booking and name screens, progress, pictures, footer links (merged). - body `thank_you` (object): The thank-you page (merged). - body `disqualified_page` (object): The page for people the form screens out (merged). - example body: {"flow":{"welcome":{"enabled":true,"cta_label":"Get my quote"},"name":{"first":true}},"thank_you":{"headline":"You're booked in","subheadline":"We'll text you a confirmation in a minute.","show_calendar_links":true}} - `POST /v1/smart-forms/{form_id}/duplicate` — Duplicate a smart form (scope smart_forms:write) A copy in the same sub-account with every setting, question, design, screen and offer of the original, a new link, unpublished, with no views or submissions. name is optional (default " (copy)"). Copying into another sub-account stays in the app. Owners and admins. - path `form_id` (string, required): Form id. - body `name` (string): The copy's name. - example body: {"name":"Free roof inspection (storm season)"} - `DELETE /v1/smart-forms/{form_id}` — Delete a smart form (scope smart_forms:write) Deletes the form; its link and embeds stop working. A form with submissions answers 409 (details.code needs_confirm) until confirm=true is sent: the submission records are deleted with it, the leads they made stay. Cannot be undone. Owners and admins. - path `form_id` (string, required): Form id. - query `confirm` (boolean): true to delete a form that has submissions. ### Invoices & reviews - `POST /v1/invoices` — Create an invoice (draft) (scope billing:write) A draft invoice, numbered like the app's: for a lead (lead_id fills in the customer and is needed to send it) or a customer_name, with its lines. Tax, due date, terms, notes and card payments default to the sub-account's invoice settings; a tax_rate sent is one plain tax in place of them, or send taxes for named ones (GST + QST), each on its own line with the registration number from the settings. Totals are worked out as the editor does: each line rounded, discount_cents off the subtotal (never more than it) and spread over the taxable lines, each tax rounded on its own. deposit_percent or deposit_cents makes it a deposit invoice: it lists the whole job and total_cents is the deposit asked for now. Owners and admins of the sub-account. Card payment pages are set up in the app. - body `lead_id` (string): Who it is for (fills in the customer; needed to send it). Or customer_name. - body `items` (array, required): The lines, 1-100: [{ description (the line's name, max 300), quantity? (above 0, default 1), unit_price_cents (whole cents; below zero for a credit line), taxable? (default true) }]. - body `tax_rate` (number): One tax, percent 0-30. Default: the sub-account's taxes. - body `taxes` (array): Instead of tax_rate, up to 4 named taxes: [{ name, rate }], e.g. GST 5 + QST 9.975. - body `discount_cents` (number): Off the subtotal, whole cents. Default 0. - body `deposit_percent` (number): Ask for this percent of the job now (above 0, up to 100). Or deposit_cents. - body `deposit_cents` (number): Ask for this amount now, whole cents. - body `due_date` (string): YYYY-MM-DD, or null for no due date. Default: the sub-account's due days from today. - body `due_days` (number): Instead of due_date: due this many days from today (0-365). - body `issue_date` (string): YYYY-MM-DD, default today. - body `notes` (string): A note to the customer (max 4000). Default: the sub-account's. - body `terms` (string): Max 4000. Default: the sub-account's. - body `currency` (string): 3 letters. Default: the sub-account's. - body `collect_payment` (boolean): Whether the customer may pay by card once a payment page is set up in the app. Default: the sub-account's. - body `customer_name` (string): Without a lead, or to change what the lead fills in. - body `customer_email` (string): Customer email. - body `customer_phone` (string): Customer phone. - body `customer_address` (string): Customer address. - example body: {"workspace_id":"uuid","lead_id":"uuid","items":[{"description":"Garage door opener","unit_price_cents":49900},{"description":"Labor","quantity":2,"unit_price_cents":7500,"taxable":false}],"discount_cents":1000,"due_days":7} - `PATCH /v1/invoices/{invoice_id}` — Change an invoice (scope billing:write) Send only what changes. items replace every line, as the editor saves; new lines, taxes, a discount or a deposit work the totals out again (a percent deposit follows the new total, an amount stays). lead_id: null unlinks it; a new lead fills in the customer unless you send the details. deposit_percent: null takes a deposit away. An invoice that has been paid (in full or in part) answers 409: make a new one. One that already has a hosted card payment page for its amount answers 409 on anything that changes the amount: change it in the app, which makes the page again. A balance invoice (billed after a deposit) keeps its currency and can't ask for another deposit. Owners and admins. - path `invoice_id` (string, required): Invoice id. - body `lead_id` (string): Who it is for, or null. - body `items` (array): Replaces every line: [{ description, quantity?, unit_price_cents, taxable? }]. - body `tax_rate` (number): One tax, percent 0-30, in place of the invoice's taxes. - body `taxes` (array): Named taxes in place of the invoice's: [{ name, rate }]. - body `discount_cents` (number): Off the subtotal, whole cents. - body `deposit_percent` (number): Ask for this percent now, or null for no deposit. - body `deposit_cents` (number): Ask for this amount now. - body `due_date` (string): YYYY-MM-DD, or null. Or due_days. - body `due_days` (number): Due this many days from today (0-365). - body `issue_date` (string): YYYY-MM-DD. - body `notes` (string): A note to the customer, or null. - body `terms` (string): Terms, or null. - body `currency` (string): 3 letters. - body `collect_payment` (boolean): Whether the customer may pay by card. - body `customer_name` (string): Customer name. - body `customer_email` (string): Customer email. - body `customer_phone` (string): Customer phone. - body `customer_address` (string): Customer address. - example body: {"items":[{"description":"Garage door opener","unit_price_cents":49900},{"description":"Trip fee","unit_price_cents":7500}],"discount_cents":0} - `DELETE /v1/invoices/{invoice_id}` — Delete an invoice (scope billing:write) The Invoices list's Delete: the invoice goes with its lines and history, and its customer link stops working. An invoice that has been paid (in full or in part) is a record and answers 409. Owners and admins. - path `invoice_id` (string, required): Invoice id. - `POST /v1/invoices/{invoice_id}/send` — Send an invoice to the lead (scope billing:write) Like the editor's Send: a text and/or an email to the invoice's lead with the link to view it (on the sub-account's own domain when it has one), in the editor's own words unless you send message (it must include {link}). When the app already set up card payment for this invoice, the pay link rides along. Sent as the key's person, with the usual opt-out, credit and limit checks; each is billed like any text or email. A draft becomes sent; sending a sent one again is a re-send. sent lists each channel and why one didn't go. Needs a lead (PATCH lead_id) and at least one line; a paid invoice answers 409. The email carries the link, not a PDF attachment (the app's Send attaches one). Owners and admins. - path `invoice_id` (string, required): Invoice id. - body `channel` (string): Default both (whichever the lead has). - body `message` (string): Your own wording, with {link} (max 1500). - body `subject` (string): The email's subject. - example body: {"channel":"sms"} - `POST /v1/invoices/{invoice_id}/mark-paid` — Mark an invoice paid (scope billing:write) The Invoices list's Mark as paid, for money taken outside the app (cash, a check, a transfer): the invoice becomes paid in full, now (on a deposit invoice, the deposit). Whatever follows a paid invoice in the app follows this too. Already paid answers 409. No body. Owners and admins. - path `invoice_id` (string, required): Invoice id. ### Pipeline & fields - `GET /v1/custom-values` — List custom values (scope workspaces:read) Settings > Custom values: the business's own words used across every text, email and automation (a webinar date, a booking link, a promo code). Each has a key, and token is what to paste into a message: {{custom_values.}}. Change a value and every message that names it says the new thing on its next send. Different from custom fields, which hold one answer per lead. Any member. - `POST /v1/custom-values` — Add a custom value (scope workspaces:write) The key comes from the name ("Webinar date" becomes webinar_date; a taken one gets _2, _3 ...) unless you send key, which must be free (409 otherwise). A sub-account keeps up to 500. People who manage the sub-account. - body `name` (string, required): What the team calls it, up to 120 characters. - body `value` (string): What messages say, up to 5,000 characters. Kept exactly as sent. - body `folder` (string): A folder to keep it in, up to 60 characters. - body `key` (string): The key in {{custom_values.}}: lowercase letters, numbers and underscores, up to 64. Left out, it comes from the name. - example body: {"workspace_id":"uuid","name":"Webinar date","value":"June 3 at 6 PM","folder":"Events"} - `PATCH /v1/custom-values/{value_id}` — Change a custom value (scope workspaces:write) Send what changes. Messages that name it say the new value on their next send. A saved key never changes, because messages already name it. People who manage the sub-account. - path `value_id` (string, required): The custom value (GET /v1/custom-values). - body `name` (string): Up to 120 characters. - body `value` (string): Up to 5,000 characters. - body `folder` (string): Up to 60 characters; null takes it out of its folder. - example body: {"value":"June 10 at 6 PM"} - `DELETE /v1/custom-values/{value_id}` — Delete a custom value (scope workspaces:write) Messages that use its token leave that spot empty from then on. People who manage the sub-account. - path `value_id` (string, required): The custom value. ### CRM leads - `POST /v1/tags` — Make a tag (scope leads:write) A tag on its own, before any lead carries it. Names match in any case: a name that already exists answers that tag with created false (200) and changes nothing, so the call is safe to repeat. Up to 60 characters, no commas. Any member, as when tagging a lead in the app. - body `name` (string, required): The tag's name. - body `color` (string): Default slate. - example body: {"workspace_id":"uuid","name":"Hot lead","color":"rose"} ### Invoices & reviews - `POST /v1/review-funnels` — Add a review page (scope workspaces:write) A blank page with the usual words, or a copy of another page of the same sub-account (copy_of: its look, threshold and settings come along). The new page has its own link and stays off until someone turns it on in the app. name, copy and helper follow the rules of PATCH /v1/review-funnels/{funnel_id}: words offering something for a review or asking for a particular rating are refused. The sub-account's first page becomes its default. Owners and admins, with the Google tools add-on. - body `copy_of` (string): A review page of this sub-account to copy. - body `name` (string): For the team, up to 60 characters. Default "New review page", or " copy". - body `copy` (object): Any of headline (140), message (300), low_title (100), low_message (300), low_button (40), low_thanks (300), high_title (100), high_message (300), high_button (40). - body `helper` (object): Any of enabled, question (120), chips (up to 8, 32 characters each), keywords (up to 6, 60 characters each), details, ask_photo. - example body: {"workspace_id":"uuid","copy_of":"uuid","name":"Roofing jobs"} - `DELETE /v1/review-funnels/{funnel_id}` — Delete a review page (scope workspaces:write) Links already sent for the page open the default page from then on, and its results stay in GET /v1/review-requests. Deleting the default page makes the oldest page left the default (default_funnel_id; null when none is left). Owners and admins, with the Google tools add-on. - path `funnel_id` (string, required): Review page id (GET /v1/review-funnels). ### Website widget - `POST /v1/website-widgets` — Add a website widget (scope workspaces:write) An AI chat assistant (mode assistant, with a goal) or a booking widget that opens a Smart Form (mode booking, which needs smart_form_id). It starts as a new one does in the app: named "Website chat" or "Book online", the goal's quick replies, a chat bubble on the right with a teaser line, turned on. Any field of PATCH /v1/website-widgets/{widget_id} can be sent too. The answer carries install.snippet, the line to paste on the site; the widget's key is made for you. Owners and admins. - body `name` (string): For the team, up to 120 characters. - body `mode` (string): Default assistant. - body `goal` (string): What the assistant works toward. Default book_appointment. - body `smart_form_id` (string): The form a booking widget opens (GET /v1/smart-forms). - body `calendar_id` (string): The calendar it books into; left out is the default one. - body `greeting` (string): The first message, up to 500 characters. - body `quick_replies` (array): Up to 4 one-tap starters, up to 80 characters each. - body `theme` (object): The look, laid over the starting one: primary_color, position, launcher, teaser_text, title, subtitle and the rest of the widget's theme. - body `enabled` (boolean): Default true. - example body: {"workspace_id":"uuid","name":"Website chat","goal":"lead_capture","theme":{"primary_color":"#2563eb"}} - `DELETE /v1/website-widgets/{widget_id}` — Delete a website widget (scope workspaces:write) It stops showing wherever its line is installed, and its visitor sessions go with it. Leads it brought in and their messages stay. Owners and admins. - path `widget_id` (string, required): The widget. ### Short links - `GET /v1/short-links/settings` — Short Links settings (scope workspaces:read) What the link editor starts from: saved UTM sets, saved pixel ids, the domain new links start on (null is the usual address) and the look new QR codes start from. Owners and admins. - `PUT /v1/short-links/settings` — Change Short Links settings (scope workspaces:write) Only what's sent changes; each part sent replaces that part. A value that isn't allowed is refused with what is. Links already made keep their own UTM, pixels and QR look. Owners and admins. - body `default_domain` (string): One of the sub-account's short domains (GET /v1/short-links/domains), or null for the usual address. - body `utm_templates` (array): Up to 40 saved sets: name (60) and any of utm_source, utm_medium, utm_campaign, utm_term, utm_content (200 each). - body `pixels` (object): Saved pixel ids: meta (10-20 digits), google (G-XXXXXXX or AW-123456789), tiktok (the pixel id), linkedin (the partner id). null or "" removes one. - body `qr` (object): The look new QR codes start from: fg, bg, eye, frameColor (#rrggbb; eye "" follows the dots), dots (square, rounded, dots, fluid), corners (square, rounded, circle), logo, logoUrl (https), frame (none, label, bubble, card), frameText (28), transparent. Fields left out go back to the usual look. - example body: {"workspace_id":"uuid","utm_templates":[{"name":"Google profile","utm_source":"google","utm_medium":"organic","utm_campaign":"gbp"}],"qr":{"fg":"#1d4ed8","dots":"dots"}} ### Ads & Google - `POST /v1/google-ads/campaigns` — Create a Google Ads Search campaign (paused) (scope meta:write) A whole Search campaign in one request, checked like the app's New campaign screen: its budget, bidding (Maximize conversions or Maximize conversion value only), locations, languages, up to 20 ad groups each with keywords and 1-3 responsive search ads, plus optional negatives, sitelinks, callouts, snippets and a phone number. It is always created PAUSED and spends nothing until POST /v1/google-ads/changes turns it on; a status other than PAUSED is refused. validate_only has Google check it without creating anything. Field names may be snake_case or camelCase. Written to the change history. Owners and admins; the sub-account must have Google Ads connected in the app (409 not_connected otherwise). - body `campaign` (object, required): name; daily_budget (the account's currency, 1 or more); bidding { strategy: MAXIMIZE_CONVERSIONS | MAXIMIZE_CONVERSION_VALUE, target_cpa?, target_roas? }; locations [{ id }] (1-100 ids from GET /v1/google-ads/locations); languages? (ids, default 1000 = English); search_partners? (default false); location_mode? (PRESENCE default | PRESENCE_OR_INTEREST); final_url_suffix?; ad_groups [{ name, keywords (1-300: "roof repair" phrase, "[roof repair]" exact, or { text, match_type }), negatives?, ads [{ headlines (3-15, 30 characters each), descriptions (2-4, 90 each), final_url, path1?, path2? }] }]; negatives?; shared_set_ids?; sitelinks? [{ text, final_url, description1?, description2? }]; callouts?; snippets? [{ header, values }]; phone? { country_code, number }. - body `customer_id` (string): One of its Google Ads accounts (GET /v1/google-ads). Default: the one picked in the app. - body `validate_only` (boolean): Have Google check it and create nothing. Default false. - example body: {"workspace_id":"uuid","validate_only":true,"campaign":{"name":"Roof repair - Austin","daily_budget":40,"bidding":{"strategy":"MAXIMIZE_CONVERSIONS"},"locations":[{"id":"1026201"}],"ad_groups":[{"name":"Roof repair","keywords":["roof repair","[emergency roof repair]"],"ads":[{"headlines":["Roof Repair in Austin","Same-Day Roof Repair","Free Roof Inspection"],"descriptions":["Leaks fixed fast by a local crew.","Call for a free inspection today."],"final_url":"https://example.com/roof-repair"}]}]}} - `POST /v1/google-ads/changes` — Change a Google Ads account (scope meta:write) Makes up to 100 changes to a sub-account's Google Ads in one request: all of them or none. They are the same changes the app's Google Ads screens make. ! This can spend real ad money. Turning a campaign, ad group, keyword or ad on, or changing a budget, a bidding strategy or a bid, changes what the account spends. The answer's can_raise_spend says whether any change in the request could. How to use it: - Get the ids (campaign, ad group, keyword, budget, asset) from GET /v1/google-ads/report. - Send changes: a list of { kind, ...fields }. Every kind and its fields are in the table below. Field names work in snake_case or camelCase. - Send validate_only true first: Google checks the changes and nothing is made. - Each applied request is one row of the change history, with a change_id. Most can be undone with POST /v1/google-ads/changes/{change_id}/undo. - A change Google refuses answers 400, and nothing in the request is applied. details.errors names the change (change_index) and why. Owners and admins. - body `changes` (array, required): 1-100 changes, each { kind, ... } (snake_case or camelCase fields). E.g. { kind: "campaign_status", campaign_id: "123", status: "PAUSED" } or { kind: "budget_amount", budget_id: "456", amount: 50, previous: 40 }. - body `customer_id` (string): One of its Google Ads accounts. Default: the one picked in the app. - body `validate_only` (boolean): Check with Google and change nothing. Default false. - body `review_id` (string): With suggestion_id: marks that suggestion of an AI review as applied once the changes went through. - body `suggestion_id` (string): The review suggestion these changes come from. - example body: {"workspace_id":"uuid","validate_only":true,"changes":[{"kind":"campaign_status","campaign_id":"21000000001","status":"PAUSED"}]} - `GET /v1/google-ads/changes` — Google Ads change history (scope meta:read) Every change made to the sub-account's Google Ads from the app, the API or Autopilot, newest first: what it was in words (summary), its kind and source, whether it can still be undone (can_undo) and when it was. Owners and admins. - query `customer_id` (string): Only one Google Ads account's changes. - query `limit` (number): 1-100, default 25. - `POST /v1/google-ads/changes/{change_id}/undo` — Undo a Google Ads change (scope meta:write) Puts back one change from the history that has can_undo true, as the app's History > Undo does, and marks it undone. Undoing a pause turns the thing back on and undoing a budget cut raises it again, so this can spend real ad money (can_raise_spend). 409 when it was already undone or can't be undone from here. Owners and admins. - path `change_id` (string, required): A change from GET /v1/google-ads/changes. - body `validate_only` (boolean): Check with Google and change nothing. Default false. - `GET /v1/google-ads/recommendations` — Google's recommendations (scope meta:read) Google's own recommendations for the account, each with its id, type, title, the campaign it is about, what it would change, and whether it can be applied from here (blocked / needs_input say why not). Owners and admins. - query `customer_id` (string): One of its Google Ads accounts. Default: the one picked in the app. - `POST /v1/google-ads/recommendations/apply` — Apply Google recommendations (scope meta:write) Applies up to 100 of Google's recommendations, all or nothing. THIS CAN SPEND REAL AD MONEY: many recommendations raise budgets, add keywords or change bidding. Google has no dry run for recommendations, so validate_only checks the typed change each one makes instead (checked says which ones that covered). A recommendation Google no longer lists is a 409. Written to the change history. Owners and admins. - body `recommendation_ids` (array, required): Ids from GET /v1/google-ads/recommendations (customers/{account}/recommendations/...). - body `customer_id` (string): One of its Google Ads accounts. Default: the one picked in the app. - body `validate_only` (boolean): Check and change nothing. Default false. - `POST /v1/google-ads/recommendations/dismiss` — Dismiss Google recommendations (scope meta:write) Tells Google to stop showing up to 100 recommendations. Nothing in the campaigns changes. Written to the change history. Owners and admins. - body `recommendation_ids` (array, required): Ids from GET /v1/google-ads/recommendations. - body `customer_id` (string): One of its Google Ads accounts. Default: the one picked in the app. - `GET /v1/google-ads/suggestions` — Google Ads suggestions (free) (scope meta:read) Rule-based suggestions from the account's own numbers: searches that spent and never converted, keywords and ads that lose money and more. Each comes with the ready-made changes to send to POST /v1/google-ads/changes. Free; nothing is changed. Owners and admins. - query `range` (string): Default last_30d. - query `customer_id` (string): One of its Google Ads accounts. Default: the one picked in the app. - `POST /v1/google-ads/review` — Start an AI review of the Google Ads account (scope meta:write) An AI review of the whole account (campaigns, keywords, searches, ads, targeting, Google's recommendations, keyword ideas): a summary and suggestions, each with checked changes ready to apply. It costs credits (the answer says how many; returned if the review fails), takes a few minutes and changes nothing by itself. Poll GET /v1/google-ads/review/{review_id}. 402 when the credits aren't there. Owners and admins. - body `range` (string): Default last_30d. - body `customer_id` (string): One of its Google Ads accounts. Default: the one picked in the app. - `GET /v1/google-ads/review/{review_id}` — One AI review (scope meta:read) A review you started (or an Autopilot run): status (processing, completed, failed), the summary, the suggestions with their changes, which were applied or dismissed, and for an Autopilot run what it applied and what Google refused. Reviews are their maker's own, as in the app. - path `review_id` (string, required): From POST /v1/google-ads/review, or last_review_id of GET /v1/google-ads/autopilot. - `GET /v1/google-ads/autopilot` — Google Ads Autopilot settings (scope meta:read) Autopilot for one Google Ads account: on or off, daily or weekly, its rules, the next and last run with what the last one did, the Google recommendation types it may be allowed to apply, and the credits each run costs. Off until someone turns it on. Owners and admins. - query `customer_id` (string): One of its Google Ads accounts. Default: the one picked in the app. - `PUT /v1/google-ads/autopilot` — Turn Google Ads Autopilot on or off, set its rules (scope meta:write) Autopilot is an AI review on a schedule that applies, without asking, the low-risk changes its rules allow and leaves the rest as suggestions. TURNING IT ON MEANS REAL CHANGES TO A LIVE AD ACCOUNT AND CREDITS FOR EVERY RUN, paid by the person who turned it on; with budget_change_pct above 0 or budget recommendation types it can raise budgets. The first run starts within about 10 minutes. Only what you send changes. Owners and admins. - body `enabled` (boolean): On or off. - body `frequency` (string): How often it runs. - body `rules` (object): block_wasted_searches (boolean: exact negatives for searches that spent and never converted), pause_losing_keywords (boolean), pause_losing_ads (boolean), budget_change_pct (0-30: the most a budget moves per run, 0 = never), recommendation_types (list from GET /v1/google-ads/autopilot), max_changes_per_run (1-100). - body `customer_id` (string): One of its Google Ads accounts. Default: the one picked in the app. - example body: {"workspace_id":"uuid","enabled":true,"frequency":"weekly","rules":{"block_wasted_searches":true,"pause_losing_keywords":true,"budget_change_pct":0}} - `POST /v1/google-ads/autopilot/preview` — Preview an Autopilot run (scope meta:read) What an Autopilot run would change right now under the rules sent (or the saved ones), using the free rule-based suggestions: each change is checked with Google, nothing is changed, charged or saved. A real run also has the AI review, so it may find more. Owners and admins. - body `rules` (object): Rules to try, as in PUT /v1/google-ads/autopilot. Default: the saved rules. - body `customer_id` (string): One of its Google Ads accounts. Default: the one picked in the app. - `POST /v1/google-ads/autopilot/run` — Run Autopilot now (scope meta:write) Runs Autopilot right away with its saved settings: THIS COSTS CREDITS AND MAKES REAL CHANGES to the ad account within the saved rules. It answers at once; read the outcome from GET /v1/google-ads/autopilot (last_status, last_summary, last_review_id). 409 while a run is under way; 400 until settings were saved. Owners and admins. - body `customer_id` (string): One of its Google Ads accounts. Default: the one picked in the app. - `GET /v1/google-ads/locations` — Find Google Ads locations (scope meta:read) Places by name (cities, regions, ZIP codes, countries) with the ids a campaign's locations and add_locations changes take. Up to 15. Owners and admins. - query `query` (string, required): 2-80 characters, e.g. Austin. - query `country_code` (string): Two letters, e.g. US. - `GET /v1/google-ads/keyword-ideas` — Keyword ideas (scope meta:read) Keyword ideas from Google with monthly searches and top-of-page bids, from seed words, a website, or both. Up to 200. Owners and admins. - query `keywords` (string): Up to 20 seed words, comma-separated. - query `url` (string): The business's website. - query `geo_ids` (string): Up to 10 location ids, comma-separated. Default: campaign_id's locations. - query `language_id` (string): Default 1000 (English). - query `campaign_id` (string): Use this campaign's locations. - query `search_partners` (boolean): Include search partners. Default false. - query `customer_id` (string): One of its Google Ads accounts. Default: the one picked in the app. ### Messaging - `GET /v1/social/comment-rules` — List Comment to DM rules (scope messaging:read) The sub-account's Comment to DM rules (Settings > Instagram & Messenger): when someone comments on the business's Instagram or Facebook post, a rule can reply under the comment and send them a private message. Oldest first, which is the order they are tried in: the oldest active rule that matches a comment answers it, so a newer rule with the same keyword never sends. Each has account_ids (empty = every connected account), post_ids (empty = any post or reel), match (contains: a keyword appears as a whole word; exact: the whole comment is the keyword; any: every comment), keywords, public_replies (one is picked at random; empty = no public reply), dm_text, button, once_per_person, fired_count and last_fired_at. What each rule did is GET /v1/social/comments. Owners and admins, with Instagram & Messenger on for the account (403 `not_enabled` otherwise). - `POST /v1/social/comment-rules` — Create a Comment to DM rule (scope messaging:write) Makes a rule with the editor's own limits. It starts answering new comments as soon as it is saved active (the default): send active false to save it switched off. Keywords are cleaned as the editor does (a leading # dropped, no repeats in any case); with match any they are not used. A message with a button can be 640 characters, without one 1,000. account_ids must be this sub-account's connected accounts (GET /v1/social/accounts). Owners and admins, with Instagram & Messenger on. - body `name` (string, required): The rule's name, up to 80 characters. - body `dm_text` (string, required): The private message: up to 1,000 characters, 640 with a button. - body `match` (string): contains (default), exact or any. - body `keywords` (array): Up to 20 keywords of up to 40 characters. Required unless match is any. - body `account_ids` (array): Connected accounts the rule watches. Empty (default) = all of them. - body `post_ids` (array): Up to 100 posts or reels (their ids on Instagram or Facebook). Empty (default) = any post. - body `public_replies` (array): Replies under the comment, up to 10 of up to 300 characters; one is picked at random. Empty (default) = none. - body `button` (object): { label (up to 20 characters), url (https) }: a link button under the message. null = none. - body `once_per_person` (boolean): Send each person this rule's message only once. Default true. - body `active` (boolean): Default true. - example body: {"workspace_id":"uuid","name":"Free guide","keywords":["guide"],"public_replies":["Check your DMs!"],"dm_text":"Here's the guide you asked for.","button":{"label":"Get the guide","url":"https://example.com/guide"}} - `PATCH /v1/social/comment-rules/{rule_id}` — Change a Comment to DM rule (scope messaging:write) Only what is sent changes, and the rule as a whole is checked again (adding a button to a 700-character message is refused). active false switches it off; button null removes the button. Owners and admins, with Instagram & Messenger on. - path `rule_id` (string, required): The rule (from GET /v1/social/comment-rules). - body `name` (string): Up to 80 characters. - body `active` (boolean): On or off. - body `dm_text` (string): Up to 1,000 characters, 640 with a button. - body `match` (string): contains, exact or any. - body `keywords` (array): The whole list, up to 20. - body `account_ids` (array): The whole list. Empty = every connected account. - body `post_ids` (array): The whole list. Empty = any post. - body `public_replies` (array): The whole list, up to 10. Empty = no public reply. - body `button` (object): { label, url } or null. - body `once_per_person` (boolean): Send each person this rule's message only once. - example body: {"active":false} - `DELETE /v1/social/comment-rules/{rule_id}` — Delete a Comment to DM rule (scope messaging:write) Deletes the rule. Its comment log stays (GET /v1/social/comments), without the rule's name. Owners and admins, with Instagram & Messenger on. - path `rule_id` (string, required): The rule. ### Meta - `GET /v1/meta-lead-forms` — Facebook Pages and Lead Forms that feed Leads (scope meta:read) Settings > Leads: the Facebook Pages connected to this sub-account so their Lead Form (Instant Form) leads arrive, and each Page's forms. A page's id is the connection (used by the routes below); page_id is Facebook's. Each form has connected (only a connected form makes leads), mapped (its questions were matched to lead fields in the app; without that, name, email and phone are recognised by themselves) and, for owners and admins, held_leads (leads Meta delivered for a form that isn't connected: they wait until the form is connected and a sync with include_unconnected imports them). import_unconnected_forms true = leads from forms that aren't connected are imported too. Any member of the sub-account. Never a Page token. - `POST /v1/meta-lead-forms/pages` — Connect a Facebook Page's Lead Forms (scope meta:write) Connects a Facebook Page to this sub-account so its Lead Form leads arrive, exactly as Connect does in Settings > Leads. It needs a Facebook login already connected in the app (the person's own, else the sub-account owner's or the agency's) that fully manages the Page and has approved Lead Ads Retrieval: 409 with details.code otherwise (not_connected, missing_leads_retrieval, insufficient_page_admin...) and the words to act on. Connecting a Page does not connect its forms: turn forms on with PATCH /v1/meta-lead-forms/pages/{id}. The same Page can feed several sub-accounts. The agency's owner and admins only (the client's admins see the Pages read-only, as in the app). - body `page_id` (string, required): The Facebook Page's id (digits). - example body: {"workspace_id":"uuid","page_id":"104857600001"} - `PATCH /v1/meta-lead-forms/pages/{id}` — Connect or disconnect a Page's Lead Forms (scope meta:write) Turns forms of a connected Page on or off (the switch on each form in Settings > Leads) and sets import_unconnected_forms. Only a connected form makes leads; from then on its new leads arrive like any live lead (alerts, the first text and automations, as the sub-account is set up). A form's field mapping, phone number and calendar set in the app are kept; matching a form's questions to lead fields stays in the app, and a form connected here without it still gets name, email and phone recognised. Only forms the Page is known to have (listed by GET /v1/meta-lead-forms) can be named. Owners and admins. - path `id` (string, required): The connected Page's id (from GET /v1/meta-lead-forms; not Facebook's page_id). - body `forms` (array): [{ form_id, connected: true | false, name? }], 1-200. name is kept only for a form that has none yet. - body `import_unconnected_forms` (boolean): Also make leads from forms that aren't connected. - example body: {"forms":[{"form_id":"9000000002","connected":true}]} - `DELETE /v1/meta-lead-forms/pages/{id}` — Disconnect a Facebook Page (scope meta:write) Disconnects the Page from this sub-account: its Lead Form leads stop arriving here and its form settings are removed. Leads already in the CRM stay. It works even when the Facebook login has expired. still_connected_elsewhere true means the same Page still feeds another sub-account. The agency's owner and admins only. - path `id` (string, required): The connected Page's id (from GET /v1/meta-lead-forms). - `POST /v1/meta-lead-forms/sync` — Sync past leads from Meta (scope meta:write) Sync leads from Meta (Settings > Leads): pulls the last `days` of leads for the connected forms of the connected Pages (page_ids / form_ids narrow it; up to 2,000 leads a form) and answers 202 with a sync_id to follow at GET /v1/meta-lead-forms/syncs/{sync_id}. A lead that already exists (same Meta lead, phone or email) is updated, never duplicated; a lead deleted in the CRM comes back, because a sync asked for by hand is a re-import. Two switches decide who hears about the NEW leads, both off unless sent (in the app's dialog the first starts on): notify_team sends the sub-account's new-lead alerts (emails and texts to its notification recipients) for each one, the same as a live lead; run_automations gives each one exactly what a live lead gets: the first text and email (auto-greet), the AI's first message and Instant Lead Connect. Leave run_automations off for a backfill so old leads are never texted. Updated leads never alert anyone. include_unconnected also imports the leads held for forms that aren't connected. Owners and admins. - body `days` (number): How far back, 1-365. Default 30. - body `page_ids` (array): Only these connected Pages (Facebook's page ids). Default: all of them. - body `form_ids` (array): Only these forms. Default: every connected form. - body `notify_team` (boolean): Send the team's new-lead alerts for each new lead. Default false. - body `run_automations` (boolean): Text and email each new lead like a live one. Default false. - body `include_unconnected` (boolean): Also import leads held for forms that aren't connected. Default false. - example body: {"workspace_id":"uuid","days":30} - `GET /v1/meta-lead-forms/syncs/{sync_id}` — How a Meta lead sync is going (scope meta:read) A sync's status (running, completed or failed), forms_done of forms_total, how many leads were created, updated and skipped, and the same per form with the reason a form couldn't be read. Poll every couple of seconds while it is running. Any member of the sub-account. - path `sync_id` (string, required): The sync (from POST /v1/meta-lead-forms/sync). - `GET /v1/lead-feedback` — Lead quality feedback: the dataset and recent events (scope meta:read) Settings > Leads > Lead quality feedback, read only: dataset_id (the Meta dataset lead stages are sent back to; null until one is made or picked in the app), enabled (the card's switch; nothing is sent without a dataset), the attached ad_account_ids, and recent_events: the newest events sent or failed (Lead, QualifiedLead, Schedule, Purchase, DisqualifiedLead) with the lead and Meta's reason for a failure. Making or picking a dataset, the step in Meta's Events Manager and sending test events stay in the app. Owners and admins. - query `limit` (number): How many recent events, 1-50. Default 10. ### Smart pages - `POST /v1/smart-pages/{page_id}/duplicate` — Duplicate a Smart Page (scope workspaces:write) A copy in the same sub-account: the draft, every extra page and file, per-page SEO, the page's settings and its database connection. The copy is a draft with a new link and no views, leads, custom domain, builds or waiting prompts. name is optional (default " copy"); include_chat true also copies the builder chat. Answers copied { documents, seo, database, messages }. Up to 200 pages a sub-account. Copying into another sub-account stays in the app. People who manage the sub-account. - path `page_id` (string, required): Page id. - body `name` (string): The copy's name, up to 80 characters. - body `include_chat` (boolean): Also copy the builder chat (default false). - example body: {"name":"Roof repair Fort Worth"} - `GET /v1/smart-pages/{page_id}/versions` — List a Smart Page's versions (scope workspaces:read) The page's history, newest first: version (its number), label, created_at, by { user_id, name }, document (which document that change was made to, / is the home page), prompt (the request behind a build, shortened), credits and restore_of (true when the version is itself a restore). Every build, edit, html write and restore makes one. People who manage the sub-account. - path `page_id` (string, required): Page id. - query `limit` (number): How many, 1-200 (default 50). - `POST /v1/smart-pages/{page_id}/restore` — Restore a Smart Page version (scope workspaces:write) Puts a version back as the draft, exactly as Restore in the builder: the home page and every extra page that version held; pages made after it are removed, and files that version could not keep (left_alone) stay as they are. A version from before whole-project history puts back only the one document it kept. The restore is saved as a new version, so restoring the version before it undoes it. 409 while a build is running. Nothing goes live until POST /v1/smart-pages/{page_id}/publish. People who manage the sub-account. - path `page_id` (string, required): Page id. - body `version` (number, required): The version number from GET /v1/smart-pages/{page_id}/versions. - example body: {"version":12} - `GET /v1/smart-pages/{page_id}/seo` — Read a Smart Page's SEO, page by page (scope workspaces:read) seo.pages: the home page (/) and each extra page with seo_title, seo_description and og_image_url. An extra page's empty field uses the home page's. People who manage the sub-account. - path `page_id` (string, required): Page id. - `PUT /v1/smart-pages/{page_id}/seo` — Set the SEO of one page of a Smart Page (scope workspaces:write) Changes only what is sent for the page at path (default /, the home page): seo_title (up to 300 characters), seo_description (up to 500), og_image_url (an https link). null clears a field. path must be a page that exists in this Smart Page (404 otherwise). Answers the same view as GET. People who manage the sub-account. - path `page_id` (string, required): Page id. - body `path` (string): Which page, e.g. /thank-you (default /). - body `seo_title` (string): Title for search results and link previews. - body `seo_description` (string): Description for search results and link previews. - body `og_image_url` (string): Picture for link previews (https). - example body: {"path":"/services/roofing","seo_title":"Roof Replacement in Dallas | Castillo Roofing","seo_description":"Free estimates, 25-year warranty."} - `POST /v1/smart-pages/{page_id}/queue/clear` — Clear a Smart Page's waiting prompts (scope workspaces:write) Drops every prompt waiting in line behind the running build (waiting in GET /v1/smart-pages/{page_id}/builds). The build that is running is not touched: POST /v1/smart-pages/{page_id}/cancel-build stops it. Answers cleared (how many). People who manage the sub-account. - path `page_id` (string, required): Page id. - `POST /v1/smart-pages/{page_id}/queue/pause` — Pause or resume a Smart Page's build queue (scope workspaces:write) paused true: prompts sent while paused, and the ones already waiting, stay in line. paused false: the queue runs again, and when nothing is building the next waiting prompt starts at once (started_build_id), costing credits like any build. Answers queue_paused, waiting and started_build_id. People who manage the sub-account. - path `page_id` (string, required): Page id. - body `paused` (boolean, required): true to pause, false to resume. - example body: {"paused":true} - `GET /v1/smart-pages/{page_id}/database` — Read a Smart Page's database connection (scope workspaces:read) The business's own database the page reads and writes, when one is connected in the builder: project_url, mode (anon: the page talks to it directly; server: through a proxy that holds the secret key), has_secret_key, tables [{ name, columns, allowed }], last_verified_at and last_error. database is null when none is connected. Its keys are never returned, and connecting or changing it stays in the app. People who manage the sub-account. - path `page_id` (string, required): Page id. ### Smart forms - `GET /v1/smart-forms/domains` — List the sub-account's form and page domains (scope smart_forms:read) The sub-account's own domains for Smart Forms and Smart Pages: hostname, verified, verified_at, ownership_status, ssl_status, last_checked_at and problem (what the last check found, if anything). Read only: a domain is connected and checked in the app. People who manage the sub-account. - `GET /v1/smart-forms/{form_id}/settings` — Read a smart form's tracking, coupon and booking settings (scope smart_forms:read) What GET /v1/smart-forms/{form_id} leaves out: tracking (meta pixels with their event, ga4, tiktok, google_ads), thank_you_offer (the thank-you page's coupon, and shown: whether the page shows it) and booking (calendar_id, scheduling_mode, lengths, notice, time zone, host, custom hours). Any member of the sub-account. - path `form_id` (string, required): Form id. - `PATCH /v1/smart-forms/{form_id}/tracking` — Set a smart form's tracking ids (scope smart_forms:write) The form's Pixels tab. Only what is sent changes; null clears. meta: up to 10 Meta pixels [{ id (digits), event (fired after a submission; default Lead) }], replacing the list. ga4: a Google Analytics 4 id (G-XXXXXXXX). tiktok: a TikTok pixel id. google_ads: { id (AW-...), label } for the conversion fired after a submission. Each id must be in its platform's own shape (400 otherwise). Answers the settings view. Owners and admins. - path `form_id` (string, required): Form id. - body `meta` (array): Meta pixels: [{ id, event? }], up to 10. Replaces the list; null or [] removes them. - body `ga4` (string): Google Analytics 4 id, G-XXXXXXXX. - body `tiktok` (string): TikTok pixel id. - body `google_ads` (object): { id: "AW-123456789", label } or null. - example body: {"meta":[{"id":"1234567890123456","event":"Lead"}],"ga4":"G-AB12CD34EF"} - `PATCH /v1/smart-forms/{form_id}/thank-you-offer` — Set the coupon on a smart form's thank-you page (scope smart_forms:write) The coupon the thank-you page shows after a booking. Only what is sent changes; null clears a field. enabled, headline (up to 80), code (up to 40, saved in capitals), description (up to 300), cta_label (up to 40), cta_url (a phone number becomes a call link; or an https, tel:, mailto: or sms: link), disclaimer (up to 200). It shows once enabled with a headline or description (shown in the answer). The rest of the thank-you page is PATCH /v1/smart-forms/{form_id}/screens. Owners and admins. - path `form_id` (string, required): Form id. - body `enabled` (boolean): Show the coupon. - body `headline` (string): The offer, e.g. $500 OFF. - body `code` (string): A code the customer can mention. - body `description` (string): One line on what they get. - body `cta_label` (string): Button label. - body `cta_url` (string): Phone number or link for the button. - body `disclaimer` (string): Small print. - example body: {"enabled":true,"headline":"$500 OFF","code":"CALLNOW500","description":"Call now and mention this code to lock in $500 off your install.","cta_label":"Call now to claim","cta_url":"(555) 123-4567"} - `PATCH /v1/smart-forms/{form_id}/booking` — Set how people pick a time on a smart form (scope smart_forms:write) The form's own booking settings. Only what is sent changes. scheduling_mode (exact | arrival_window; arrival windows run back to back, so buffer_minutes is then 0), slot_minutes 5-480, buffer_minutes 0-240, arrival_window_minutes 30-480, max_days_ahead 1-365, min_notice_hours 0-720, slots_per_window 1-50 (bookings that can share one time), timezone (IANA; null = the sub-account's), host_user_id (a member of the sub-account; null = its owner), use_custom_hours with weekly_hours ({ mon: [["09:00","17:00"]], ... }; a day left out is closed; null removes them). A form assigned to a booking calendar follows that calendar's hours, lengths and mode instead. Turning booking on or off and picking the calendar are PATCH /v1/smart-forms/{form_id} (booking_enabled, calendar_id). Owners and admins. - path `form_id` (string, required): Form id. - body `scheduling_mode` (string): exact or arrival_window. - body `slot_minutes` (number): Appointment length, 5-480. - body `buffer_minutes` (number): Gap between appointments, 0-240. - body `arrival_window_minutes` (number): Arrival window length, 30-480. - body `max_days_ahead` (number): How far ahead people can book, 1-365 days. - body `min_notice_hours` (number): Minimum notice, 0-720 hours. - body `slots_per_window` (number): Bookings per time, 1-50. - body `timezone` (string): IANA time zone, or null. - body `host_user_id` (string): The member bookings belong to, or null. - body `use_custom_hours` (boolean): Use weekly_hours instead of the sub-account's hours. - body `weekly_hours` (object): { mon: [["09:00","17:00"]], ... } or null. - example body: {"scheduling_mode":"arrival_window","arrival_window_minutes":120,"max_days_ahead":30,"min_notice_hours":4} ### Website Analytics - `GET /v1/website-analytics/pages` — Every page of the website with its views per device (scope workspaces:read) The pages visitors opened in the last days, most viewed first (up to 200): host, path, title, views, and views on desktop, tablet and mobile. pictures lists the devices a page has a picture for in the app's heatmaps. Use a path with GET /v1/website-analytics/heatmap. Owners and admins. - query `site_id` (string): One site of the sub-account (GET /v1/website-analytics/sites). Leave out for every site together. - query `days` (number): How many days back, 1-400 (default 30). - query `host` (string): Only this website (a host name like www.example.com), when the code is on several. - `GET /v1/website-analytics/heatmap` — One page on one device: what people click and how far they scroll (scope workspaces:read) A page's heatmap numbers: views, visitors, avg_s (attention time), exit_rate, clicks_total, elements (the 60 most clicked: its CSS path, label, tag, link, clicks, sessions, rage clicks and dead clicks), reach (percent of views that got to each 5 % of the page, 0 % to 100 %), fold (how much of the page shows without scrolling, percent), page_height, attention (average attention in each twentieth of the page, top to bottom) and devices (views per device). The page's picture and every single click's position stay in the app; has_picture says whether the app has one. Owners and admins. - query `site_id` (string): One site of the sub-account (GET /v1/website-analytics/sites). Leave out for every site together. - query `path` (string, required): The page's path, e.g. /pricing (from GET /v1/website-analytics/pages). - query `device` (string): Desktop (default), Mobile or Tablet. - query `host` (string): Only this website (host name). - query `days` (number): How many days back, 1-400 (default 30). - `GET /v1/website-analytics/recordings` — Recorded visits, most worth watching first (scope workspaces:read) The visits that were recorded, as the app's Recordings list: when, entry and exit page, pages, attention time (engaged_ms), length of the recording (duration_ms), source, channel, ad platform, campaign, place, device, browser, clicks, rage and dead clicks, errors, quick_backs, conversions, starred, summary (the AI's one line, when someone asked for it), score (the app's 'worth watching' number: frustration, conversions, time and pages) and the lead it became (lead_id, lead_name). sort best (default) | newest | longest. Filters: frustrated, converted, lead, starred, from_ads (true / false), min_s, visitor (New | Returning), and the overview's breakdowns (page, source, channel, campaign, ad, referrer, country, region, city, device, browser, os, entry, exit, host). The recording itself plays only in the app; visitor ids are never returned. Owners and admins. - query `site_id` (string): One site of the sub-account (GET /v1/website-analytics/sites). Leave out for every site together. - query `days` (number): How many days back, 1-400 (default 30). - query `sort` (string): best (default), newest or longest. - query `limit` (number): 1-200 (default 50). - query `offset` (number): Skip this many. - query `frustrated` (boolean): Only visits with rage clicks, dead clicks, errors or quick backs. - query `converted` (boolean): Only visits that converted (false: that didn't). - query `lead` (boolean): Only visits that became a lead. - query `starred` (boolean): Only starred ones. - query `min_s` (number): At least this many seconds of attention. - query `page` (string): Only visits that opened this page path. - query `device` (string): Desktop, Mobile or Tablet. - query `source` (string): Only this source (as the overview's dims.source names it). - `GET /v1/website-analytics/recordings/{recording_id}` — One recorded visit: its pages and markers (scope workspaces:read) What the app's player shows beside the video: recording (source, campaign and ad ids, referring site, place, device, screen, language, counts, starred, summary, duration_ms), lead (the lead this visit became), pages (each page in order with its time, scroll depth and the thank-you page it matched), markers (up to 1,500: clicks with the element's label, rage and dead clicks, form starts, fields touched (names only, never what was typed) and sends, errors, conversions) and other_visits (the same visitor's other visits). The video itself and its files are only in the app. Owners and admins. - path `recording_id` (string, required): A recorded visit (GET /v1/website-analytics/recordings). - `POST /v1/website-analytics/recordings/{recording_id}/star` — Star a recording (scope workspaces:write) Marks a recorded visit to keep: starred recordings are kept 180 days instead of 30. Owners and admins. - path `recording_id` (string, required): A recorded visit. - `DELETE /v1/website-analytics/recordings/{recording_id}/star` — Take the star off a recording (scope workspaces:write) The recording goes back to the usual 30 days. Owners and admins. - path `recording_id` (string, required): A recorded visit. - `GET /v1/website-analytics/forms` — The website's forms: started, sent, and where people stop (scope workspaces:read) Each form on the website (by page and form name): visits that started it, visits that sent it, and its fields in order with touched, filled and quit_here (people whose last field this was before leaving without sending). Field names only, never what anyone typed. Takes the overview's filters (device, source, campaign, country, page...). Owners and admins. - query `site_id` (string): One site of the sub-account (GET /v1/website-analytics/sites). Leave out for every site together. - query `days` (number): How many days back, 1-400 (default 30). - query `device` (string): Desktop, Mobile or Tablet. - query `source` (string): Only this source. - query `page` (string): Only visits that opened this page path. - `POST /v1/website-analytics/funnel` — How many visits reached each step, in order (scope workspaces:read) A funnel over the last days: 2 to 6 steps, each a page ({ type: 'page', value: '/pricing', match: 'exact' | 'starts' | 'contains' }, exact by default) or a conversion ({ type: 'convert', value: 'Form sent' }; value '' counts any conversion). Answers the visits that reached each step after the one before it. filter narrows the visits like the overview's filters ({ device: 'Mobile' }). Only reads: nothing is saved. Owners and admins. - body `site_id` (string): One site of the sub-account (GET /v1/website-analytics/sites). Leave out for every site together. - body `steps` (array, required): 2-6 steps in order: { type, value, match? }. - body `days` (number): How many days back, 1-400 (default 30). - body `filter` (object): Narrow the visits, e.g. { device: 'Mobile', source: 'Meta Ads' }. - example body: {"workspace_id":"uuid","steps":[{"type":"page","value":"/","match":"exact"},{"type":"page","value":"/pricing","match":"starts"},{"type":"convert","value":"Form sent"}],"days":30} - `GET /v1/website-analytics/live` — Who is on the website right now (scope workspaces:read) Visits active in the last 5 minutes (up to 50), newest first: the page they're on, source, country, city, device, pages so far and whether the visit is being recorded. Owners and admins. - query `site_id` (string): One site of the sub-account (GET /v1/website-analytics/sites). Leave out for every site together. - `GET /v1/website-analytics/settings` — Website Analytics settings (scope workspaces:read) record (visits are recorded), record_rate (percent of visits recorded), mask_text (every word shown as stars in recordings and heatmaps), hosts (only these websites count; empty = any site the code is on), blocked_hosts (websites whose visits are dropped), goals (thank-you pages: a visit that reaches one counts as converted), installed, last_seen_at, last_host and recordings_this_month. The code itself is GET /v1/website-analytics/install. Owners and admins. - query `site_id` (string): One site of the sub-account (GET /v1/website-analytics/sites). Leave out for every site together. - `PATCH /v1/website-analytics/settings` — Change Website Analytics settings (scope workspaces:write) Send only what changes. record true / false; record_rate 100, 50, 25 or 10; mask_text; hosts and blocked_hosts (host names like www.example.com, up to 50 each; each list is replaced); goals (up to 20 thank-you pages, the whole list is replaced: name up to 60 characters, path starting with /, match exact | starts | contains). Typed text, passwords and card numbers are always hidden in recordings whatever is set here. Owners and admins. - body `site_id` (string): One site of the sub-account (GET /v1/website-analytics/sites). Leave out for every site together. - body `record` (boolean): Record visits. - body `record_rate` (number): Percent of visits recorded: 100, 50, 25 or 10. - body `mask_text` (boolean): Show every word as stars. - body `hosts` (array): Only these websites count ([] = any). - body `blocked_hosts` (array): Websites whose visits are dropped. - body `goals` (array): Thank-you pages: { name, path, match }. Replaces the list. - example body: {"workspace_id":"uuid","record_rate":50,"goals":[{"name":"Quote sent","path":"/thank-you","match":"exact"}]} ### Ads & Google - `GET /v1/google-business/desk/tasks` — What waits on a business's Google profile (scope workspaces:read) The Google desk's Tasks for one sub-account: reply (a review reply written and waiting for an OK, or one Google refused), review (a review with no reply written yet), post (a draft waiting for an OK, one that failed, or one approved whose time passed without going out: status stuck with stuck_reason posts_off | not_connected | late), photo (a customer's or crew's photo waiting for an OK, or one Google refused) and fix (a Google connection to connect or reconnect). Each task carries its own fields (the review and draft, the post's words, the photo's link, the error). counts adds them up (older_reviews: unanswered reviews from before review_days, not listed); by_business splits them per sub-account. Act on them with the posts, reviews and photos routes. Owners and admins; needs the Google tools add-on (403 addon_locked). - query `kinds` (string): Only these, comma separated: reply, review, post, photo, fix, google (a detail Google changed by itself: answer it with POST /v1/google-business/desk/google-changes/{change_id}). - query `review_days` (number): Reviews from this many days back count, 1-3650 (default 90). - query `limit` (number): 1-1500 (default 200); total says how many there are. - `GET /v1/google-business/desk/feed` — What went out on a business's Google profile (scope workspaces:read) The Google desk's Feed for one sub-account, newest first: post (published posts with their words, button and link on Google), reply (review replies that were sent, with the review), photo and video (uploaded to Google), report (weekly and monthly report emails: subject, how many recipients, opened_at), checkin (check-in emails to the owner) and faq (the website FAQ embed: its first questions). Keyset paging: send next.before and next.before_id back to read on (next is null at the end). Owners and admins; needs the Google tools add-on. - query `kinds` (string): Only these, comma separated: post, reply, photo, video, report, checkin, faq. - query `limit` (number): 1-100 (default 40). - query `before` (string): Read on from here: the last answer's next.before. - query `before_id` (string): Goes with before: next.before_id. - `GET /v1/google-business/desk/results` — 12 weeks of Google profile work and reviews (scope workspaces:read) The Google desk's Results for one sub-account: weeks (the last 12, oldest first: posts, replies, photos, videos and reports that went out, the reviews that came in and their average stars) and businesses (each Google business over the last days: posts, replies, photos, new reviews, their average stars, how many were answered, and when something last went out). Owners and admins; needs the Google tools add-on. - query `days` (number): Each business's last N days, 1-365 (default 30). - `POST /v1/google-business/desk/google-changes/{change_id}` — Answer something Google changed on a profile (scope workspaces:write) A desk task of kind google is a detail Google (or a customer's suggestion) changed on the profile by itself: its field, Google's version and the business's own. choice keep makes Google's version the business's, ours puts the business's version back on Google, dismiss leaves it and stops showing it. keep and ours change the live profile and are recorded as a change that can be undone (POST /v1/google-business/optimizer/changes/{id}/undo); the name, address and main category are never sent (they can send a profile back through verification). dry_run: true has Google check the change only. status answers kept, reverted, dismissed, gone (Google dropped it meanwhile) or validated. Owners and admins; needs the Google tools. - path `change_id` (string, required): The task's id (GET /v1/google-business/desk/tasks, kind google). - body `choice` (string, required): keep, ours or dismiss. - body `dry_run` (boolean): true: Google checks it, nothing changes. - example body: {"choice":"ours"} - `GET /v1/google-business/photos` — A business's Google photo line (scope workspaces:read) Photos of Google Posts & Photos, in line order (up to 400): status pending (from a customer's review page or the crew's photo link, waiting for an OK), queued (in the line; scheduled_for is when it goes to Google), uploading, failed (Google refused it: error says why) or uploaded (on Google: uploaded_at, google_media_url). Also category, position, source (app, link, companycam, review), added_by, keeps_its_spot (it carries where it was taken, for geotags) and media_format. counts: pending, in_line, on_google. Owners and admins. - query `profile_id` (string): Only this Google profile (default every profile of the sub-account). - query `status` (string): pending, queued, uploading, uploaded or failed. - `POST /v1/google-business/photos` — Add a photo to the Google photo line (scope workspaces:write) A JPG or PNG from a public https link (up to 5 MB, at least 250 x 250 pixels; its type is read from the file itself): copied in and put last in the profile's line, then the line's upload times are worked out again (scheduled says whether that worked). It goes to Google on its time by itself only while the profile's automatic uploads are on and Google is connected; photos on Google are public. Needs a Google business on the sub-account (409 not_connected) and the Google tools add-on (403 addon_locked). Owners and admins. - body `image_url` (string, required): A public https link to a JPG or PNG. - body `category` (string): AT_WORK (default), EXTERIOR, INTERIOR, PRODUCT, TEAMS, FOOD_AND_DRINK, ADDITIONAL, COVER or LOGO. - body `profile_id` (string): One of its Google profiles (default its first). - example body: {"workspace_id":"uuid","image_url":"https://example.com/jobs/new-roof.jpg","category":"AT_WORK"} - `POST /v1/google-business/photos/{photo_id}/approve` — Add a waiting photo to the line (scope workspaces:write) A pending photo (from a customer or the crew) joins the end of the line, as Add to line in the app; nothing goes to Google before that. 409 when it isn't pending any more. Needs the Google tools add-on. Owners and admins. - path `photo_id` (string, required): A pending photo (GET /v1/google-business/photos?status=pending). - `DELETE /v1/google-business/photos/{photo_id}` — Remove a photo from the line or from Google (scope workspaces:write) A pending, queued or failed photo leaves the line (the rest move up). One already on Google is taken off Google too: google says deleted, gone (Google no longer had it), by_hand (it was added on Google by hand, so it stays there) or none. When Google refuses (409, details.code google_refused), here_only=true removes it here and leaves the one on Google. A photo going up right now answers 409: try again in a minute. Works without the Google tools add-on. Owners and admins. - path `photo_id` (string, required): A photo (GET /v1/google-business/photos). - query `here_only` (boolean): true: leave the copy on Google. ### Calls - `GET /v1/call-settings` — Call recording and voicemail (scope workspaces:read) A sub-account's call recording and voicemail (Settings > Phone): whether calls are recorded (call_recording_enabled) and which kinds (call_recording_inbound, call_recording_outbound, call_recording_forwarded; recording_now lists the kinds being recorded right now), the announcement callers hear before the call connects, whether voicemail is on and which greeting plays (voicemail_greeting: default, typed or recording). notes says so when calls are recorded with no announcement. Anyone in the sub-account. - `PATCH /v1/call-settings` — Change call recording and voicemail (scope workspaces:write) Only what's sent changes; what GET answers can be sent straight back. Recording: the switch, the three kinds, and call_recording_announcement (spoken to the caller before the call connects; null for none). Many states require everyone on a call to agree to being recorded, so keep an announcement while recording is on: the answer's notes says so when there is none (the app recommends it and doesn't refuse either). Voicemail: voicemail_enabled, and voicemail_greeting_text (3-600 characters), which callers hear in a plain built-in voice and which replaces a recorded greeting; reset_voicemail_greeting: true goes back to the standard greeting. A greeting recorded, uploaded or spoken in a chosen voice is made in the app, and so is one number's own greeting (which wins over this one). People who manage the sub-account. - body `call_recording_enabled` (boolean): Record calls. - body `call_recording_inbound` (boolean): Calls people make to the business's numbers. - body `call_recording_outbound` (boolean): Calls placed from the dialer. - body `call_recording_forwarded` (boolean): Calls forwarded on to another phone. - body `call_recording_announcement` (string): Spoken before the call connects, up to 500 characters; null for none. - body `voicemail_enabled` (boolean): Missed callers can leave a message. - body `voicemail_greeting_text` (string): What callers hear before the beep, 3-600 characters. - body `reset_voicemail_greeting` (boolean): true: back to the standard greeting. - example body: {"workspace_id":"uuid","call_recording_enabled":true,"call_recording_announcement":"This call may be recorded for quality and training purposes."} ### Routing & alerts - `GET /v1/notification-settings` — The sub-account's alert and outcome settings (scope workspaces:read) Settings > Notifications' switches for the whole sub-account: notify_on_appointments (alerts for new appointments), notify_on_partials and partial_notify_delay_minutes (alert about a form someone started and never sent, after that wait), auto_complete_appointments and auto_complete_grace_hours (appointments are marked done that long after they end), appointment_outcome_digest (the morning 'mark the outcome' digest). Anyone in the sub-account. - `PATCH /v1/notification-settings` — Change the sub-account's alert and outcome settings (scope workspaces:write) Only what's sent changes; what GET answers can be sent straight back. partial_notify_delay_minutes is one of 2, 5, 10, 15 and auto_complete_grace_hours one of 2, 12, 24, 48 (the app's own choices). Who is alerted about new leads is /v1/alert-recipients; each person's own alerts are PUT /v1/notification-settings/mine. People who manage the sub-account. - body `notify_on_appointments` (boolean): Alerts for new appointments. - body `notify_on_partials` (boolean): Alerts for forms started and never sent. - body `partial_notify_delay_minutes` (number): 2, 5, 10 or 15. - body `auto_complete_appointments` (boolean): Mark appointments done by themselves. - body `auto_complete_grace_hours` (number): 2, 12, 24 or 48 hours after they end. - body `appointment_outcome_digest` (boolean): The morning digest of appointments to mark. - example body: {"workspace_id":"uuid","auto_complete_grace_hours":48} - `GET /v1/notification-settings/mine` — My alerts in a sub-account (scope workspaces:read) The alerts of the person this key belongs to, in this sub-account, never anyone else's: alerts { new_lead, lead_reply, incoming_call, appointment_booked, appointment_reminder, missed_call, delivery_failure, team_mention } (each on until they turn it off) and tap_opens_lead (tapping an alert opens the lead). Anyone in the sub-account. - `PUT /v1/notification-settings/mine` — Change my alerts in a sub-account (scope workspaces:write) Turns alerts on or off for the person this key belongs to, in this sub-account: only the alerts sent change. It never changes another person's alerts (there is no way to name one). Anyone in the sub-account. - body `alerts` (object): The alerts to change: any of new_lead, lead_reply, incoming_call, appointment_booked, appointment_reminder, missed_call, delivery_failure, team_mention, each true or false. - body `tap_opens_lead` (boolean): Tapping an alert opens the lead. - example body: {"workspace_id":"uuid","alerts":{"appointment_reminder":false}} ### Setup - `GET /v1/email-senders` — Email sender identities (scope workspaces:read) The people a sub-account's emails come from (Settings > Email > Sender identities): each has a mailbox name (local_part), its address on one of the sub-account's verified sending domains, a From name, whether it is the default, and signature_html when it has a signature of its own (null = it uses the sub-account's main signature). domains lists the verified sending domains a sender can be on. People who manage the sub-account. - `POST /v1/email-senders` — Add an email sender (scope workspaces:write) A new sender identity, as the app's Add saves it. local_part is the mailbox name before the @ (made lowercase, spaces become dots, only letters, digits, dot, dash and underscore kept). The address is always on one of the sub-account's verified sending domains: domain_id picks one, else the main one; 409 when the sub-account has none yet (verify one in the app, Settings > Email). display_name defaults to 'Sarah at '. The first sender becomes the default; is_default: true moves the default to this one. signature_html is the sender's own signature ({agent}, {business} and {city} are filled in per email): anything in it that runs is taken out when saved (scripts, frames, forms and style blocks, on... handlers, links and pictures that aren't http(s), mailto, tel or an image), up to 50,000 characters. Up to 50 senders; 409 when the address already exists. People who manage the sub-account. - body `local_part` (string, required): The mailbox name before the @ (sarah). - body `display_name` (string): The From name, up to 64 characters. - body `domain_id` (string): One of the verified sending domains (GET /v1/email-senders domains). - body `signature_html` (string): The sender's own signature as HTML; leave out to use the main signature. - body `is_default` (boolean): Make it the default sender. - example body: {"workspace_id":"uuid","local_part":"mike","display_name":"Mike at Castillo Roofing"} - `PATCH /v1/email-senders/{sender_id}` — Change an email sender (scope workspaces:write) Only what's sent changes: display_name, domain_id (a verified sending domain of the sub-account), signature_html (cleaned as on create; null goes back to the main signature), is_default: true (makes it the default; to change the default, make another sender the default). The mailbox name never changes: delete the sender and add another. People who manage the sub-account. - path `sender_id` (string, required): Sender id. - body `display_name` (string): The From name. - body `domain_id` (string): A verified sending domain. - body `signature_html` (string): The sender's own signature as HTML; null to use the main signature. - body `is_default` (boolean): true makes it the default sender. - example body: {"signature_html":"

{agent}
{business}

"} - `DELETE /v1/email-senders/{sender_id}` — Delete an email sender (scope workspaces:write) Removes a sender identity, as the app does: contacts that were set to it go back to the default sender. People who manage the sub-account. - path `sender_id` (string, required): Sender id. ### Calls - `GET /v1/instant-lead-connect` — Instant Lead Connect settings (scope workspaces:read) Instant Lead Connect (Settings > Calls): when a new lead comes in, the business's phone rings its team one after another and whoever answers is connected to the lead. The settings as the app shows them; a sub-account that never saved any answers the defaults (off). call_order lists who rings: a teammate by user_id (never their phone), other phones whole only to people who may change the settings and as their last four digits to everyone else. Anyone in the sub-account. - `PUT /v1/instant-lead-connect` — Change Instant Lead Connect (scope workspaces:write) Only what's sent changes, by the app's own limits. enabled: true makes the business's phone call its team for every new lead from the sources ticked, from then on (409 while the sub-account has no phone number); this route itself never starts a call. call_order replaces the list: { kind: "member", user_id } rings a teammate on the phone saved on their own profile (400 when they aren't on the team or have no phone there; a phone can't be typed for a teammate), { kind: "phone", phone, label } rings any other number; each may carry ring_seconds 10-60; up to 20. Ring times 10-60 seconds, trigger_delay_minutes 0-120, quiet hours as 24-hour times with a time zone and call_days (at least one), retry_ladder up to 6 waits of 1-720 minutes, whisper templates up to 1,000 characters. Auto greets (the recorded greeting a lead hears) are made in the app. Only the sub-account's owner and the owner's own team (the agency side) may change it, as in the app. - body `enabled` (boolean): Call the team for new leads. - body `enabled_sources` (array): Which leads: smart_form, meta_lead, api, webhook, website, manual. - body `call_order` (array): Who rings, in order: [{ kind: "member", user_id, ring_seconds? } | { kind: "phone", phone, label?, ring_seconds? }]. - body `assigned_rep_first` (boolean): Ring the lead's assigned person first. - body `skip_busy_reps` (boolean): Skip someone already on a call. - body `salesperson_ring_seconds` (number): 10-60. - body `lead_ring_seconds` (number): 10-60. - body `trigger_delay_minutes` (number): Wait before calling, 0-120. - body `require_press_1` (boolean): The teammate presses 1 to take the call. - body `auto_connect_on_answer` (boolean): Connect as soon as the teammate answers. - body `record_calls` (boolean): Record these calls. - body `transcribe_recordings` (boolean): Write out the recordings. - body `sms_after_no_connect` (boolean): Text the lead when nobody could be connected. - body `quiet_hours_enabled` (boolean): Hold calls outside the hours below. - body `quiet_hours_start` (string): When quiet hours start, like 18:00. - body `quiet_hours_end` (string): When they end, like 08:00. - body `quiet_hours_timezone` (string): IANA time zone. - body `call_days` (array): Days calls may go out while quiet hours are on: sun..sat. - body `retry_ladder` (object): { enabled, delays_minutes: [5, 15, 60] }. - body `whisper_template` (string): What the teammate hears first; {{first_name}}, {{full_name}}, {{business_name}}, {{lead_source}}, {{service}}... - body `whisper_include_form_answers` (boolean): Read the lead's form answers out too. - body `call_on_booking` (boolean): Also call when a lead books. - body `booking_whisper_template` (string): The whisper for a booking; {{appointment_time}} too. - body `use_auto_greet` (boolean): Play the lead a greeting first. - body `on_greet_failure` (string): connect, end or backup. - body `salesperson_hold_audio` (string): What the teammate hears while the lead is rung. - body `salesperson_hold_message` (string): The short message, when hold audio is message. - body `voicemail_behavior` (string): When the lead's voicemail answers. - example body: {"workspace_id":"uuid","quiet_hours_enabled":true,"quiet_hours_start":"18:00","quiet_hours_end":"08:00","call_days":["mon","tue","wed","thu","fri"]} - `GET /v1/instant-lead-connect/history` — Instant Lead Connect calls (scope workspaces:read) Its calls, newest first: the lead (lead_id, lead_name), where the lead came from, who was rung (recipient_label, never their phone), connection_status and final_outcome, whether each side answered and how long each rang, how long they talked, whether there is a recording (has_recording; the recording itself is played in the app), the transcript when there is one, and retry_attempt. Anyone in the sub-account. - query `limit` (number): 1-100 (default 25). - query `lead_id` (string): Only this lead's calls. ### Setup - `PATCH /v1/phone-numbers/{phone_number_id}` — Change a phone number's settings (scope phone_numbers:write) Settings > Phone > Edit on a number, and who uses it (Team). Only what's sent changes. friendly_name. Call forwarding: forward_to (a phone number, or null to clear it), forward_enabled (400 with nothing to forward to), forward_caller_id (line: the forwarded phone sees the business's number; caller: the caller's own). ring_order: who the number rings one after another instead of everyone at once, { on, screen, steps: [{ seconds: 10-60, targets: [{ kind: "member", user_id, app, phone } | { kind: "phone", phone, label }] }] }: up to 8 steps of up to 5 people and 180 seconds in all; screen makes a phone that answers press 1 to take the call; null clears it; refused when a step names someone off the team or one of the business's own numbers. assigned_user_id gives the number to one teammate (it rings only them; null shares it with everyone; 400 for someone off the team), tech_can_answer and tech_can_use say whether it rings technicians and whether they may call and text from it. Forwarding and the ring order change where real calls go from the next call on. The answer is the number as GET /v1/phone-numbers lists it plus voice_forward_caller_id and has_forward_to: the forwarding number and the ring order's phones are never returned. Buying and releasing numbers, and a number's own voicemail greeting, stay in the app. People who manage the sub-account. - path `phone_number_id` (string, required): The number's id (GET /v1/phone-numbers). - body `friendly_name` (string): The number's name, up to 64 characters. - body `forward_to` (string): The phone calls forward to; null clears it. - body `forward_enabled` (boolean): Forward calls nobody answers in the app. - body `forward_caller_id` (string): What the forwarded phone sees. - body `ring_order` (object): { on, screen, steps: [{ seconds, targets }] }; null clears it. - body `assigned_user_id` (string): The teammate the number belongs to; null for everyone. - body `tech_can_answer` (boolean): It rings technicians. - body `tech_can_use` (boolean): Technicians may call and text from it. - example body: {"friendly_name":"Main line","assigned_user_id":null} ### Ads & Google - `PATCH /v1/google-business/profiles/{profile_id}/automation` — Automatic Google replies, posts and photos (scope workspaces:write) The switches of Google Review Replies and Posts & Photos on one Google profile. Only what's sent changes. Turning these on makes things go to the business's public Google profile later, by themselves, with nobody approving each one: replies_enabled answers new reviews (a review with at least replies_auto_min_stars stars, 1-5, is answered on Google without asking; 6 makes every reply wait for approval); posts_enabled writes posts ahead (posts_per_week 1-7 at posts_hour 0-23 on the business's clock) and, with posts_auto_publish true, publishes them on Google by themselves (otherwise each waits for approval); photos_enabled adds photos_per_week (1-14) photos from the photo line at photos_hour. Also replies_tone (warm, professional, casual, upbeat) and posts_use_photos. The answer's goes_out_by_itself lists, in plain words, what now reaches Google without an approval. Turning a switch off is always safe. Owners and admins of the sub-account, with the Google tools add-on (403 addon_locked without it). - path `profile_id` (string, required): Google profile id (GET /v1/google-business/profiles). - body `replies_enabled` (boolean): Answer new reviews automatically. - body `replies_auto_min_stars` (number): 1-5: reviews with at least this many stars are answered without asking; 6: always ask first. - body `replies_tone` (string): The replies' tone. - body `posts_enabled` (boolean): Write Google posts ahead. - body `posts_auto_publish` (boolean): Publish them without an approval. - body `posts_per_week` (number): 1-7. - body `posts_hour` (number): 0-23, the business's clock. - body `posts_use_photos` (boolean): Use the business's photos on posts. - body `photos_enabled` (boolean): Add photos from the photo line to Google. - body `photos_per_week` (number): 1-14. - body `photos_hour` (number): 0-23. - example body: {"replies_auto_min_stars":6} ### Media - `DELETE /v1/media/{media_id}` — Delete a media file (scope workspaces:write) Deletes a file from the sub-account's Media page, as the page's delete does: the row, and its file only when it was uploaded into Media itself (files_removed; a tool result saved into Media points at the original ad's file, which stays). It cannot be undone. Owners and agency admins delete any file; a client admin only files they added themselves (403); other roles can't; a file that isn't shared with the client's team is a 404 to them. - path `media_id` (string, required): File id (GET /v1/media). ### Calendars & hours - `GET /v1/my-booking-link` — My booking link (scope bookings:read) The personal booking page of the person this key belongs to, in this sub-account (Calendars > My booking link): its url and settings, or booking_link: null when they have none. Never anyone else's. Anyone in the sub-account. - `PUT /v1/my-booking-link` — Make or change my booking link (scope bookings:write) For the person this key belongs to, in this sub-account. With none yet it makes one as the app's Create does (a 30-minute 'Book a call', its link name from their name plus four random characters) with anything sent laid over it (201); otherwise only what's sent changes. slug is the end of the link (lowercase letters, numbers and dashes, up to 40) and one namespace for everyone: 409 when taken. title up to 60, duration_minutes 5-240, buffer_minutes 0-120, max_days_ahead 1-60, meeting_type zoom, google_meet, phone, in_person or custom (meeting_location is the address or link), confirm_button_text up to 40, is_active: false pauses the page. Their hours and connected calendars are set in the app. Anyone in the sub-account. - body `slug` (string): The end of the link. - body `title` (string): The page's title. - body `description` (string): A few words under it. - body `duration_minutes` (number): 5-240. - body `buffer_minutes` (number): 0-120. - body `min_notice_minutes` (number): How soon someone can book. - body `max_days_ahead` (number): 1-60. - body `meeting_type` (string): Where it happens. - body `meeting_location` (string): The address, or the meeting link or note. - body `require_email` (boolean): Ask for an email. - body `require_phone` (boolean): Ask for a phone number. - body `confirm_button_text` (string): The button's words, up to 40 characters. - body `is_active` (boolean): false pauses the page. - example body: {"workspace_id":"uuid","title":"Roof inspection call","duration_minutes":20} ### CRM leads - `POST /v1/leads/import` — Import leads quietly (up to 500 a call) (scope leads:write) Adds a list of leads the way the Leads page's Import does: nothing is sent and nothing starts. No first text, no new-lead or tag automations, no AI calls, no team alerts, no lead.created webhook, no push to job software; "Leads imported" automations are not started from the API either. Each lead takes the fields of POST /v1/leads (full_name, email, phone, extra_phones, notes, address, city, state, zip, custom_fields, tags, status, stage_key, assigned_to, existing_customer, deal fields...) except source (always import) and run_intake; a lead needs a name, an email or a phone. tags go on every lead on top of its own (new tags are made; names are cut at 40 characters). existing_customers true adds them as existing customers: won with no sale date, out of the pipeline and every lead count. A lead imported as won gets no sale date unless deal_won_at is sent. Duplicates: a row whose email or phone (last 10 digits, main number or one of a lead's other numbers) is already in the sub-account, or earlier in the same call, is skipped and listed with the lead it matched; on_duplicate create imports it anyway where the sub-account allows a second record. Rows that can't be used are listed in refused with their index and why; the rest still go in. Send more than 500 in several calls. 201 when at least one lead went in, else 200. Owners and admins of the sub-account. - body `leads` (array, required): 1-500 leads, each an object with the fields of POST /v1/leads. - body `tags` (array): Tag names for every lead in this call. - body `existing_customers` (boolean): Add them as existing customers, not leads (a lead's own existing_customer wins). Default false. - body `on_duplicate` (string): skip (default) or create. - body `file_name` (string): Where the list came from (kept on each lead), up to 200 characters. - example body: {"workspace_id":"uuid","tags":["Spring list"],"leads":[{"full_name":"Jane Doe","email":"jane@example.com","phone":"+14155550123","city":"Tampa","tags":["VIP"]},{"full_name":"Sam Roe","phone":"(415) 555-0142"}]} - `POST /v1/leads/bulk` — One change on many leads (up to 500) (scope leads:write) The Leads page's bulk bar: one action on every lead in lead_ids. add_tags / remove_tags (tags by name; new ones are made; a lead holds 50 at most), set_stage (stage_key from GET /v1/stages; a lead that becomes won gets today's sale date unless it has one), assign (assigned_to: a member's user id from GET /v1/members, or null to unassign; goes on each lead's timeline; the agency owner can't be picked by someone else), set_existing_customer (existing_customer true | false; only the flag, the stage stays). Each lead is written exactly like PATCH /v1/leads/{lead_id} with that one field, so automations and webhooks that start on a tag, a stage or a status change run for each lead as usual. Every id must be a lead of this sub-account: any other id is refused as "Lead not found" and never touched. The answer says how many changed and lists the refused ids with why. No messages are sent by this route. Owners and admins of the sub-account. - body `lead_ids` (array, required): 1-500 lead ids. - body `action` (string, required): What to do to each of them. - body `tags` (array): add_tags, remove_tags: tag names. - body `stage_key` (string): set_stage: the stage's key. - body `assigned_to` (string): assign: a member's user id, or null to unassign. - body `existing_customer` (boolean): set_existing_customer: true or false. - example body: {"workspace_id":"uuid","lead_ids":["uuid","uuid"],"action":"add_tags","tags":["Spring promo"]} - `POST /v1/leads/bulk-delete` — Delete many leads for good (up to 500) (scope leads:admin) Deletes every lead in lead_ids, each the way DELETE /v1/leads/{lead_id} does. It can't be undone, so confirm: true is required. With delete_appointments true each lead's appointments are deleted first the way the calendar deletes one (the synced calendar event, the customer's cancellation notice, the reminders); without it they stay on the calendar with no lead. Every id must be a lead of this sub-account: any other id is refused as "Lead not found". The answer says how many were deleted and lists the refused ids. Needs an admin key, like deleting one lead. Owners and admins of the sub-account. - body `lead_ids` (array, required): 1-500 lead ids. - body `confirm` (boolean, required): Must be true. - body `delete_appointments` (boolean): Also delete the leads' appointments (tells each customer theirs is cancelled). Default false. - example body: {"workspace_id":"uuid","lead_ids":["uuid","uuid"],"confirm":true} ### Calls - `POST /v1/call-campaigns` — Create an AI calling campaign (always a draft) (scope messaging:write) Saves a new outbound AI calling campaign as a draft: nobody is enrolled and nothing is dialled. Starting or resuming a campaign places real, paid calls, so that is done in the app (Campaigns). Who it calls: audience_statuses (built-in stages: new, contacted, qualified, booked, partial; default new, contacted, partial), audience_stages (custom stage keys), audience_sources, audience_tag_ids, audience_created_within_days, audience_skip_booked (default true: leads with an appointment on the calendar are skipped); won, lost and spam leads, leads with no phone or a bad number, and leads who asked not to be called are never called. What the agent says: agent_name, goal, offer, greeting, script, extra_instructions, transfer_number, calendar_id; a field left out uses the sub-account's AI caller settings. When: call_days and call_window_start / call_window_end in the sub-account's time zone, run_days, start_at, max_attempts_per_lead, hours_between_attempts, daily_call_cap, max_concurrent_calls, stop_on_reply, spend_cap_credits. The calendar, tags and stages named must be the sub-account's own. Owners and admins of the sub-account. - body `name` (string, required): The campaign's name, up to 120 characters. - body `audience_statuses` (array): Built-in stages to call: new, contacted, qualified, booked, partial. Empty with no audience_stages = every open lead. - body `audience_stages` (array): Custom stage keys to call (GET /v1/stages). - body `audience_sources` (array): Only leads from these sources. - body `audience_tag_ids` (array): Only leads with one of these tags: ids from GET /v1/tags. - body `audience_created_within_days` (number): Only leads added in the last N days (1-3650), or null. - body `audience_skip_booked` (boolean): Skip leads with an appointment on the calendar. Default true. - body `rolling` (boolean): Keep adding new leads that match while it runs. Default true. - body `agent_name` (string): The agent's name, up to 80 characters. - body `goal` (string): What the call is for. - body `offer` (string): What the call is about, up to 4000 characters. - body `greeting` (string): The opening line, up to 2000 characters. - body `script` (string): What to say and ask, in order, up to 8000 characters. - body `extra_instructions` (string): Anything else the agent should know, up to 20,000 characters. - body `transfer_number` (string): A person's number the agent can put the lead through to, with its country code (+14155550123). Not the line the campaign calls from. null = no transfers. - body `calendar_id` (string): The calendar the agent books into (GET /v1/calendars). - body `max_call_seconds` (number): Longest call, 60-900 seconds. - body `voicemail_action` (string): On voicemail. - body `voicemail_message` (string): What to leave, up to 2000 characters. - body `start_at` (string): Earliest moment it may call once started (ISO date and time). - body `run_days` (number): How many days it runs once started, 1-90 (default 30). - body `call_days` (array): Days it may call: sun, mon, tue, wed, thu, fri, sat (default mon-fri). - body `call_window_start` (string): HH:MM (default 09:00). - body `call_window_end` (string): HH:MM (default 18:00). - body `max_attempts_per_lead` (number): 1-12 (default 4). - body `hours_between_attempts` (number): 1-72 (default 4). - body `daily_call_cap` (number): Calls a day, 1-1000 (default 100). - body `max_concurrent_calls` (number): Calls at once, 1-5 (default 1). - body `stop_on_reply` (boolean): Stop calling a lead who replies. Default true. - body `spend_cap_credits` (number): Stop after this many credits, or null for no cap. - example body: {"workspace_id":"uuid","name":"Winter check-in","audience_statuses":["contacted"],"audience_created_within_days":90,"goal":"book_appointment","offer":"a free winter roof inspection","call_days":["mon","tue","wed","thu"],"call_window_start":"10:00","call_window_end":"17:00","daily_call_cap":40} - `GET /v1/call-campaigns/{campaign_id}` — One AI calling campaign (scope messaging:read) The campaign whole: who it calls, what the agent says, when it calls, its progress (leads_total, calls_placed, calls_connected, bookings, credits_used) and audience_now: how many leads its rules match right now (who starting it would call). Owners and admins of the sub-account. - path `campaign_id` (string, required): Campaign id. - `PATCH /v1/call-campaigns/{campaign_id}` — Change an AI calling campaign (scope messaging:write) Changes only the fields sent (the fields of POST /v1/call-campaigns). Never its status: pausing is POST /v1/call-campaigns/{campaign_id}/pause, starting and resuming are done in the app. While the campaign is running, who it calls (the audience_ fields and rolling) can't change, because a running campaign calls whoever matches: 409, pause it first. Owners and admins of the sub-account. - path `campaign_id` (string, required): Campaign id. - body `name` (string): The campaign's name, up to 120 characters. - body `audience_statuses` (array): Built-in stages to call: new, contacted, qualified, booked, partial. Empty with no audience_stages = every open lead. - body `audience_stages` (array): Custom stage keys to call (GET /v1/stages). - body `audience_sources` (array): Only leads from these sources. - body `audience_tag_ids` (array): Only leads with one of these tags: ids from GET /v1/tags. - body `audience_created_within_days` (number): Only leads added in the last N days (1-3650), or null. - body `audience_skip_booked` (boolean): Skip leads with an appointment on the calendar. Default true. - body `rolling` (boolean): Keep adding new leads that match while it runs. Default true. - body `agent_name` (string): The agent's name, up to 80 characters. - body `goal` (string): What the call is for. - body `offer` (string): What the call is about, up to 4000 characters. - body `greeting` (string): The opening line, up to 2000 characters. - body `script` (string): What to say and ask, in order, up to 8000 characters. - body `extra_instructions` (string): Anything else the agent should know, up to 20,000 characters. - body `transfer_number` (string): A person's number the agent can put the lead through to, with its country code (+14155550123). Not the line the campaign calls from. null = no transfers. - body `calendar_id` (string): The calendar the agent books into (GET /v1/calendars). - body `max_call_seconds` (number): Longest call, 60-900 seconds. - body `voicemail_action` (string): On voicemail. - body `voicemail_message` (string): What to leave, up to 2000 characters. - body `start_at` (string): Earliest moment it may call once started (ISO date and time). - body `run_days` (number): How many days it runs once started, 1-90 (default 30). - body `call_days` (array): Days it may call: sun, mon, tue, wed, thu, fri, sat (default mon-fri). - body `call_window_start` (string): HH:MM (default 09:00). - body `call_window_end` (string): HH:MM (default 18:00). - body `max_attempts_per_lead` (number): 1-12 (default 4). - body `hours_between_attempts` (number): 1-72 (default 4). - body `daily_call_cap` (number): Calls a day, 1-1000 (default 100). - body `max_concurrent_calls` (number): Calls at once, 1-5 (default 1). - body `stop_on_reply` (boolean): Stop calling a lead who replies. Default true. - body `spend_cap_credits` (number): Stop after this many credits, or null for no cap. - example body: {"script":"Ask how the roof held up this winter, then offer the free inspection.","daily_call_cap":60} - `DELETE /v1/call-campaigns/{campaign_id}` — Delete an AI calling campaign (scope messaging:write) Deletes the campaign. Calls still queued for it are dropped first, so a deleted campaign never dials. Calls already made stay in the call log. Owners and admins of the sub-account. - path `campaign_id` (string, required): Campaign id. - `POST /v1/call-campaigns/audience` — Count who a calling campaign would call (scope messaging:read) A count only, nobody is called: how many leads a set of audience rules would call right now (would_call), by the same rules a campaign enrols with, and who is held back: handed_to_a_person (the AI passed them to the team), asked_not_to_be_called, paused_by_the_team, bad_number, no_phone, has_an_appointment. by_stage splits would_call when more than one stage is picked. With no rules sent it counts every open lead with no appointment. Owners and admins of the sub-account. - body `audience_statuses` (array): Built-in stages: new, contacted, qualified, booked, partial. - body `audience_stages` (array): Custom stage keys. - body `audience_sources` (array): Only leads from these sources. - body `audience_tag_ids` (array): Only leads with one of these tags (ids). - body `audience_created_within_days` (number): Only leads added in the last N days. - body `audience_skip_booked` (boolean): Skip leads with an appointment on the calendar. Default true. - example body: {"workspace_id":"uuid","audience_statuses":["new","contacted"],"audience_created_within_days":60} ### Messaging - `GET /v1/text-campaigns` — List AI texting campaigns (scope messaging:read) A sub-account's AI texting campaigns, newest first: who each texts, its goal and instructions, its texting hours, why it is paused or held (paused_because, on_hold), what keeps a draft from starting (start_problems: no texting number, rules that match nobody, nothing for the AI to say) and where its people stand (people: total, queued, waiting, replied, goal, needs_you, opted_out, no_reply, texted, replied_ever, texts_sent, first_today, next_send_at, goal_reached). Drafts carry matching_now: how many people starting it would text. Owners and admins of the sub-account. - query `status` (string): Only campaigns in this status. - `POST /v1/text-campaigns` — Create an AI texting campaign (always a draft) (scope messaging:write) Saves a new texting campaign as a draft: nobody is texted until POST /v1/text-campaigns/{campaign_id}/start. The AI writes each person's first text from what's on file (or sends your first_message), follows up with the ones who don't answer, and answers every reply with this campaign's goal and instructions, which win over the account's AI settings for these conversations (even with the account's AI texts off). A preset fills the name, goal and who it texts (not_booked: leads who never booked; win_back: Lost leads quiet 30+ days; past_customers; gone_quiet); with no preset and no audience it texts leads who never booked. Every value is checked and a wrong one refused with the allowed ones. The calendar and tags must be the sub-account's own. Owners and admins of the sub-account. - body `preset` (string): A ready-made audience (GET /v1/text-campaigns/setup). - body `name` (string): Up to 120 characters. Default: the preset's name. - body `audience` (object): Who it texts: stages (board columns: new, contacted, partial, qualified, booked, won, lost or a custom stage key; spam is never texted), sources, tag_ids (GET /v1/tags), skip_booked (default true), customers exclude | include | only (existing customers and Won leads), created_within_days, older_than_days, quiet_days (nothing either way for N days), skip_texted_days. A rule sent is laid over the preset's (or the campaign's) own. - body `rolling` (boolean): Keep adding new leads who match while it runs. Default false. - body `goal` (string): What the AI works towards in replies. Default book. - body `offer` (string): What the campaign is about, up to 1,500 characters. - body `instructions` (string): How the AI should text these people, up to 4,000 characters. Wins over the account's AI instructions in these conversations. - body `agent_name` (string): The name the AI texts as, up to 40 characters. Default the account's. - body `calendar_id` (string): The calendar it books into (GET /v1/calendars). Default the account's. - body `reply_mode` (string): auto answers replies by itself; approve has each reply wait for the team. Default auto. - body `first_message_mode` (string): ai writes each person's first text; template sends first_message. Default ai. - body `first_message` (string): Your own first text, up to 480 characters, with {first_name}, {business} and the other variables of GET /v1/text-campaigns/setup. - body `opt_out_line` (boolean): End the first text with Reply STOP to opt out. Default true. - body `follow_ups` (number): Follow-ups to people who don't answer, 0-4. Default 2. - body `follow_up_gap_days` (number): Days between texts, 1-14. Default 2. - body `follow_up_texts` (array): Your own follow-ups, in order; "" lets the AI write that one. - body `nudge_quiet` (boolean): One nudge when a conversation stops on our side for a day. Default true. - body `send_days` (array): Days it may text: mon, tue, wed, thu, fri, sat, sun. Default mon-sat. - body `send_start` (string): HH:MM in the sub-account's time zone. Default 09:00. - body `send_end` (string): HH:MM, at least an hour after send_start. Default 19:00. - body `daily_cap` (number): New people texted a day, 1-1000. Default 100. - body `run_days` (number): How many days it runs once started, 1-120. Default 30. - body `start_at` (string): Earliest moment it may text once started (ISO date and time). - example body: {"workspace_id":"uuid","preset":"win_back","offer":"15% off any repair this month","instructions":"Lead with the special. Short and casual."} - `GET /v1/text-campaigns/setup` — What a texting campaign starts from (scope messaging:read) The sub-account's texting number (has_texting_number: a campaign can't start without one), daily texting limit, its account-level AI (texts_on, goal, agent_name, reply_mode, instructions: what a campaign's own settings win over), prices in credits (a text, an AI reply), the ready-made audiences with how many people each would text now (presets[].matching_now), the goals and the variables a text may use. Owners and admins of the sub-account. - `POST /v1/text-campaigns/audience` — Count who a texting campaign would text (scope messaging:read) A count only, nobody is texted: how many people a set of rules would text right now (would_text), by the same rule a campaign enrols with, and who is held back and why (held_back: no_phone, cant_text, team: the AI is paused for them, other_campaign: in another live texting campaign, recent: heard from you recently; held_back_words says it in words), with up to three first names it would text. Rules: a preset, a campaign's own (campaign_id), or audience; audience is laid over either. Owners and admins of the sub-account. - body `preset` (string): Start from a ready-made audience. - body `campaign_id` (string): Start from this campaign's own rules. - body `audience` (object): Who it texts: stages (board columns: new, contacted, partial, qualified, booked, won, lost or a custom stage key; spam is never texted), sources, tag_ids (GET /v1/tags), skip_booked (default true), customers exclude | include | only (existing customers and Won leads), created_within_days, older_than_days, quiet_days (nothing either way for N days), skip_texted_days. A rule sent is laid over the preset's (or the campaign's) own. - example body: {"workspace_id":"uuid","preset":"not_booked","audience":{"quiet_days":7}} - `POST /v1/text-campaigns/preview` — A sample text for one real lead (scope messaging:read) Writes the text a campaign would send one real lead, as the editor's phone preview does: the campaign's saved settings (campaign_id) with any campaign field sent laid over them, or a draft of fields alone. step first (default) or follow_up (follow_up: which one, 1-4; earlier: the texts it would already have sent). lead_id picks whose text; left out, someone the campaign would text. Nothing is saved or sent. When the AI can't write it, text is null and could_not_write says why. Owners and admins of the sub-account. - body `campaign_id` (string): Use this campaign's saved settings. - body `step` (string): Which text. Default first. - body `follow_up` (number): Which follow-up, 1-4. - body `lead_id` (string): Whose text. - body `earlier` (array): For a follow-up: up to 4 texts the campaign already sent them. - body `offer` (string): Any field of POST /v1/text-campaigns overrides the saved one for this sample. - example body: {"workspace_id":"uuid","campaign_id":"uuid"} - `GET /v1/text-campaigns/{campaign_id}` — One AI texting campaign (scope messaging:read) The campaign whole (the fields of POST /v1/text-campaigns), where its people stand (people), whether it is inside its texting hours now (texting_now, window_opens_at), matching_now and held_back_now: who its rules match right now, start_problems: what would stop a start (no texting number, a draft whose rules match nobody, nothing for the AI to say), and what_start_does: what starting it would do, in words to read to the person before they say yes. Owners and admins of the sub-account. - path `campaign_id` (string, required): Campaign id. - `PATCH /v1/text-campaigns/{campaign_id}` — Change an AI texting campaign (scope messaging:write) Changes only the fields sent (the fields of POST /v1/text-campaigns; audience rules are laid over the campaign's own). Never its status: that is start, pause and stop. While the campaign is texting, who it texts (audience, rolling) can't change: 409, pause it first. Owners and admins of the sub-account. - path `campaign_id` (string, required): Campaign id. - body `preset` (string): A ready-made audience (GET /v1/text-campaigns/setup). - body `name` (string): Up to 120 characters. Default: the preset's name. - body `audience` (object): Who it texts: stages (board columns: new, contacted, partial, qualified, booked, won, lost or a custom stage key; spam is never texted), sources, tag_ids (GET /v1/tags), skip_booked (default true), customers exclude | include | only (existing customers and Won leads), created_within_days, older_than_days, quiet_days (nothing either way for N days), skip_texted_days. A rule sent is laid over the preset's (or the campaign's) own. - body `rolling` (boolean): Keep adding new leads who match while it runs. Default false. - body `goal` (string): What the AI works towards in replies. Default book. - body `offer` (string): What the campaign is about, up to 1,500 characters. - body `instructions` (string): How the AI should text these people, up to 4,000 characters. Wins over the account's AI instructions in these conversations. - body `agent_name` (string): The name the AI texts as, up to 40 characters. Default the account's. - body `calendar_id` (string): The calendar it books into (GET /v1/calendars). Default the account's. - body `reply_mode` (string): auto answers replies by itself; approve has each reply wait for the team. Default auto. - body `first_message_mode` (string): ai writes each person's first text; template sends first_message. Default ai. - body `first_message` (string): Your own first text, up to 480 characters, with {first_name}, {business} and the other variables of GET /v1/text-campaigns/setup. - body `opt_out_line` (boolean): End the first text with Reply STOP to opt out. Default true. - body `follow_ups` (number): Follow-ups to people who don't answer, 0-4. Default 2. - body `follow_up_gap_days` (number): Days between texts, 1-14. Default 2. - body `follow_up_texts` (array): Your own follow-ups, in order; "" lets the AI write that one. - body `nudge_quiet` (boolean): One nudge when a conversation stops on our side for a day. Default true. - body `send_days` (array): Days it may text: mon, tue, wed, thu, fri, sat, sun. Default mon-sat. - body `send_start` (string): HH:MM in the sub-account's time zone. Default 09:00. - body `send_end` (string): HH:MM, at least an hour after send_start. Default 19:00. - body `daily_cap` (number): New people texted a day, 1-1000. Default 100. - body `run_days` (number): How many days it runs once started, 1-120. Default 30. - body `start_at` (string): Earliest moment it may text once started (ISO date and time). - example body: {"instructions":"Offer two times this week. Never bring up price first.","daily_cap":60} - `DELETE /v1/text-campaigns/{campaign_id}` — Delete an AI texting campaign (scope messaging:write) Deletes the campaign and its list of people. Texts already sent stay in each conversation, and its people's replies go back to the account's AI settings. Owners and admins of the sub-account. - path `campaign_id` (string, required): Campaign id. - `POST /v1/text-campaigns/{campaign_id}/duplicate` — Copy an AI texting campaign (scope messaging:write) A draft copy of the campaign's settings, named "(copy)": nobody is texted until it is started. Owners and admins of the sub-account. - path `campaign_id` (string, required): Campaign id. - `POST /v1/text-campaigns/{campaign_id}/start` — Start or resume an AI texting campaign (texts real people) (scope messaging:write) TEXTS REAL PEOPLE from the sub-account's number and spends credits, so confirm: true is required; an assistant must tell the person which campaign, how many people it would text (matching_now on GET /v1/text-campaigns/{campaign_id}) and when, and get a clear yes first. Starts a draft, resumes a paused campaign, or runs a finished one again with a fresh run window: everyone who matches its rules now is added and texted inside its texting hours, at most daily_cap new people a day. Refused (409) when it is already texting, the sub-account has no texting number, nobody matches, or something it needs is missing (start_problems); (402) when the account is out of credits. Answers added_people. Owners and admins. - path `campaign_id` (string, required): Campaign id. - body `confirm` (boolean, required): Must be true: real texts will go out and credits are spent. - example body: {"confirm":true} - `POST /v1/text-campaigns/{campaign_id}/pause` — Pause an AI texting campaign (scope messaging:write) No more texts until it is started again. Replies are still answered by the campaign's AI. Only a running campaign can be paused (409). Owners and admins of the sub-account. - path `campaign_id` (string, required): Campaign id. - `POST /v1/text-campaigns/{campaign_id}/stop` — Finish an AI texting campaign (scope messaging:write) Finishes it: nobody else is texted, people waiting for a follow-up are marked no reply, and conversations already going keep the campaign's AI. A draft is deleted instead (409). Start runs it again. Owners and admins of the sub-account. - path `campaign_id` (string, required): Campaign id. - `GET /v1/text-campaigns/{campaign_id}/people` — Who is in an AI texting campaign (scope messaging:read) 50 people at a time: each one's lead, state (queued: up next, waiting: texted, replied, goal, needs_you: with the team, opted_out, no_reply, stopped, skipped, failed) in words, why they left, texts and follow-ups sent, when the next text goes, their last text and last reply. Owners and admins of the sub-account. - path `campaign_id` (string, required): Campaign id. - query `filter` (string): Default all. - query `q` (string): A name or phone. - query `offset` (number): Skip this many (next_offset of the last page). - `DELETE /v1/text-campaigns/{campaign_id}/people/{lead_id}` — Take a person out of an AI texting campaign (scope messaging:write) The campaign texts them no more. Someone already finished with it answers removed: false. Owners and admins of the sub-account. - path `campaign_id` (string, required): Campaign id. - path `lead_id` (string, required): Lead id. ### Calls - `GET /v1/ai-calling` — The AI caller's settings (scope messaging:read) The always-on AI caller of a sub-account (Settings > AI calling): whether it is on, whether it calls new leads by itself, what it says and when it calls. Shows the app's defaults until someone saves. The voice is picked in the app. Owners and admins of the sub-account. - `PATCH /v1/ai-calling` — Change the AI caller's settings (scope messaging:write) Changes only the settings sent. With enabled and auto_enroll_new_leads both true, new leads that match eligible_sources and eligible_statuses (empty = all) are called by the AI caller by itself, first_call_delay_minutes after they come in, inside call_days and the call window; those calls cost credits like any AI call, so turn them on only when the business asked for it. default_calendar_id must be one of the sub-account's calendars. Owners and admins of the sub-account. - body `enabled` (boolean): The AI caller on or off. - body `auto_enroll_new_leads` (boolean): Call new leads by itself. - body `agent_name` (string): Up to 80 characters. - body `goal` (string): What a call is for. - body `greeting` (string): The opening line, up to 2000 characters; null for the usual one. - body `offer` (string): What the call is about, up to 4000 characters. - body `extra_instructions` (string): Up to 20,000 characters. - body `call_days` (array): sun, mon, tue, wed, thu, fri, sat. - body `call_window_start` (string): HH:MM in the sub-account's time zone. - body `call_window_end` (string): HH:MM. - body `first_call_delay_minutes` (number): 0-1440. - body `max_attempts_per_day` (number): 1-10. - body `hours_between_attempts` (number): 1-72. - body `max_total_attempts` (number): 1-20. - body `attempt_jitter_minutes` (number): 0-60: tries land a little before or after the hour. - body `taper_enabled` (boolean): Space later tries further apart. - body `max_call_seconds` (number): 60-900. - body `stop_on_reply` (boolean): Stop calling a lead who replies. - body `voicemail_action` (string): On voicemail. - body `voicemail_message` (string): Up to 2000 characters. - body `eligible_sources` (array): Only leads from these sources; empty = all. - body `eligible_statuses` (array): Only leads in these stages; empty = all. - body `default_calendar_id` (string): The calendar the agent books into, or null. - example body: {"workspace_id":"uuid","agent_name":"Riley","call_window_start":"09:00","call_window_end":"18:00","max_total_attempts":6} ### Contracts - `POST /v1/contract-templates` — Create a contract template (scope leads:write) A new template in the sub-account's Contracts (Tools > Contracts > Templates), ready for POST /v1/contracts. Send the text as body_html (HTML) or body (plain text with markdown: # headings, - or 1. lists, **bold**, *italic*). Write {{client_name}}, {{price}}, {{start_date}} and the like where a value goes: each becomes a blank (variables / blanks in the answer) filled when a contract is made. HTML is cleaned before it is saved, to exactly what the signing page shows: headings, paragraphs, lists, tables, bold / italic / underline, links (https, mailto, tel), https pictures, drawn-signature SVG paths and simple inline styles (alignment, colors, margins, fonts) stay; scripts, styles, forms, frames, event handlers and javascript: or data: links are removed, and unknown tags keep only their words. The answer's body_html is what was saved. Up to 200,000 characters. Optional step after signing: booking_enabled with booking_calendar_id (one of the sub-account's calendars), booking_heading, booking_message. Any member of the sub-account, as on the Contracts page. - body `name` (string, required): The template's name, up to 160 characters. - body `body_html` (string): The contract's text as HTML (cleaned before saving). Or body. - body `body` (string): The contract's text as plain text with markdown. Or body_html. - body `description` (string): What it is for, up to 500 characters. - body `category` (string): A label to group templates by, up to 60 characters. - body `booking_enabled` (boolean): After signing, offer a calendar to book on. Needs booking_calendar_id. - body `booking_calendar_id` (string): The calendar to book on (GET /v1/calendars). - body `booking_heading` (string): Heading over the calendar, up to 120 characters. - body `booking_message` (string): A line under it, up to 600 characters. - example body: {"workspace_id":"uuid","name":"Roofing agreement","category":"Roofing","body":"# Roofing agreement\n\nThis agreement is between {{business_name}} and {{client_name}}.\n\n## Scope\n\n- Replace the roof at {{client_address}}\n- Start on {{start_date}}\n\n## Price\n\n**{{price}}**, half due before work starts."} - `GET /v1/contract-templates/{template_id}` — One contract template (scope leads:read) The template with its text (body_html), its {{blanks}} and its booking step. Only the sub-account's own templates: the agency's are not reachable here. Any member of the sub-account. - path `template_id` (string, required): Template id. - `PATCH /v1/contract-templates/{template_id}` — Change a contract template (scope leads:write) Changes only what is sent: name, description, category, the text (body_html or body, cleaned like on create; the blanks are worked out again) or the booking step (send booking_enabled with it; booking_enabled false turns it off). Contracts already made from the template keep their own text. Any member of the sub-account. - path `template_id` (string, required): Template id. - body `name` (string): Up to 160 characters. - body `body_html` (string): The new text as HTML. Or body. - body `body` (string): The new text as plain text with markdown. Or body_html. - body `description` (string): Up to 500 characters; null clears it. - body `category` (string): Up to 60 characters; null clears it. - body `booking_enabled` (boolean): The booking step on or off; send it with any booking field. - body `booking_calendar_id` (string): The calendar to book on. - body `booking_heading` (string): Up to 120 characters. - body `booking_message` (string): Up to 600 characters. - example body: {"name":"Roofing agreement (2027)","description":"For full roof replacements"} - `DELETE /v1/contract-templates/{template_id}` — Delete a contract template (scope leads:write) Deletes the template. Contracts already made from it are not touched: each keeps its own text. Any member of the sub-account. - path `template_id` (string, required): Template id. ### Sub-account setup - `GET /v1/brand-settings` — Get a sub-account's CRM brand (scope workspaces:read) Settings > Branding: the logo (also the browser icon), the home-screen app icon, whether the sub-account has its own installable app and its name, the CRM's own name, accent colour and hide-logo switch, and the sign-in page on the business's own domain (headline, text, color, image_url). agency_only lists the fields only the agency side may change. Any member of the sub-account. - `PATCH /v1/brand-settings` — Update a sub-account's CRM brand (scope workspaces:write) Changes only what is sent; everything else about the brand is kept. logo_url is also saved as the browser icon and as the sub-account's logo on lists, invoices and contracts; null removes it (and the app icon with it). Links must be public https links. app_install_enabled, app_name, brand_name, accent_color and hide_logo are the agency's: a client admin gets 403 on them. Owners and admins. - body `logo_url` (string): Logo, an https link (null removes it). - body `app_icon_url` (string): The square home-screen icon, an https link. Needs a logo. - body `sign_in_page` (object): { headline (80), text (240), color (hex), image_url (https) }: any of them; null clears one. - body `app_install_enabled` (boolean): Agency only: the sub-account gets its own Add to Home Screen app. - body `app_name` (string): Agency only: that app's name, up to 40 characters. - body `brand_name` (string): Agency only: the name the CRM shows for this sub-account, up to 60 characters. - body `accent_color` (string): Agency only: a hex colour like #0f172a. - body `hide_logo` (boolean): Agency only: hide the logo in the CRM's menu. - example body: {"workspace_id":"uuid","logo_url":"https://cdn.example.com/logo.png","sign_in_page":{"headline":"Welcome back","color":"#0f172a"}} - `GET /v1/custom-menu` — Get the CRM's custom menu links (scope workspaces:read) The custom links in a sub-account's CRM menu: agency_items (the agency's, shown in every sub-account, read only here) and items (the sub-account's own), each { id, label, kind (link | code), url, mode (embed | new_tab | same_tab), icon, audience (everyone | admins) } and, for kind code, the pasted embed code. Links for admins only are left out for staff. Any member of the sub-account. - `PUT /v1/custom-menu` — Set the CRM's custom menu links (scope workspaces:write) Replaces the sub-account's own menu links (the agency's stay). Up to 12 items, each { label (up to 40 characters), url } for a link (http or https; it may use {workspace_id}, {workspace_name}, {user_email}, {user_name}) or { label, kind: "code", code } for pasted embed code (up to 20,000 characters, always shown as its own page). Optional: id (kept so a link's address stays the same), mode (embed (default) | new_tab | same_tab), icon (favicon (default), link, globe, layout, chart, file, folder, video, book, calendar, chat, cart, star, wrench, briefcase, graduation, or lucide:), audience (everyone (default) | admins). An empty list removes them all. Owners and admins. - body `items` (array, required): The links, in order. - example body: {"workspace_id":"uuid","items":[{"label":"Reports","url":"https://reports.example.com/?account={workspace_id}","mode":"embed","icon":"chart","audience":"admins"}]} ### Workspaces - `GET /v1/refer` — A sub-account's referral link and rewards (scope workspaces:read) The sub-account's Refer & earn page: on (false when there is no referral program right now, and nothing else is sent), its link and code, the reward it earns (reward) out of reward_options, where it wants payouts sent, how long rewards are earned, the people it referred (paying or not) and its rewards with their status (pending, ready, paid). Owners and admins of the sub-account. A sub-account key gets 403 feature_off when Refer & earn is hidden from the account's people. ### Sub-account setup - `GET /v1/crm-connections` — List connected job software and CRM tools (scope workspaces:read) The tools a sub-account connected in Settings > Integrations: provider, connected, sends_new_leads and sends_appointments (it gets them by itself), leads_arrive_as, tags, source_name, reads_status_changes, reads_revenue, last_error. Never a key. Connecting a tool or changing its key is done in the app. People who manage the sub-account. ### CRM leads - `GET /v1/leads/{lead_id}/crm` — Which connected tools have a lead (scope leads:read) For each tool the sub-account connected: connection_id, provider, name, external_id (the tool's own id for the lead, null when it doesn't have it), synced_at, url (a link to open it there, where the tool's address is known), last_error and auto_push. Anyone who can open the lead (a technician only their own). - path `lead_id` (string, required): The lead. - `POST /v1/leads/{lead_id}/push-to-crm` — Send a lead to a connected tool now (scope leads:write) The lead panel's Push to CRM: sends the lead to one connected tool even when it doesn't get new leads by itself. A tool that already has the lead keeps its record and no second one is made (already_there true). pushed false carries the tool's own error. Anyone who can open the lead. - path `lead_id` (string, required): The lead. - body `connection_id` (string, required): The tool (connection_id from GET /v1/leads/{lead_id}/crm or id from GET /v1/crm-connections). - example body: {"connection_id":"uuid"} ### Sub-account setup - `GET /v1/email-domains` — List email sending domains (scope workspaces:read) The sub-account's own sending domains (Settings > Email): verified, is_default, and dns_records { dkim, return_path, dmarc }, each { type, host, value, verified }: the records to add at the domain's registrar. People who manage the sub-account. - `POST /v1/email-domains` — Add an email sending domain (scope workspaces:write) Registers a domain for sending the sub-account's emails and answers the DNS records to add. The first one becomes the default. 409 when the domain is already set up, here or in another account. People who manage the sub-account. - body `domain` (string, required): The domain, like mail.acme.com. - example body: {"workspace_id":"uuid","domain":"mail.acme.com"} - `POST /v1/email-domains/{domain_id}/verify` — Check an email domain's DNS records (scope workspaces:write) Looks the DNS records up again and answers the domain with each record's verified. Emails go from the domain once it is verified. DNS changes can take from a few minutes to an hour. People who manage the sub-account. - path `domain_id` (string, required): The domain (GET /v1/email-domains). - `POST /v1/email-domains/{domain_id}/default` — Send from this email domain (scope workspaces:write) Makes this the sub-account's default sending domain. People who manage the sub-account. - path `domain_id` (string, required): The domain (GET /v1/email-domains). - `DELETE /v1/email-domains/{domain_id}` — Remove an email sending domain (scope workspaces:write) Removes the domain; the sub-account's emails go from its agency's domain or the shared one again. People who manage the sub-account. - path `domain_id` (string, required): The domain (GET /v1/email-domains). ### AI agent - `GET /v1/ai-agents` — List AI agents (scope workspaces:read) The sub-account's AI agents: named assistants that watch a connected email inbox, sort new mail and answer customers. Each has its settings, mailbox (provider gmail | outlook, account_email, status; null until an inbox is connected in the app), working (on, with a healthy inbox) and waiting_for_you (emails a person has to act on). Any member of the sub-account. While AI Agents is in its beta, accounts that are not on it get 404 on every AI agent route. - `POST /v1/ai-agents` — Create an AI agent (scope workspaces:write) Makes an agent. Only name is required; it starts switched off, in approve mode (every reply waits as a draft). It answers email once an inbox is connected to it on its page in the app (a sign-in with Google or Microsoft, which the API can't do) and it is switched on. Up to 50 agents a sub-account. Owners and admins. - body `name` (string, required): The agent's name, up to 60 characters. - body `role` (string): Its job title (default Email assistant), up to 80 characters. - body `avatar_url` (string): An https link to its picture. - body `instructions` (string): How it should answer, up to 6,000 characters. - body `signature` (string): The sign-off under its emails, up to 600 characters. - body `enabled` (boolean): On or off (default off). - body `reply_mode` (string): approve: every reply waits as a draft. auto: customer emails are answered straight away, anything unclear still waits. - body `can_book` (boolean): May it book appointments (default true). - body `daily_reply_cap` (number): Most replies a day, 1-1000 (default 100). - example body: {"workspace_id":"uuid","name":"Ava","role":"Email assistant","instructions":"Keep replies short and friendly. Always offer a time to come out.","signature":"Ava\nCastillo Roofing"} - `GET /v1/ai-agents/{agent_id}` — Get an AI agent (scope workspaces:read) One agent: its settings, its inbox and how many emails wait for a person. Any member of the sub-account. - path `agent_id` (string, required): Agent id. - `PATCH /v1/ai-agents/{agent_id}` — Update an AI agent (scope workspaces:write) Changes only what is sent: name, role, avatar_url, instructions, signature, enabled, reply_mode (approve | auto), can_book, daily_reply_cap (1-1000). Switching reply_mode to auto lets it answer customer emails without anyone reading them first. Owners and admins. - path `agent_id` (string, required): Agent id. - body `name` (string): Name. - body `role` (string): Job title. - body `instructions` (string): How it should answer. - body `signature` (string): Sign-off. - body `enabled` (boolean): On or off. - body `reply_mode` (string): approve or auto. - body `can_book` (boolean): May it book appointments. - body `daily_reply_cap` (number): Most replies a day, 1-1000. - example body: {"instructions":"Never quote a price. Offer a free visit instead.","daily_reply_cap":50} - `DELETE /v1/ai-agents/{agent_id}` — Delete an AI agent (scope workspaces:write) Deletes the agent. Its inbox connection and its list of emails go with it; contacts and their conversations stay. Owners and admins. - path `agent_id` (string, required): Agent id. - `GET /v1/ai-agents/{agent_id}/emails` — List an AI agent's emails (scope workspaces:read) The emails the agent looked at, newest first, and what it did with each: category (customer | owner | ignore), summary, urgent, status (new | working | replied | draft | needs_you | skipped | failed | dismissed), status_reason, needs_a_person, the drafted reply (draft), the reply that went out (reply) and the contact (lead_id). Emails made with try are left out unless include_tests=true. Any member of the sub-account. - path `agent_id` (string, required): Agent id. - query `status` (string): One or more statuses, comma-separated (draft,needs_you,failed = what waits for a person). - query `include_tests` (boolean): true to include try emails. - query `limit` (number): 1-200 (default 50). - `POST /v1/ai-agents/{agent_id}/try` — Try an AI agent on a made-up email (scope workspaces:write) The agent page's Try it: the agent sorts a made-up email and drafts the reply it would write. Nothing is sent, nothing stays in the CRM and nothing is charged. Answers status and the email with its draft. Owners and admins. - path `agent_id` (string, required): Agent id. - body `body` (string, required): The email's text. - body `from_name` (string): Who it is from. - body `from_email` (string): Their address (default customer@example.com). - body `subject` (string): Its subject. - example body: {"from_name":"Jenna Morales","subject":"Quote?","body":"Hi there, how much do you charge to come out and take a look? Do you have anything open this week?"} - `POST /v1/ai-agent-emails/{email_id}/approve` — Send an AI agent's drafted reply (scope workspaces:write) Sends the drafted reply to the customer from the agent's connected inbox, or body when given (an edited reply). A draft that books an appointment, sent unchanged, books it. Refused for try emails, emails with no contact or no inbox, and with 409 when someone already answered the thread from the inbox itself (the email is then marked handled). An email already replied to answers replied and sends nothing. Owners and admins. - path `email_id` (string, required): Email id (from the agent's emails). - body `body` (string): The reply to send instead of the draft. - `POST /v1/ai-agent-emails/{email_id}/dismiss` — Dismiss an AI agent's email (scope workspaces:write) Marks the email handled without a reply. Owners and admins. - path `email_id` (string, required): Email id. - `POST /v1/ai-agent-emails/{email_id}/retry` — Retry a failed AI agent email (scope workspaces:write) Runs a failed email again (only status failed). The agent sorts it and drafts a reply; in auto mode, with the agent on, it answers the customer straight away. Owners and admins. - path `email_id` (string, required): Email id. ### CRM leads - `POST /v1/leads/merge` — Merge duplicate leads into one (cannot be undone) (scope leads:admin) The Leads page's Merge: the leads in merge_ids are merged into keep_id and then deleted for good, so confirm: true is required. Blank fields on the kept lead (full_name, email, phone, notes, source, utm_source, utm_medium, utm_campaign, assigned_to, gclid, gbraid, wbraid) are filled from the merged leads, oldest first; a field the kept lead already has is never changed, and a merged lead's own phone or email is not kept as a second one (add it to the kept lead's extra_phones yourself if it matters). The merged leads' tags go onto the kept lead, and their timeline (notes, texts, emails, calls), appointments, estimates, invoices, deals in extra pipelines, form submissions, website visits and queued follow-ups are re-pointed at it. Nothing is sent to anyone and no stage changes. It all happens together or not at all. The answer lists the fields filled (`filled`; `fill_refused` true when the fill could not be saved, which happens when a merged lead's phone would have been copied: check the kept lead then), how many rows moved per kind (`moved`) and any kind that could not be moved (`not_moved`). Every id must be a lead of this sub-account: any other id answers 404 with the ids in details.not_found and nothing is touched. Up to 20 leads merged in a call. Needs an admin key, like deleting leads. Owners and admins of the sub-account. - body `keep_id` (string, required): The lead to keep. - body `merge_ids` (array, required): 1-20 lead ids to merge into keep_id. They are deleted. - body `confirm` (boolean, required): Must be true. - example body: {"workspace_id":"uuid","keep_id":"uuid","merge_ids":["uuid","uuid"],"confirm":true} ### Calls - `POST /v1/call-campaigns/{campaign_id}/start` — Start or resume an AI calling campaign (places real calls) (scope messaging:write) PLACES REAL PHONE CALLS to real people and spends credits, so confirm: true is required; an assistant must tell the person which campaign and how many leads it would call (audience_now on GET /v1/call-campaigns/{campaign_id}) and get a clear yes first. Starts a draft, resumes a paused campaign, or runs a finished one again with a fresh run window: everyone who matches its audience now is put in line and called inside its calling hours. Refused (409) when the sub-account has no phone line that can place calls or the campaign is already running, (402) when it is out of credits. POST /v1/call-campaigns/{campaign_id}/pause stops it. Answers the campaign's status, run window and leads_total. Owners and admins. - path `campaign_id` (string, required): Campaign id. - body `confirm` (boolean, required): Must be true: real calls will be placed and credits spent. - example body: {"confirm":true} - `POST /v1/call-campaigns/{campaign_id}/recall` — Call a campaign's leads again (places real calls) (scope messaging:write) The campaign's "Call them again". LEADS ARE CALLED when the campaign is running or start is true, so confirm: true is required and an assistant must get a clear yes from the person first. Puts leads back in line: new audience matches are added and finished leads with tries left are queued again. Leads who asked not to be called, said not interested, were paused by the team, have a bad number or are won, lost or booked are never queued (blocked); only a hand-off to a person is lifted (unpaused). Leads that already had every try stay finished (at_limit) unless fresh: true gives them the full number of tries again. The campaign's status only changes with start: true (a draft, a finished campaign or one paused by a person then starts, with the same checks as start). Owners and admins. - path `campaign_id` (string, required): Campaign id. - body `confirm` (boolean, required): Must be true: leads are put back in line to be called. - body `start` (boolean): Also start the campaign so they are called. Default false. - body `fresh` (boolean): Start from scratch: finished leads get the full number of tries again. Default false. - example body: {"confirm":true,"start":false} ### Invoices & reviews - `POST /v1/invoices/{invoice_id}/payment-link` — Make an invoice's card payment page (scope billing:write) Sets up card payment for the invoice on the business's own connected payment processor (Settings > Integrations) and answers payment_url. Made for the invoice as it is now; an earlier unpaid page for the same invoice is cancelled, so it can't be paid twice. With authorize_net and whop the customer pays from the invoice's own page (pays_on_invoice_page true; the page opens once the invoice is sent). gateway left out: the processor the invoice already uses, else the sub-account's default, else whichever is connected with card payments on invoices switched on. Nothing is charged by this call. 409 when the invoice is paid or cancelled, has no customer email, card payment is off for it, its total is under the processor's minimum, or no processor is ready. Never answers a key or the processor's own ids. Owners and admins. - path `invoice_id` (string, required): Invoice id. - body `gateway` (string): Which connected processor. Default: the invoice's, else the sub-account's default. - example body: {} ### Meta - `GET /v1/lead-feedback/datasets` — Lead quality feedback: the datasets to choose from (scope meta:read) The Meta datasets on the sub-account's ad accounts, CRM ones first: id, name, is_crm (false = a website pixel), last_event_at, made_by_ad_account. ad_accounts carry own_dataset_id and can_create (Meta lets an ad account make one dataset this way; with one there, connect it instead). saved_dataset_id is the one lead stages go to now. suggested_dataset_id is set only when nothing is saved and there is exactly one CRM dataset; a website pixel is never suggested. problem says what stands in the way (Facebook not connected, no ad account picked). Owners and admins. - `POST /v1/lead-feedback/datasets` — Lead quality feedback: make a CRM dataset and connect it (scope meta:write) Makes a new dataset on one of the sub-account's ad accounts, saves it as where lead stages are sent, switches lead quality feedback on and sends Meta one event of each stage (Lead, QualifiedLead, Schedule, Purchase, DisqualifiedLead) for a made-up person, never a real lead, so they show in Events Manager. Meta treats it as a CRM dataset only after one step the person does in Events Manager (next_step, events_manager_url). 409 when that ad account already made its one dataset (details.own_dataset_id: connect it with PUT /v1/lead-feedback/dataset), when Meta refuses, or when another dataset is already saved and replace isn't true. Owners and admins. - body `ad_account_id` (string): Which of the sub-account's ad accounts, like act_123456789. Default: its first. - body `name` (string): The dataset's name in Meta, up to 60 characters. Default: " CRM". - body `replace` (boolean): Change the dataset that is already saved. Default false. - example body: {"workspace_id":"uuid","name":"Castillo Roofing CRM"} - `PUT /v1/lead-feedback/dataset` — Lead quality feedback: connect a dataset (scope meta:write) Saves a dataset the ad account already has (GET /v1/lead-feedback/datasets, or an id copied from Meta's Events Manager) as where lead stages are sent, switches lead quality feedback on and, unless send_events is false, sends one event of each stage for a made-up person. Answers is_crm (null for an id the connected logins can't list) and, for a website pixel, the step in Events Manager that makes it a CRM dataset. Pick a CRM dataset where there is one; never choose a website pixel for someone without asking. 409 when another dataset is already saved and replace isn't true. Owners and admins. - body `dataset_id` (string, required): The dataset's id: 6 to 20 digits. - body `send_events` (boolean): Send the setup events. Default true. - body `replace` (boolean): Change the dataset that is already saved. Default false. - example body: {"workspace_id":"uuid","dataset_id":"1234567890123456"} ### Smart pages - `GET /v1/smart-pages/{page_id}/forms` — List a Smart Page's lead forms (scope workspaces:read) The forms on one document of the page (path, default / for the home page): form_id, name, connected (submissions reach the CRM as leads), fields (the names a visitor fills in) and what happens after it's sent: mode message (title, message, cta_label, cta_href; all null = the page's own thank-you card) or redirect. A document built before element ids existed gets them stamped on its draft first (attributes only, no new version), as the builder does when it opens, so every form and element can be addressed. People who manage the sub-account. - path `page_id` (string, required): Page id. - query `path` (string): Which document, e.g. /contact (default /). - `PUT /v1/smart-pages/{page_id}/forms` — Set what a Smart Page form does after it's sent (scope workspaces:write) mode message: a thank-you card with title (up to 120 characters), message (up to 600) and an optional button (cta_label up to 60, cta_href: a page in the project like /book, or an https:// link); leave them all out to go back to the page's own card. mode redirect: send the visitor to a page in this project (redirect, like /thank-you); never another site. Saved to the draft as a free version (no AI, no credits); POST /v1/smart-pages/{page_id}/publish puts it live. 409 when the form is no longer on the page. People who manage the sub-account. - path `page_id` (string, required): Page id. - body `path` (string): Which document (default /). - body `form_id` (string, required): The form (form_id from GET .../forms). - body `mode` (string, required): What happens after it's sent. - body `title` (string): message: the card's title. - body `message` (string): message: the card's words. - body `cta_label` (string): message: a button on the card. - body `cta_href` (string): message: where the button goes (/page or https://...). - body `redirect` (string): redirect: the page to send visitors to, like /thank-you. - example body: {"form_id":"form-1","mode":"message","title":"Thanks!","message":"We'll call you within the hour.","cta_label":"Book a time now","cta_href":"/book"} - `POST /v1/smart-pages/{page_id}/text-edits` — Retype text on a Smart Page (scope workspaces:write) The builder's inline edit: replaces the text of up to 100 elements by id in one free version (no AI, no credits). Each edit takes element_id (the element's data-zu-id in the page's HTML: GET /v1/smart-pages/{page_id}?include=html) and text (plain words) or html (words with inline markup such as or
; scripts, styles, forms, embeds and event handlers are refused). All or nothing: 409 when an element is no longer on the page. People who manage the sub-account. - path `page_id` (string, required): Page id. - body `path` (string): Which document (default /). - body `edits` (array, required): 1-100: [{ element_id, text | html, label? }]. label names the element in the version list. - example body: {"edits":[{"element_id":"hero-headline","text":"New roofs in 2 days"}]} - `POST /v1/smart-pages/{page_id}/style-edits` — Style or remove one element of a Smart Page (scope workspaces:write) The builder's Style panel on one element: styles sets any of color, background-color (hex, rgb(), hsl(), transparent), font-size, padding, border-radius (px, rem, em or %), font-weight (100-900, normal, bold), text-align (left, center, right, justify); "" puts the page's own style back. Or remove: true takes the element off the page. One free version (no AI, no credits). 409 when a value isn't valid or the element is gone. People who manage the sub-account. - path `page_id` (string, required): Page id. - body `path` (string): Which document (default /). - body `element_id` (string, required): The element's data-zu-id. - body `styles` (object): Property -> value, e.g. { "color": "#1d4ed8" }. - body `remove` (boolean): Remove the element instead. - body `label` (string): What to call the element in the version list. - example body: {"element_id":"hero-button","styles":{"background-color":"#1d4ed8","border-radius":"12px"}} ### Meta - `GET /v1/meta-lead-forms/available-pages` — List the Facebook Pages that can be connected (scope meta:read) The Facebook Pages the connected Facebook login can connect to this sub-account: what the Page picker in Settings > Leads shows (the caller's own Facebook login, plus the Pages of the agency owner's). Each has page_id (what POST /v1/meta-lead-forms/pages takes), name, followers, has_instagram, shared_by (set when the Page comes from the agency owner's login), connected and id (this sub-account's connection, once connected). The list is the one saved when the Pages were last read; refresh=true starts reading them from Facebook again in the background and answers the saved list with refreshing true, so ask again in a minute. 409 `not_connected` when no Facebook login is connected, `login_expired` when it has run out, `missing_permission` when the login didn't allow Pages to be read. The agency's owner and admins only, as connecting a Page. - query `refresh` (boolean): Read the Pages from Facebook again (in the background). Default false. - `GET /v1/meta-lead-forms/pages/{id}/forms` — List a connected Page's Lead Forms with their questions (scope meta:read) A connected Page's active Lead Forms, read from Meta now, newest first: so a form made after the Page was connected is listed too. Each has form_id, name, created_at, connected (only a connected form makes leads), questions (key, label, type, field: the lead field its answer is saved to or null, suggested_field: what the app's mapper would pick), mapping (everything saved for the form), phone_number_id (the business number that texts its leads; null = the sub-account's default), calendar_id (the calendar they book on; null = automatic), imessage_line_id (set in the app) and held_leads (leads waiting because the form isn't connected). lead_fields lists what a question can be mapped to: the core lead fields and the sub-account's custom fields as custom:. 409 `not_connected` / `login_expired` / `facebook_refused` when Facebook can't be read with the connected login. Owners and admins. - path `id` (string, required): The connected Page's id (from GET /v1/meta-lead-forms; not Facebook's page_id). - `PATCH /v1/meta-lead-forms/pages/{id}/forms` — Set one Lead Form's mapping, phone number, calendar and switch (scope meta:write) Changes what is saved for one Lead Form of a connected Page, as the form's editor in Settings > Leads does. mapping is the form's whole mapping, question key -> lead field (full_name, first_name, last_name, email, phone, address, city, state, zip, inquiry, or custom: for one of the sub-account's custom fields; null leaves a question unmapped): every key must be a question the form asks now (GET /v1/meta-lead-forms/pages/{id}/forms) or one already saved for it. phone_number_id is the business number that texts this form's leads and calendar_id the calendar they book on; both must be this sub-account's own, null goes back to the default. connected turns the form on or off (only a connected form makes leads; from then on its new leads arrive like any live lead). What isn't sent stays as it is; a form saved for the first time starts connected unless connected false is sent. A form made after the Page was connected can be named: it is looked up on Facebook first. The iMessage line a form texts from is set in the app. Owners and admins. - path `id` (string, required): The connected Page's id (from GET /v1/meta-lead-forms; not Facebook's page_id). - body `form_id` (string, required): The Lead Form's id (digits). - body `mapping` (object): { question key: lead field | null }: the form's whole mapping. - body `phone_number_id` (string): One of the sub-account's phone numbers (GET /v1/phone-numbers), or null for its default. - body `calendar_id` (string): One of the sub-account's active calendars (GET /v1/calendars), or null for automatic. - body `connected` (boolean): Whether the form makes leads. - body `name` (string): The name shown for the form, up to 200 characters. - example body: {"form_id":"9000000002","mapping":{"full_name":"full_name","phone_number":"phone","what_service":"custom:service"},"calendar_id":null,"connected":true} ### Smart forms - `POST /v1/smart-forms/domains` — Add a domain the business owns (scope smart_forms:write) Adds a domain for the sub-account's Smart Forms and Smart Pages (and, once verified, its CRM address): a root domain (example.com) or a subdomain (forms.example.com), written with or without https://. It is saved unverified and the answer carries dns, the record to create at the domain's DNS provider: one CNAME to portal.usezu.com for a subdomain; for a root domain the provider's alias-style record (ALIAS / ANAME / CNAME flattening), or A records (their addresses come with a check). Then call POST /v1/smart-forms/domains/{domain_id}/verify. A hostname has one owner: 409 `already_added` (with its id) when this sub-account has it, 409 `domain_taken` when another account or the white-label settings hold it. People who manage the sub-account. - body `hostname` (string, required): The domain, like example.com or forms.example.com. - example body: {"workspace_id":"WORKSPACE_ID","hostname":"forms.example.com"} - `POST /v1/smart-forms/domains/{domain_id}/verify` — Check a domain's DNS record now (scope smart_forms:write) The app's Check: looks up where the hostname points right now. When it points here the domain becomes verified and its secure certificate is issued within minutes (live true once it is ready; forms and pages open on it from then). The answer is the domain (verified, live, ssl_status, problem: what the check found in plain words, dns: the record to create) plus points_to (the end of its CNAME chain), addresses (its A records) and edge_addresses (the addresses a root domain's A records may use). DNS changes often take 5 to 30 minutes: check again later rather than in a loop; pending domains are also re-checked on a timer. People who manage the sub-account. - path `domain_id` (string, required): The domain's id (from GET or POST /v1/smart-forms/domains). - `DELETE /v1/smart-forms/domains/{domain_id}` — Remove a domain (scope smart_forms:write) Removes the domain from the sub-account. Smart Pages on it go back to their shared link, forms stop opening on it, and a CRM address that used it goes back to the agency's. The DNS record at the provider is the business's to delete. People who manage the sub-account. - path `domain_id` (string, required): The domain's id. ### Smart pages - `PATCH /v1/smart-pages/{id}/domain` — Put a Smart Page on its own domain, or back on its shared link (scope workspaces:write) Sets which of the sub-account's own domains opens this Smart Page (the builder's Address & domain): domain_id must be a verified domain of the same sub-account (GET /v1/smart-forms/domains; 409 `domain_not_verified` otherwise), or null for the shared link. A domain opens one Smart Page: when another page has it the call is refused with 409 `domain_in_use` and that page's id, unless move true is sent, which moves the domain here and puts the other page back on its shared link (moved_from). The answer has public_url (where the page opens now) and shared_url (which keeps working either way). People who manage the sub-account. - path `id` (string, required): The Smart Page's id. - body `domain_id` (string, required): A verified domain's id, or null for the shared link. - body `move` (boolean): Take the domain from the page that has it now. Default false. - example body: {"domain_id":"DOMAIN_ID"} ### Ads & Google - `GET /v1/ad-insights/comments` — Comments on a sub-account's ads (scope meta:read) The comments people left on the sub-account's Facebook and Instagram ads (Ad Insights > Comments), newest first. Each has its status (open = waiting on the business, replied, hidden, removed, done = set aside), what the AI made of it (category, reason, suggested_reply, wants_hidden), the reply that went out, anything waiting to go out, and the ad it is on. Read on with before = next_before. Anyone who works in the sub-account; the client's people get 403 while the agency manages the ads for them. - query `status` (string): Only these, comma separated: open, replied, hidden, removed, done. - query `category` (string): Only these, comma separated: question, interest, praise, complaint, spam, abuse, tag, other. - query `platform` (string): facebook or instagram. - query `needs_review` (boolean): true: only comments the AI wants hidden that nobody has decided on. - query `before` (string): Read on from here: the last answer's next_before. - query `limit` (number): 1-200 (default 50). - `GET /v1/ad-insights/comments/status` — Ad comments: what is connected and what the AI does (scope meta:read) Which Facebook Pages and Instagram accounts the comments are read from (and whether each is connected), the AI settings, how many replies or hides are waiting to go out, when comments were last read, and paused when Meta asked to slow down (nothing automatic runs until then). - `PUT /v1/ad-insights/comments/settings` — Ad comments: set what the AI does by itself (scope meta:write) Changes only the settings you send: reply_mode (off, suggest = the AI drafts and a person sends, auto = the AI replies), reply_categories (question, interest, praise, complaint, other), hide_mode (off, review = marked for a person, auto), hide_categories (spam, abuse, complaint), hide_action (hide or delete), blocked_words, tone (friendly, professional, playful, short), instructions and cta. Owners and admins. Turning a mode off drops what it had waiting. Answers the same view as the status route. - body `settings` (object, required): The fields to change (they can also be sent at the top level). - example body: {"workspace_id":"uuid","settings":{"reply_mode":"suggest","hide_mode":"review"}} - `POST /v1/ad-insights/comments/sync` — Read new ad comments now (scope meta:write) Reads the newest comments from Meta now instead of waiting for the next automatic read (there is a short cooldown and a daily cap, to stay inside Meta's limits). The AI then reads what is new in the background; list them a little later. - example body: {"workspace_id":"uuid"} - `POST /v1/ad-insights/comments/bulk` — Act on several ad comments at once (scope meta:write) For up to 50 open comments: approve (send each one's AI draft as the Page's reply), hide, delete (confirm: true; cannot be undone), done (set aside) or keep (the AI wanted them hidden; keep them). Replies, hides and deletes go out spaced apart, never together, to keep the Page safe: the answer says how many are waiting and about how long it takes. Refused with 409 while Meta has asked to slow down. - body `action` (string, required): approve, hide, delete, done or keep. - body `ids` (array, required): Up to 50 comment ids. - body `confirm` (boolean): delete: must be true. - example body: {"workspace_id":"uuid","action":"approve","ids":["uuid"]} - `POST /v1/ad-insights/comments/{comment_id}/reply` — Reply to an ad comment (scope meta:write) Posts a reply under the comment as the Page, right away. It is public: confirm the words with the person first. 409 for a hidden or removed comment (show it again first); 429 when Meta says slow down. - path `comment_id` (string, required): The comment's id, from GET /v1/ad-insights/comments. - body `message` (string, required): The reply, up to 2,000 characters. - example body: {"message":"We do! Send us a message and we'll get you on the schedule."} - `POST /v1/ad-insights/comments/{comment_id}/suggest` — Have the AI draft a reply to an ad comment (scope meta:write) The AI writes (or rewrites) a reply from what it knows about the business; nothing is posted. The draft is kept on the comment as its suggested_reply. Uses the sub-account's daily AI allowance for comments (429 when it is used up). - path `comment_id` (string, required): The comment's id, from GET /v1/ad-insights/comments. - body `hint` (string): How to rewrite it: shorter, friendlier or formal. - `POST /v1/ad-insights/comments/{comment_id}/hide` — Hide an ad comment (scope meta:write) Hides the comment on the ad (its author and their friends still see it). It can be shown again. - path `comment_id` (string, required): The comment's id, from GET /v1/ad-insights/comments. - `POST /v1/ad-insights/comments/{comment_id}/unhide` — Show a hidden ad comment again (scope meta:write) Brings a hidden comment back on the ad. 409 when it isn't hidden. - path `comment_id` (string, required): The comment's id, from GET /v1/ad-insights/comments. - `POST /v1/ad-insights/comments/{comment_id}/done` — Set an ad comment aside (scope meta:write) Marks the comment done without replying. Nothing is sent to Meta. - path `comment_id` (string, required): The comment's id, from GET /v1/ad-insights/comments. - `POST /v1/ad-insights/comments/{comment_id}/reopen` — Bring an ad comment back (scope meta:write) Puts a comment that was set aside back to open. 409 for any other comment. - path `comment_id` (string, required): The comment's id, from GET /v1/ad-insights/comments. - `POST /v1/ad-insights/comments/{comment_id}/keep` — Keep an ad comment the AI wanted hidden (scope meta:write) Clears the AI's mark (and anything it had waiting for this comment). Nothing is sent to Meta. - path `comment_id` (string, required): The comment's id, from GET /v1/ad-insights/comments. - `POST /v1/ad-insights/comments/{comment_id}/cancel` — Stop an ad comment's reply or hide that is waiting (scope meta:write) Takes back a reply, hide or delete that is waiting to go out for this comment. - path `comment_id` (string, required): The comment's id, from GET /v1/ad-insights/comments. - `DELETE /v1/ad-insights/comments/{comment_id}` — Delete an ad comment (scope meta:write) Removes the comment from the ad for good. It cannot be undone, so confirm=true is required; hiding can be undone. - path `comment_id` (string, required): The comment's id, from GET /v1/ad-insights/comments. - query `confirm` (boolean, required): Must be true. - `POST /v1/ad-insights/ads/{ad_id}/pause` — Pause a Meta ad (scope meta:write) Pauses one ad in the sub-account's Meta ad accounts (the ads GET /v1/ad-insights shows; ad_id is Meta's id). Only an ad in an ad account attached to this sub-account, and shown on its dashboard, can be changed. The agency's own people always can; the client's people only when the agency lets them pause ads (403 otherwise). Kept in the sub-account's ad action log. - path `ad_id` (string, required): Meta's ad id. - body `ad_account_id` (string): Meta ad account id. Needed only when the sub-account has more than one. - body `name` (string): The ad's name, for the action log. - example body: {"workspace_id":"uuid"} - `POST /v1/ad-insights/ads/{ad_id}/resume` — Turn a Meta ad back on (scope meta:write) Sets a paused ad to active, with the same rules as pausing. This spends ad money again: confirm with the person first. - path `ad_id` (string, required): Meta's ad id. - body `ad_account_id` (string): Meta ad account id. Needed only when the sub-account has more than one. - body `name` (string): The ad's name, for the action log. - example body: {"workspace_id":"uuid"} - `POST /v1/ad-insights/campaigns/{campaign_id}/pause` — Pause a Meta campaign (scope meta:write) Pauses a campaign in the sub-account's Meta ad accounts (campaign_id is Meta's id, from GET /v1/ad-insights). Only a campaign in an attached ad account and shown on the sub-account's dashboard. The client's people need the agency's switch for pausing campaigns (403 otherwise). Kept in the ad action log. - path `campaign_id` (string, required): Meta's campaign id. - body `ad_account_id` (string): Meta ad account id. Needed only when the sub-account has more than one. - body `name` (string): The campaign's name, for the action log. - example body: {"workspace_id":"uuid"} - `POST /v1/ad-insights/campaigns/{campaign_id}/resume` — Turn a Meta campaign back on (scope meta:write) Sets a paused campaign to active, with the same rules as pausing. This spends ad money again: confirm with the person first. - path `campaign_id` (string, required): Meta's campaign id. - body `ad_account_id` (string): Meta ad account id. Needed only when the sub-account has more than one. - body `name` (string): The campaign's name, for the action log. - example body: {"workspace_id":"uuid"} - `PUT /v1/ad-insights/campaigns/{campaign_id}/budget` — Change a Meta campaign's budget (scope meta:write) Sets the daily (default) or lifetime budget of a campaign, or of the ad set that holds the budget (send its id as campaign_id). amount is in the ad account's currency: 25 means $25.00. The client's people need the agency's switch for adjusting budgets, and stay inside the daily range the agency set (400 with the range otherwise). Raising a budget spends more ad money: confirm with the person first. Kept in the ad action log. - path `campaign_id` (string, required): Meta's id of the campaign or ad set. - body `amount` (number, required): The new budget in the ad account's currency (up to 100,000). - body `type` (string): daily (default) or lifetime. - body `ad_account_id` (string): Meta ad account id. Needed only when the sub-account has more than one. - example body: {"workspace_id":"uuid","amount":40,"type":"daily"} ### Smart pages - `GET /v1/smart-pages` — List Smart Pages (scope workspaces:read) The sub-account's Smart Pages: landing pages and small websites with lead capture, built by an AI builder and hosted on the business's own domain. Each has status (draft | published), live, public_url, views, leads, building (queued | running | awaiting_approval | null) and builder (the page in the app). People who manage the sub-account. - `POST /v1/smart-pages` — Create a Smart Page (scope workspaces:write) Makes a page. With brief, the AI builder starts building it at once (usually 2-6 minutes; watch GET /v1/smart-pages/{page_id}/builds): write it like a brief for a designer: the business, the offer, who it's for, the sections wanted, the style and colors, the phone number, and what the form should ask. Without brief the page is empty until POST /v1/smart-pages/{page_id}/edit or PUT /v1/smart-pages/{page_id}/html. A build costs credits like in the app (charged to the account that pays for the sub-account, when the build finishes); 402 when it is out of credits. model: claude-opus-5-5 (default, the design model) or glm-5.3-flash. A new page is a draft: publish it when it's ready. People who manage the sub-account. - body `name` (string): The page's name (also starts its link). - body `brief` (string): What to build, 20-20,000 characters. Starts the AI builder. - body `model` (string): claude-opus-5-5 or glm-5.3-flash. - example body: {"workspace_id":"uuid","name":"Roof repair Dallas","brief":"A landing page for Castillo Roofing in Dallas, TX. Offer: free roof inspection after hail. For homeowners. Sections: hero with the offer and a short form (name, phone, address), why us, how it works in 3 steps, service area, FAQ. Navy and orange, bold and trustworthy. Phone (214) 555-0142."} - `GET /v1/smart-pages/{page_id}` — Get a Smart Page (scope workspaces:read) One page: its settings, link, numbers, built (false until a first build or html), unpublished_changes, documents (the home page "/" and every extra page or file such as /thank-you or /robots.txt, with sizes) and latest_build. include=html adds html { path, content }: the draft of the home page, or of path. People who manage the sub-account. - path `page_id` (string, required): Page id. - query `include` (string): html to include a document's draft. - query `path` (string): With include=html: which document (default /). - `PATCH /v1/smart-pages/{page_id}` — Update a Smart Page's settings (scope workspaces:write) name, slug (the end of its link: 3-60 lowercase letters, numbers and dashes; changing it changes a published page's address), seo_title, seo_description, favicon_url and og_image_url (https links; null clears). What is on the page changes with POST /v1/smart-pages/{page_id}/edit or PUT /v1/smart-pages/{page_id}/html. A custom domain is connected in the app. - path `page_id` (string, required): Page id. - body `name` (string): Name. - body `slug` (string): The end of the page's link. - body `seo_title` (string): Title for search results and link previews. - body `seo_description` (string): Description for search results and link previews. - example body: {"seo_title":"Roof Repair in Dallas | Castillo Roofing","seo_description":"Free hail inspection, same-week repairs."} - `DELETE /v1/smart-pages/{page_id}` — Delete a Smart Page (scope workspaces:write) Takes the page offline and removes it from the list, as Delete in the app does. Leads it brought in stay. - path `page_id` (string, required): Page id. - `POST /v1/smart-pages/{page_id}/edit` — Ask the AI builder to change a Smart Page (scope workspaces:write) Sends the page's AI builder a request in plain words, as typing in the builder's chat does: content, design, new sections, extra pages ("add a /thank-you page"), forms, anything. mode build (default) makes the change; plan writes a plan first and waits (the build's status is awaiting_approval and plan holds it: send approve_build_id with that build's id to build it); chat answers a question without changing the page. path is the document the request is about (default /, the home page). attachments are up to 4 https pictures to use or copy. One build runs per page at a time: a request sent meanwhile waits in line (queued: true) and starts by itself. Answers 202 with build_id; GET /v1/smart-pages/{page_id}/builds shows when it is done. Costs credits like in the app; 402 when out of credits. Nothing goes live until the page is published. - path `page_id` (string, required): Page id. - body `prompt` (string): What to change or build, up to 20,000 characters. Required unless approve_build_id is sent. - body `mode` (string): build (default), plan or chat. - body `path` (string): The document it's about (default /). - body `attachments` (array): Up to 4 https picture links. - body `approve_build_id` (string): Build a plan that is waiting for approval. - body `model` (string): claude-opus-5-5 or glm-5.3-flash (default: the page's). - example body: {"prompt":"Make the hero headline 'Hail damage? Free roof inspection this week' and add a section with three customer reviews above the FAQ."} - `GET /v1/smart-pages/{page_id}/builds` — List a Smart Page's builds (scope workspaces:read) The last 15 builds (status queued | running | awaiting_approval | done | failed | canceled, stage while running, plan for a plan, error when it failed), the requests waiting in line, queue_paused, and the builder's last messages (what it said it changed, or its answer to a chat). - path `page_id` (string, required): Page id. - `POST /v1/smart-pages/{page_id}/cancel-build` — Cancel a Smart Page's build (scope workspaces:write) Stops the build that is queued, running or waiting for approval. 409 when none is. - path `page_id` (string, required): Page id. - `PUT /v1/smart-pages/{page_id}/html` — Write a Smart Page document yourself (scope workspaces:write) Replaces one document's draft with html you wrote: the home page (path /, default) or an extra page or file (path /thank-you, /services/roofing, /robots.txt, /sitemap.xml; a path that doesn't exist yet is created, up to 60). A page must be a whole document ( ... ), up to 1,500,000 characters. To edit what's there, read it first with GET /v1/smart-pages/{page_id}?include=html. Free. Saved as a version (label names it in the builder's history), so Restore in the builder can undo it. Refused (409) while a build is running on the page. Lead forms on the page keep working when they keep the builder's own form markup. Nothing goes live until the page is published. - path `page_id` (string, required): Page id. - body `html` (string, required): The whole document. - body `path` (string): Which document (default /). - body `label` (string): A name for this version in the builder's history. - example body: {"path":"/thank-you","html":"Thank you

Thanks! We'll call you shortly.

","label":"New thank-you page"} - `POST /v1/smart-pages/{page_id}/publish` — Publish a Smart Page (scope workspaces:write) Puts the draft live at public_url, with every extra page. 409 when nothing has been built yet. Publishing again after a change updates the live page. - path `page_id` (string, required): Page id. - `POST /v1/smart-pages/{page_id}/unpublish` — Unpublish a Smart Page (scope workspaces:write) Takes the page offline. The draft and everything published before stay, so publishing again brings it back. - path `page_id` (string, required): Page id. ### Smart forms - `PATCH /v1/smart-forms/{form_id}` — Update or publish a smart form (scope smart_forms:write) Takes the same fields as create; send only what changes. questions, qualifier_questions and hidden_fields replace their lists; qualification, estimate, fields and fields.address.service_area are merged. - path `form_id` (string, required): Form id. - body `is_published` (boolean): Publish or unpublish. - body `layout_mode` (string): single_step, multi_step, conversational or funnel (see create). - body `qualifier_enabled` (boolean): Ask the qualifier_questions first. - body `qualifier_questions` (array): Replaces the list (see create). - body `questions` (array): Replaces the list (see create). - body `qualification` (object): Merged (see create). - body `estimate` (object): Merged (see create). - body `calendar_routing` (boolean): Pick the calendar from the answers (see create). - body `fields` (object): Merged, including address.service_area (see create). - body `video` (object): The video at the top, merged (see create); null turns it off. - body `hidden_fields` (array): Replaces the list (see create); null or [] clears it. - example body: {"fields":{"address":{"service_area":{"enabled":true,"mode":"radius","center":{"lat":32.7767,"lng":-96.797,"label":"Dallas, TX"},"radius_miles":50}}}} ### AI agent - `GET /v1/ai-texting` — Read the AI texting agent and automatic text settings (scope workspaces:read) AI replies, agent name, reply mode, goal, what it knows, booking link, first text, send window, hand-off, confirmation and reminder texts, missed-call text-back, email greeting, and a preview of its prompt. Says whether the sub-account has a phone number. - `PATCH /v1/ai-texting` — Change the AI texting agent and automatic texts (scope workspaces:write) Changes how the AI texts a sub-account's leads. Send only the settings to change. Every value is checked. AI replies: - ai_replies turns them on or off. Turning them on lets the AI answer conversations still waiting for a reply. - agent_name, reply_mode (auto | suggest), goal (book_appointment | collect_details | customer_support), business_context, booking_link. - max_replies (1-15), reply_delay_minutes (1-120), ai_can_cancel, ai_answers_email. - handoff_when_unsure, pause_ai_on_handoff, handoff_resume_days (0, 1, 2, 3 or 7). - prompt_addition adds one more rule; prompt rewrites the whole instructions. The first text to a new lead: - `greet_new_leads`, `first_message`, `greet_delay_minutes`, `form_greet_delay_minutes`. - smart_first_text: the AI writes each new lead's first text from their answers and the right calendar's open times; first_message becomes the backup. - smart_first_text_goal: what that text should get them to do. Empty means book an appointment. - `email_greeting`, `email_greeting_subject`, `email_greeting_body`. Missed calls, confirmations and reminders: - `missed_call_text`, `missed_call_message`. - `confirmation_text`, `confirmation_message`. - confirmation_email (the confirmation email with a calendar invite, plus the move and cancel emails), confirmation_email_language (en | es). - `reminder_24h`, `reminder_24h_message`, `reminder_1h`, `reminder_1h_message`. - reminder_5m (off by default), reminder_5m_message. When texts may go out: - send_window (anytime | daily | booking_hours), send_window_start and send_window_end ("HH:MM"). Owners, agency admins and client admins. - body `ai_replies` (boolean): The AI answers leads by text. - body `agent_name` (string): First name the AI texts as (max 40). - body `reply_mode` (string): suggest = drafts each reply for a teammate to approve (GET /v1/reply-suggestions). - body `first_message` (string): First text to a new lead. Variables {first_name}, {agent}, {business}, {service}. - body `send_window` (string): When automated texts may go out. - body `prompt_addition` (string): A rule added to the end of the AI's prompt (max 2000). - example body: {"workspace_id":"uuid","ai_replies":true,"agent_name":"Sarah","reply_mode":"auto","prompt_addition":"Always mention free estimates."} - `GET /v1/nurture-sequence` — Read the automatic follow-up sequence (scope workspaces:read) Every text and email step with the day it goes out, whether each channel is on, and offers whose own follow-ups replace it for the leads they match. - `PUT /v1/nurture-sequence` — Replace the follow-up texts (or emails) (scope workspaces:write) Replaces one channel's steps and turns it on. Timing is the app's: the first 3 hours after the first text, then front-loaded days over span_days (about 5 days per message, at most 60), or the explicit days you send. At most 40 texts or 60 emails; email needs a verified sending domain. Pending sends that would change channel are cancelled. - body `channel` (string): Default sms. - body `messages` (array, required): One message per step, in order. - body `subjects` (array): Email only: one subject per message. - body `span_days` (number): Days from the first message to the last (1-365). - body `days` (array): Instead of span_days: the day each message goes out, going up. 0 = 3 hours in. - body `enabled` (boolean): Default true. - example body: {"workspace_id":"uuid","channel":"sms","messages":["Hi {first_name}, still looking for a quote?","Quick check-in from {business}: want me to hold a time for you?"],"span_days":7} - `PATCH /v1/nurture-sequence` — Switch follow-ups on or off, or reword one step (scope workspaces:write) Send enabled, or step with message (and subject for email). A reworded step keeps its timing. - body `channel` (string): Default sms. - body `enabled` (boolean): On or off. - body `step` (number): Which step to reword (1 = first). - body `message` (string): The step's new wording. - body `subject` (string): Email only: the new subject. - example body: {"workspace_id":"uuid","channel":"sms","step":2,"message":"Hi {first_name}, any questions I can answer?"} - `DELETE /v1/nurture-sequence` — Remove one channel's follow-up steps (scope workspaces:write) Switches that channel off and cancels its pending sends. - query `channel` (string): Default sms. ### Setup - `GET /v1/business-profile` — Read the business profile (scope workspaces:read) Name, industry, time zone, address, country, business phone and business email (Settings → General). - `PATCH /v1/business-profile` — Change the business profile (scope workspaces:write) Send only what changes. A new time zone also moves the booking hours' time zone, as in the app. - body `name` (string): Max 120. - body `industry` (string): Max 80. - body `timezone` (string): IANA zone, e.g. America/Chicago. - body `address_line1` (string): Street. - body `address_line2` (string): Suite, unit. - body `city` (string): City. - body `state` (string): State or region. - body `postal_code` (string): ZIP or postal code. - body `country` (string): Two-letter country code (US, CA, GB, AU; "United States" works too), or null. It picks the State list on leads, forms and booking pages, and the list a lead's state is matched against when the lead has no phone. - body `business_phone` (string): US 10-digit or + and a country code. - body `business_email` (string): Email address. - example body: {"workspace_id":"uuid","timezone":"America/Chicago","country":"US","business_phone":"+14155550123"} ### Dashboard - `GET /v1/overview` — Dashboard numbers for a window (scope workspaces:read) New leads, booked leads and appointments (each with the previous window of the same length for comparison), upcoming appointments, contacted, won and closed, speed to lead (median minutes to the first reply: anyone, AI or automation, a person), AI replies sent, calls (answered, missed, voicemails, AI calls, talk time), and stage_reach: of the leads created in the window, how many reached each pipeline stage (`total`, and `reached` keyed by stage key from GET /v1/stages; a lead counts for every stage it has been in, so a lead that sat and then won counts for both; the Overview's " rate" cards divide reached by total). Moves made before 2026-10-16 are not known. stage_reach is null if it could not be read. Viewers limited to their own leads see only those. - query `days` (number): 1-365, default 30. - query `from` (string): ISO start, instead of days (window at most 366 days). - query `to` (string): ISO end, default now. - `GET /v1/health-score` — A sub-account's health score (scope workspaces:read) The 0-100 health score from the Sub-accounts list and its breakdown: grade (Excellent, Healthy, Needs attention, At risk, Dormant), the five factors (activity recency 15, lead flow 20, speed to lead 25, leads answered 15, booking rate 25) with the points each earned, its value and how it was worked out; a factor that can't be measured yet has earned null (listed in not_measured) and its weight is spread over the rest. verdict says what goes well and what holds it back; actions is what would raise it, biggest gain first (gain in score points; path is the page inside the sub-account, e.g. settings?tab=messaging), with people waiting for a reply first. history is the score at the end of each of the last weeks (oldest first, the last one now), and last_30_days the funnel, reply speed and lead sources behind it. Leads leave out spam and imported lists. Any member; Technicians and Viewers limited to their own leads are scored on those. - query `weeks` (number): Weeks of history, 1-26, default 12. - `GET /v1/health-scores` — Health scores of every sub-account (scope workspaces:read) Every sub-account the key's person can open, best first, scored as GET /v1/health-score scores them: score, grade, rank among the active ones (null for a sub-account where nothing has happened yet), the factor holding it back most (held_back_by, when it costs 3 points or more), each factor's points and the inputs; plus the median score and the medians of each input across the active ones. A key restricted to one sub-account gets just that one. Archived sub-accounts are left out unless include_archived=true. - query `include_archived` (boolean): Also archived sub-accounts. - `GET /v1/usage` — Credits used by tool (scope billing:read) What the sub-account spent in a window, by tool (the Usage tab's names: texts, lead alert texts, email, AI text replies, website chat widget, AI agents, phone calls, AI receptionist, AI calling, phone numbers, ad tools) and by day. unpaid counts events that ran while the account was out of credits. - query `days` (number): 1-365, default 30. - query `from` (string): ISO start, instead of days. - query `to` (string): ISO end, default now. ### Inbox - `GET /v1/conversations` — The Inbox: conversations, newest first (scope messaging:read) Every lead with a message either way (or an unread one), like the Inbox: unread count, archive state, whether the AI is paused on it (and the question it handed to the team), and the last message or call. The first page also returns the Inbox counts. Read the thread with GET /v1/leads/{lead_id}/conversation. - query `archived` (boolean): true = the Archived tab. Default false. - query `unread` (boolean): Only unread conversations. - query `assigned_to` (string): A user id, "me" or "unassigned". - query `search` (string): Name, email or phone contains (2-80 characters). - query `imessage_line_id` (string): Only the conversations this iMessage Mac has had (GET /v1/imessage/lines), like the Inbox's number filter. - query `limit` (number): 1-100, default 25. - query `cursor` (string): next_cursor from the previous page. - `POST /v1/conversations/{lead_id}/read` — Mark a conversation read (scope messaging:write) Anyone who can see the lead can, as in the Inbox. - path `lead_id` (string, required): Lead id. - `POST /v1/conversations/{lead_id}/unread` — Mark a conversation unread (scope messaging:write) - path `lead_id` (string, required): Lead id. - `POST /v1/conversations/{lead_id}/archive` — Archive a conversation (scope messaging:write) As in the app, archiving switches the lead's automatic follow-up texts off. A new message from the lead brings the conversation back. - path `lead_id` (string, required): Lead id. - `POST /v1/conversations/{lead_id}/unarchive` — Move a conversation back to the Inbox (scope messaging:write) Follow-ups switched off by archiving stay off. - path `lead_id` (string, required): Lead id. - `POST /v1/leads/{lead_id}/ai-pause` — Pause or resume the AI on one lead (scope messaging:write) paused: true stops AI replies to this lead (and its automatic follow-ups at send time) until someone turns it back on, or until `until`. paused: false turns it back on and clears any hand-off. The sub-account-wide switch is ai_replies on PATCH /v1/ai-texting. - path `lead_id` (string, required): Lead id. - body `paused` (boolean, required): Pause (true) or resume (false). - body `until` (string): ISO time the AI turns itself back on (paused: true only, at most a year away). - example body: {"paused":true,"until":"2026-10-07T15:00:00Z"} - `GET /v1/reply-suggestions` — AI suggested replies waiting for a teammate (scope messaging:read) When AI texting's reply_mode is suggest, the AI drafts its reply to each text or email here instead of sending it. Each one shows the lead, the draft, and the appointment it would book or cancel. reply_mode in the response says whether the sub-account is in suggest mode. - query `status` (string): Default pending. - query `lead_id` (string): One lead's suggestions. - query `limit` (number): 1-100, default 25. - query `cursor` (string): next_cursor from the previous page. - `POST /v1/reply-suggestions/{suggestion_id}/dismiss` — Dismiss a suggested reply (scope messaging:write) Nothing is sent. The AI does not suggest again until the lead writes. 409 when it was already handled. - path `suggestion_id` (string, required): Suggestion id. - `POST /v1/reply-suggestions/{suggestion_id}/approve` — Send a suggested reply (scope messaging:write; uses credits) Sends it to the lead as the AI (edited, if you send body), makes the booking or cancellation it decided on, and is charged exactly like an automatic AI reply plus the text, through the same code as the Inbox's Send button. Owners and admins only. 409 = someone already answered or the lead wrote again (nothing sent), 422 = not sent for a reason in `error` (e.g. AI paused, out of credits, that time is no longer open), 503 = a sending hiccup, try again. - path `suggestion_id` (string, required): Suggestion id. - body `body` (string): The edited reply to send instead (texts up to 1600 characters, emails 5000). - example body: {"body":"Thursday at 2pm works! See you then."} - `POST /v1/leads/{lead_id}/reply-ideas` — Reply ideas for a conversation (scope messaging:write) The Inbox composer's reply assistant: up to three ready replies in the business's tone (Settings > Reply assistant), written from the conversation, calls, appointments, the lead's stage and the AI Brain. `kind` says what they are: reply (an answer to their message), follow_up (a nudge after the business's own message) or first (the first message). Send `draft` to polish your own text instead (`how`: improve, grammar, shorter, a tone, or custom with `instruction`); the answer is `text`. Nothing is sent or saved: send the one you pick with POST /v1/messages. Free, and counted in the person's hourly allowance shared with the Inbox (429 when it's used up). Anyone who can see the lead. - path `lead_id` (string, required): Lead id. - body `channel` (string): Where the reply goes. Default sms. - body `tone` (string): New ideas only: this tone instead of the business's own. - body `avoid` (array): New ideas only: up to 6 replies you already have, to get different ones. - body `draft` (string): Polish this text instead (max 4000). - body `how` (string): With draft. Default improve. - body `instruction` (string): With how custom: what to change (max 300). - example body: {"channel":"sms"} - `GET /v1/needs-reply` — Who is waiting on a person (Needs you now) (scope messaging:read) The CRM overview's "Needs you now": everyone from the last 14 days waiting on someone at the business, newest first, and why. `ai_handoff`: the AI told them the team would get back to them and nobody has written, called or booked them since (`question` is what it couldn't answer, `asked_again` when they chased it). `missed_call`: they called and nobody picked up or called back (`voicemail`, `message_taken` by the AI receptionist, `call_note`). `message`: their message has no reply from a person or the AI (reminders, follow-ups and automations aren't replies; a thanks or ok after a message that asked nothing needs none; with AI replies on, a brand-new message is the AI's for its first 3 minutes). `total`, `by_reason` and `longest_since` count everyone; `leads` lists up to `limit`. Technicians and limited Staff see only their own leads. - query `limit` (number): How many people to list, 1-100, default 25. ### Calls - `GET /v1/calls` — Phone calls, newest first (scope messaging:read) Every call on the sub-account's numbers: direction, type (softphone, bridge, inbound, forward, ai, ai_receptionist), status, duration, voicemail, the AI's outcome and summary, and the lead. Get one for its transcript and recording. - query `direction` (string): Inbound or outbound. - query `type` (string): Call type. - query `outcome` (string): The Calls tab's outcome filter. - query `lead_id` (string): One lead's calls. - query `since` (string): ISO time, calls at or after. - query `until` (string): ISO time, calls before. - query `limit` (number): 1-100, default 25. - query `cursor` (string): next_cursor from the previous page. - `GET /v1/calls/{call_id}` — One call: summary, transcript and recording (scope messaging:read) recording.url is a fresh link that works for 15 minutes; ask again for a new one. - path `call_id` (string, required): Call id. - `GET /v1/call-campaigns` — AI calling campaigns and their progress (scope messaging:read) Leads, calls placed and connected, bookings, and credits used against the spend cap. Owners and admins only. - query `status` (string): Only this status. - `POST /v1/call-campaigns/{campaign_id}/pause` — Pause a running AI calling campaign (scope messaging:write) Its queued calls are cancelled. Resuming places paid calls, so it is done in the app. 409 when it is not running. - path `campaign_id` (string, required): Campaign id. ### AI Brain - `GET /v1/ai-lessons` — What the team has taught the AI (scope workspaces:read) Settings → AI Brain: rules (instructions every AI reply follows), good examples (thumbs up) and lessons (thumbs down: what was wrong, a better reply, never send anything like it again). The AI texter and the voice agent read the active ones on every reply. Owners and admins only. - query `kind` (string): Only this kind. - query `active` (boolean): Only switched on (true) or off (false). - query `limit` (number): 1-100, default 50. - query `cursor` (string): next_cursor from the previous page. - `POST /v1/ai-lessons` — Add a rule the AI follows (scope workspaces:write) Like Add rule in Settings → AI Brain. channel limits it to texts (sms), email or calls (voice); leave it out for everywhere. To teach from a specific reply, rate it (POST /v1/messages/{message_id}/rating). Owners and admins only; at most 200 rules. - body `note` (string, required): The rule, max 600 characters. - body `channel` (string): Where it applies. Default everywhere. - body `active` (boolean): Default true. - example body: {"workspace_id":"uuid","note":"Never quote prices by text; offer a free estimate visit instead.","channel":"sms"} - `PATCH /v1/ai-lessons/{lesson_id}` — Switch a lesson off or reword it (scope workspaces:write) What can change depends on the kind, as in the app: a rule's note, channel and active; a thumbs-down lesson's note, better_reply, never_again and active; a good example's active only. - path `lesson_id` (string, required): Lesson id. - body `active` (boolean): On or off. - body `note` (string): Max 600. - body `channel` (string): Rules only. - body `better_reply` (string): Thumbs-down lessons only, max 2000. - body `never_again` (boolean): Thumbs-down lessons only. - example body: {"active":false} - `DELETE /v1/ai-lessons/{lesson_id}` — Delete a lesson for good (scope workspaces:write) active: false on PATCH keeps it but switches it off. - path `lesson_id` (string, required): Lesson id. - `POST /v1/messages/{message_id}/rating` — Thumbs up or down on an AI message (scope workspaces:write) Exactly the Inbox's rating. up keeps the reply as a good example; down records what was wrong (reasons), what it should have said (better_reply), a note, and by default never to send anything close again; clear removes the rating. Rating the same message again replaces its lesson. Works on messages and calls sent to the lead (message ids from GET /v1/leads/{lead_id}/conversation). Owners and admins only. - path `message_id` (string, required): The message (lead event) id. - body `rating` (string, required): up, down or clear. - body `reasons` (array): down only: wrong_info, too_pushy, too_long, missed_question, wrong_tone, should_not_reply. - body `better_reply` (string): down only: what it should have said (max 2000). - body `note` (string): down only: a note (max 600). - body `never_again` (boolean): down only. Default true. - example body: {"rating":"down","reasons":["too_pushy"],"better_reply":"No rush at all, happy to answer any questions first."} ### Setup - `GET /v1/phone-numbers` — The sub-account's phone numbers (scope phone_numbers:read) Number, name, default, capabilities, texting registration and caller-name status, and who may use it: assigned_user_id (a number that belongs to one team member: it rings only them and other technicians can't text from it), tech_can_answer and tech_can_use (whether it rings technicians and whether they may call and text from it), and ring_in_order (its calls ring the team one after another, set in the app under Settings > Phone). Buying and releasing numbers is done in the app. iMessage Macs: GET /v1/imessage/lines. - query `include_released` (boolean): Include released numbers. ### Invoices & reviews - `GET /v1/invoices` — Invoices (read only) (scope billing:read) The sub-account's invoices, newest first. effective_status adds overdue (sent and past due), as the app shows it. kind is invoice, deposit (it lists the whole job but asks only for deposit_cents now; deposit_percent when it was a percent) or balance (made by Bill the balance: deposit_invoice_id is the deposit it follows and deposit_applied_cents comes off the job total). total_cents is always what this invoice asks for. Owners and admins only. Payment processor details are never returned. - query `status` (string): Filter. - query `lead_id` (string): One lead's invoices. - query `limit` (number): 1-100, default 25. - query `cursor` (string): next_cursor from the previous page. - `GET /v1/invoices/{invoice_id}` — One invoice with its line items and history (scope billing:read) Adds the customer's address, notes, terms, subtotal, discount and tax, the PDF link, line items, the event history (created, sent, viewed, paid) and public_path, the customer's view-and-pay page on the sub-account's domain (none for drafts). - path `invoice_id` (string, required): Invoice id. - `GET /v1/stripe/payments` — Payments from the business's own Stripe (scope billing:read) With Track payments on (Settings > Integrations > Stripe), every paid Payment Link or checkout the business made in its own Stripe is recorded, matched to a lead (the link's client_reference_id = the lead id, then email, then phone), moves that lead to payment_stage_key (never backwards) and is sent to Meta as payment_meta_event. connection is the setting (null = Stripe not connected; listening = our webhook is on their Stripe account); payments are the ones recorded, newest first: lead_action is moved, already, kept (it was further along), none or no_lead; meta_status is sent, queued, failed, off, no_dataset or no_login. Owners and admins only. The Stripe key and webhook details are never returned. - query `lead_id` (string): One lead's payments. - query `limit` (number): 1-100, default 25. - query `cursor` (string): next_cursor from the previous page. - `PATCH /v1/stripe/payment-tracking` — Turn Stripe payment tracking on or off (scope billing:write) on: true adds our webhook endpoint to the business's connected Stripe account (the key needs Webhook Endpoints: Write) and false removes it; payments already recorded stay. stage_key is the pipeline stage a paying lead moves to (any stage the sub-account shows except lost; null leaves the lead where it is); meta_event is what the sub-account's Meta dataset gets (Purchase with the amount, Schedule, or null for nothing). Send any of the three; the rest stay as they are. 409 when Stripe isn't connected (connect it in the app). Owners and admins only. Answers with the connection as GET /v1/stripe/payments shows it. - body `on` (boolean): Track payments, or stop. - body `stage_key` (string): Where a paying lead moves (GET /v1/stages), or null to leave it. - body `meta_event` (string): What Meta gets, or null. - example body: {"workspace_id":"uuid","on":true,"stage_key":"booked","meta_event":"Purchase"} - `GET /v1/estimates` — Estimates (read only) (scope billing:read) The sub-account's estimates, newest first, as the Estimates tab lists them: number, title, the customer, status and effective_status (expired: sent and past its last day), when it was sent, viewed, approved (and by whom) or declined (and why), the invoice it became, its Good / Better / Best options with their totals, and total_cents (the option the customer picked, else the recommended one). With Quote templates (Settings > Features) each also says the template it started from (template_id), what approving does (on_approve, approval_steps in words), the booking calendar (booking_calendar_id), whether the customer signed (signed; the drawing itself never leaves) and the total they agreed to with their add-ons (approved_total_cents); these are null / false otherwise. Technicians and Staff limited to their own leads see the estimates for leads they can see and ones they made without a lead, as in the app. - query `status` (string): Filter. - query `lead_id` (string): One lead's estimates. - query `limit` (number): 1-100, default 25. - query `cursor` (string): next_cursor from the previous page. - `GET /v1/estimates/{estimate_id}` — One estimate with its options, lines and history (scope billing:read) Adds the customer's address, intro, terms, tax rate and the customer's approval note, every option (name, description, photo, recommended, subtotal, tax and total) with its lines (name, details, photo, quantity, unit price, taxable, and with Quote templates optional (an add-on the customer may tick) and picked (they did); an option's totals count its other lines plus the picked add-ons), the history (created, sent, viewed, approved, declined) and public_path, the customer's page on the sub-account's domain (none for drafts). Also template_id, on_approve, approval_steps, booking_calendar_id, signed and approved_total_cents as the list shows them. - path `estimate_id` (string, required): Estimate id. - `GET /v1/price-book` — The price book (scope billing:read) The saved items estimates and invoices pick their lines from: name, details, category, unit price, taxable, photo, and how often it's used (most used first). - query `search` (string): Name or category contains (2-80 characters). - query `include_inactive` (boolean): Include archived items. - query `limit` (number): 1-500, default 100. - `POST /v1/estimates` — Create an estimate (draft) (scope billing:write) Saved as a draft exactly as the estimate editor saves one: the sub-account's next number, its default terms, days valid and tax rate, the lead's name, email, phone and address filled in. Send items for one option, or options (2-5, e.g. Good / Better / Best) each with its items; every option's subtotal, tax and total are worked out as the editor does (each line rounded, tax on taxable lines; an add-on line counts only once the customer picks it). With Quote templates on (Settings > Features), template_id starts it from a saved quote (its title, intro, terms, days valid, options and lines, on_approve and booking calendar) and anything else you send replaces the template's (items or options replace all its lines); lines can be add-ons (optional) and on_approve says what approving does. Those fields answer 403 feature_off while Quote templates is off. Answers with the estimate as GET /v1/estimates/{estimate_id} shows it. Send it with POST /v1/estimates/{estimate_id}/send. Technicians only while the sub-account lets them make estimates, and only for their own leads. - body `lead_id` (string): Who it is for (fills in the customer; needed to send it). Or customer_name. - body `template_id` (string): Start from this quote template (GET /v1/estimate-templates). Needs Quote templates. - body `title` (string): Max 200, e.g. Whole-house duct cleaning. - body `intro` (string): A note to the customer at the top (max 2000). - body `items` (array): One option's lines: [{ description (the line's name, max 300), details? (max 2000), image_url? (https), quantity? (default 1), unit_price_cents, taxable? (default true), optional? (an add-on the customer may tick, counted once picked; needs Quote templates) }]. At least one line isn't optional. - body `options` (array): Instead of items, up to 5 choices: [{ name, description?, image_url?, recommended?, items: [...] }]. One is recommended (the first marked, else the first). - body `on_approve` (object): What approving does: { signature (they draw their signature), invoice: "none" | "draft" (an invoice waits for you to send) | "pay" (they pay it right away), deposit_percent (above 0, below 100) or deposit_cents (a fixed amount; either needs an invoice), mark_won (the lead is marked Won with the total) }, or null for nothing automatic. Default: the template's, else nothing automatic. Needs Quote templates. - body `booking_calendar_id` (string): After approving, the customer can book a time on this calendar of the sub-account (GET /v1/calendars), or null. Default: the template's. Needs Quote templates. - body `tax_rate` (number): Percent, 0-30. Default: the sub-account's. - body `valid_days` (number): Days it is valid (1-365). Default: the sub-account's. Or expires_at. - body `expires_at` (string): Last day, YYYY-MM-DD, or null for no end. - body `terms` (string): Max 4000. Default: the sub-account's estimate terms. - body `currency` (string): 3 letters, default usd. - body `customer_name` (string): Without a lead, or to change what the lead fills in. - body `customer_email` (string): Customer email. - body `customer_phone` (string): Customer phone. - body `customer_address` (string): Customer address. - example body: {"workspace_id":"uuid","lead_id":"uuid","title":"Duct cleaning","options":[{"name":"Good","items":[{"description":"Main trunk lines","unit_price_cents":29900}]},{"name":"Better","recommended":true,"items":[{"description":"Every vent and return","details":"Up to 20 vents, before and after photos.","unit_price_cents":49900}]}]} - `PATCH /v1/estimates/{estimate_id}` — Change an estimate (scope billing:write) Send only what changes. options (or items) replace every option and line, as the editor saves; a new tax_rate re-totals the options. on_approve, booking_calendar_id and add-on lines (optional) need Quote templates on (403 feature_off otherwise); template_id is only for creating. An approved estimate or one already made into an invoice answers 409: make a new one. - path `estimate_id` (string, required): Estimate id. - body `title` (string): New title. - body `intro` (string): New note at the top. - body `lead_id` (string): Or null. - body `items` (array): Replaces the options with one (lines may be optional add-ons, see create). - body `options` (array): Replaces the options. - body `tax_rate` (number): Percent, 0-30; re-totals the options. - body `valid_days` (number): Days valid from today (1-365). - body `expires_at` (string): Last day, YYYY-MM-DD, or null. - body `terms` (string): New terms. - body `customer_name` (string): Customer name. - body `customer_email` (string): Customer email. - body `customer_phone` (string): Customer phone. - body `customer_address` (string): Customer address. - body `on_approve` (object): What approving does: { signature (they draw their signature), invoice: "none" | "draft" (an invoice waits for you to send) | "pay" (they pay it right away), deposit_percent (above 0, below 100) or deposit_cents (a fixed amount; either needs an invoice), mark_won (the lead is marked Won with the total) }, or null for nothing automatic. Needs Quote templates. - body `booking_calendar_id` (string): A calendar of the sub-account, or null. Needs Quote templates. - example body: {"tax_rate":8.25} - `DELETE /v1/estimates/{estimate_id}` — Delete an estimate (scope billing:write) One that became an invoice stays (409), so the invoice still points at it. - path `estimate_id` (string, required): Estimate id. - `POST /v1/estimates/{estimate_id}/send` — Send an estimate to the lead (scope billing:write) Like the editor's Send: a text and/or an email to the estimate's lead with the link to review and approve it (on the sub-account's own domain when it has one), in the editor's own words unless you send message (it must include {link}). Sent as the key's person, with the usual opt-out, credit and limit checks; each is billed like any text or email. A draft (or a declined or expired one) becomes sent. sent lists each channel and why one didn't go. - path `estimate_id` (string, required): Estimate id. - body `channel` (string): Default both (whichever the lead has). - body `message` (string): Your own wording, with {link}. - body `subject` (string): The email's subject. - example body: {"channel":"sms"} - `POST /v1/estimates/{estimate_id}/convert` — Make the invoice (scope billing:write) Convert to invoice: a draft invoice from the option the customer picked (else the recommended one, or option_id), with its lines (and the add-ons the customer picked, never the ones they left), the estimate's tax rate and the sub-account's due days, terms and notes; the estimate becomes converted. Owners and admins (invoices are theirs). Send the invoice from the app. - path `estimate_id` (string, required): Estimate id. - body `option_id` (string): The option to invoice. - `GET /v1/estimate-templates` — Quote templates (scope billing:read) Saved quotes estimates start from, the most used first: name, the estimate title it fills in, shape (options, lines, add-ons), from_cents (the recommended option's lines before tax and add-ons), what approving does (on_approve, and approval_steps in words), the booking calendar, use_count and last_used_at. Everyone who makes estimates reads them. Needs Quote templates on in Settings > Features (PATCH /v1/workspaces/{workspace_id} with enabled_features.quote_templates); while it's off this answers 403 feature_off. - `GET /v1/estimate-templates/{template_id}` — One quote template with its lines (scope billing:read) Adds intro, terms, valid_days and the options with every line (prices in cents; optional = an add-on the customer may tick). Needs Quote templates on in Settings > Features (PATCH /v1/workspaces/{workspace_id} with enabled_features.quote_templates); while it's off this answers 403 feature_off. - path `template_id` (string, required): Template id. - `POST /v1/estimate-templates` — Save a quote template (scope billing:write) Owners and admins, at most 200 per sub-account. Without on_approve a new template asks for a signature, has the customer pay the invoice right away and marks the lead Won, as in the app. Make an estimate from it with POST /v1/estimates template_id. Needs Quote templates on in Settings > Features (PATCH /v1/workspaces/{workspace_id} with enabled_features.quote_templates); while it's off this answers 403 feature_off. - body `name` (string, required): What the team sees in the list (max 120). - body `title` (string): The estimate's title it fills in (max 200). - body `intro` (string): A note to the customer at the top (max 2000). - body `terms` (string): Max 4000. Empty: the sub-account's estimate terms. - body `valid_days` (number): Days an estimate made from it is valid (1-365). Empty: the sub-account's default. - body `options` (array): The options with their lines, 1-5 (replaces them all): [{ name, description?, image_url? (https), recommended?, items: [{ description (max 300), details?, image_url? (https), quantity? (default 1), unit_price_cents, taxable? (default true), optional? (an add-on the customer may tick; counts once picked) }] }]. Every option needs at least one line that isn't optional. - body `on_approve` (object): What approving does: { signature (they draw their signature), invoice: "none" | "draft" (an invoice waits for you to send) | "pay" (they pay it right away), deposit_percent (above 0, below 100) or deposit_cents (a fixed amount; either needs an invoice), mark_won (the lead is marked Won with the total) }, or null for nothing automatic. - body `booking_calendar_id` (string): After approving, the customer can book a time on this calendar of the sub-account (GET /v1/calendars), or null. - example body: {"workspace_id":"uuid","name":"Window cleaning, standard house","title":"Window cleaning","options":[{"name":"Outside only","items":[{"description":"Exterior windows, up to 20","unit_price_cents":19900}]},{"name":"Inside and out","recommended":true,"items":[{"description":"Every window, both sides","unit_price_cents":29900},{"description":"Screens washed","unit_price_cents":4900,"optional":true}]}],"on_approve":{"signature":true,"invoice":"pay","deposit_percent":25,"mark_won":true}} - `PATCH /v1/estimate-templates/{template_id}` — Change a quote template (scope billing:write) Owners and admins. Send only what changes; options replace them all. Estimates already made from it keep what they copied. Needs Quote templates on in Settings > Features (PATCH /v1/workspaces/{workspace_id} with enabled_features.quote_templates); while it's off this answers 403 feature_off. - path `template_id` (string, required): Template id. - body `name` (string): New name. - body `title` (string): New title. - body `intro` (string): New note at the top. - body `terms` (string): New terms. - body `valid_days` (number): 1-365, or null. - body `options` (array): Replaces the options (see create). - body `on_approve` (object): What approving does: { signature (they draw their signature), invoice: "none" | "draft" (an invoice waits for you to send) | "pay" (they pay it right away), deposit_percent (above 0, below 100) or deposit_cents (a fixed amount; either needs an invoice), mark_won (the lead is marked Won with the total) }, or null for nothing automatic. - body `booking_calendar_id` (string): A calendar of the sub-account, or null. - example body: {"on_approve":{"signature":true,"invoice":"draft","mark_won":false}} - `DELETE /v1/estimate-templates/{template_id}` — Delete a quote template (scope billing:write) Owners and admins. Estimates made from it keep everything they copied. Needs Quote templates on in Settings > Features (PATCH /v1/workspaces/{workspace_id} with enabled_features.quote_templates); while it's off this answers 403 feature_off. - path `template_id` (string, required): Template id. ### Email marketing - `GET /v1/email-campaigns` — Email campaigns and their results (scope messaging:read) The sub-account's marketing emails, most recently changed first, as Tools > Email Marketing lists them: status (draft, scheduled, sending, sent, failed, canceled), subject, who it goes to, the pace (drip: every emails a batch, minutes between batches; null = all at once), how far it got and the results (delivered, opened, clicked, booked, booked after a click, unsubscribed, bounced). Owners and admins. - query `status` (string): Filter. - query `limit` (number): 1-100, default 25. - `GET /v1/email-campaigns/{campaign_id}` — One email campaign (scope messaging:read) Adds its content (subject, preheader, headline, sections in blocks, the button, signature, design), where the button goes (destination), problems (what still blocks sending; ready_to_send when there are none) and the header pictures' status. - path `campaign_id` (string, required): Campaign id. - `POST /v1/email-campaigns` — Create an email campaign (draft) (scope messaging:write; uses credits) With brief, the AI designs and writes the whole email from one or two sentences, as Write it for me does (it can take a minute or two), and suggests an audience (suggested_audience); pictures: true also makes AI header pictures (0.5 credits each, three a round). Without, a draft from the business's own details and the content you send. The button goes to destination (default: the newest published Smart Page, else a booking form) or button_url. Nothing is sent. Owners and admins. - body `name` (string): Your name for it (max 120). - body `brief` (string): What the email is about: the offer, the deadline, who it's for (4-4000 characters). Not with the content fields. - body `pictures` (boolean): With brief: AI header pictures (spends credits). Default false. - body `destination` (object): Where the button goes: { kind: smart_page | smart_form, id }, { kind: url, url } or { kind: none }. - body `subject` (string): Max 150. - body `preheader` (string): The preview line inboxes show after the subject (max 200). - body `eyebrow` (string): A small label above the headline (max 40). - body `headline` (string): Max 160. - body `greeting` (string): e.g. Hi {first_name}, (max 80). - body `body` (string): The words in markdown (## headings, - bullets, **bold**, [links](https://...)), max 12000. Replaces every section with one text section. - body `blocks` (array): Instead of body, up to 24 sections as GET shows them: text {md}, offer {value, label, was, note, kicker}, image {url}, split {url, title, md}, features / steps {title, items}, quote {text, name, stars}, gallery {images}, banner {text}, faq {items: [{q, a}]}, cards {items}, button {label, url}, divider, html {html} (email-safe HTML), game {gameId, headline, text, button} (one of the sub-account's reward games: its picture and a play button; each reader who clicks gets their own play). - body `button_label` (string): The main button (max 50). - body `button_url` (string): Where it goes: a full http(s) link. - body `hero_image_url` (string): An https picture at the top, or empty to remove it. - body `hero_image_alt` (string): Its description. - body `signoff` (string): e.g. Talk soon, - body `signer_name` (string): Who signs it. - body `signer_title` (string): Their title. - body `ps` (string): A P.S. under the signature (max 600). - body `design` (string): The look. - body `show_logo` (boolean): Design > Logo at the top: false leaves the logo and business name off the top of the email (when a picture or your own header already shows them); true puts them back. Works with brief too. - body `html` (string): Your own HTML (a whole email, max 250,000 characters): sent as written instead of the designed email, with subject and preheader still applied. Scripts are taken out; {first_name}, {business} and {unsubscribe_link} are filled in, and without an unsubscribe link a footer with the business's address and one is added. Send an empty string to go back to the designed email. - body `audience` (string): Who gets it: everyone with an email address, everyone who hasn't booked, leads in some stages, or leads with any of some tags. - body `stages` (array): audience stages: stage keys (GET /v1/stages). - body `tags` (array): audience tags: tag names or ids (GET /v1/tags). - body `not_booked` (boolean): audience tags: only those who haven't booked. - example body: {"workspace_id":"uuid","brief":"$49 furnace tune-up through November 15, for past customers","design":"fresh"} - `PATCH /v1/email-campaigns/{campaign_id}` — Change a draft (scope messaging:write) Send only what changes, as the builder saves it; brief has the AI rewrite the whole draft instead. A campaign that was sent or scheduled answers 409: duplicate it. - path `campaign_id` (string, required): Campaign id. - body `name` (string): New name. - body `brief` (string): The AI rewrites the draft from this (not with the content fields). - body `pictures` (boolean): With brief: new AI header pictures (spends credits). - body `subject` (string): Max 150. - body `preheader` (string): The preview line inboxes show after the subject (max 200). - body `eyebrow` (string): A small label above the headline (max 40). - body `headline` (string): Max 160. - body `greeting` (string): e.g. Hi {first_name}, (max 80). - body `body` (string): The words in markdown (## headings, - bullets, **bold**, [links](https://...)), max 12000. Replaces every section with one text section. - body `blocks` (array): Instead of body, up to 24 sections as GET shows them: text {md}, offer {value, label, was, note, kicker}, image {url}, split {url, title, md}, features / steps {title, items}, quote {text, name, stars}, gallery {images}, banner {text}, faq {items: [{q, a}]}, cards {items}, button {label, url}, divider, html {html} (email-safe HTML), game {gameId, headline, text, button} (one of the sub-account's reward games: its picture and a play button; each reader who clicks gets their own play). - body `button_label` (string): The main button (max 50). - body `button_url` (string): Where it goes: a full http(s) link. - body `hero_image_url` (string): An https picture at the top, or empty to remove it. - body `hero_image_alt` (string): Its description. - body `signoff` (string): e.g. Talk soon, - body `signer_name` (string): Who signs it. - body `signer_title` (string): Their title. - body `ps` (string): A P.S. under the signature (max 600). - body `design` (string): The look. - body `show_logo` (boolean): Design > Logo at the top: false leaves the logo and business name off the top of the email (when a picture or your own header already shows them); true puts them back. Works with brief too. - body `html` (string): Your own HTML (a whole email, max 250,000 characters): sent as written instead of the designed email, with subject and preheader still applied. Scripts are taken out; {first_name}, {business} and {unsubscribe_link} are filled in, and without an unsubscribe link a footer with the business's address and one is added. Send an empty string to go back to the designed email. - body `audience` (string): Who gets it: everyone with an email address, everyone who hasn't booked, leads in some stages, or leads with any of some tags. - body `stages` (array): audience stages: stage keys (GET /v1/stages). - body `tags` (array): audience tags: tag names or ids (GET /v1/tags). - body `not_booked` (boolean): audience tags: only those who haven't booked. - example body: {"subject":"Last call: $49 tune-ups end Friday","audience":"not_booked"} - `DELETE /v1/email-campaigns/{campaign_id}` — Delete an email campaign (scope messaging:write) A scheduled or sending one answers 409: stop it first. - path `campaign_id` (string, required): Campaign id. - `POST /v1/email-campaigns/{campaign_id}/send` — Send or schedule a draft (scope messaging:write; uses credits) Emails real people. As the Send button: to the saved audience (or the one you send), now or at schedule_at, all at once or a few at a time (drip). Left out: leads with no email address, who unsubscribed, bounced or marked it spam. Each email costs messaging credits (none through the business's own email server); a send the credits don't cover answers 402 before anything goes out. A draft is sent once: a second call answers 409. recipients is how many it goes to. - path `campaign_id` (string, required): Campaign id. - body `audience` (string): Who gets it: everyone with an email address, everyone who hasn't booked, leads in some stages, or leads with any of some tags. - body `stages` (array): audience stages: stage keys (GET /v1/stages). - body `tags` (array): audience tags: tag names or ids (GET /v1/tags). - body `not_booked` (boolean): audience tags: only those who haven't booked. - body `schedule_at` (string): ISO 8601 with a time zone, 2 minutes to 90 days ahead. Leave out to send now. - body `drip` (object): A few at a time: { every: 1-10000 emails, minutes: 5-43200 between batches }. The whole send must fit in 90 days. - example body: {"audience":"tags","tags":["Past customer"],"schedule_at":"2026-11-03T09:00:00-05:00","drip":{"every":100,"minutes":60}} - `POST /v1/email-campaigns/{campaign_id}/cancel` — Stop a send (scope messaging:write) A scheduled campaign goes back to draft; one that is sending stops (the emails not yet sent are skipped). - path `campaign_id` (string, required): Campaign id. - `POST /v1/email-campaigns/{campaign_id}/send-rest` — Send the rest now (scope messaging:write; uses credits) A campaign going out a few at a time: everyone still waiting gets it now. Emails real people. - path `campaign_id` (string, required): Campaign id. - `POST /v1/email-campaigns/{campaign_id}/duplicate` — Duplicate a campaign (scope messaging:write) A new draft with the same content, audience and pace, to change and send again. - path `campaign_id` (string, required): Campaign id. ### Contracts - `GET /v1/contracts` — Contracts (scope leads:read) The sub-account's contracts, newest first: who signs (lead and recipient), status (draft, sent, signed, declined, voided) and stage as the page shows it (draft, sent, viewed, signed, completed when you countersigned, declined, voided, expired), when it was sent, opened, signed or declined (and why), the onboarding call it booked, and sign_url once it is out of draft. - query `status` (string): Filter. - query `lead_id` (string): One lead's contracts. - query `limit` (number): 1-100, default 25. - query `before` (string): next_before from the previous page. - `GET /v1/contracts/{contract_id}` — One contract (scope leads:read) Adds its text (body_html), the values filled in, the {{blanks}} left and its history (created, sent, resent with the channels, viewed, signed, declined, voided). - path `contract_id` (string, required): Contract id. - `GET /v1/contract-templates` — Contract templates (scope leads:read) The sub-account's templates with their {{blanks}}. Most fill in by themselves on a new contract (client_name, client_email, client_phone, client_address, business_name, date); send values for the rest. - query `include_body` (boolean): Include each template's text (body_html). - `POST /v1/contracts` — Create a contract (draft) (scope leads:write) Saved as a draft, as New contract saves one. From a template (template_id, with values for its blanks; the template's onboarding call setting comes along) or from your own text (body in markdown: # headings, paragraphs, - lists, **bold**, at least 40 characters). The lead's name, email, phone and address, the business's name and today's date fill in by themselves; recipient_* are for a contract without a lead. Nothing is sent: share it with POST /v1/contracts/{contract_id}/link or send it with /send (which needs a lead). - body `lead_id` (string): Who signs. - body `template_id` (string): From this template (GET /v1/contract-templates). Or body. - body `values` (object): { blank: value } for the template's {{blanks}} (up to 2000 characters each). - body `body` (string): Instead of a template: the contract's text in markdown (max 60000). - body `subject` (string): The title (max 200). Default: the template's name, or the text's first line. - body `recipient_name` (string): Without a lead. - body `recipient_email` (string): Without a lead. - body `recipient_phone` (string): Without a lead. - body `expires_in_days` (number): The signing link stops working after this many days (1-365). Default: never. - example body: {"workspace_id":"uuid","lead_id":"uuid","template_id":"uuid","values":{"start_date":"November 3","price":"$1,200"}} - `POST /v1/contracts/{contract_id}/link` — Get the signing link (nothing sent) (scope leads:write) As Copy link: the link to share yourself, with nothing emailed or texted. A draft's link doesn't open, so a draft comes out of draft first (status sent). A voided contract answers 409. - path `contract_id` (string, required): Contract id. - body `allow_blanks` (boolean): Let it go out with {{blanks}} left for the signer to fill on the signing page. Default false: 409 with the blanks. - `POST /v1/contracts/{contract_id}/send` — Send a contract for signature (scope leads:write; uses credits) Emails and / or texts the contract's lead the signing link (in the business's name, from its own email and number, as the key's person; billed like any text or email; opted-out leads aren't sent to), and the message shows in the lead's conversation. A draft or declined contract becomes sent; sending again re-sends the same link. sent_via lists what went, failures why a channel didn't. Signed or voided contracts answer 409; one with no lead too. - path `contract_id` (string, required): Contract id. - body `channel` (string): Default email. - body `note` (string): A short note with the link (max 1000). - body `allow_blanks` (boolean): Let it go out with {{blanks}} left for the signer to fill on the signing page. Default false: 409 with the blanks. - example body: {"channel":"both","note":"Here's the agreement we talked about."} - `POST /v1/contracts/{contract_id}/void` — Void a contract (scope leads:write) As Void on the page: the signing link stops working right away. No undo; signed contracts can't be voided. - path `contract_id` (string, required): Contract id. ### Proposals - `GET /v1/proposals` — Proposals (scope leads:read) Newest first: your agency's own proposals (leave workspace_id out), or a sub-account's. Who each is for, status (draft, sent, accepted, declined) and stage as the page shows it (draft, sent, viewed, accepted, declined, expired), when it was sent and opened, the package and add-ons the client said yes to (accepted_choice) and the contract that made, whether the AI is working on it (ai_status building or editing), public_url once it is out of draft, and page: where it opens in the app. template=true lists your templates instead. Credits spent (credits_used) only on your agency's own. - query `status` (string): Filter. - query `lead_id` (string): A sub-account's: one lead's proposals. - query `template` (boolean): true: your templates. Default false. - query `limit` (number): 1-100, default 25. - query `before` (string): next_before from the previous page. - `GET /v1/proposals/{proposal_id}` — One proposal (scope leads:read) Adds what it says: its sections in order (type and heading; a custom section's layout and HTML length), its words as plain text, the pricing (packages, add-ons, and whether the client picks one), the [blanks] the AI left for what it didn't know, the {{variables}} it uses and the ones it has nothing to fill with, its pictures (ready, being made, failed), the brief it was written from, the AI's last turn (working with its progress, or done with its reply and the changes it made) and its history (sent with how, viewed, accepted with the choice, declined). include=doc adds the whole document (theme, Brand CSS, every section with its custom HTML) and its rev, to change it with PATCH. - path `proposal_id` (string, required): Proposal id. - query `include` (string): doc: the whole document as well (theme, css, sections). - `POST /v1/proposals` — Create a proposal (the AI writes it, or your own HTML) (scope leads:write; uses credits) As New proposal, one of three ways. build: the AI writes and designs the whole proposal from your brief and prices, as Build with AI does, and makes its pictures (images, 0-24); it answers 201 at once with ai.message_id while the AI works for a minute or two: read the proposal until ai_status is idle. It never invents results, testimonials, clients or prices: what it doesn't know is left as [blanks]. template_id: a copy of one of your templates (GET /v1/proposals?template=true) for the client you name: a template that uses {{variables}} is filled in, any other is rewritten by the AI (rewrite: true or false decides). doc: your own design, no AI and no credits: { theme, css, sections }, where a custom section is your HTML and CSS (layout fullWidth or contained), css is the Brand CSS every custom section shares, and built-in sections (pricing for the packages they pick from) can sit beside them; as_template: true saves it straight as a template. The answer lists warnings for anything the page leaves out (no scripts, forms or iframes; https pictures; CSS that loads only Google Fonts and https files). Rules and an example: GET /v1/proposals/design-guide. AI work spends credits: about 1.5-3.5 for the writing plus 0.5 a picture, a change about 0.3-1.5 (in a sub-account, at its own price for Proposals, often included); 402 when they don't cover it (nothing is made). The next step after the client's "I agree": contract_template_id (the contract to sign), then signup_link_id (your agency's onboarding) or booking_calendar_id (a sub-account's booking page). Nothing is sent. - body `build` (object): The AI writes it: { brief (what you're proposing, who it's for, 10-8000 characters), pricing (your packages and prices in your words, max 3000), images (AI pictures 0-24, default 4), preset (auto = your brand colours, or a look: executive, editorial, mono, emerald, electric, sunset, ocean, blush, slate, noir, citrus, atelier) }. Or template_id. - body `template_id` (string): Instead of build: a copy of this template. - body `rewrite` (boolean): With template_id: the AI rewrites the copy for the client named. Default true, or false when the template uses {{variables}} (they fill in). - body `doc` (object): Instead of build: your own design, no AI. { theme: { headingFont, bodyFont, colors: { bg, surface, ink, muted, primary, accent }, radius, texture, numbered }, css: your Brand CSS (shared by every custom section, max 60,000), sections: [{ type: "custom", layout: "fullWidth" | "contained", html (max 100,000), css (max 50,000) }, or any built-in section: cover, letter, cards, feature, scope, timeline, stats, case_study, pricing, team, testimonial, faq, gallery, text, cta] } (1-40 sections). See GET /v1/proposals/design-guide. - body `as_template` (boolean): With doc: save it as a template (no client). Make proposals from it with template_id. - body `title` (string): Your name for it (max 200). Default: Proposal for . - body `lead_id` (string): A sub-account's lead it is for: fills in the client's name, email and phone, and its answer lands on the lead's timeline. - body `client_name` (string): The client's name (max 200). - body `client_company` (string): Their company (max 200). - body `client_email` (string): Where it is emailed. - body `client_phone` (string): Their phone. - body `client_website` (string): Their website: a build reads it for context (it never quotes it word for word). - body `contract_template_id` (string): After I agree: this contract to sign (one of the same account's contract templates). - body `signup_link_id` (string): Agency proposals: after I agree (and the contract), this signup link (GET /v1/signup-links). - body `booking_calendar_id` (string): A sub-account's proposals: after I agree (and the contract), this booking page (GET /v1/calendars). - body `accept_label` (string): The accept button's words (max 60). Default I agree. - body `expires_in_days` (number): The offer ends after this many days (1-365): the page still opens, but it can no longer be accepted. - example body: {"client_company":"Acme Dental","client_name":"Dana Lee","client_email":"dana@acmedental.com","build":{"brief":"Local SEO and Google Ads for a two-location dental clinic that wants more implant patients","pricing":"Growth $1,500/month, Scale $2,800/month; setup $500 once","images":4},"contract_template_id":"uuid"} - `PATCH /v1/proposals/{proposal_id}` — Change it yourself (your own HTML, no AI) (scope leads:write) Your own changes, saved at once with no AI and no credits (an editor open on it picks them up). doc replaces the whole document; or theme (merged into the current one), css (the Brand CSS; "" removes it), sections (the whole list) and ops: changes by section id (GET /v1/proposals/{proposal_id} lists them), { op: "update", id, set: { html, css, heading, ... } }, { op: "replace", id, section }, { op: "add", after: id | "start", section }, { op: "remove", id }, { op: "move", id, after }, { op: "theme", set }, { op: "css", css }. Also its name, the client (not on a template), the button's words, the end date and the next step. The answer lists the changes made and warnings for anything the page leaves out. An accepted proposal answers 409 (duplicate it), as does one the AI is working on, or one changed meanwhile. - path `proposal_id` (string, required): Proposal id. - body `title` (string): Its name (max 200). - body `doc` (object): The whole document: { theme, css, sections } (as in POST /v1/proposals). - body `theme` (object): Theme fields to change. - body `css` (string): The Brand CSS every custom section shares. "" removes it. - body `sections` (array): The whole list of sections. - body `ops` (array): Changes by section id (up to 60): update, replace, add, remove, move, theme, css. - body `client_name` (string): The client's name (max 200). - body `client_company` (string): Their company (max 200). - body `client_email` (string): Where it is emailed. - body `client_phone` (string): Their phone. - body `client_website` (string): Their website: a build reads it for context (it never quotes it word for word). - body `accept_label` (string): The accept button's words (max 60); null for I agree. - body `expires_in_days` (number): The offer ends this many days from now (1-365); null for no end. - body `contract_template_id` (string): After I agree: this contract to sign; null for none. - body `signup_link_id` (string): Agency proposals: after I agree, this signup link; null for none. - body `booking_calendar_id` (string): A sub-account's proposals: after I agree, this booking page; null for none. - example body: {"ops":[{"op":"update","id":"hero","set":{"html":"

A plan for {{client_company}}

"}}],"css":".hero{padding:120px 8vw;background:var(--pp-primary);color:var(--pp-on-primary)}"} - `GET /v1/proposals/design-guide` — How to design one in your own HTML (scope leads:read) The rules for a proposal in your own HTML and CSS, as markdown an AI can read before it designs one: the document's parts, custom sections and the Brand CSS, what HTML and CSS are drawn (no JavaScript; https pictures; Google Fonts), the theme's CSS variables, the {{variables}}, pricing and the I agree block, templates, and an example. - `POST /v1/proposals/{proposal_id}/edit` — Change it with the AI (scope leads:write; uses credits) One change from the editor's AI Designer, in your words: "make the pricing a table", "add an FAQ about contracts", "shorter, and warmer". Answers at once with ai.message_id while the AI works; read the proposal for its reply and the changes it made. Spends credits; an accepted proposal answers 409 (duplicate it), as does one the AI is still working on. - path `proposal_id` (string, required): Proposal id. - body `instruction` (string, required): What to change (max 4000). - body `section_id` (string): The section it's about (GET /v1/proposals/{proposal_id} lists them). - example body: {"instruction":"Add a short FAQ about the 3-month minimum and make the pricing a table."} - `POST /v1/proposals/{proposal_id}/link` — Get the public link (nothing sent) (scope leads:write) As Copy link: the link to share yourself, with nothing emailed or texted. A draft's page doesn't open, so a draft comes out of draft first (status sent). A template answers 409. - path `proposal_id` (string, required): Proposal id. - body `allow_blanks` (boolean): Let it go out with [blanks] the AI left for what it didn't know. Default false: 409 with the blanks. - `POST /v1/proposals/{proposal_id}/send` — Send a proposal (scope leads:write; uses credits) Emails the client the link in your brand (a sub-account's: the business's), with your note. A sub-account's proposal to one of its leads goes through the lead's conversation as the key's person, by email and / or text (billed like any text or email; opted-out leads aren't sent to). A draft or declined proposal becomes sent; sending again re-sends the same link. sent_via lists what went, failures why a channel didn't. An accepted proposal or a template answers 409. - path `proposal_id` (string, required): Proposal id. - body `channel` (string): Default email. sms and both: a sub-account's proposal to a lead. - body `to_email` (string): Default: the client's email (or the lead's). - body `note` (string): Your words in the email instead of the standard ones (max 1500). - body `allow_blanks` (boolean): Let it go out with [blanks] the AI left for what it didn't know. Default false: 409 with the blanks. - example body: {"note":"Dana, here's the plan we talked about. Happy to walk you through it on Thursday."} - `POST /v1/proposals/{proposal_id}/duplicate` — Duplicate, save as a template, or use for another client (scope leads:write; uses credits) A copy with the same design and words and a new link, nothing sent or answered (an accepted proposal too: that's how a new version is made). as_template saves it as a template. Naming a client or a lead makes it theirs and the AI rewrites it for them, keeping the design and prices (Use for another client; rewrite: false keeps the words; the rewrite spends credits). It stays in its account. - path `proposal_id` (string, required): Proposal id. - body `as_template` (boolean): Save the copy as a template (no client). - body `title` (string): The copy's name (max 200). - body `lead_id` (string): A sub-account's lead it is for: fills in the client's name, email and phone, and its answer lands on the lead's timeline. - body `client_name` (string): The client's name (max 200). - body `client_company` (string): Their company (max 200). - body `client_email` (string): Where it is emailed. - body `client_phone` (string): Their phone. - body `client_website` (string): Their website: a build reads it for context (it never quotes it word for word). - body `rewrite` (boolean): For a client: the AI rewrites it for them. Default true. - example body: {"client_company":"Brightside Ortho","client_name":"Sam Ortiz","client_email":"sam@brightside.com"} ### Dashboard - `GET /v1/sales` — The Sales page: won jobs, parts, tips and profit (scope leads:read) Settings > Features > Sales (off until an owner or admin turns it on: 403 feature_off until then). Won jobs in the window by the date they were won, as the Sales page adds them up: what customers paid, parts, tips and profit in total, per technician (deal_sold_by, else whoever the lead is assigned to), per lead source and per tag, plus the jobs themselves. Every group also has plans, monthly_cents (the monthly revenue its new plans add) and expected_cents (what its jobs are expected to bring in, one-time jobs at their amount), and each job its deal_type and plan (Plans & memberships). Record a sale with PATCH /v1/leads/{lead_id}: status won, deal_value_cents, deal_parts_cents, deal_tip_cents, deal_sold_by. Owners and admins only. - query `days` (number): 1-365, default 30. - query `from` (string): ISO start, instead of days. - query `to` (string): ISO end, default now. ### Ads & Google - `GET /v1/ad-insights` — The sub-account's Ad Insights (scope meta:read) Exactly what its Ad Insights page shows: spend, leads, cost per lead, impressions and clicks for the Meta ad accounts attached to it (one, or all of them added up with each account's share in accounts, and an error for one that couldn't be read), each read with whichever connected Facebook profile can; per campaign and per ad, only the campaigns and ads the agency picked for this sub-account; ads left out (ads_hidden) when the agency hides them from the client. Amounts are added up in each account's own currency (accounts_meta). 403 ad_insights_off when Ad Insights is off for it. - query `ad_account_id` (string): "all" (default) or one attached account, act_123. - query `date_preset` (string): Default last_30d. - query `since` (string): YYYY-MM-DD, with until (instead of date_preset). - query `until` (string): YYYY-MM-DD. - query `campaign_id` (string): Only this campaign's ads. - `GET /v1/google-ads` — Google Ads: the connection and conversions sent (scope meta:read) The sub-account's own Google Ads connection (Ad Insights > Google Ads): its ad accounts (customers), the one in use, whether booked / won leads are sent back as conversions and to which conversion actions, and the newest conversions with their status (pending, sent, failed, skipped) and how each lead was matched (gclid, gbraid, wbraid or email / phone). Owners and admins. - `GET /v1/google-ads/report` — Google Ads reports, live (scope meta:read) One of the Google Ads screens, read live from Google for one of the sub-account's ad accounts: overview (campaigns with spend, clicks, conversions, totals and by day), ad_groups, keywords, ads, search_terms, negatives, campaign_settings (campaign_id), conversion_actions, bidding, recommendations. Nothing is changed. Owners and admins. - query `report` (string): Default overview. - query `range` (string): Default last_30d. - query `customer_id` (string): One of its accounts (GET /v1/google-ads). Default: the one picked in the app. - query `campaign_id` (string): Narrow to one campaign. - query `ad_group_id` (string): Narrow to one ad group. - query `limit` (number): search_terms: rows, default 500. - `GET /v1/google-business/profiles` — Google Business Profiles (scope workspaces:read) Every Business Profile connected to the sub-account (it can have several): the location, rating, review count, whether Google's API answers for it, and its auto-reply, auto-post and photo settings, local knowledge, words for replies and photo geotag spot; plus the Google logins connected (email only). Owners and admins. - `GET /v1/google-business/reviews` — Google reviews and replies (scope workspaces:read) Reviews synced from Google every 15 minutes, newest first, with the reply sent, the draft waiting for approval and its status. Owners and admins. - query `profile_id` (string): One profile. - query `status` (string): Filter. - query `unanswered` (boolean): Only reviews without a reply. - query `max_stars` (number): This many stars or fewer. - query `limit` (number): 1-100, default 25. - query `cursor` (string): next_cursor from the previous page. - `GET /v1/google-business/posts` — Google Business Profile posts (scope workspaces:read) Drafts, scheduled and published posts (title, text, button, offer, photo, when, the live link). Owners and admins. - query `profile_id` (string): One profile. - query `status` (string): Filter. - query `limit` (number): 1-100, default 25. - query `cursor` (string): next_cursor from the previous page. - `GET /v1/google-business/optimizer` — Profile Optimizer runs (scope workspaces:read) Each Profile Optimizer check, newest first: the score, what it found, the keywords, its suggestions and the changes made from it (and undone). Owners and admins. - query `profile_id` (string): One profile. - query `limit` (number): 1-25, default 5. - `GET /v1/map-rankings` — Map Rankings: keywords and scans (scope workspaces:read) Where the business ranks on Google Maps across a grid around it: the keywords tracked (grid, schedule, next and last scan) and the scans, newest first, each with its summary (points, found, top 3, average rank). Owners and admins. - query `keyword_id` (string): One keyword's scans. - query `profile_id` (string): One profile. - query `limit` (number): 1-100, default 25. - query `cursor` (string): next_cursor from the previous page. - `GET /v1/map-rankings/scans/{scan_id}` — One Map Rankings scan (scope workspaces:read) Every grid point with its rank (null: not in the top 20), the competitors found, and the next steps to rank #1 once they've been written (they are written when the scan is first opened in the app). Owners and admins. - path `scan_id` (string, required): Scan id. - `GET /v1/listings` — Business Listings (scope workspaces:read) The directories the business is being listed on: each one's status (queued, scanning, listed, mismatch, not_listed, working, needs_you, submitted, live, owner, skipped, failed) with counts, what differs or what's needed from the owner, the listing link, and the latest activity. Passwords and verification codes are never returned. Owners and admins. - `POST /v1/google-business/posts` — Create a Google post (scope workspaces:write) A post in your own words, Google's rules checked first. Saved as a draft waiting for an OK, or approved at once with approve: true (it then goes up publicly on the business's Google profile on scheduled_for, on its own when the profile is connected to Google; otherwise the app shows it to copy). Owners and admins. - body `profile_id` (string): One of its profiles (default its first). - body `kind` (string): STANDARD (an update, default), OFFER or EVENT. - body `title` (string): OFFER and EVENT posts: up to 58 characters. - body `body` (string, required): The post, up to 1,500 characters. Google refuses a phone number in the text: use the CALL button. - body `cta_type` (string): The button (not on OFFER posts). Left out: the profile's own button and link. - body `cta_url` (string): Full https:// link for the button (or an offer's link). - body `coupon_code` (string): OFFER: the code, up to 58 characters. - body `offer_terms` (string): OFFER: terms and conditions. - body `starts_at` (string): EVENT: when it starts, ISO date-time. - body `ends_at` (string): EVENT: when it ends; OFFER: when it ends (default 30 days). ISO. - body `image_url` (string): A public link to a JPG or PNG (5 MB, 250 x 250 at least), copied in like an upload. - body `scheduled_for` (string): When it goes up on Google, ISO date-time (default: the next posting day on the profile's schedule). - body `approve` (boolean): true: approved now (scheduled), as the app's Schedule it. Default false (a draft). - example body: {"workspace_id":"uuid","body":"Spring tune-ups are open: book a visit and we'll check your whole system in under an hour.","cta_type":"BOOK","cta_url":"https://acmehvac.com/book"} - `POST /v1/google-business/posts/write` — Have the AI write Google posts (scope workspaces:write) The AI writes 1-8 posts in the business's voice from an idea, or one post about each photo of the work in photo_urls (the post carries that photo), dated on the profile's posting days. They are saved as drafts: nothing goes to Google until one is approved or published. Owners and admins. - body `profile_id` (string): One of its profiles (default its first). - body `idea` (string): What to write about, up to 600 characters (needed for OFFER and EVENT). - body `kind` (string): STANDARD (an update, default), OFFER or EVENT. - body `count` (number): 1-8, default 4 (with photo_urls: one per photo). - body `photo_urls` (array): Up to 8 public JPG or PNG links of the business's work. - body `cta_type` (string): The button (not on OFFER posts). Left out: the profile's own button and link. - body `cta_url` (string): Full https:// link for the button (or an offer's link). - body `starts_at` (string): EVENT: when it starts, ISO date-time. - body `ends_at` (string): EVENT: when it ends; OFFER: when it ends (default 30 days). ISO. - body `scheduled_for` (string): The date of a single post, ISO. - example body: {"workspace_id":"uuid","idea":"Free furnace check with any tune-up this month","count":2} - `PATCH /v1/google-business/posts/{post_id}` — Edit a Google post (scope workspaces:write) Change a post that isn't on Google yet (draft, scheduled or failed): send only what changes; image_url null removes the photo. Google's rules are checked on the result. A scheduled post stays approved for its new date. Owners and admins. - path `post_id` (string, required): Post id (GET /v1/google-business/posts). - body `title` (string): OFFER and EVENT posts: up to 58 characters. - body `body` (string): The post, up to 1,500 characters. Google refuses a phone number in the text: use the CALL button. - body `cta_type` (string): The button (not on OFFER posts). Left out: the profile's own button and link. - body `cta_url` (string): Full https:// link for the button (or an offer's link). - body `coupon_code` (string): OFFER: the code, up to 58 characters. - body `offer_terms` (string): OFFER: terms and conditions. - body `starts_at` (string): EVENT: when it starts, ISO date-time. - body `ends_at` (string): EVENT: when it ends; OFFER: when it ends (default 30 days). ISO. - body `scheduled_for` (string): When it goes up on Google, ISO date-time (default: the next posting day on the profile's schedule). - body `image_url` (string): A public JPG or PNG link, or null to remove the photo. - example body: {"body":"Spring tune-ups are open this week only.","scheduled_for":"2026-11-04T17:00:00Z"} - `POST /v1/google-business/posts/{post_id}/approve` — Approve a Google post (scope workspaces:write) A draft becomes scheduled: it goes up publicly on the business's Google profile on its date (on its own when the profile is connected to Google). Google's rules are checked first and the date must not have passed (send scheduled_for to move it). Owners and admins. - path `post_id` (string, required): Post id. - body `scheduled_for` (string): A new date, ISO (default the post's own). - `POST /v1/google-business/posts/{post_id}/unschedule` — Unschedule a Google post (scope workspaces:write) A scheduled post goes back to the drafts, so it doesn't go up on its date. Owners and admins. - path `post_id` (string, required): Post id. - `POST /v1/google-business/posts/{post_id}/publish` — Post on Google now (scope workspaces:write) Publishes the post publicly on the business's Google profile right away, as the app's Post now (a draft, scheduled or failed post). It needs the profile connected to Google; Google's rules are checked first. When Google doesn't take it the answer is 409 with details.code: awaiting_google (Google hasn't opened its API to the account yet) or not_posted (the reason is in error and on the post). Owners and admins. - path `post_id` (string, required): Post id. - `DELETE /v1/google-business/posts/{post_id}` — Delete a Google post (scope workspaces:write) Removes the post from the app. A post already published stays on Google (still_on_google: true); remove it there. Not while it is going up. Owners and admins. - path `post_id` (string, required): Post id. - `POST /v1/google-business/reviews/{review_id}/draft` — Have the AI draft a review reply (scope workspaces:write) The AI writes the reply in the business's voice and tone (the tool's reply settings), or rewrites it following instruction, and saves it as the review's draft. Nothing is posted. Owners and admins. - path `review_id` (string, required): Review id (GET /v1/google-business/reviews). - body `instruction` (string): How to write or change it, up to 600 characters (e.g. mention the warranty). - `PATCH /v1/google-business/reviews/{review_id}` — Edit a reply draft, or skip a review (scope workspaces:write) draft_reply replaces the saved draft (nothing is posted); skip: true takes the review off the list to answer, false brings it back. Owners and admins. - path `review_id` (string, required): Review id. - body `draft_reply` (string): The reply draft, up to 4,000 characters. - body `skip` (boolean): true skips the review; false brings it back. - example body: {"draft_reply":"Thank you, Dana! We're glad the new furnace is keeping you warm."} - `POST /v1/google-business/reviews/{review_id}/reply` — Reply to a Google review (scope workspaces:write) Posts text (or the saved draft) as the business's public reply under the review on Google, as the app's Post reply; on a review already answered it replaces the reply. Only reviews that came from Google with the profile connected: one read from Google Maps or pasted in answers 409 copy_by_hand (paste the reply on Google yourself); awaiting_google and not_posted as for posts. Owners and admins. - path `review_id` (string, required): Review id. - body `text` (string): The reply, up to 4,000 characters (default: the saved draft). - example body: {"text":"Thank you, Dana! We're glad the new furnace is keeping you warm."} - `POST /v1/google-business/optimizer/apply` — Apply Profile Optimizer suggestions (scope workspaces:write) Makes the picked suggestions of a Profile Optimizer check (the newest, or run_id) on the business's live Google profile, which everyone sees: categories added, a new description, services, attributes turned on, the Book button linked to one of its calendars, holiday hours, the website link (website_link) and the opening date. Ids come from the run's suggestions (GET /v1/google-business/optimizer). Each change is recorded and can be undone; dry_run: true asks Google to check them without changing anything. results says what worked. Owners and admins. - body `profile_id` (string): One of its profiles (default its first). - body `run_id` (string): The check (default the newest). - body `categories` (array): Category ids to add (suggestions.categories[].id). - body `description` (string): The description to use, 50-750 characters (the suggested one, edited or not). - body `services` (array): Service ids (suggestions.services[].id). - body `service_updates` (array): Better descriptions for services already on the profile (suggestions.serviceUpdates[].id). Only those change; every other service goes back as Google has it, and a service edited on Google since the check is left out. - body `attributes` (array): Attribute ids to turn on (suggestions.attributes[].id). - body `booking_calendar_id` (string): The calendar the Book button opens (suggestions.booking.calendars[].id). - body `holidays` (array): [{ key, closed }] from suggestions.holidays (closed defaults to true). - body `website_link` (boolean): true: put suggestions.websiteLink.url on the profile (tracking tags on the website link, or the business's site when the profile has none). - body `opening_date` (object): { year, month }: when the business opened, when suggestions.openingDate asks for it. - body `dry_run` (boolean): true: Google validates, nothing changes. - example body: {"workspace_id":"uuid","categories":["categories/gcid:hvac_contractor"],"attributes":["attributes/has_onsite_services"],"dry_run":true} - `POST /v1/google-business/optimizer/changes/{change_id}/undo` — Undo a Profile Optimizer change (scope workspaces:write) Puts what was on the Google profile before that change back (the change ids are in GET /v1/google-business/optimizer, runs[].changes). Owners and admins. - path `change_id` (string, required): Change id. - `POST /v1/map-rankings/keywords` — Track a Map Rankings keyword (scope workspaces:write; uses credits) Tracks where the business ranks on Google Maps for a search, across a grid of points centred on the business (or center_lat / center_lng). On a schedule (weekly by default) its first scan runs within minutes and then on the schedule; each scan costs 0.25 (5x5), 0.5 (7x7), 1 (9x9) or 2 (13x13) credits from the account, the first 3 scans of a business are free. Up to 10 keywords per business. Owners and admins. - body `profile_id` (string): One of its profiles (default its first). - body `keyword` (string, required): What people search, e.g. "furnace repair" (up to 80 characters). - body `grid_size` (number): Points per side: 5, 7 (default), 9 or 13. - body `spacing_m` (number): Meters between points: 402, 805, 1609 (default), 2414, 3219, 4828 or 8047. - body `center_lat` (number): With center_lng: the grid's centre (default the business). - body `center_lng` (number): With center_lat. - body `schedule` (string): Default weekly. - example body: {"workspace_id":"uuid","keyword":"furnace repair","grid_size":7,"schedule":"weekly"} - `PATCH /v1/map-rankings/keywords/{keyword_id}` — Change a tracked keyword (scope workspaces:write; uses credits) Changes a tracked search: how often it's scanned (schedule weekly, monthly or off), the search itself or its grid. Send only what changes; the rest stays as saved. A search never scanned that goes onto a schedule is scanned within minutes (credits, as a scan). Its past scans stay, and GET /v1/map-rankings?keyword_id= reads its ranking over time. Owners and admins. - path `keyword_id` (string, required): Keyword id (GET /v1/map-rankings). - body `schedule` (string): weekly, monthly or off. - body `keyword` (string): What people search (up to 80 characters). - body `grid_size` (number): Points per side: 5, 7, 9 or 13. - body `spacing_m` (number): Meters between points: 402, 805, 1609, 2414, 3219, 4828 or 8047. - body `center_lat` (number): With center_lng: a new centre for the grid. - body `center_lng` (number): With center_lat. - example body: {"schedule":"monthly"} - `DELETE /v1/map-rankings/keywords/{keyword_id}` — Stop tracking a keyword (scope workspaces:write) No more scans for it; its past scans stay readable. Owners and admins. - path `keyword_id` (string, required): Keyword id (GET /v1/map-rankings). - `POST /v1/map-rankings/keywords/{keyword_id}/scan` — Scan a keyword now (scope workspaces:write; uses credits) Starts a scan of the keyword's grid (202): 0.25 to 2 credits by grid size, from the account (free for the first 3 scans of a business); points Google never answers are refunded. One scan of a keyword at a time: while one runs, that one is returned. It takes a few minutes; read it with GET /v1/map-rankings/scans/{scan_id}. 402 when there aren't enough credits. Owners and admins. - path `keyword_id` (string, required): Keyword id. - `POST /v1/listings/scan` — Check the business on the directories (scope workspaces:write) The free check of every directory (202): starts Business Listings for the business, or looks again for the current run (at most every 6 hours). business sets the details every directory gets (default: from its Google profile); they can change until something has been sent. Read the results with GET /v1/listings. Owners and admins. - body `profile_id` (string): One of its profiles (default its first). - body `business` (object): name, street, unit, city, state, zip, country, phone, website, email, category, categories, description, tagline, hours, services, first_name, last_name, year_founded, logo_url, service_area_only. - example body: {"workspace_id":"uuid"} - `POST /v1/listings/start` — Start listing the business (scope workspaces:write; uses credits) Signs the business up, with its details, on every directory the check didn't find it on or found with wrong details, as the app's Start: those listings are public. 8 credits a directory from the account, refunded for each that ends without a listing; credits_charged says how many. Some directories then need the owner (a code, a robot check): GET /v1/listings shows them. Owners and admins. - body `campaign_id` (string): Default the current run (GET /v1/listings). - example body: {"workspace_id":"uuid"} ### Support - `GET /v1/support/tickets` — Support tickets (scope workspaces:read) The sub-account's Support tickets, newest activity first: subject, category, status (open, answered, resolved), who is answering (the assistant or the team), unread state and rating. The agency team sees every ticket; a client admin every ticket of the sub-account; anyone else their own. 403 feature_off while Support is off for the sub-account. - query `status` (string): Filter. - query `limit` (number): 1-100, default 25. - query `cursor` (string): next_cursor from the previous page. - `GET /v1/support/tickets/{ticket_id}` — One support ticket and its messages (scope workspaces:read) Every message in order (the customer, the assistant, the team), with the files' names. Internal notes only for the agency team. - path `ticket_id` (string, required): Ticket id. - `POST /v1/support/tickets` — Open a support ticket (scope workspaces:write) What the sub-account's Support page does: the ticket goes to the account's support team, their AI assistant answers first (usually within a minute; read the ticket for the answer) and hands it to a person when it can't solve it. Replies also arrive by email. Any member of the sub-account; at most 5 new tickets an hour per person. Files are added in the app. 403 feature_off while Support is off for the sub-account. - body `message` (string, required): What is going on (2-20,000 characters). - body `subject` (string): Up to 160 characters. Default: the start of the message. - body `topic` (string): Default question. - example body: {"workspace_id":"uuid","subject":"Texts not sending","message":"Since this morning our texts to new leads fail. We changed nothing.","topic":"problem"} - `POST /v1/support/tickets/{ticket_id}/messages` — Add to a ticket (as the client) (scope workspaces:write) A new message on a ticket the key's person opened (a client admin: any of the sub-account's tickets), as on the Support page. While the assistant handles the ticket it answers again; otherwise the team is told. answered_by says which. The support team answers with POST /v1/support/tickets/{ticket_id}/reply instead (403 here). - path `ticket_id` (string, required): Ticket id. - body `message` (string, required): Up to 20,000 characters. - example body: {"message":"Still failing after the restart."} - `POST /v1/support/tickets/{ticket_id}/reply` — Answer the client (support team) (scope workspaces:write) The support team's reply, as from the Support desk: it shows on the client's Support page, is emailed to them (emailed says whether it went) and pushed to their phone. A reply still holding [check: ...] parts (from the assistant's suggested reply) is refused until they are filled in. The agency's owners and team only; others get 403. - path `ticket_id` (string, required): Ticket id. - body `body` (string, required): The reply, up to 20,000 characters. - example body: {"body":"Thanks Pat, your texting number was paused by the carrier. We've fixed it; texts are going out again."} - `POST /v1/support/tickets/{ticket_id}/notes` — Add an internal note (support team) (scope workspaces:write) A note on the ticket only the support team sees; the client is not told. The agency's owners and team only. - path `ticket_id` (string, required): Ticket id. - body `body` (string, required): The note, up to 20,000 characters. - example body: {"body":"Carrier flagged the number on 10-28. Asked them to lift it."} - `PATCH /v1/support/tickets/{ticket_id}` — Status, priority, assignee, who answers (support team) (scope workspaces:write) The Support desk's changes, applied in this order: assigned_to (a team member's user id who can open the sub-account, or null to unassign; the new assignee is emailed and pushed the ticket), priority, handler (staff: the team answers from now on; assistant: hand it back, and the assistant answers at once if the client is waiting), status (resolved, or open to reopen). If one fails, the ones before it stay. Returns the ticket. The agency's owners and team only. - path `ticket_id` (string, required): Ticket id. - body `status` (string): resolved closes it; open reopens it. - body `priority` (string): Set by hand, it stays even when the assistant suggests another. - body `assigned_to` (string): A team member's user id, or null to unassign. - body `handler` (string): Who answers the client. - example body: {"assigned_to":"uuid","priority":"high","handler":"staff"} ### Dashboard - `GET /v1/activity` — The Activity log (scope workspaces:read) Everything that happened in the sub-account, newest first, as Settings > Activity log shows it: every change (the fields that changed, before and after, secrets hidden) with who made it (a person, an API key, the AI or an automation), their IP and browser, who opened what (contacts, conversations, recordings, exports), and messages, calls, bookings, automation runs, notifications and errors. Keyset paged by next_cursor. summary=true adds the page's counts by type and by day and who did the most. Owners and admins only. - query `days` (number): 1-365, default 30. - query `from` (string): ISO start, instead of days. - query `to` (string): ISO end, default now. - query `category` (string): Comma-separated: change, access, lead, inbound, outbound, ai, call, booking, appointment, automation, notification, webhook, api, error, system. - query `actor` (string): A user id, or user, api, ai, automation, lead or system. - query `lead_id` (string): Only what happened to this lead. - query `search` (string): Words in the title or description, or a contact's name, phone or email. - query `summary` (boolean): Also return counts by type and day and the most active people. - query `tz` (string): IANA time zone for summary days, default UTC. - query `limit` (number): 1-200, default 50. - query `cursor` (string): next_cursor from the previous page. ### Invoices & reviews - `GET /v1/review-funnels` — Review pages (scope workspaces:read) Tools → Review funnel: each review page, which one is the default, its rating threshold, where happy customers are sent, its words (copy), "Help them write it" (helper) and its public_path (/r/ on the sub-account's domain). - `GET /v1/review-requests` — Who was asked for a review, and what they did (scope leads:read) Sent, opened, rated (1-5), clicked through to a review site, and any private feedback, most recently active first. - query `funnel_id` (string): One review page. - query `lead_id` (string): One lead. - query `rated` (boolean): Only rated (true) or not yet rated (false). - query `since` (string): ISO time, changed at or after. - query `limit` (number): 1-100, default 25. - query `cursor` (string): next_cursor from the previous page. - `POST /v1/leads/{lead_id}/review-link` — A lead's personal review link (scope leads:write) Makes (or returns) the lead's link on a review page, like Copy review link on the lead. Sends nothing; share it however you like. Owners and admins only. - path `lead_id` (string, required): Lead id. - body `funnel_id` (string): Which review page. Default: the default page. ### CRM leads - `PATCH /v1/notes/{note_id}` — Edit a note you wrote (scope leads:write) Note ids are the note events in GET /v1/leads/{lead_id}/timeline. People can edit only their own notes, as in the app. - path `note_id` (string, required): Note id. - body `body` (string, required): The note, max 4000. - example body: {"body":"Prefers a call after 5pm."} - `DELETE /v1/notes/{note_id}` — Delete a note (scope leads:write) Owners and admins. - path `note_id` (string, required): Note id. - `POST /v1/leads/{lead_id}/do-not-contact` — Mark a lead do-not-contact (scope leads:write) Like Do not contact on the Leads page: no more emails, and texts to the lead's number are blocked. The app has no undo, so it takes an owner or admin. - path `lead_id` (string, required): Lead id. ### Account - `GET /v1/keys/self` — Inspect the calling API key (scope keys:read) What this key may do and how much of it is used: `access_level` (read / write / admin / custom) and `scopes`, the `workspace` it is locked to (if any), `rate_limit_per_min`, `credit_budget` (limit, used, remaining and reset date; null when the key has no budget) and `usage_30d` (requests, errors, rate_limited). `type` is `account` (made in Settings → API) or `sub_account` (made in a sub-account's own Settings → API in the client CRM), and `endpoints` gives the API and MCP addresses for the host you called. A sub-account key can call this. ### Click Guard - `GET /v1/click-guard` — Click fraud: the protection score, invalid clicks, what they cost, blocked addresses (scope workspaces:read) From the Website Analytics line on the sub-account's website, which watches every visit from its Google and Meta ads (robots included). protection is 0-100 with items (what's done, what's missing); totals and period_before hold clicks, valid, suspicious, invalid, accidental, ignored (the ad platforms' own checkers), converted, invalid_cost (invalid clicks x the account's own cost per click from Google Ads, else the owner's manual_cpc), blocked_now and blocked_new. savings: wasted, perMonth (that rate for 30 days), realClicks and leads that money buys at the account's conversion rate. why_invalid groups clicks by their main reason (repeat, robot, hidden = servers / VPNs / Tor, area, competitor, farm, accidental); by_day, breakdowns (campaign, keyword, country, region, city, device, network, platform, browser), latest_invalid, google_ads (campaigns, cost per click, Google's own invalid clicks it didn't charge for, last sync and coverage), meta, setup and settings. Owners and admins. - query `days` (number): How many days back, 1-400 (default 30). - `GET /v1/click-guard/clicks` — Ad clicks, newest first, with each one's score and reasons (scope workspaces:read) Every ad click that reached the website: verdict (valid, suspicious, invalid, ignored), score 0-100, reasons (code, points, detail), category, ip (erased after 90 days), network (home, mobile, datacenter, vpn, relay), isp, place, device, campaign and keyword (from Google Ads), landing page, seconds on the page, cost, blocked, converted. 50 a page. - query `days` (number): How many days back, 1-400 (default 30). - query `verdict` (string): invalid, suspicious, valid or ignored. - query `search` (string): Starts of an IP address, or words in the city, network, campaign or keyword. - query `offset` (number): Skip this many. - query `limit` (number): Up to 100 (default 50). - `GET /v1/click-guard/clicks/{click_id}` — One ad click in full, with the address's other clicks (scope workspaces:read) What the browser said (automated or not, time zone, screen), what the visitor did (time on the page, scroll, moves, taps, first action), every reason with its points, the address's block (status, expires_at, in_google), and up to 30 other clicks from the same address or device. - path `click_id` (string, required): A click (GET /v1/click-guard/clicks). - `GET /v1/click-guard/blocks` — Blocked addresses and the never-block list (scope workspaces:read) active (kept out of the ads: why, clicks, cost, place, network, in_google, expires_at), allowed (never blocked) and the last 100 expired. A block lasts 30 days after the last bad click (90 for servers and VPNs, 7 for phone networks); a block made by hand lasts until it's unblocked. - `POST /v1/click-guard/blocks` — Block an IP address or range from the ads (scope workspaces:write) Adds an address (203.0.113.7) or a CIDR range (203.0.113.0/24) to the block list; with automatic blocking on and Google Ads connected it reaches the account's IP exclusions within minutes. 409 when it's on the never-block list. - body `ip` (string, required): An IPv4 / IPv6 address or a CIDR range. - `POST /v1/click-guard/unblock` — Unblock an address (and optionally never block it again) (scope workspaces:write) Takes the address off the block list (and out of Google Ads with the next sync). never: true also puts it on the never-block list and scores its recent clicks again. - body `ip` (string, required): The address or range. - body `never` (boolean): Never block it again. - `PATCH /v1/click-guard/settings` — Automatic blocking, how strict, the click limit, servers, VPNs, countries, never-block list (scope workspaces:write) Any of: enabled, auto_block (block in Google Ads by itself), sensitivity (relaxed, standard, strict), click_limit (0-20; 0 = no limit) and click_limit_days (1-30), block_servers, block_vpn, countries (ISO codes served; empty = the business's own), allow_ips (never block), meta_leads (check leads from the ads for fakes), manual_cpc (your cost per click, used only without Google Ads). A rule change scores the last 7 days' clicks again. - body `enabled` (boolean): Turn Click Guard on or off for the sub-account. - body `meta_leads` (boolean): Check leads from the ads for fakes and keep them out of what Meta and Google learn from. Default true. - body `auto_block` (boolean): Block in Google Ads by itself. - body `sensitivity` (string): relaxed, standard or strict. - body `click_limit` (number): Clicks allowed before a block (0 = no limit). - body `click_limit_days` (number): In how many days. - body `block_servers` (boolean): Block cloud servers. - body `block_vpn` (boolean): Block VPNs. - body `countries` (array): Countries served (ISO codes). - body `allow_ips` (array): Never block these. - body `manual_cpc` (number): Your cost per click without Google Ads. - `POST /v1/click-guard/sync` — Bring Google Ads' IP exclusions in line now (scope workspaces:write) Reads the Google Ads account (campaigns, cost per click, Google's invalid clicks) and adds or removes Click Guard's addresses: the account-wide list first (every campaign type, Performance Max included, 500 at most), then each Search, Display and Shopping campaign's own list. The business's own exclusions are never touched. Answers added, removed and coverage. It also runs by itself every few minutes. - `POST /v1/click-guard/ask` — Ask about the ad clicks in plain words (scope workspaces:write) Answered from the business's own clicks, blocks and costs (never made up), with buttons into the tool and next questions. Pass chat_id back to continue a conversation. 40 questions a day per person. - body `question` (string, required): The question. - body `chat_id` (string): Continue this conversation. - body `days` (number): How many days back (default 30). - `GET /v1/click-guard/install` — The line of code for the website (scope workspaces:read) The same line as Website Analytics (a site that has it needs nothing more), whether it's on the site, and the setup steps. Turns Click Guard on for the sub-account. - `GET /v1/click-guard/leads` — Leads from the ads that looked fake (scope workspaces:read) Every lead from the sub-account's ads is checked a few minutes after it comes in: a Meta Instant Form lead from what it says (made-up names, numbers and emails, test entries, numbers that don't exist), a form or booking from the ad click its visit came from. verdict junk = fake (a fake Instant Form lead is reported to Meta as DisqualifiedLead through Lead quality feedback; a form from a fake ad click is never sent to Meta), doubt = only marked. meta: told | held | no_dataset (Lead quality feedback off). Nothing is hidden or deleted. Owners and admins. - query `days` (number): How many days back, 1-400 (default 30). - query `verdict` (string): junk (only fake) or all (every checked lead). Default: fake and doubtful. - `POST /v1/click-guard/leads/{lead_id}/not-junk` — Mark a lead real (Not junk) (scope workspaces:write) Its verdict never comes back, a report to Meta that hasn't gone out yet is stopped (meta_stopped), and its timeline says so. - path `lead_id` (string, required): The lead's id. - `GET /v1/click-guard/meta-cleanup` — Which Meta ad sets show on Audience Network (scope workspaces:read) Read only: the sub-account's active Meta ad sets that show ads inside other apps and sites (Audience Network), where accidental taps and junk clicks pile up. Needs Meta connected in Ad Insights. - `POST /v1/click-guard/meta-cleanup` — Turn off Audience Network in the Meta ad sets (or undo it) (scope workspaces:write) Takes Audience Network out of every active ad set that shows there, keeping everything else; the ads keep running on Facebook, Instagram and Messenger. Each ad set's earlier placements are kept, so undo: true puts them back. Meta may review a changed ad set again (usually under a day). - body `undo` (boolean): true puts the earlier placements back. - `GET /v1/click-guard/google-cleanup` — Which Google campaigns show where junk clicks pile up (scope workspaces:read) Read only: the sub-account's Google Ads campaigns (on or paused) with search partners on, the Display Network on a Search campaign, or ads shown to people only interested in the area (not in it), with what the clean-up would change in each. Performance Max is left alone. Needs Google Ads connected. - `POST /v1/click-guard/google-cleanup` — Clean up the Google campaigns (or undo it) (scope workspaces:write) Turns search partners and the Display Network off on Search campaigns and shows the ads only to people in the targeted places, through the account's Google Ads change history (one row per kind of change, each with its own undo). undo: true puts every campaign back as it was; Google Ads History's own Undo does the same. - body `undo` (boolean): true puts the earlier settings back. ### Call Tracking - `GET /v1/call-tracking` — Calls from tracking numbers: where they came from, answered, good leads, revenue (scope workspaces:read) Tracking numbers show which ad, campaign, keyword and page made the phone ring: each website visitor sees their own number from a pool (the Website Analytics line swaps it), and a Google profile, flyer or truck gets a number each. totals (calls, prev_calls for the period before, first_time, answered, missed, voicemail, qualified = good leads + booked, booked, avg_seconds, missed_from_ads = callers from ads nobody answered or called back, leads, revenue_cents from callers whose jobs were won), series (per day), series_by_channel, channels, sources, campaigns, keywords, pages (landing pages), numbers, hours (weekday x hour, calls and missed), recent (the newest calls), pool (website numbers: size, in_use now, visits and shared = visits that had to share a number) and insights. Owners and admins. - query `days` (number): How many days back, 1-400 (default 30). - `GET /v1/call-tracking/calls` — Tracked calls, newest first, with where each came from and the AI's read (scope workspaces:read) Each call: id, at, from, name (the lead's or the one the caller said), status, duration, voicemail, recording (true when there is one), tracking_number and number_name, kind (pool = a website number, source = one place's number), matched (visit, shared, none, source), channel, source, campaign, keyword, landing, first_time, label (the person's) and ai_label, summary, score (0-100 chance of becoming a customer), topic, value_cents, won, called_back, lead_id and session_id (the website visit). - query `days` (number): How many days back, 1-400 (default 30). - query `status` (string): answered, missed, voicemail or not_called_back. - query `label` (string): qualified (good leads and booked), booked, quote, customer, not_a_fit, vendor, spam, voicemail or unknown. - query `channel` (string): e.g. Paid search, Paid social, Organic search, Google Business Profile, Offline. - query `source` (string): e.g. Google Ads, or a source number's name. - query `campaign` (string): One campaign. - query `keyword` (string): One keyword. - query `number_id` (string): One tracking number. - query `first_time` (boolean): true: first-time callers only. - query `search` (string): A name, number, keyword or what they wanted. - query `offset` (number): Skip this many. - query `limit` (number): Up to 200 (default 50). - `GET /v1/call-tracking/calls/{call_id}` — One tracked call in full: the visit, the recording, transcript and the AI's read (scope workspaces:read) Everything in the list, plus recording_url, transcript (lines by caller c / business b, written by a speech-to-text model; the AI reads only that, never the audio), next_step, amount (a price said on the call), the lead, the website visit (source, campaign, device, place, time on the site) with its pages in order, and the caller's other calls. - path `call_id` (string, required): A call (GET /v1/call-tracking/calls). - `PATCH /v1/call-tracking/calls/{call_id}` — Mark what kind of call it was, or what it was worth (scope workspaces:write) label wins over the AI's (null goes back to it). A call marked spam is given back: its talk time, recording and AI credits are refunded, up to 50 calls a month per sub-account. - path `call_id` (string, required): The call. - body `label` (string): booked, qualified, quote, customer, not_a_fit, vendor, spam, voicemail, missed, unknown, or null. - body `value_cents` (number): What the call was worth, in cents, or null. - example body: {"workspace_id":"uuid","label":"booked","value_cents":45000} - `GET /v1/call-tracking/numbers` — The tracking numbers, the settings, and how many website numbers the traffic needs (scope workspaces:read) numbers (phone_number, kind pool | source, name, preset, carrier, bought_at, paid_until), settings, pool_advice (recommended, why, measured: sized from the site's real traffic), traffic (visits a day, the busy-time number of visitors at once, the share from ads) and prices (credits: number_monthly, per_leg_minute, recording_per_minute, ai_per_minute). - `POST /v1/call-tracking/numbers` — Add website numbers or a number for one place (spends credits) (scope workspaces:write; uses credits) kind pool adds count (1-10) website numbers; kind source adds one number for one place (preset gbp, google_lsa, yelp, angi, nextdoor, facebook_page, flyer, direct_mail, vehicle, yard_sign, billboard, radio, tv, print, email, other; name). Local numbers in area_code (else the sub-account's), bought on the carrier of the line calls ring like. Voice only: they never text, so they need no texting registration. 15 credits a number a month, the first month now; 402 when the credits aren't there. - body `kind` (string): pool or source. - body `count` (number): pool: how many, 1-10. - body `preset` (string): source: where it's used. - body `name` (string): source: its name in reports. - body `area_code` (string): e.g. 512. - example body: {"workspace_id":"uuid","kind":"source","preset":"gbp","name":"Google Business Profile","area_code":"512"} - `DELETE /v1/call-tracking/numbers/{number_id}` — Give a tracking number back (scope workspaces:write) Calls to it stop working. Its calls stay in the history. - path `number_id` (string, required): A number (GET /v1/call-tracking/numbers). - `PATCH /v1/call-tracking/settings` — Where calls ring, recording, which numbers the website swaps, for whom (scope workspaces:write) route line (rings like line_number: the apps, ring order, AI receptionist, voicemail and missed-call text, as a call to it would) or forward (to forward_to, with caller_id caller | tracking and whisper: the person answering hears the source first). record + greeting (played to every caller before the call when recorded), ai (read recorded calls), swap_numbers (numbers on the site to replace), who (all, ads, not_direct), hold_minutes (10-120: how long a visitor keeps their number after their last activity), area_code, google_ads (a caller from a Google ad gets that click on their lead, so booked and won jobs count in Google Ads) and enabled (false stops swapping; the numbers keep ringing). - body `route` (string): line or forward. - body `line_number` (string): E.164, one of the sub-account's own lines. - body `forward_to` (string): E.164. - body `caller_id` (string): caller or tracking. - body `whisper` (boolean): Forwarded calls: say the source first. - body `record` (boolean): Record calls. - body `greeting` (string): The recording notice. - body `swap_numbers` (array): Numbers on the website to replace. - body `who` (string): all, ads or not_direct. - body `hold_minutes` (number): 10-120. - body `area_code` (string): For new numbers. - body `ai` (boolean): Read recorded calls with AI. - body `google_ads` (boolean): Give callers' leads their Google click. - body `enabled` (boolean): Swap numbers on the website. - example body: {"workspace_id":"uuid","route":"forward","forward_to":"+15125550100","whisper":true,"record":true} - `POST /v1/call-tracking/setup` — Turn Call Tracking on and buy the website numbers (scope workspaces:write; uses credits) The settings (as PATCH /v1/call-tracking/settings) plus pool_size: buys the website numbers that are missing (up to 10 at a time; see pool_advice) and turns swapping on. Spends 15 credits a number for its first month. - body `pool_size` (number): How many website numbers (4-30). - body `swap_numbers` (array): The numbers on the website. - body `route` (string): line or forward. - body `line_number` (string): With route line. - body `forward_to` (string): With route forward. - body `caller_id` (string): caller or tracking. - body `whisper` (boolean): Forwarded calls: say the source first. - body `record` (boolean): Record calls. - body `greeting` (string): The recording notice. - body `who` (string): all, ads or not_direct. - body `hold_minutes` (number): 10-120. - body `area_code` (string): For new numbers. - body `ai` (boolean): Read recorded calls with AI. - body `google_ads` (boolean): Give callers' leads their Google click. - example body: {"workspace_id":"uuid","pool_size":5,"swap_numbers":["+15125550100"],"route":"line","line_number":"+15125550100","record":true} ### Website Analytics - `GET /v1/website-analytics` — The website's numbers: visitors, sources and ads, pages, conversions, frustration (scope workspaces:read) From the line of code on the sub-account's website (GET /v1/website-analytics/install). people only: robots, Meta's ad checkers and the team's own browsers are left out. totals and previous (the same length before) hold visitors, sessions (visits), pageviews, avg_s (real attention time per visit), bounce_rate (one page, under 10 seconds, nothing done), converted / conv_rate (form sent, phone or email tapped, a thank-you page reached, or the site's own zs('convert')), from_ads, rage, dead, errors, quick_backs, forms_started / forms_sent. series is one row per day (per hour for 2 days or less); dims has source, channel, campaign, utm_*, ad, referrer, country, region, city, device, browser, os, screen, language, entry, exit and visitor (new or returning), each row with visitors, sessions, bounce, avg_s and conv (percent). pages, conversions, frustration (elements with rage and dead clicks), errors, hours (weekday, hour, visits), points (map), live (people in the last 5 minutes). Heatmaps and recordings are in the app. Owners and admins. - query `site_id` (string): One site of the sub-account (GET /v1/website-analytics/sites). Leave out for every site together. - query `days` (number): How many days back, 1-400 (default 30). - query `page` (string): Only visits that opened this page path. - query `source` (string): Only this source (as dims.source names it, e.g. Meta Ads). - query `device` (string): Desktop, Mobile or Tablet. - query `country` (string): 2-letter country code. - query `campaign` (string): A utm_campaign. - query `ad` (string): An ad platform (Meta Ads, Google Ads...). - query `entry` (string): A landing page path. - query `timezone` (string): IANA zone for the day-by-day line (default UTC). - `GET /v1/website-analytics/install` — The line of code for the website, and whether visits arrive (scope workspaces:read) snippet goes inside the of every page (WordPress, Wix, Squarespace, Shopify, Webflow, GoHighLevel and Google Tag Manager steps in steps). It loads after the page and hides everything typed. installed turns true with the first visit. - query `site_id` (string): One site of the sub-account (GET /v1/website-analytics/sites). Leave out for every site together. - `GET /v1/website-analytics/sites` — The sub-account's sites: each website and landing page it tracks (scope workspaces:read) A sub-account can track several websites and landing pages, each with its own code and its own numbers, heatmaps and recordings, kept apart. sites lists them, the first one first: id (send it as site_id on any /v1/website-analytics route), name, kind (website or landing), url, first, installed (visits arrive), last_seen_at, last_host, visitors_7d, on_it_now, recordings, smart_page_ids (Smart Pages that send their visits to it with no code) and snippet (its own line of code). Opening the tool makes the first site. Owners and admins. - `POST /v1/website-analytics/sites` — Add a website or landing page with its own code and numbers (scope workspaces:write) Makes another site for the sub-account (up to 25): its own line of code (snippet), and from the first visit its own visitors, heatmaps, recordings and Ask AI, apart from the other sites. name is what the switcher shows (unique in the sub-account, up to 60 characters). kind is website (default) or landing. smart_page_ids makes it count those Smart Pages, with nothing to paste (a page belongs to one site: it leaves the site it was on). Deleting a site is done in the app. Owners and admins. - body `name` (string, required): What to call it, e.g. Spring roof sale. - body `kind` (string): website (default) or landing. - body `url` (string): Its address (optional). - body `smart_page_ids` (array): Smart Pages that send their visits to this site. - example body: {"workspace_id":"uuid","name":"Spring roof sale","kind":"landing","url":"https://acmeroofing.com/spring-sale"} - `POST /v1/website-analytics/ask` — Ask about the website in plain words (scope workspaces:write) Answered from the website's own numbers for the last days (visitors, pages, sources and ads, forms, what people click, frustration), with the numbers behind it, up to three actions (open a page's heatmap, watch recordings with a filter, narrow the overview), up to three prompts ready to paste into a website builder's AI or send to a web designer (title, for, text) and followups (likely next questions). Each answer belongs to a saved conversation (chat_id, title; the same chats as the app's Ask AI): send chat_id back and it remembers the earlier questions and answers. Free; 100 questions a week per sub-account (429 when used up, left = what's left this week). Owners and admins. - body `site_id` (string): One site of the sub-account (GET /v1/website-analytics/sites). Leave out for every site together. - body `question` (string, required): e.g. Which page works best, and why? - body `chat_id` (string): Continue an earlier conversation (an answer's chat_id). Leave out to start a new one. - body `days` (number): How many days back, 1-400 (default 30). - body `timezone` (string): IANA zone (default UTC). - example body: {"workspace_id":"uuid","question":"Where do people get stuck on my website?","days":30} ### Reports - `GET /v1/reports` — A sub-account's reports, with their email schedules and alerts (scope workspaces:read) Every saved report: name, what it covers (sources), its dates, the share link when on, its scheduled emails (describe says when, next_run_at the next one) and alerts. Owners and admins. 403 feature_off for a client when the agency hides Reports. - `GET /v1/reports/catalog` — What a report can show here: connected sources, team emails, ready-made reports (scope workspaces:read) connected says which sources have data to show in this sub-account (Meta and Google Ads need Ad Insights, the Google profile needs Tools, rankings need a Map Rankings scan); team lists people to send to; templates are the ready-made reports (POST /v1/reports with template). The metric keys, splits and tables themselves are in the API docs and MCP tool reports (action catalog). - `POST /v1/reports` — Make a report: ask for it in words, start from a ready-made one, or send its blocks (scope workspaces:write) prompt: the AI builds it from plain words ("a monthly report on leads and cost per lead, emailed to me on the 1st") and saves it, plus its email schedule and alerts when the words ask for them (with_schedule false to skip); the answer has its reply. template: a ready-made report (GET /v1/reports/catalog). doc: your own blocks. The report: {range: {preset}, compare: previous | year | none, blocks: [...]}. Block types: kpis {metrics}, chart {metrics, view: area | line | bar, group: auto | day | week | month}, breakdown {metric, by, view: bar | donut | table, limit}, table {table, limit}, funnel, summary {focus}, heading {text, sub}, text {text}; any block takes title and width (full | half). Metric keys, splits and tables: GET /v1/reports/catalog. Unknown keys are dropped. Owners and admins. - body `prompt` (string): What to build, in plain words. The AI picks the numbers, charts and dates. - body `template` (string): A ready-made report key: monthly_marketing, weekly_pipeline, ads_performance, calls_speed, google_presence, appointments, at_a_glance, daily_recap, sales_revenue, ai_assistant, local_seo, reviews, map_rankings, ai_visibility, website. - body `doc` (object): The report's blocks (see the description). - body `name` (string): Up to 120 characters. - body `description` (string): One line about what it answers. - body `with_schedule` (boolean): prompt only: false = don't set up the emails it asked for. - example body: {"workspace_id":"uuid","prompt":"How are my Facebook and Google ads doing? Cost per lead and cost per sale by campaign. Email it to me every Monday."} - `GET /v1/reports/{report_id}` — One report: its blocks, schedules, alerts and the emails it sent (scope workspaces:read) sends are the last 25 emails (scheduled, sent now, tests, alerts) with when they went out and were opened; url is the frozen web copy that email links to. Owners and admins. - path `report_id` (string, required): Report id (GET /v1/reports). - `PATCH /v1/reports/{report_id}` — Change a report by hand or by asking the AI (scope workspaces:write) Send name, description or doc (the whole doc replaces it), or prompt to have the AI change it ("add Google Ads spend", "show it by week", "email it monthly"): it keeps what you didn't ask to change. Shows on the page at once. Owners and admins. - path `report_id` (string, required): Report id (GET /v1/reports). - body `prompt` (string): The change, in plain words. - body `doc` (object): The whole report (see POST /v1/reports). - body `name` (string): Up to 120 characters. - body `description` (string): One line. - example body: {"prompt":"Add Google Ads spend and cost per conversion under the Meta numbers"} - `DELETE /v1/reports/{report_id}` — Delete a report, its schedules and alerts (scope workspaces:write) Emails already sent keep their links. Owners and admins. - path `report_id` (string, required): Report id (GET /v1/reports). - `GET /v1/reports/{report_id}/data` — A report's numbers for its dates, or others (scope workspaces:read) values: metric -> [this period, compared period]; series: metric -> one value per day; breakdowns: metric|split -> rows; tables; summaries (the AI summary per summary block, summaries=false to skip); sources says why a source has nothing (not_connected, error, no_data). Money is in the account's currency, percents are fractions (0.25 = 25%), speed in minutes. Leads leave out imported lists, spam, existing customers and chat-only people. Meta, Google Ads and Google profile numbers are read live (Google's run about 3 days behind). Owners and admins. - path `report_id` (string, required): Report id (GET /v1/reports). - query `preset` (string): Other dates: last_7_days, last_30_days, this_month, last_month, last_quarter, this_year, custom ... (the report's own when left out). - query `from` (string): custom: first day, YYYY-MM-DD. - query `to` (string): custom: last day, YYYY-MM-DD. - query `compare` (string): previous | year | none. - query `summaries` (boolean): false = no AI summary. - `POST /v1/reports/{report_id}/send` — Email a report now (or a test to yourself) (scope workspaces:write) Freezes the numbers for the report's dates (or range) and emails them in the agency's brand: format {summary: the numbers in the email, pdf: attached, link: to the web copy}. test: true sends only to the key's person. At most 60 a day per sub-account. Owners and admins. - path `report_id` (string, required): Report id (GET /v1/reports). - body `recipients` (array): Email addresses (up to 25). - body `test` (boolean): Send only to yourself. - body `format` (object): {summary, pdf, link}, booleans. - body `message` (string): A note at the top. - body `subject` (string): {period} becomes the dates. - body `range` (object): Other dates than the report's own: { preset, from, to } as GET .../data takes them. - example body: {"recipients":["owner@acme.com"],"format":{"summary":true,"pdf":true,"link":true},"message":"Here's October."} - `PUT /v1/reports/{report_id}/share` — Turn a report's share link on or off, or make a new one (scope workspaces:write) Anyone with the link sees the report with live numbers and can pick other dates, without signing in. new_link: true makes the old link stop working. Owners and admins. - path `report_id` (string, required): Report id (GET /v1/reports). - body `enabled` (boolean): On (default) or off. - body `new_link` (boolean): Replace the link. - example body: {"enabled":true} - `POST /v1/reports/{report_id}/schedules` — Email a report every day, week, two weeks, month or quarter (scope workspaces:write) frequency daily | weekly | biweekly | monthly | quarterly; day_of_week 0-6 (0 = Sunday), day_of_month 1-28, hour 0-23, minute 0 | 15 | 30 | 45, in timezone (the sub-account's when left out). period schedule (default) covers the days before each email (the week before, the month before ...), report uses the report's own dates. format {summary, pdf, link}. Send id to change one. Up to 10 per report. Owners and admins. - path `report_id` (string, required): Report id (GET /v1/reports). - body `id` (string): A schedule to change. - body `frequency` (string, required): daily | weekly | biweekly | monthly | quarterly. - body `day_of_week` (number): 0-6, 0 = Sunday. - body `day_of_month` (number): 1-28. - body `hour` (number): 0-23. - body `minute` (number): 0, 15, 30 or 45. - body `timezone` (string): IANA zone. - body `recipients` (array, required): Email addresses (up to 25). - body `format` (object): {summary, pdf, link}. - body `period` (string): schedule | report. - body `subject` (string): {period} becomes the dates. - body `message` (string): A note at the top. - body `enabled` (boolean): false pauses it. - example body: {"frequency":"weekly","day_of_week":1,"hour":8,"recipients":["owner@acme.com","sales@acme.com"],"format":{"summary":true,"pdf":false,"link":true}} - `DELETE /v1/reports/{report_id}/schedules/{schedule_id}` — Stop a report's scheduled email (scope workspaces:write) - path `report_id` (string, required): Report id (GET /v1/reports). - path `schedule_id` (string, required): Schedule id. - `POST /v1/reports/{report_id}/alerts` — Email someone when a number crosses a line (scope workspaces:write) metric (a report metric key), op above | below, threshold (money in the account's currency, percents as fractions, speed in minutes), window day | week | month (yesterday, the last 7 or 30 days). Checked every morning after 7 AM in the sub-account's time zone; emails once when it crosses, again only after it comes back. Send id to change one. Up to 20 per sub-account. Owners and admins. - path `report_id` (string, required): Report id (GET /v1/reports). - body `id` (string): An alert to change. - body `metric` (string, required): e.g. ads.cost_per_lead, calls.missed, leads.new. - body `op` (string, required): above | below. - body `threshold` (number, required): The line. - body `window` (string): day | week | month. - body `recipients` (array, required): Email addresses. - body `enabled` (boolean): false pauses it. - example body: {"metric":"ads.cost_per_lead","op":"above","threshold":60,"window":"week","recipients":["owner@acme.com"]} - `DELETE /v1/reports/{report_id}/alerts/{alert_id}` — Delete a report alert (scope workspaces:write) - path `report_id` (string, required): Report id (GET /v1/reports). - path `alert_id` (string, required): Alert id. ### Ads & Google - `GET /v1/ai-visibility` — AI Visibility: how often AI assistants name the business (scope workspaces:read) Does ChatGPT, Gemini, Google AI Mode / AI Overviews, Perplexity or Claude name this business when asked what its customers ask? A check asks every question on every engine, several times where answers change. The number is how often the business is named, always with the count (named of answers; rate is 0-1): answers don't repeat, so it is never a rank. available is false until the feature is switched on, set_up false until POST /v1/ai-visibility/setup. latest_check is the newest finished one: per engine (real_app false = measured through its API, not its app), per question (questions about the business by name don't count towards the rate), named_instead (who else is named, by how many answers), sources (the sites the answers read) and facts (is the phone, address and hours it gives right). wrong_details lists what it gets wrong. last_four_weeks and months add checks up, with rate_low and rate_high (a 90% range); trend says up or down only when the ranges don't overlap. running is a check still going (about five minutes). checks lists the newest 20 (GET /v1/ai-visibility/checks/{check_id} opens any one whole, to compare two dates); steps_done are plan steps someone ticked off. pricing.next_check_credits is what the next check costs. A sub-account can track several locations, one per Google profile: locations lists them with their latest count (location_id null = a Google profile not tracked yet), and everything else here is about one of them, its first unless location_id or profile_id says otherwise. Owners and admins. An add-on: 403 addon_locked without it. 403 feature_off for a client when the agency hides Tools. - query `location_id` (string): Which tracked location (locations in GET /v1/ai-visibility). Leave out for the sub-account's first. - query `profile_id` (string): Or which of the sub-account's Google profiles. - `GET /v1/ai-visibility/prefill` — What the account already knows, for setting up AI Visibility (scope workspaces:read) The business's name, website, phone, address, what it does, town and state, from its Google profile and sub-account, as the set-up screen fills them in; competitor is the one Map Rankings sees most. POST /v1/ai-visibility/setup uses these for anything you leave out. towns is the area around it, from its Google service area and neighborhoods. Owners and admins. - query `location_id` (string): Which tracked location (locations in GET /v1/ai-visibility). Leave out for the sub-account's first. - query `profile_id` (string): Or which of the sub-account's Google profiles. - `POST /v1/ai-visibility/ideas` — Write questions customers would ask (scope workspaces:write) The AI writes the questions to check, for this business, or plain templates when it can't. Free, and nothing is saved: pass them on to POST /v1/ai-visibility/setup or PUT /v1/ai-visibility/questions. Anything left out comes from what the account knows. Owners and admins. - body `business_name` (string): Default: the account's. - body `service` (string): What it does, in a customer's words. - body `services` (array): Other services (up to 8). - body `town` (string): Default: the account's. - body `state` (string): Default: the account's. - body `towns` (array): Up to 5 towns around the location the questions also name. - body `competitor` (string): A competitor, for the comparison question. - body `location_id` (string): Which tracked location (locations in GET /v1/ai-visibility). Leave out for the sub-account's first. - body `profile_id` (string): Or which of the sub-account's Google profiles. - example body: {"workspace_id":"uuid","service":"garage door repair","town":"Encino","state":"CA"} - `POST /v1/ai-visibility/setup` — Set up AI Visibility and start its first check (scope workspaces:write) Saves the business's details and questions and starts the first check straight away. Spends credits: 0.75 a question (1.50 with Claude, which is on by default), the first check's first 10 questions free; answers that never come back are refunded. Anything left out comes from what the account knows (GET /v1/ai-visibility/prefill); 400 when it doesn't know business_name, service or town. A question naming the business is added when none is sent. Checks then run on schedule (weekly by default). 409 already_set_up when that location already is: use PUT /v1/ai-visibility/settings, PUT /v1/ai-visibility/questions and POST /v1/ai-visibility/check. To track another location send its profile_id, or add_location true with its details; only a sub-account's very first check has free questions. 402 when there aren't enough credits. Owners and admins. - body `questions` (array, required): [{ text, kind }] up to 20, at least one a customer would ask. kind: discovery, cost, branded (names the business) or comparison; left out, it's guessed from the words. - body `business_name` (string): Default: the account's. - body `aliases` (array): Other names it goes by (up to 6). - body `website` (string): Default: the account's. - body `phone` (string): Default: the account's. The fact check compares with it. - body `address` (string): Default: the account's. - body `service` (string): What it does, in a customer's words. - body `town` (string): Default: the account's. - body `state` (string): Default: the account's. - body `towns` (array): Up to 5 towns around the location the questions also name. - body `location_id` (string): Which tracked location (locations in GET /v1/ai-visibility). Leave out for the sub-account's first. - body `profile_id` (string): Start tracking this Google profile. - body `add_location` (boolean): A new location that isn't one of its Google profiles. - body `claude` (boolean): Also ask Claude. Default true. - body `schedule` (string): How often to check. Default weekly. - example body: {"workspace_id":"uuid","questions":[{"text":"Who is the best garage door repair in Encino?","kind":"discovery"},{"text":"How much does a garage door spring cost in Encino?","kind":"cost"}]} - `PUT /v1/ai-visibility/settings` — Change AI Visibility's settings (scope workspaces:write) Send any of these; the rest stay as they are. A new schedule counts from now. 404 until it's set up. Owners and admins. - body `business_name` (string): Who counts as the business: this whole name, its phone or its website. - body `aliases` (array): Other names it goes by (up to 6). - body `website` (string): Or null. - body `phone` (string): Or null. - body `address` (string): Or null. - body `service` (string): What it does, or null. - body `town` (string): Or null. - body `state` (string): Or null. - body `towns` (array): Up to 5 towns around the location the questions also name. - body `location_id` (string): Which tracked location (locations in GET /v1/ai-visibility). Leave out for the sub-account's first. - body `profile_id` (string): Or which of the sub-account's Google profiles. - body `claude` (boolean): Also ask Claude (costs more). - body `schedule` (string): How often to check. - body `schedule_weekday` (number): Weekly checks: the day, 0 = Sunday ... 6 = Saturday. They run early that morning in the sub-account's time zone. - body `schedule_monthday` (number): Monthly checks: the day of the month, 1-28. - example body: {"workspace_id":"uuid","schedule":"monthly","claude":false} - `PUT /v1/ai-visibility/questions` — Replace the questions AI Visibility asks (scope workspaces:write) Replaces the whole list: send every question to keep. A question that stays (same words) keeps its id and history. At least one a customer would ask, at most 20; a question naming the business is added when none is sent. 404 until it's set up. Owners and admins. - body `questions` (array, required): [{ text, kind }]. kind: discovery, cost, branded (names the business) or comparison; left out, it's guessed from the words. - body `location_id` (string): Which tracked location (locations in GET /v1/ai-visibility). Leave out for the sub-account's first. - body `profile_id` (string): Or which of the sub-account's Google profiles. - example body: {"workspace_id":"uuid","questions":[{"text":"Who is the best garage door repair in Encino?","kind":"discovery"},{"text":"Is Acme Garage Doors any good?","kind":"branded"}]} - `POST /v1/ai-visibility/check` — Run an AI Visibility check now (scope workspaces:write) Asks every question again, and takes about five minutes; read it with GET /v1/ai-visibility. Spends credits: 0.75 a question, 1.50 with Claude (pricing.next_check_credits in GET /v1/ai-visibility); answers that never come back are refunded. While one is running that one is returned and nothing is charged. 402 when there aren't enough credits, 404 until it's set up. Owners and admins. - example body: {"workspace_id":"uuid"} - `GET /v1/ai-visibility/answers` — The answers behind one question (scope workspaces:read) Every answer to one question in one check, for reading: the words, who it named in the order it named them (you is this business) and the sites it read. repeat is which time it was asked; asked_from says how (Google AI Mode: computer_nearby, phone_nearby, computer_elsewhere or phone_elsewhere). about_the_business is what it said on a question naming the business. The words of checks older than 180 days are gone; their numbers stay. Owners and admins. - query `check_id` (string, required): latest_check.id from GET /v1/ai-visibility. - query `question` (string, required): The question exactly as by_question has it. - query `engine` (string): Only this engine. - `GET /v1/ai-visibility/checks/{check_id}/advice` — What to do next, from one check (scope workspaces:read) A plan written from what the check measured, once per check, free, the first time it's asked for. state: writing (ask again in a few seconds), ready, or none (the check isn't finished). tool names the sub-account tool for a step: listings, reviews, google-optimizer, google-posts, google-embeds, smart-pages or null; copy is exact text to paste (robots.txt lines); done_at when someone ticked it off. website_prompts are prompts to paste into the AI that edits the website (its builder's AI, ChatGPT or Claude), built from this check and the Google profile, never by a model: key crawlers, readable, details (with the business details markup), questions, services, or review (the last: for ChatGPT or Claude to read the site and suggest more); website_prompts_all is every website fix as one prompt, or null with fewer than two. website is the plan's look at the business's site, what an AI crawler that runs no scripts reads there: reachable (status 403 = its firewall turned the check away, so what is on it is unknown and the rest is null, never false), ai_crawlers_blocked (by robots.txt), words_without_scripts, business_markup (schema.org with an address or phone), faq_markup, phone_on_page. Owners and admins. - path `check_id` (string, required): Check id (GET /v1/ai-visibility). - `PATCH /v1/ai-visibility/checks/{check_id}/advice` — Tick a plan step off (scope workspaces:write) Marks a step of a check's plan done (or not done again with done false). The app's chart marks the day, GET /v1/ai-visibility lists it under steps_done, and the next check's plan knows it was done. Answers the plan. Owners and admins. - path `check_id` (string, required): Check id. - body `step` (number, required): The step's place in the plan, 0 for the first. - body `done` (boolean): false un-ticks it (default true). - example body: {"step":0} - `GET /v1/ai-visibility/checks/{check_id}` — One check, whole (scope workspaces:read) Any check kept (GET /v1/ai-visibility lists the newest 20 under checks), as latest_check shows the newest: per engine and question, who is named instead, the sources, the facts it got right or wrong. Two of them side by side compare two dates; a check that isn't finished comes back without the breakdown. Owners and admins. - path `check_id` (string, required): Check id. - `GET /v1/ad-insights/cards` — The cards at the top of Ad Insights and the custom metrics (scope meta:read) What the key's person sees at the top of the sub-account's Ad Insights. cards are in showing order, then the ones hidden (kind: standard, ready_made, custom). source: personal (their own), team (saved for everyone) or default (the eight usual ones). metrics are the custom metrics: format is what was picked, shows_as what auto comes to, problem why one can't be worked out. numbers are what a formula can use; a percent is a fraction, as in a spreadsheet. Any member of the sub-account. 403 feature_off for a client when the agency hides Ad Insights. - `PUT /v1/ad-insights/cards` — Change the Ad Insights cards and custom metrics (scope meta:write) Starts from what the key's person sees now and shows on the page as soon as it's saved. cards = the card ids to show, in order, and every other card hides. metrics = metrics to add or change (by id, else by name): name, formula over the numbers GET lists (AOV - CPA, Revenue * 40% - Spend; + - * / and brackets), format auto (default), money, number, percent or ratio, per_campaign to make it a column of Campaign Performance; a new one's card shows last, a rename carries into the formulas using it, and a formula that can't be read is a 400 that says why. delete_metrics = metric ids; refused when a metric you're keeping uses it. Saves the person's own cards unless for_everyone: true (owners and admins: their cards become everyone's, and personal cards made before give way). for_everyone alone saves what they see now. reset: true drops their own cards. Answers as GET does. - body `cards` (array): Card ids to show, in order. Leave out to keep them. - body `metrics` (array): [{ id, name, formula, format, per_campaign }] to add or change. The others stay. - body `delete_metrics` (array): Metric ids to delete. - body `for_everyone` (boolean): Make these everyone's cards in the sub-account. - body `reset` (boolean): Drop this person's own cards (back to the team's, or the usual ones). Goes alone. - example body: {"workspace_id":"uuid","metrics":[{"name":"Profit per sale","formula":"AOV - CPA","format":"money","per_campaign":true}]} ### Media - `GET /v1/media` — Media files (scope workspaces:read) A sub-account's Media page: its images and videos, newest first. Owners and agency admins see everything; the client's own people see only files shared with them (visible_to_client). - query `folder_id` (string): Only this folder, or none for files in no folder. - query `kind` (string): Only this kind. - query `search` (string): Words in the name. - query `limit` (number): 1-100, default 25. - query `cursor` (string): next_cursor from the previous page. - `POST /v1/media` — Add a file from a link (scope workspaces:write) Copies a public https link into the sub-account's Media, stored like an upload: PNG, JPG, WebP or GIF up to 15 MB, MP4, MOV or WebM up to 50 MB (the file's own bytes decide its type). Larger files go through the Media page. Owners and admins; a client admin's file is always shared with the client's team, an agency's starts hidden. - body `url` (string, required): A public https link to the image or video. - body `name` (string): Up to 120 characters. Default: the link's file name. - body `folder_id` (string): A folder of this sub-account. Default: no folder. - body `visible_to_client` (boolean): Whether the client's team sees it. - example body: {"workspace_id":"uuid","url":"https://example.com/roof.jpg","name":"Roof before","visible_to_client":true} - `PATCH /v1/media/{media_id}` — Rename, move, share or hide a file (scope workspaces:write) Send what changes. Owners and agency admins change any file; client admins only files they added, and those stay shared. - path `media_id` (string, required): The file. - body `name` (string): Up to 120 characters. - body `folder_id` (string): A folder of this sub-account, or null for no folder. - body `visible_to_client` (boolean): Share with or hide from the client's team. - example body: {"folder_id":"uuid","visible_to_client":true} - `GET /v1/media/folders` — Media folders (scope workspaces:read) - `POST /v1/media/folders` — Make a folder (scope workspaces:write) Owners and admins. New folders go last unless position says otherwise. - body `name` (string, required): Up to 60 characters. - body `color` (string): One of the page's colors; null or left out is the default grey. - body `position` (number): Its place in the list, 0 first. - example body: {"workspace_id":"uuid","name":"Job photos","color":"#3b82f6"} - `PATCH /v1/media/folders/{folder_id}` — Rename, recolor or reorder a folder (scope workspaces:write) - path `folder_id` (string, required): The folder. - body `name` (string): Up to 60 characters. - body `color` (string): One of the page's colors, or null. - body `position` (number): Its place in the list, 0 first. - example body: {"name":"Before and after"} - `DELETE /v1/media/folders/{folder_id}` — Delete a folder (scope workspaces:write) The folder only: its files stay in the library, in no folder. - path `folder_id` (string, required): The folder. ### Website widget - `GET /v1/website-widgets` — Website widgets (scope workspaces:read) Tools > Website Widget: each chat or booking widget's settings and numbers, and install.snippet, the exact line to paste on the business's site, on the sub-account's CRM domain. Make one with POST /v1/website-widgets and remove one with DELETE /v1/website-widgets/{widget_id}. - `GET /v1/website-widgets/{widget_id}` — One website widget (scope workspaces:read) - path `widget_id` (string, required): The widget. - `PATCH /v1/website-widgets/{widget_id}` — Change a website widget (scope workspaces:write) Send what changes; the live widget follows on its next page load. theme merges over the saved look, and null clears one of its fields. Owners and admins. - path `widget_id` (string, required): The widget. - body `name` (string): Up to 120 characters. - body `enabled` (boolean): Whether it shows on the site. - body `mode` (string): An AI assistant, or a Smart Form to book (needs smart_form_id). - body `goal` (string): What the assistant works toward. - body `ai_prompt` (string): Its own prompt; null uses the sub-account's text message prompt. - body `agent_name` (string): Shown under replies; null uses the texting agent's name. - body `greeting` (string): The first message, up to 500 characters. - body `quick_replies` (array): Up to 4 one-tap starters, up to 80 characters each. - body `collect_contact` (string): Ask for details before the first message, or during the chat. - body `notify_on_handoff` (boolean): Tell the team when the assistant can't answer. - body `calendar_id` (string): The calendar it books into; null is the default one. - body `smart_form_id` (string): The form a booking widget opens. - body `theme` (object): The look: primary_color, position (right, left), launcher (bubble, avatar), avatar_url, avatar_video_url, teaser_text, title, subtitle, host_name, host_title, card_headline, card_text, card_bullets, cta_label, secondary_label, secondary_url, phones (show, compact, hide), show_after_seconds (0, 3, 5, 10, 20, 30), hide_on_paths. - body `allowed_origins` (array): Only these websites (subdomains included); [] allows any. - body `daily_message_cap` (number): Messages a day across all visitors, 20-10000. - body `session_message_cap` (number): Messages a conversation, 5-200. - example body: {"greeting":"Hi! Want a quick quote?","theme":{"primary_color":"#2563eb","phones":"compact"}} ### Reward games - `GET /v1/reward-games` — Reward games (scope workspaces:read) Tools > Reward Games: short games (spin the wheel, scratch card, pick a gift, slot machine, pop a balloon, prize drop) a business sends past customers and old leads. Every play wins one of its own rewards, shown as a coupon, and playing is free. Each game has its setup, rewards with each one's chance and how many were won, share_url (the public link for social or a flyer) and numbers: added_by_send, sent, opened, played, redeemed, friends (came through a friend's link), friend_rewards, booked (a sale, booking or coupon used after playing) and booked_cents. Test plays never count. Owners and admins only. - `POST /v1/reward-games` — Make a reward game (a draft) (scope workspaces:write) A new draft, from a ready-made template or blank; anything else you send goes on top. Nothing is sent, and its links don't work until it is live. A game can never be tied to a review: wording about reviews or ratings anywhere is refused (Google's policy and the FTC rule). Rewards are 3 to 8, each with a label of up to 24 characters; a blank game can start with none but can't go live or be sent until it has them. Up to 50 games per sub-account. Answers with the game as GET shows it. - body `template` (string): Start from a ready-made game. Left out: blank. - body `name` (string): The game's name, up to 60 characters (only your team sees it). - body `style` (string): The game. - body `scene` (string): The look of the page. - body `accent` (string): #RRGGBB, or empty for the business's own colour. - body `slice_colors` (array): The wheel's slices: 2 to 4 #RRGGBB, or empty for shades of the accent. - body `font` (string): Headline font. - body `photo` (string): A picture already stored with us (a media library link), or empty. - body `photo_show` (string): How much of the photo shows. - body `headline` (string): Up to 60 characters. - body `subhead` (string): Up to 120 characters. - body `button` (string): The wheel's button, up to 24 characters. - body `language` (string): The language of every word on the game, its texts and its emails. Stock wording follows it; the business's own stays. - body `words` (object): The business's own words over the language's, by key: for example { continue: "Je tente ma chance", showButton: "Montrer en magasin", bookNow: "Prendre rendez-vous" }. Keys include the game's, the coupon's, the form's, the friend step's and the texts'; an unknown key is refused and lists them all. {braces} are filled in. "" puts a word back. The texting agreement and the rules can't be changed. - body `claim_how` (string): How a reward is claimed. - body `terms` (string): The business's fine print, up to 300 characters. - body `expires_days` (number): Days a won reward stays good, 1-90. - body `referral` (object): { on, reward }: the fixed reward a customer earns when a friend uses theirs (never an extra spin). - body `form` (object): Questions before playing: { on, email: off | optional | required, questions: [{ label, type: text | choice | choices | yesno, options, required }] }, up to 6. Answers never change what anyone wins. - body `rewards` (array): 3 to 8 of { id, label, detail, weight (1-100), stock (null = no limit) }. A reward named by its id, or by the same label, keeps its won count. - body `message` (string): The text sent with the link, up to 640 characters: {first_name}, {business}, {link}, {referral_reward}. - body `email_subject` (string): The email's subject, up to 120 characters. - example body: {"workspace_id":"uuid","template":"win-back","name":"Spring thank-you","expires_days":30} - `GET /v1/reward-games/{game_id}` — One reward game: setup and results (scope workspaces:read) The same fields as the list, for one game. - path `game_id` (string, required): Game id. - `PATCH /v1/reward-games/{game_id}` — Change a reward game (scope workspaces:write) Send only what changes: the fields of POST /v1/reward-games, and status. status draft | live | paused | ended is the game's switch: live makes its links work (409 until it has 3 rewards in stock), paused shows a back-soon page and holds its queue, ended closes it. New plays get the changes. Reward won counts and the public link are the server's and can't be changed. Wording about reviews is refused. - path `game_id` (string, required): Game id. - body `status` (string): The game's switch. - body `headline` (string): Or any other field of POST /v1/reward-games. - example body: {"status":"paused"} - `DELETE /v1/reward-games/{game_id}` — Delete a reward game (scope workspaces:write) Deletes the game and everyone's plays and coupons with it. Links stop working. To stop a game but keep its results, set status ended instead. - path `game_id` (string, required): Game id. - `POST /v1/reward-games/{game_id}/audience` — How many people a send would reach (scope workspaces:write) Free, and sends nothing. count = who would get it; skipped = people left out (no number or email, opted out, already have this game). at_least: the sub-account is too big to count exactly. per_send: how many one send queues at most. - path `game_id` (string, required): Game id. - body `audience` (string, required): Who. - body `channel` (string, required): How it would go. - body `tag_ids` (array): Only leads with any of these tags (GET /v1/tags). - example body: {"audience":"past_customers","channel":"sms"} - `POST /v1/reward-games/{game_id}/send` — Send a reward game to an audience (scope workspaces:write) Messages real people. Puts each person (up to 2,000 a send) in the queue with their own time, at the pace you ask or the recommended one (texts: half the daily texting limit a day; emails: 100 an hour), inside the business's sending hours and never past its daily limit, so a list is never sent all at once. Quiet hours, STOP and do-not-text apply. Each person gets a personal link once per game. A draft goes live. 409 when the game is paused or ended, has too few rewards or mentions reviews. more_not_sent: people past the 2,000; send again later to reach them. - path `game_id` (string, required): Game id. - body `audience` (string, required): Who. - body `channel` (string, required): How it goes. - body `tag_ids` (array): Only leads with any of these tags (GET /v1/tags). - body `pace` (object): { n, per: hour | day }: at most 500 an hour or 5,000 a day. Left out: the recommended pace. - example body: {"audience":"past_customers","channel":"sms","pace":{"n":100,"per":"day"}} - `POST /v1/reward-games/{game_id}/try` — A test link for the team (scope workspaces:write) A link to play the game yourself, drafts included. Never texted, uses no stock, never counted in the numbers. - path `game_id` (string, required): Game id. - `GET /v1/reward-games/{game_id}/plays` — Who got a game, who played, rewards and codes (scope workspaces:read) Newest first. status is queued, sent, opened, played, redeemed, failed or skipped; kind is play, or bonus for a referrer's fixed reward; not_sent_reason says why one didn't go; answers are the game's questions. q finds a coupon code or a first name, then POST .../plays/{play_id}/redeem marks it used. - path `game_id` (string, required): Game id. - query `filter` (string): Default all. won = played and not used yet; waiting = queued, sent or opened; friends = came through a friend, and their rewards. - query `q` (string): A coupon code or first name. - query `limit` (number): 1-100, default 25. - query `cursor` (string): next_cursor from the previous page. - `POST /v1/reward-games/plays/{play_id}/redeem` — Mark a reward used (scope workspaces:write) The customer used their coupon. Notes it on the lead; when this player came through a friend, the friend gets the game's fixed referral reward by text (friend_reward). Past its date it is redeemed anyway and says expired: the business decides. undo: true marks it not used; a referral reward already given stays. 409 when they haven't played. - path `play_id` (string, required): Play id (GET .../plays; q finds it by code). - body `undo` (boolean): Mark it not used yet. - example body: {} ### Loyalty cards - `GET /v1/loyalty-cards` — Loyalty card programs (scope workspaces:read) The sub-account's loyalty programs, newest first, with their settings, design, join link (the QR code on the counter) and 30-day numbers: cards, active, invited, in_apple, in_google, joined_30d, visits_30d, earned_30d, rewards_ready, rewards_used_30d, spend_30d, returning_30d. problems lists what must be fixed before a draft can go live. wallets says whether Apple Wallet and Google Wallet passes are on. Free. - `GET /v1/loyalty-cards/catalog` — Card types and starters (scope workspaces:read) The kinds of card (stamps, points, cashback, tiers, membership, multipass, coupon, gift, event) with what each suits, and the starters (a ready card for a coffee shop, salon, car wash, auto repair, home services, pet groomer, gym, spa, bakery, pizza, shop, a one-time offer, gift cards) to pass as starter to POST /v1/loyalty-cards. - `POST /v1/loyalty-cards` — Make a loyalty program (scope workspaces:write) A new draft: starter (from the catalog: its rules and look, in the business's logo), or kind with optional settings and design (missing fields take the kind's defaults). Turn it on with PATCH status live. Words about reviews or ratings are refused. - body `starter` (string): A starter key from GET /v1/loyalty-cards/catalog. - body `kind` (string): stamps, points, cashback, tiers, membership, multipass, coupon, gift or event. - body `settings` (object): Rules: language (en, fr, es, de, nl, pt-BR, pt, zh: what customers read; a starter's words come in it), name, headline, goal, rewards [{ at, label, detail }], earn { per: visit | spend, spendCents, points }, cashbackPercent, tiers, perks, validMonths, offer, event, welcome, referral, birthday, winback, auto { invoicePaid, jobWon, appointmentDone, stripePaid, issue }, message (must hold {link}), maxPerDay, rewardDays, terms. - body `design` (object): Look: theme, bg, fg, label, stripBg, stampOn, stampOff (#rrggbb), icon { kind: glyph | clay | image, name, url }, shape, empty, logo, logoText, stripImage, barcode, font. - `GET /v1/loyalty-cards/{program_id}` — A loyalty program (scope workspaces:read) - path `program_id` (string, required): A loyalty program (from GET /v1/loyalty-cards). - `PATCH /v1/loyalty-cards/{program_id}` — Change a loyalty program (scope workspaces:write) Only what's sent: settings and design are merged into the saved ones, status is draft, live, paused or ended (live refuses a program that isn't ready and says why). Every card already in a wallet updates by itself within a minute. - path `program_id` (string, required): A loyalty program (from GET /v1/loyalty-cards). - body `settings` (object): See POST /v1/loyalty-cards. - body `design` (object): See POST /v1/loyalty-cards. - body `status` (string): draft, live, paused or ended. - `DELETE /v1/loyalty-cards/{program_id}` — Delete a loyalty program (scope workspaces:write) With customers on it, answers 409 has_cards unless ?confirm=true (their cards stop working). End it instead to keep their history. - path `program_id` (string, required): A loyalty program (from GET /v1/loyalty-cards). - query `confirm` (string): true to delete it with its cards. - `GET /v1/loyalty-cards/{program_id}/members` — Who has a card (scope workspaces:read) The program's cards, newest first: first name, phone, email, member number, balance fields (stamps, points, credit_cents, uses_left, visits, spend_cents, tier, expires_at), in_apple_wallet, in_google_wallet, card_url and last_visit_at. - path `program_id` (string, required): A loyalty program (from GET /v1/loyalty-cards). - query `q` (string): Name, email, phone or member number. - query `status` (string): invited, active, expired or closed. - query `limit` (number): 1-200, default 50. - query `before` (string): next_before from the previous page. - `POST /v1/loyalty-cards/{program_id}/members` — Give someone a card (scope workspaces:write) For a lead in the CRM (lead_id) or someone new (contact: firstName, phone, email; matched to a lead first). channel sms or email sends them their card's link right away (texts cost the usual text price). A person who already has the card gets theirs back (created false). - path `program_id` (string, required): A loyalty program (from GET /v1/loyalty-cards). - body `lead_id` (string): A lead in the sub-account. - body `contact` (object): { firstName, phone?, email? } - body `channel` (string): sms or email: send it now. - body `gift_cents` (number): A gift card's starting balance. - `POST /v1/loyalty-cards/{program_id}/import` — Import members (scope workspaces:write) People and balances from another loyalty app, up to 100 a call: { name, phone?, email?, stamps?, points?, balance_cents?, visits_left?, visits?, birthday? (MM-DD) }. Saved as customers with a card that isn't sent; send them later with POST .../send audience unsent. - path `program_id` (string, required): A loyalty program (from GET /v1/loyalty-cards). - body `rows` (array, required): 1 to 100 people. - `POST /v1/loyalty-cards/{program_id}/audience` — Who a send reaches (scope workspaces:write) How many people POST .../send would reach (free, sends nothing): audience past_customers, recent (90 days), everyone, tagged (tag_ids) or unsent (cards made but never sent), channel sms or email. People who already have the card, opted out or can't get that channel are left out. - path `program_id` (string, required): A loyalty program (from GET /v1/loyalty-cards). - body `audience` (string, required): past_customers, recent, everyone, tagged or unsent. - body `channel` (string, required): sms or email. - body `tag_ids` (array): With audience tagged. - `POST /v1/loyalty-cards/{program_id}/send` — Send cards (scope workspaces:write) Each person in the audience gets their own card, already filled in, by text or email, spread over the business's sending hours at the recommended pace (or pace { n, per: hour | day }), never past the daily texting limit. Up to 2,000 a send. Turns a draft program live when it's ready. - path `program_id` (string, required): A loyalty program (from GET /v1/loyalty-cards). - body `audience` (string, required): See .../audience. - body `channel` (string, required): sms or email. - body `tag_ids` (array): With audience tagged. - body `pace` (object): { n, per }. - `GET /v1/loyalty-cards/{program_id}/messages` — Notes to card holders (scope workspaces:read) - path `program_id` (string, required): A loyalty program (from GET /v1/loyalty-cards). - `POST /v1/loyalty-cards/{program_id}/messages` — A note on card holders' lock screens (scope workspaces:write) body (up to 240 characters) shows on the lock screen of everyone whose card is in Apple Wallet or Google Wallet, and on browsers that turned notifications on on their card page (both free); channel wallet_then_text also texts the rest, if they agreed to texts. audience all, active, quiet, ready (a reward waiting), close (one or two stamps away) or new. One a day per program; send_at schedules it. - path `program_id` (string, required): A loyalty program (from GET /v1/loyalty-cards). - body `body` (string, required): The note. - body `audience` (string): Default all. - body `channel` (string): wallet (default) or wallet_then_text. - body `send_at` (string): ISO time. - `GET /v1/loyalty-members` — Find cards (scope workspaces:read) Cards across every program by name, phone or the 8-digit member number on the card (q), or a lead's cards (lead_id). - query `q` (string): Name, email, phone or member number. - query `lead_id` (string): A lead's cards. - query `status` (string): invited, active, expired or closed. - query `limit` (number): 1-200. - `GET /v1/loyalty-members/{card_id}` — A customer's card (scope workspaces:read) The card with its balance, what it shows (face: headline, fields, the nudge like "2 more stamps to a free coffee"), rewards ready to use, every reward, and its history (each entry's id is what undo takes). - path `card_id` (string, required): A customer's card (from .../members or GET /v1/loyalty-members). - `POST /v1/loyalty-members/{card_id}/earn` — Add a visit or purchase (scope workspaces:write) Stamps (one per visit, or per amount spent), points, cashback credit, a VIP level's spend or a membership check-in, by the program's rules; count gives stamps or points by hand. A milestone gives its reward and the card's phone shows it. ref (your order or receipt id) never counts twice. Refused past the program's daily limit per card. - path `card_id` (string, required): A customer's card (from .../members or GET /v1/loyalty-members). - body `spend_cents` (number): What they spent. - body `count` (number): Stamps or points by hand. - body `note` (string): Kept on the history. - body `ref` (string): Your id for this purchase. - `POST /v1/loyalty-members/{card_id}/use` — Use points, credit or a visit (scope workspaces:write) reward_id trades points for one of the program's rewards; cents spends cashback credit or a gift card's balance; uses takes visits from a visit pack, a coupon's use or an event check-in. - path `card_id` (string, required): A customer's card (from .../members or GET /v1/loyalty-members). - body `reward_id` (string): A points reward's id. - body `cents` (number): Credit or balance to use. - body `uses` (number): Visits or uses (default 1). - `POST /v1/loyalty-members/{card_id}/refill` — Add visits or money, renew (scope workspaces:write) uses adds visits to a visit pack (default the pack's size), cents adds to a gift card, and a membership is renewed by the program's months. - path `card_id` (string, required): A customer's card (from .../members or GET /v1/loyalty-members). - body `uses` (number): Visits to add. - body `cents` (number): Money to add. - `POST /v1/loyalty-members/{card_id}/rewards` — Give a reward (scope workspaces:write) A reward of your own on the card (a thank-you, a make-good); the customer's phone shows it. - path `card_id` (string, required): A customer's card (from .../members or GET /v1/loyalty-members). - body `label` (string, required): What it is. - body `detail` (string): More about it. - `POST /v1/loyalty-members/{card_id}/adjust` — Set a balance (scope workspaces:write) field stamps, points, credit_cents, uses_left, visits or spend_cents set to value (a correction, or a card moved from another app); kept on the history with note. - path `card_id` (string, required): A customer's card (from .../members or GET /v1/loyalty-members). - body `field` (string, required): Which balance. - body `value` (number, required): 0 or more. - body `note` (string): Why. - `POST /v1/loyalty-members/{card_id}/undo` — Take back a change (scope workspaces:write) A stamp, points, a purchase, a use or a refill from the last 24 hours (event_id from the card's history): its balances come back and the rewards it gave are voided (refused when one was already used). - path `card_id` (string, required): A customer's card (from .../members or GET /v1/loyalty-members). - body `event_id` (number, required): The history entry. - `POST /v1/loyalty-members/{card_id}/close` — Close a card (scope workspaces:write) It stops earning and its Wallet pass shows it's closed. Reopen it any time. - path `card_id` (string, required): A customer's card (from .../members or GET /v1/loyalty-members). - body `note` (string): Why. - `POST /v1/loyalty-members/{card_id}/reopen` — Open a card again (scope workspaces:write) - path `card_id` (string, required): A customer's card (from .../members or GET /v1/loyalty-members). - `POST /v1/loyalty-rewards/{reward_id}/redeem` — Use a reward (scope workspaces:write) A reward waiting on a card (a stamp card's free item, a birthday or welcome gift) was used. Refused when it was used, taken back or ran out. - path `reward_id` (string, required): From the card's rewards_ready. ### Short links - `GET /v1/short-links` — Short links (scope workspaces:read) The sub-account's short links, newest first, with clicks and QR scans. A link without a domain lives at /l/; one on the business's own domain at https:/// (short_url has it). state: active, scheduled_end (it has an end date or click limit), expired, used_up or disabled. Free: short links never cost credits. - query `q` (string): Words in the name, address or back-half. - query `tag` (string): Only links with this tag. - query `domain` (string): Only links on this domain (empty = the CRM's own address). - query `archived` (string): Default exclude. - query `sort` (string): Default newest. - query `limit` (number): 1-100, default 25. - query `cursor` (string): next_cursor from the previous page. - `POST /v1/short-links` — Make a short link (scope workspaces:write) url is where people land (https:// is added when left out). Leave key out for a random back-half; a taken key is 409. The page's title becomes the link's name unless you send one. Everything else is optional and can be changed later, including url: printed QR codes keep working. qr_image in the answer is the QR code (SVG) in the link's design; add ?qr=1 to the short link yourself to count scans apart from clicks. - body `url` (string, required): Where people land. - body `key` (string): The back-half: letters, numbers, - and _, up to 50. slug works too. - body `domain` (string): One of GET /v1/short-links/domains (verified). Left out: the sub-account's default. - body `title` (string): A name only the team sees. - body `tags` (array): Up to 20. - body `utm` (object): { source, medium, campaign, term, content }: added to url. - body `expires_at` (string): When it stops (ISO date). Then people go to expired_url, else a page saying it ended. - body `expired_url` (string): Where people go once it ends. - body `click_limit` (number): Stops after this many clicks. - body `password` (string): People type it before they go on. Kept only as a hash. - body `ios_url` (string): Where iPhones and iPads go: a web address, or an app link (instagram://user?username=you) that opens the app, with url as the fallback. - body `android_url` (string): Where Android phones go; an app link works the same way. - body `geo` (object): { "CA": "https://..." }: a country's visitors go to its own page (up to 30). - body `variants` (array): A/B split: [{ url, weight }] (1-3, weights in percent; the main url keeps the rest). - body `og` (object): The card texts and posts show: { title, description, image }. - body `pixels` (object): { meta, google, tiktok, linkedin }: retargeting pixels fired on the way through. - body `cloak` (boolean): Show the page under the short address, so the short link stays in the address bar (sites that refuse frames get an Open button). - body `notes` (string): Only the team sees them. - example body: {"workspace_id":"uuid","url":"example.com/spring-special","key":"spring","tags":["print"],"utm":{"source":"flyer","medium":"print"}} - `POST /v1/short-links/bulk` — Make up to 100 short links (scope workspaces:write) links is a list of addresses or { url, key?, title?, tags?, ... } (any field of POST /v1/short-links); defaults applies to every one (tags, utm, domain...). Each is made on its own: results says which worked, in order. - body `links` (array, required): Up to 100. - body `defaults` (object): Fields for every link. - example body: {"workspace_id":"uuid","links":["https://example.com/a",{"url":"https://example.com/b","key":"b-flyer"}],"defaults":{"tags":["mailer"]}} - `GET /v1/short-links/stats` — Every link's numbers (scope workspaces:read) Clicks for all the sub-account's links (or one tag's): totals against the same length of time before (previous), a series by hour (up to 2 days) or day in the business's time zone, breakdown by country, region, city, continent, device, browser, os, referrer, trigger (link or qr), target (which page a rule sent them to), hour and weekday, and the top links. people counts different visitors (a salted fingerprint of IP and browser, never shown) and returning those who came back; visitors counts different people each day. breakdown also has postal (ZIP), model (phone), os_version, browser_version, isp (network), language, referrer_url (the page they came from) and query (the link's own ?parameters), and points are map positions (city level). Bots and link previews are recorded apart (totals.bots) and never counted. - query `range` (string): Default 30d. - query `from` (string): Or a start (ISO date)... - query `to` (string): ...and an end (default now). Up to 3 years. - query `tz` (string): IANA time zone for the series (default the sub-account's). - query `tag` (string): Only links with this tag. - query `country` (string): Filter: only clicks from this country (any breakdown key works the same way: region, city, postal, continent, device, browser, os, model, referrer, trigger, target, isp, language, query). - `POST /v1/short-links/check` — Check that links still work (scope workspaces:write) Opens every link's destination (or the ids sent, up to 300) and keeps the answer on the link (health: ok, status, checked_at): a page that stopped working shows as broken in the app. Free. - body `ids` (array): Only these links. - example body: {} - `GET /v1/short-links/{link_id}` — One short link (scope workspaces:read) The link as GET /v1/short-links shows it. - path `link_id` (string, required): Link id. - `PATCH /v1/short-links/{link_id}` — Change a short link (scope workspaces:write) Send only what changes: any field of POST /v1/short-links, plus pinned and archived (an archived link still works). Changing url sends everyone, printed QR codes included, to the new page. Changing key or domain makes a new address: the old one stops working. password "" removes the password; utm alone re-tags the current url; null clears expires_at, expired_url, click_limit, ios_url, android_url or og. - path `link_id` (string, required): Link id. - body `archived` (boolean): Hide it from the list; it keeps working. - body `pinned` (boolean): Keep it at the top. - body `url` (string): Where people land. - body `key` (string): The back-half: letters, numbers, - and _, up to 50. slug works too. - body `domain` (string): One of GET /v1/short-links/domains (verified). Left out: the sub-account's default. - body `title` (string): A name only the team sees. - body `tags` (array): Up to 20. - body `utm` (object): { source, medium, campaign, term, content }: added to url. - body `expires_at` (string): When it stops (ISO date). Then people go to expired_url, else a page saying it ended. - body `expired_url` (string): Where people go once it ends. - body `click_limit` (number): Stops after this many clicks. - body `password` (string): People type it before they go on. Kept only as a hash. - body `ios_url` (string): Where iPhones and iPads go: a web address, or an app link (instagram://user?username=you) that opens the app, with url as the fallback. - body `android_url` (string): Where Android phones go; an app link works the same way. - body `geo` (object): { "CA": "https://..." }: a country's visitors go to its own page (up to 30). - body `variants` (array): A/B split: [{ url, weight }] (1-3, weights in percent; the main url keeps the rest). - body `og` (object): The card texts and posts show: { title, description, image }. - body `pixels` (object): { meta, google, tiktok, linkedin }: retargeting pixels fired on the way through. - body `cloak` (boolean): Show the page under the short address, so the short link stays in the address bar (sites that refuse frames get an Open button). - body `notes` (string): Only the team sees them. - example body: {"url":"https://example.com/summer-special","tags":["print","summer"]} - `DELETE /v1/short-links/{link_id}` — Delete a short link (scope workspaces:write) The link, its QR code and its numbers are gone for good; anyone who opens it sees "link not found". To keep it working but out of the list, PATCH archived: true instead. - path `link_id` (string, required): Link id. - `GET /v1/short-links/{link_id}/stats` — One link's numbers (scope workspaces:read) The numbers of GET /v1/short-links/stats for one link (no top links). - path `link_id` (string, required): Link id. - query `range` (string): Default 30d. - query `from` (string): Or a start (ISO date). - query `to` (string): And an end. - query `tz` (string): IANA time zone. - `GET /v1/short-links/{link_id}/clicks` — A link's latest clicks (scope workspaces:read) Newest first: when, QR scan or click, which page it went to, country, region, city, ZIP, map position, time zone, device and phone model, browser and OS with versions, language, the site and page they came from, the link's own ?parameters, the IP address (kept 90 days), network (ISP, ASN) and whether they came back. Robots are left out. - path `link_id` (string, required): Link id. - query `limit` (number): 1-100, default 25. - `GET /v1/short-links/domains` — The business's own short domains (scope workspaces:read) Domains like go.yourbusiness.com that short links can use. verified: it's live. dns_record is what to add at the domain's DNS provider. root_url: where the bare domain goes; not_found_url: where an unknown back-half goes. - `POST /v1/short-links/domains` — Add a short domain (scope workspaces:write) Adds the domain and checks it at once. Point a CNAME record for it to portal.usezu.com (a bare domain: an ALIAS or ANAME record); it is checked every few minutes until it's live, usually 5-30 minutes. Use a subdomain (go., link.), never the address of the main website. Up to 10. - body `hostname` (string, required): Like go.yourbusiness.com. - body `root_url` (string): Where the bare domain goes. - body `not_found_url` (string): Where an unknown back-half goes. - example body: {"workspace_id":"uuid","hostname":"go.example.com","root_url":"https://example.com"} - `POST /v1/short-links/domains/{domain_id}/verify` — Check a short domain now (scope workspaces:write) Looks at its DNS record and opens it. error says what's still missing. - path `domain_id` (string, required): Domain id. - `DELETE /v1/short-links/domains/{domain_id}` — Remove a short domain (scope workspaces:write) Its short links and their QR codes stop working and are deleted with it. - path `domain_id` (string, required): Domain id. ### Smart forms - `GET /v1/surveys` — Surveys (scope smart_forms:read) The sub-account's surveys: Smart Forms that ask for feedback (a funnel with no booking and no screening). A survey never makes a lead: an answer lands on the lead the personal link belongs to, or on one matched by the phone or email typed, else it stays on the survey. Each has live, the message its link goes out in, rules (when it sends itself) and its questions. Add or change questions with PATCH /v1/smart-forms/{form_id} (questions). - `POST /v1/surveys` — Make a survey (scope smart_forms:write) A new survey from one of the app's five starts, with its questions, message and rule, as a draft: it sends nothing until it is live (PATCH /v1/surveys/{form_id}/rules with live: true). Owners and admins. A sub-account keeps at most 100 Smart Forms. - body `template` (string): Which start. Default blank. - body `name` (string): Up to 80 characters. Default the start's own. - example body: {"workspace_id":"uuid","template":"lost_deal"} - `GET /v1/surveys/{form_id}/results` — A survey's answers (scope smart_forms:read) The Results tab as data. totals: answers, and of the links that went out how many were opened and answered. questions: per question, answers with counts and percents and other_words (what people typed under Other); a rating's average, scores 1-10, gave_9_or_10_pct and gave_6_or_less_pct; a number's average; written answers (the first 50, written_total says how many). responses: every answer, a page at a time. Covers the newest 2,000 answers (capped says so). Every member can read it. - path `form_id` (string, required): Survey id. - query `days` (number): Look back this many days, 1-3650. Default 90. - query `limit` (number): Responses per page, 1-100, default 25. - query `cursor` (string): next_cursor from the previous page. - `PATCH /v1/surveys/{form_id}/rules` — When a survey sends itself, its words, on or off (scope smart_forms:write) rules replaces the list (up to 4): when a deal is marked Won or Lost, the survey goes to that person after the wait, once per rule and person in 180 days, and not if the deal has moved on by then. A rule on these messages real people automatically. Send a rule's key to keep it; without one it takes over the old rule for the same event. message and subject are what the personal link goes out in ({first_name}, {business_name}, {survey_link}). live turns the survey on or off. Send any of these; the rest stay. Owners and admins. - path `form_id` (string, required): Survey id. - body `rules` (array): Up to 4 of { key, when: lost | won, delay: { amount, unit: hours | days | weeks | months }, channel: sms | email | both, on }. - body `message` (string): Up to 600 characters. - body `subject` (string): The email's subject, up to 150 characters. - body `live` (boolean): On (links work and it can send) or off. - example body: {"rules":[{"when":"lost","delay":{"amount":2,"unit":"days"},"channel":"sms"}],"live":true} - `POST /v1/surveys/{form_id}/send` — Send a survey to people (scope smart_forms:write) Messages real people: each lead gets their own link, by text, email or both, through the queue (quiet hours, daily limits, STOP). The first 25 go at once, the rest within minutes. Up to 200 a send. The survey must be live (400 otherwise). Get lead ids from GET /v1/leads. Owners and admins. - path `form_id` (string, required): Survey id. - body `lead_ids` (array, required): 1-200 lead ids. - body `channel` (string): Default sms (text; someone with only an email gets it by email). - example body: {"lead_ids":["uuid"],"channel":"sms"} - `POST /v1/surveys/{form_id}/links` — One lead's personal survey link (scope smart_forms:write) Their own link, to send however you like; nothing is sent. The same link comes back while it's unanswered (30 days). Answers land on this lead, with no name or phone asked. live says whether the survey is on, because a draft's links don't work yet. Owners and admins. - path `form_id` (string, required): Survey id. - body `lead_id` (string, required): The lead. - example body: {"lead_id":"uuid"} ### Ads & Google - `GET /v1/google-business/reports/settings` — Google Reports settings (scope workspaces:read) Tools > Google Reports: whether the weekly and monthly emails go, the day and hour (in the sub-account's time zone), who gets them, the check-ins, what the emails show and next_note, your note at the top of the next one. saved is false until someone saves them, and the settings are then the defaults. Owners and admins, with the Google tools add-on (403 addon_locked without it). - `PUT /v1/google-business/reports/settings` — Change the Google Reports settings (scope workspaces:write) The app's Save. Send only what changes. Turning reports on needs someone to send them to (400 otherwise). enabled: true means real emails go to recipients, in the agency's brand, on their schedule. Owners and admins, with the Google tools add-on. - body `enabled` (boolean): Reports on or off. - body `weekly` (boolean): The weekly summary. - body `monthly` (boolean): The monthly report (first weekday from the 4th). - body `send_day` (number): The weekly's day: 0 = Sunday ... 6 = Saturday. - body `send_hour` (number): The hour, 5 to 20, in the sub-account's time zone. - body `recipients` (array): Up to 10 email addresses. - body `nudge_reviews_days` (number): Check-in after this many days without a new Google review: 7, 10, 14, 21 or 30; null for off. - body `nudge_photos` (boolean): Check-in when automatic photo uploads have under a week left. - body `nudge_wins` (boolean): Check-in after a great week of reviews. - body `show_drops` (boolean): Show numbers that went down too (off: only gains get a %). - body `compare` (boolean): This period next to the one before. - body `rank_maps` (boolean): The Map Rankings heat maps. - body `next_note` (string): Your words at the top of the next weekly or monthly report, in your name, up to 1,200 characters; cleared once that one goes out. null clears it now. - example body: {"workspace_id":"uuid","enabled":true,"recipients":["owner@acmeroofing.com"],"send_day":1,"send_hour":8} - `GET /v1/google-business/reports` — Google report emails sent (scope workspaces:read) Newest first: each email's kind, status (sent, failed, sending), who got it, the numbers it showed for each business (reviews, posts, photos, Google's own numbers, Map Rankings) and link, the public web version anyone with the link can open. Owners and admins, with the Google tools add-on. - query `kind` (string): Only this kind. - query `limit` (number): 1-30, default 10. - `POST /v1/google-business/reports/test` — Send a test Google report to yourself (scope workspaces:write) The app's Send me a test: the report as it would go now, marked [Test], to the email of the person this key belongs to and nobody else. It takes no address. 400 until the business is found on Google. Owners and admins, with the Google tools add-on. - body `kind` (string): Default weekly. - example body: {"workspace_id":"uuid","kind":"monthly"} - `GET /v1/google-business/holiday-hours` — Holiday hours on Google (scope workspaces:read) What a Google profile shows now on the coming US holidays (75 days) and on its other special days ahead: hours is closed, the hours that day ("09:00-14:00") or null with set false (nothing set: Google shows the usual hours). has_regular_hours false means Google needs regular hours before holiday hours. Read live from Google. Owners and admins, with the Google tools add-on. - query `profile_id` (string): One of its Google profiles (default its first). - `POST /v1/google-business/holiday-hours` — Set holiday hours on Google (scope workspaces:write) Sets the days sent on the Google profile, live: closed, usual or its own hours. Every other special day stays as it is. Recorded like a Profile Optimizer change (undo it with POST /v1/google-business/optimizer/changes/{change_id}/undo) and listed in the client's next report. 400 with Google's reason when it refuses. Owners and admins, with the Google tools add-on. - body `profile_id` (string): One of its Google profiles (default its first). - body `days` (array, required): Up to 12 days: { date: "2026-11-26", hours: "closed" | "usual" | "09:00-14:00", name?: "Thanksgiving" }. usual is that weekday's regular hours. From today (the business's time zone) to a year out. - example body: {"workspace_id":"uuid","days":[{"date":"2026-11-26","hours":"closed","name":"Thanksgiving"},{"date":"2026-12-24","hours":"09:00-14:00","name":"Christmas Eve"}]} - `GET /v1/google-business/profile` — A Google profile, as Google has it now (scope workspaces:read) Everything that can be edited by hand on a Google Business Profile, read live from Google: the website link, phone, description, hours (each day's open stretches; an empty day is closed, 00:00 to 24:00 is open all day), opening date, main and extra categories, services (id, kind google or custom, name, description, the category it sits under), service_catalog (Google's own services for each of its categories, on_profile true for the ones already there), the Book button's link, its booking calendars, and the social links Google offers this business. pending_review true means Google is still reviewing an earlier edit. Owners and admins, with the Google tools add-on. - query `profile_id` (string): One of its Google profiles (default its first). - `PATCH /v1/google-business/profile` — Edit a Google profile by hand (scope workspaces:write) Changes the fields sent on the business's live Google profile, which everyone sees. Each field goes to Google on its own, against the profile as it is at that moment, and answers its own result (ok with what changed, or Google's reason), so one refused field doesn't stop the rest; a field already like that on Google answers ok with a message and changes nothing. Services and categories are steps (add, update, remove), never a whole list, so an edit made on Google meanwhile is kept. Every change is recorded like a Profile Optimizer change: undo it with POST /v1/google-business/optimizer/changes/{change_id}/undo, and the client's next report lists it. dry_run: true has Google validate without saving (the Book link and social links have no such check and are skipped). Never changed here: the business name, the address and the main category. A new phone number can make Google ask to verify the business again. Owners and admins, with the Google tools add-on. - body `profile_id` (string): One of its Google profiles (default its first). - body `website` (string): The website link; "" takes it off. - body `phone` (string): The main phone number, 7 to 15 digits. - body `hours` (object): The whole week: { MONDAY: [{ open: "08:00", close: "17:00" }], ... }. A day left out or with an empty list is closed, up to 3 stretches a day, 00:00 to 24:00 is open all day, a close before the open runs past midnight. - body `description` (string): Up to 750 characters, no links; "" clears it. - body `services` (object): { add: [{ kind: "google", service_type_id, description? } | { kind: "custom", name, category, description? }], update: [{ id, description?, name? }], remove: [id] }. Ids and service_type_ids come from GET /v1/google-business/profile; a custom name can only be changed on a custom service; descriptions up to 300 characters. - body `categories` (object): { add: [category id], remove: [category id] } for the extra categories (up to 9). Ids like categories/gcid:gutter_service. - body `booking_link` (string): The Book button's link, "" to take it off, or { calendar_id } for one of its booking calendars. - body `links` (object): Social links by id from GET /v1/google-business/profile: { url_facebook: "https://facebook.com/acme", url_instagram: "" } ("" takes one off). - body `opening_date` (object): { year, month } the business opened. - body `dry_run` (boolean): true: Google validates, nothing changes. - example body: {"workspace_id":"uuid","website":"https://acmeroofing.com/jacksonville","services":{"add":[{"kind":"custom","name":"Skylight installation","category":"categories/gcid:roofing_contractor","description":"New skylights, flashed and sealed."}],"remove":["ff:storm damage tarping"]}} - `GET /v1/google-business/embeds` — Website embeds (scope workspaces:read) Tools > Website embeds: review widgets, photo galleries, Latest updates, FAQs and schema markup, each with snippet, the one line to paste on the business's website. Each is drawn from the live Google data. Owners and admins, with the Google tools add-on. - query `profile_id` (string): One Google business (default all). - `POST /v1/google-business/embeds` — Make a website embed (scope workspaces:write) One widget for the business's website, on its Google business (profile_id, default its first). Nothing shows anywhere until its snippet is pasted on a site. Settings a kind doesn't have, or a value it wouldn't keep, are refused (400). At most 100 per sub-account. Owners and admins, with the Google tools add-on. - body `profile_id` (string): One of its Google businesses (default its first). - body `kind` (string, required): What it shows. - body `name` (string): For the team, up to 80 characters (default the kind's name). - body `settings` (object): Every kind but schema: theme (light, dark, auto), accent (#rrggbb), radius (0-28), font (site, system), heading. reviews: layout (carousel, grid, list, badge), minStars (4, 5), max (1-30), showReply, reviewButton, buttonText, summary, hidden (review ids not to show). photos: layout (grid, masonry, mosaic, carousel, slideshow), max (1-96), columns (2-6), phoneColumns (1-3), ratio (square, landscape, wide, portrait), fit (cover, contain), gap (none, s, m, l), paging (all, more, pages; grid, masonry and mosaic) with rows (1-8) and buttonText / buttonStyle for the Show more button, arrows (top, sides, none), dots, autoplay (0, 4, 6, 8) and thumbs for the carousel and slideshow, captions (none, hover, always), hover (zoom, dim, none), lightbox, order (newest, oldest, shuffle), hidden (photo ids not to show, as in the embed JSON; the gallery shows the photos already on the Google profile and the ones sent through the tools). posts: layout (cards, list), max (1-12), open (modal, google). faq: openFirst, schema. schema: type (a schema.org type or auto), url. - body `faq` (array): FAQ only: up to 20 { q, a } (a question up to 200 characters, an answer up to 1,200). - example body: {"workspace_id":"uuid","kind":"reviews","name":"Homepage reviews","settings":{"layout":"grid","max":6}} - `PATCH /v1/google-business/embeds/{embed_id}` — Change a website embed (scope workspaces:write) Changes what visitors see on any site it's pasted on, at once. Send only what changes: settings merge onto the saved ones (hide a review by putting its id in settings.hidden), faq replaces the whole list. Its kind and the line to paste never change. Owners and admins, with the Google tools add-on. - path `embed_id` (string, required): Embed id. - body `name` (string): Up to 80 characters. - body `settings` (object): As POST /v1/google-business/embeds. - body `faq` (array): FAQ only: the whole list of { q, a }. - example body: {"settings":{"hidden":["review-uuid"],"minStars":5}} - `DELETE /v1/google-business/embeds/{embed_id}` — Delete a website embed (scope workspaces:write) It stops showing on any site it's pasted on. Owners and admins, with the Google tools add-on. - path `embed_id` (string, required): Embed id. - `POST /v1/google-business/embeds/{embed_id}/faq` — Have the AI write an FAQ (scope workspaces:write) Free. Writes new questions from the business's own facts (its Google profile, the AI Brain, its hours) and what its reviews keep mentioning, and drops any answer claiming what those facts don't say (dropped counts them). Nothing is saved: written is what's new, faq the list with them added; check it and send it with PATCH /v1/google-business/embeds/{embed_id}. FAQ embeds only. 409 not_enough_facts until the Optimizer has run or the AI Brain has facts; 409 faq_full at 20 questions. Owners and admins, with the Google tools add-on. - path `embed_id` (string, required): An FAQ embed's id. - `POST /v1/google-business/embeds/{embed_id}/facts` — Read the business from Google Maps (scope workspaces:write) Reads the pin, opening hours, type, phone, website and address from Google Maps onto every embed of that business, for its schema markup and FAQ. Owners and admins, with the Google tools add-on. - path `embed_id` (string, required): Embed id. - `POST /v1/google-business/connect-link` — Make or get the owner's Google connect link (scope workspaces:write) For a business whose owner should connect Google without the CRM: a page on the CRM's own domain, in the agency's brand, with no sign-in. It answers with the working link, or makes one when there's none, it expired (14 days) or it was used; reset: true replaces it. Only a Google account that manages this business can save a connection through it. state is ready, expired, connected or off. Owners and admins, with the Google tools add-on. Anyone holding the link can open the page, so send it only to the owner. - body `profile_id` (string): One of its Google businesses (default its first). - body `reset` (boolean): true: the old link stops working and a new one is made. - example body: {"workspace_id":"uuid"} - `DELETE /v1/google-business/connect-link` — Turn off the owner's Google connect link (scope workspaces:write) The link stops working. A connection already made through it stays. Owners and admins. - query `profile_id` (string): One of its Google businesses (default its first). - `GET /v1/google-business/photo-link` — The crew's photo link and PIN (scope workspaces:read) The link and 4-digit PIN crews use to add job photos to the Google profile with no sign-in (made the first time, as in the app). Give them only to the crew: both together can add photos to the line. Owners and admins, with the Google tools add-on. - query `profile_id` (string): One of its Google businesses (default its first). - `PATCH /v1/google-business/profiles/{profile_id}` — Change a Google profile's own settings (scope workspaces:write) Local knowledge (the Optimizer may name places from it), the words review replies work in now and then, and whether photos going to Google carry a location (a job's own GPS first, then this spot, then the business's pin). Send only what changes; geotag_lat and geotag_lng go together and null clears the spot. Auto-replies and auto-posting stay in the app. Owners and admins, with the Google tools add-on. - path `profile_id` (string, required): Profile id. - body `local_notes` (string): Streets, neighborhoods, landmarks and weather its customers know, up to 1,500 characters; null clears it. - body `replies_keywords` (string): Services and towns, comma separated, up to 400 characters; null clears it. - body `photos_geotag` (boolean): Photos going to Google carry a location. - body `geotag_lat` (number): With geotag_lng; null clears the spot. - body `geotag_lng` (number): With geotag_lat. - body `geotag_place` (string): The spot's name, up to 200 characters (goes with geotag_lat and geotag_lng). - example body: {"local_notes":"Most jobs are in Riverside and San Marco; salt air is hard on metal roofs.","photos_geotag":true} ### Invoices & reviews - `PATCH /v1/review-funnels/{funnel_id}` — Change a review page's words (scope workspaces:write) The team's name for the page, what it says (public, at once) and "Help them write it": after a happy rating the customer taps what they liked and the page writes a short review for them to edit and post themselves. Send only what changes; copy and helper merge onto what's saved. The star threshold, where unhappy customers go and the thank-you offer can't be changed here, and words offering something for a review or asking for a particular rating are refused (Google's and the FTC's rules). Owners and admins, with the Google tools add-on. - path `funnel_id` (string, required): Review page id (GET /v1/review-funnels). - body `name` (string): For the team, up to 60 characters. - body `copy` (object): Any of headline (140), message (300), low_title (100), low_message (300), low_button (40), low_thanks (300), high_title (100), high_message (300), high_button (40). {business} and {first_name} are filled in. - body `helper` (object): Any of enabled, question (120), chips (up to 8, 32 characters each: what customers can tap), keywords (up to 6, 60 characters each: services and towns a review may mention once), details (the optional "Anything to add?" box), ask_photo (ask for a photo of the job; it waits for the owner's OK). - example body: {"helper":{"enabled":true,"chips":["On time","Fair price","Clean and tidy"],"ask_photo":true}} ### Setup - `GET /v1/texting-registration` — Where the texting registration stands (scope phone_numbers:read) Read only. The business's A2P registration with the phone carriers, as the business sees it in Settings > Phone: kind (business or sole_proprietor), status (draft, brand_pending, needs_code, campaign_pending, approved, needs_fix, on_hold or closed), whose_move (you, us, carriers or nobody), message and needed in plain words, reasons when it was turned down (each with what to fix), and whether the business's numbers are on its own registration yet. registration is null when none was started. texting_live, numbers and numbers_ready say whether a number can text now, the same reading as texting_ready on GET /v1/phone-numbers; a status can be up to about 10 minutes old. Filing or fixing a registration and buying a number stay in the app on purpose: they take the business's legal details and a fee that isn't refunded. A tax ID or personal cell number is never returned. Owners and admins only. - `GET /v1/number-orders` — Numbers on order outside the US (scope phone_numbers:read) Read only. A number in a country whose regulator wants paperwork is an order the carrier reviews before it exists. Newest first: country, number, status (review, needs_fix, active or cancelled), whose_move (you, us, carriers or nobody), message and needed in plain words, and each requirement's name, type and status (approved, turned_down or waiting). Buying a number and sending or fixing its paperwork stay in the app on purpose. Countries with no paperwork have no order. Owners and admins only. - query `status` (string): review, needs_fix, active or cancelled. - query `limit` (number): 1-100, default 25. ## Errors - 400: Invalid request body or unknown action. Fix the payload; retrying unchanged returns the same error. - 401: Missing, malformed or revoked API key. Re-copy the key from Settings → API. - 402: The account is out of credits for this message or call, or the key's monthly credit budget is used up. Add credits to the account, or raise the key's budget in Settings → API. - 403: The key lacks the scope for this endpoint. `details.code` `account_locked`: this account is locked (paused, or its plan unpaid or ended), so its API keys stop until it opens again. Create a key with that scope in Settings → API; the response names the scope it needs. For `account_locked`, an admin of the account opens the CRM to see why and unlock it. - 404: Unknown route or record. Check the path and the id. - 409: Conflict, e.g. a lead with that phone or email already exists, or the lead is already booked at that time. Also `idempotency_in_progress`: the first request with this Idempotency-Key is still running. Use the id returned in `details`. For `idempotency_in_progress`, send the request again with the same key a moment later. - 429: Per-key rate limit exceeded. Wait for `Retry-After` seconds; read X-RateLimit-Remaining. - 503: Pricing or a limit check is temporarily unavailable. Nothing was charged. Retry with exponential backoff. - 5xx: Transient server or upstream failure. Retry with exponential backoff. ## Webhooks Sub-account webhooks are set up in Settings → Leads → Outbound webhooks, or with /v1/outbound-webhooks, and emit: - `lead.created` — A lead was captured for this sub-account. Payload is a full lead snapshot including custom form fields. - `lead.updated` — The lead's status or pipeline stage changed (other field edits do not fire it). Payload carries previous_status, status, previous_stage_key and stage_key. - `lead.qualified` — The lead was marked qualified. - `appointment.booked` — An appointment was booked for the lead. - `appointment.rescheduled` — An appointment moved to a new time, in the CRM calendar, through the API, by an inbound webhook or by the customer on their appointment page. Payload carries booking_id, lead_id, the new starts_at / ends_at, timezone, host, calendar, meeting and moved_via (app, api, inbound_webhook or customer). - `appointment.cancelled` — A booked appointment was cancelled. - `message.received` — An inbound SMS or email arrived on this sub-account's number or inbox. Payload carries message_id, lead_id, channel, direction, body, from/to and media_urls, and `transport` (imessage or mac_sms) when it came in on one of the sub-account's iMessage Macs. - `message.sent` — An outbound SMS or email was handed to the carrier or mail provider — manual, automated or API-sent. Texts carry `transport`: sms from the business number, imessage or mac_sms when one of the sub-account's Macs sent it. - `message.failed` — An outbound message could not be sent. Payload includes the error and, when the contact-safety cap was hit, a `limit` object. - `call.completed` — An AI receptionist call ended (once per call, after its recap is written; practice calls from Settings excluded). Payload carries call_id, lead_id (null for a caller with no lead), from/to, status, duration_sec, outcome, summary, booking_id and started_at / ended_at. The transcript and recording: GET /v1/calls/{call_id}. - `deal.updated` — A lead was marked won, or a won lead's amount or plan changed later (an amount added from Ad Insights, a plan edited). Payload carries deal_type (one_time or plan), deal_value_cents (the first payment), deal_plan_cents, deal_plan_interval, deal_monthly_cents and deal_expected_total_cents, plus the lead snapshot. Every lead event's snapshot carries the same deal fields. Verification: `X-Webhook-Signature: sha256=`. Each delivery is signed with HMAC-SHA256 over the exact raw request body using the webhook's secret (shown once when it is created). Compute the HMAC over the raw bytes, before JSON parsing, and compare in constant time. `X-Webhook-Event` carries the event name and `X-Webhook-Delivery` a unique delivery id you can use to de-duplicate retries. ## MCP server Streamable HTTP endpoint: https://api.localflywheel.com/mcp Auth: `Authorization: Bearer zu-...`, or `?api_key=zu-...` for clients that cannot set headers. Every tool maps onto the REST endpoints above, so access levels, the sub-account lock and rate limits apply the same way. - Account: get_api_key_info - Sub-account setup: get_setup_checklist, manage_offers, manage_calendars, manage_booking_menus, manage_calendar_routes, business_hours, manage_pipeline_stages, manage_custom_fields, lead_routing, manage_alert_recipients, manage_lead_sources, manage_outbound_webhooks, knowledge_base, ai_receptionist, manage_smart_forms, configure_workspace_outreach, ai_texting, nurture_sequence, business_profile, list_phone_numbers, manage_pipelines, texting_status - Dashboard & inbox: get_overview, get_usage, list_conversations, update_conversation, pause_lead_ai, list_reply_suggestions, decide_reply_suggestion, reply_ideas, needs_reply, list_calls, get_call, call_campaigns, busy_blocks, ai_lessons, rate_ai_message, invoices, stripe_payments, estimates, estimate_templates, get_ad_insights, google_ads, google_business, map_rankings, business_listings, manage_google_business, manage_map_rankings, manage_listings, support_tickets, health_score, ai_brain_photos, ai_brain_prices, ai_brain_waiting, get_sales_report, list_activity, reviews, call_tracking, click_guard, website_analytics, reports, ai_visibility, media_library, website_widget, ad_insights_cards, reward_games, manage_invoices, custom_values, review_pages, website_widgets_manage, short_link_settings, manage_google_ads, smart_pages_more, smart_forms_more, website_analytics_details, google_desk_tasks, ad_comments, delete_media, google_photos, call_settings, notification_settings, email_senders, instant_lead_connect, phone_number_settings, google_profile_automation, my_booking_link, ai_calling, text_campaigns, ai_agents, call_campaign_start, invoice_payment_link, smart_page_forms, manage_meta_ads, smart_pages, smart_form_editor, loyalty_cards, short_links, surveys, google_tools - CRM leads: list_recent_leads, list_lead_tags, manage_tags, get_lead, create_lead, update_lead, delete_lead, get_lead_timeline, add_lead_note, set_lead_stage, manage_lead_note, mark_do_not_contact, list_pipeline_stages, manage_deals, leads_bulk, merge_leads - Messaging: send_lead_message, scheduled_messages, get_lead_conversation, list_messages, instagram_messenger, appointment_emails, get_message, get_message_limits, manage_imessage, comment_to_dm_rules - Email marketing, contracts & proposals: email_campaigns, contracts, proposals, contract_templates - Bookings: list_calendars, get_calendar_availability, list_bookings, create_booking, reschedule_booking, cancel_booking, update_booking - Sub-accounts & team: list_workspaces, get_workspace, update_workspace, list_workspace_members, invite_workspace_member, update_workspace_member_role, remove_workspace_member, crm_connections, email_domains, refer_and_earn - Forms & automations: list_smart_forms, list_form_submissions, list_workspace_automations, automation_folders, enroll_leads_in_automation, toggle_workspace_automation, manage_workspace_automation, workflow_enrollments - Meta: meta_lead_forms, lead_quality_feedback, lead_feedback_datasets, meta_lead_form_setup - Smart forms: site_domains ## Machine-readable spec - OpenAPI 3.1: https://api.localflywheel.com/openapi.json - This guide: https://api.localflywheel.com/llms.txt