{"openapi":"3.0.0","info":{"title":"osiro API","version":"2.0.0"},"tags":[{"name":"Funnel","description":"Public funnel rendering, submission, Lead verification, and analytics."},{"name":"Booking","description":"A lead's cancel and reschedule of their booking, via the manage link."},{"name":"Training","description":"Org-scoped sales-training catalogs, sessions, and call records."},{"name":"Attribution","description":"Cross-domain PostHog identity handoff for the marketing site."},{"name":"Billing","description":"Org-scoped checkouts, plans, trials and the Stripe billing portal."},{"name":"Leads","description":"Org-scoped lead reads and actions."},{"name":"Ad copy","description":"Org-scoped ad guidelines and Meta ad copy generation."}],"components":{"schemas":{"ApiError":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"A stable code for the error, for a client to act on."},"message":{"type":"string","description":"What went wrong, in plain English."},"fields":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"On `validation_failed`: each failing field's messages, by path."}},"required":["code","message"],"description":"The error."}},"required":["error"]},"MemberList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The Member's User id."},"first_name":{"type":"string","description":"The Member's first name."},"last_name":{"type":"string","description":"The Member's last name."},"email":{"type":"string","description":"The Member's email address."},"lead_visibility":{"type":"string","enum":["assigned_and_unassigned","assigned_only"],"description":"Which Leads the Member sees: assigned_only, the Leads assigned to them; assigned_and_unassigned, those and the unassigned ones."}},"required":["id","first_name","last_name","email","lead_visibility"]},"description":"Every Member of the Organization."}},"required":["items"]},"UploadedAsset":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid","description":"The image's Asset id, for any block's assetId field (image, logo, picture-choice options, the lp-* image, hero and logo sections)."},"imageUrl":{"type":"string","format":"uri","description":"The image's public URL, for lp-html."}},"required":["assetId","imageUrl"]},"WebhookList":{"type":"object","properties":{"webhooks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Webhook's id."},"name":{"type":"string","description":"The Webhook's name."},"url":{"type":"string","description":"The receiver's URL, which osiro sends to."},"event_types":{"type":"array","items":{"type":"string","enum":["lead.created","lead.called","lead.not_reached","lead.callback_set","lead.presetting","lead.converted","lead.duration_ended","lead.state_changed","note.added"],"description":"A Webhook event type: lead.created (A new Lead came in.); lead.called (A Lead was called in osiro.hunter.); lead.not_reached (A call didn't reach the Lead.); lead.callback_set (A callback was scheduled for the Lead.); lead.presetting (The Lead was marked for presetting.); lead.converted (The Lead was converted.); lead.duration_ended (The Lead's calling duration ended.); lead.state_changed (The Lead's state changed.); note.added (A note was added to the Lead.)."},"description":"The Webhook event types it sends."},"enabled":{"type":"boolean","description":"Whether the Webhook is Enabled; false when it is Disabled."},"disabled_reason":{"type":"string","nullable":true,"enum":["member","gone","failing",null],"description":"Why the Webhook is Disabled: member (a Member disabled it), gone (the receiver answered 410 Gone) or failing (its Webhook deliveries kept failing). Null while it is Enabled."},"disabled_at":{"type":"string","nullable":true,"description":"When the Webhook was Disabled; null while it is Enabled."},"disabled_by_name":{"type":"string","nullable":true,"description":"The name of the Member who disabled it, when the reason is member."},"failing_since":{"type":"string","nullable":true,"description":"Since when its Webhook deliveries have been failing; null while they succeed."},"created_at":{"type":"string","description":"When the Webhook was added."},"created_by_name":{"type":"string","nullable":true,"description":"The name of the Member who added it; null once they're removed."},"delivery_count":{"type":"integer","description":"How many Webhook deliveries it has. They are deleted along with the Webhook."}},"required":["id","name","url","event_types","enabled","disabled_reason","disabled_at","disabled_by_name","failing_since","created_at","created_by_name","delivery_count"]},"description":"Every Webhook of the Organization, oldest first."}},"required":["webhooks"]},"CreatedWebhook":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The new Webhook's id."}},"required":["id"]},"WebhookInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"The Webhook's name, e.g. the tool it feeds: \"n8n new leads\"."},"url":{"type":"string","maxLength":2000,"format":"uri","description":"The receiver's http(s) URL, e.g. an n8n or Zapier webhook URL. It must reach a public address, and use https in production."},"event_types":{"type":"array","items":{"type":"string","enum":["lead.created","lead.called","lead.not_reached","lead.callback_set","lead.presetting","lead.converted","lead.duration_ended","lead.state_changed","note.added"],"description":"A Webhook event type: lead.created (A new Lead came in.); lead.called (A Lead was called in osiro.hunter.); lead.not_reached (A call didn't reach the Lead.); lead.callback_set (A callback was scheduled for the Lead.); lead.presetting (The Lead was marked for presetting.); lead.converted (The Lead was converted.); lead.duration_ended (The Lead's calling duration ended.); lead.state_changed (The Lead's state changed.); note.added (A note was added to the Lead.)."},"minItems":1,"description":"The Webhook event types to send. Each item's description lists every type and what it means."}},"required":["name","url","event_types"]},"Webhook":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Webhook's id."},"name":{"type":"string","description":"The Webhook's name."},"url":{"type":"string","description":"The receiver's URL, which osiro sends to."},"event_types":{"type":"array","items":{"type":"string","enum":["lead.created","lead.called","lead.not_reached","lead.callback_set","lead.presetting","lead.converted","lead.duration_ended","lead.state_changed","note.added"],"description":"A Webhook event type: lead.created (A new Lead came in.); lead.called (A Lead was called in osiro.hunter.); lead.not_reached (A call didn't reach the Lead.); lead.callback_set (A callback was scheduled for the Lead.); lead.presetting (The Lead was marked for presetting.); lead.converted (The Lead was converted.); lead.duration_ended (The Lead's calling duration ended.); lead.state_changed (The Lead's state changed.); note.added (A note was added to the Lead.)."},"description":"The Webhook event types it sends."},"enabled":{"type":"boolean","description":"Whether the Webhook is Enabled; false when it is Disabled."},"disabled_reason":{"type":"string","nullable":true,"enum":["member","gone","failing",null],"description":"Why the Webhook is Disabled: member (a Member disabled it), gone (the receiver answered 410 Gone) or failing (its Webhook deliveries kept failing). Null while it is Enabled."},"disabled_at":{"type":"string","nullable":true,"description":"When the Webhook was Disabled; null while it is Enabled."},"disabled_by_name":{"type":"string","nullable":true,"description":"The name of the Member who disabled it, when the reason is member."},"failing_since":{"type":"string","nullable":true,"description":"Since when its Webhook deliveries have been failing; null while they succeed."},"created_at":{"type":"string","description":"When the Webhook was added."},"created_by_name":{"type":"string","nullable":true,"description":"The name of the Member who added it; null once they're removed."},"delivery_count":{"type":"integer","description":"How many Webhook deliveries it has. They are deleted along with the Webhook."}},"required":["id","name","url","event_types","enabled","disabled_reason","disabled_at","disabled_by_name","failing_since","created_at","created_by_name","delivery_count"]},"WebhookEnabledInput":{"type":"object","properties":{"enabled":{"type":"boolean","description":"true enables the Webhook; false disables it, with the caller as the Member who disabled it."}},"required":["enabled"]},"WebhookSecret":{"type":"object","properties":{"secret":{"type":"string","description":"The Webhook's current Signing secret, which signs every Webhook delivery."}},"required":["secret"]},"WebhookDeliveryList":{"type":"object","properties":{"deliveries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Webhook delivery's id."},"type":{"type":"string","description":"The Webhook event type it sends."},"status":{"type":"string","enum":["queued","sent","failed"],"description":"Where the Webhook delivery stands: queued, sent or failed."},"attempts":{"type":"integer","description":"How many times osiro tried to send it."},"created_at":{"type":"string","description":"When the Webhook delivery was created."},"lead":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The Lead's id."},"name":{"type":"string","nullable":true,"description":"The Lead's name, if it has one."}},"required":["id","name"],"description":"The Lead it is about; null when it is about no Lead."}},"required":["id","type","status","attempts","created_at","lead"]},"description":"This page's Webhook deliveries, newest first."},"total":{"type":"integer","description":"Every Webhook delivery that matches, across pages."},"page":{"type":"integer","description":"This page, 1-based."},"page_size":{"type":"integer","description":"Webhook deliveries per page."}},"required":["deliveries","total","page","page_size"]},"WebhookDeliveryDetail":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Webhook delivery's id."},"status":{"type":"string","enum":["queued","sent","failed"],"description":"Where the Webhook delivery stands: queued, sent or failed."},"failure_reason":{"type":"string","nullable":true,"enum":["blocked_url","gone","webhook_off","out_of_attempts","retry_failed",null],"description":"Why it failed, from the newest attempt: blocked_url (the URL is not allowed), gone (the receiver answered 410 Gone), webhook_off (the Webhook was switched off), out_of_attempts (osiro stopped retrying) or retry_failed (a manual retry failed). Null unless it failed."},"attempts":{"type":"array","items":{"type":"object","properties":{"attempt_number":{"type":"integer","description":"Which attempt this was, counting from 1."},"attempted_at":{"type":"string","description":"When osiro sent it."},"duration_ms":{"type":"integer","nullable":true,"description":"How long the receiver took to answer, in milliseconds."},"response_status":{"type":"integer","nullable":true,"description":"The receiver's HTTP status; null when no response came."},"manual":{"type":"boolean","description":"Whether a Member's manual retry sent it."}},"required":["attempt_number","attempted_at","duration_ms","response_status","manual"]},"description":"Every attempt to send it, newest first."},"payload":{"type":"object","additionalProperties":{"nullable":true},"description":"The payload exactly as sent: its envelope and the Lead's data."}},"required":["id","status","failure_reason","attempts","payload"]},"StyleGuideExtract":{"type":"object","properties":{"url":{"type":"string","description":"The page that was read, after redirects."},"colors":{"type":"array","items":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"maxItems":4,"description":"The colours for the Style guide's levels, in level order: the action colour, the dark text colour, then accents. Lowercase `#rrggbb`. A level the site doesn't show is left out from the end."},"fontHeading":{"type":"string","nullable":true,"description":"The font family of headings, as the site names it."},"fontBody":{"type":"string","nullable":true,"description":"The font family of body text, as the site names it."},"radiusStyle":{"type":"string","nullable":true,"enum":["cornered","rounded","curved",null],"description":"How round the site's buttons are."}},"required":["url","colors","fontHeading","fontBody","radiusStyle"]},"StyleGuideExtractCreate":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri","description":"The website to read the Style guide off, e.g. the Company's home page."}},"required":["url"],"additionalProperties":false},"LegalDocumentList":{"type":"object","properties":{"legalDocuments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Legal text's Asset id."},"name":{"type":"string","description":"The Legal text's internal name."},"kind":{"type":"string","enum":["IMPRINT","PRIVACY"],"description":"IMPRINT is the Impressum, PRIVACY the Datenschutzerklärung (privacy policy)."},"source":{"type":"string","enum":["DOCUMENT","URL"],"description":"DOCUMENT is written in osiro; URL links to a page hosted elsewhere."},"externalUrl":{"type":"string","nullable":true,"description":"The URL of a Legal text hosted elsewhere, which the footer links to; null for one written in osiro."},"isOrgDefault":{"type":"boolean","description":"Whether every Landing page and Website without its own Legal text of this kind shows this one."},"explicitPageCount":{"type":"integer","description":"The Landing pages that picked this Legal text themselves."},"inheritingPageCount":{"type":"integer","description":"The Landing pages that show it as the default; 0 unless it is the default."},"createdAt":{"type":"string","description":"When the Legal text was created."},"updatedAt":{"type":"string","description":"When the Legal text was last changed."}},"required":["id","name","kind","source","externalUrl","isOrgDefault","explicitPageCount","inheritingPageCount","createdAt","updatedAt"]},"description":"One page of the Organization's Legal texts."},"total":{"type":"number","description":"Every Legal text that matches, across pages."}},"required":["legalDocuments","total"]},"ReferenceList":{"type":"object","properties":{"references":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Referenz's id."},"title":{"type":"string","description":"What was done, as the Referenz's title."},"description":{"type":"string","nullable":true,"description":"The job in the Organization's words."},"initialSituation":{"type":"string","nullable":true,"description":"Ausgangslage: where the customer started, the problem or wish before the job."},"result":{"type":"string","nullable":true,"description":"Ergebnis: what the job achieved for the customer."},"services":{"type":"array","items":{"type":"string"},"description":"The services the job involved, as tags."},"keyFigures":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"The figure, e.g. \"120 m²\"."},"label":{"type":"string","description":"What the figure counts, e.g. \"Dachfläche\"."}},"required":["value","label"]},"description":"Figures about the job, each with a label."},"postalCode":{"type":"string","nullable":true,"description":"The postal code where the job was done."},"city":{"type":"string","description":"The city where the job was done."},"completedOn":{"type":"string","nullable":true,"pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"The month the job was completed, as YYYY-MM."},"status":{"type":"string","enum":["draft","published","archived"],"description":"The Referenz status: draft is still being prepared, published is approved to be shown, archived is no longer shown."},"consentConfirmedAt":{"type":"string","nullable":true,"description":"When a Member confirmed the Referenz consent."},"consentRevokedAt":{"type":"string","nullable":true,"description":"When the customer revoked the Referenz consent; null while it stands. Publishing again needs a fresh consent."},"createdAt":{"type":"string","description":"When the Referenz was created."},"updatedAt":{"type":"string","description":"When the Referenz was last changed."},"missing":{"type":"array","items":{"type":"string","enum":["title","city","photo","consent"]},"description":"What publishing still needs: title, city, photo, consent."},"cover":{"type":"object","nullable":true,"properties":{"assetId":{"type":"string","format":"uuid","description":"The photo's image Asset id."},"url":{"type":"string","description":"The photo's public URL."},"takenAt":{"type":"string","nullable":true,"description":"When the photo was taken, as the photo says; null when it doesn't."},"position":{"type":"integer","description":"The photo's place in the Referenz; 0 is the cover."},"kind":{"type":"string","nullable":true,"enum":["before","during","after","detail",null],"description":"What the photo shows: before, during or after the job, or a detail; null when no one said."}},"required":["assetId","url","takenAt","position","kind"],"description":"The Referenz's cover photo; null without photos."},"photoCount":{"type":"integer","description":"How many photos the Referenz has."},"photoAssetIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Every photo's image Asset id, in order, the cover first."},"photoKinds":{"type":"array","items":{"type":"string","nullable":true,"enum":["before","during","after","detail",null]},"description":"What each photo shows, in the order of photoAssetIds; null when no one said."}},"required":["id","title","description","initialSituation","result","services","keyFigures","postalCode","city","completedOn","status","consentConfirmedAt","consentRevokedAt","createdAt","updatedAt","missing","cover","photoCount","photoAssetIds","photoKinds"]},"description":"One page of the Organization's Referenzen."},"total":{"type":"number","description":"Every Referenz that matches, across pages."}},"required":["references","total"]},"Reference":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Referenz's id."},"title":{"type":"string","description":"What was done, as the Referenz's title."},"description":{"type":"string","nullable":true,"description":"The job in the Organization's words."},"initialSituation":{"type":"string","nullable":true,"description":"Ausgangslage: where the customer started, the problem or wish before the job."},"result":{"type":"string","nullable":true,"description":"Ergebnis: what the job achieved for the customer."},"services":{"type":"array","items":{"type":"string"},"description":"The services the job involved, as tags."},"keyFigures":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"The figure, e.g. \"120 m²\"."},"label":{"type":"string","description":"What the figure counts, e.g. \"Dachfläche\"."}},"required":["value","label"]},"description":"Figures about the job, each with a label."},"postalCode":{"type":"string","nullable":true,"description":"The postal code where the job was done."},"city":{"type":"string","description":"The city where the job was done."},"completedOn":{"type":"string","nullable":true,"pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"The month the job was completed, as YYYY-MM."},"status":{"type":"string","enum":["draft","published","archived"],"description":"The Referenz status: draft is still being prepared, published is approved to be shown, archived is no longer shown."},"consentConfirmedAt":{"type":"string","nullable":true,"description":"When a Member confirmed the Referenz consent."},"consentConfirmedBy":{"type":"string","nullable":true,"format":"uuid","description":"The Member who confirmed the Referenz consent."},"consentRevokedAt":{"type":"string","nullable":true,"description":"When the customer revoked the Referenz consent; null while it stands. Publishing again needs a fresh consent."},"consentRevokedBy":{"type":"string","nullable":true,"format":"uuid","description":"The Member who recorded the revocation."},"createdAt":{"type":"string","description":"When the Referenz was created."},"updatedAt":{"type":"string","description":"When the Referenz was last changed."},"createdBy":{"type":"string","nullable":true,"format":"uuid","description":"The Member who created the Referenz."},"photos":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid","description":"The photo's image Asset id."},"url":{"type":"string","description":"The photo's public URL."},"takenAt":{"type":"string","nullable":true,"description":"When the photo was taken, as the photo says; null when it doesn't."},"position":{"type":"integer","description":"The photo's place in the Referenz; 0 is the cover."},"kind":{"type":"string","nullable":true,"enum":["before","during","after","detail",null],"description":"What the photo shows: before, during or after the job, or a detail; null when no one said."}},"required":["assetId","url","takenAt","position","kind"]},"description":"The Referenz's photos in order; the first is the cover."},"lead":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The lead's id."},"name":{"type":"string","nullable":true,"description":"The lead's first and last name; null when unknown or hidden."},"city":{"type":"string","nullable":true,"description":"The lead's city; null when unknown or hidden."}},"required":["id","name","city"],"description":"The lead the job was done for; internal, never published. Null when none is linked."},"missing":{"type":"array","items":{"type":"string","enum":["title","city","photo","consent"]},"description":"What publishing still needs: title, city, photo, consent."}},"required":["id","title","description","initialSituation","result","services","keyFigures","postalCode","city","completedOn","status","consentConfirmedAt","consentConfirmedBy","consentRevokedAt","consentRevokedBy","createdAt","updatedAt","createdBy","photos","lead","missing"]},"ReferenceCreate":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":100,"description":"What was done, as the Referenz's title."},"city":{"type":"string","minLength":1,"maxLength":100,"description":"The city where the job was done."}},"required":["title","city"],"additionalProperties":false},"ReferencePatch":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":100,"description":"What was done, as the Referenz's title."},"description":{"type":"string","nullable":true,"maxLength":1000,"description":"The job in the Organization's words."},"initialSituation":{"type":"string","nullable":true,"maxLength":300,"description":"Ausgangslage: where the customer started, the problem or wish before the job."},"result":{"type":"string","nullable":true,"maxLength":300,"description":"Ergebnis: what the job achieved for the customer."},"services":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"description":"The services the job involved, as tags; repeated ones, ignoring case, are dropped."},"keyFigures":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":100,"description":"The figure, e.g. \"120 m²\"."},"label":{"type":"string","minLength":1,"maxLength":100,"description":"What the figure counts, e.g. \"Dachfläche\"."}},"required":["value","label"],"additionalProperties":false},"maxItems":4,"description":"Figures about the job, each with a label."},"postalCode":{"type":"string","nullable":true,"pattern":"^\\d{5}$","description":"The postal code where the job was done."},"city":{"type":"string","minLength":1,"maxLength":100,"description":"The city where the job was done."},"completedOn":{"type":"string","nullable":true,"pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"The month the job was completed, as YYYY-MM."},"leadId":{"type":"string","nullable":true,"format":"uuid","description":"The lead the job was done for: an unsold lead of the same organization, visible to the caller. Null unlinks it."}},"additionalProperties":false},"ReferencePublishProblem":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["reference_not_publishable"],"description":"Why the request failed, for code to compare."},"message":{"type":"string","description":"Why the request failed, in words."}},"required":["code","message"],"description":"Why the Referenz can't be published."},"missing":{"type":"array","items":{"type":"string","enum":["title","city","photo","consent"]},"minItems":1,"description":"What publishing still needs: title, city, photo, consent."}},"required":["error","missing"]},"ReferencePublish":{"type":"object","properties":{"consentConfirmed":{"type":"boolean","description":"Whether the Member confirms the Referenz consent: the customer agreed to the Referenz being shown."}},"required":["consentConfirmed"],"additionalProperties":false},"ReferencePhotoUploadResult":{"type":"object","properties":{"photo":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid","description":"The photo's image Asset id."},"url":{"type":"string","description":"The photo's public URL."},"takenAt":{"type":"string","nullable":true,"description":"When the photo was taken, as the photo says; null when it doesn't."},"position":{"type":"integer","description":"The photo's place in the Referenz; 0 is the cover."},"kind":{"type":"string","nullable":true,"enum":["before","during","after","detail",null],"description":"What the photo shows: before, during or after the job, or a detail; null when no one said."}},"required":["assetId","url","takenAt","position","kind"],"description":"The stored photo."},"suggestion":{"type":"object","nullable":true,"properties":{"postalCode":{"type":"string","nullable":true,"pattern":"^\\d{5}$","description":"The postal code nearest to where the photo was taken."},"city":{"type":"string","nullable":true,"description":"The city nearest to where the photo was taken."},"completedOn":{"type":"string","nullable":true,"pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"The month the photo was taken, as YYYY-MM."}},"required":["postalCode","city","completedOn"],"description":"What the photo suggests for the Referenz; null when it gives nothing."}},"required":["photo","suggestion"]},"ReferencePhotoOrder":{"type":"object","properties":{"assetIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":20,"description":"Every photo's image Asset id of the Referenz, in the new order; the first is the cover."}},"required":["assetIds"],"additionalProperties":false},"ReferencePhotoPatch":{"type":"object","properties":{"kind":{"type":"string","nullable":true,"enum":["before","during","after","detail",null],"description":"What the photo shows: before, during or after the job, or a detail; null when not said."}},"required":["kind"],"additionalProperties":false},"BillingCheckoutUrl":{"type":"object","properties":{"url":{"type":"string","nullable":true,"description":"The Stripe Checkout page to send the buyer to; null when Stripe gave none."}},"required":["url"]},"SubscriptionCheckoutInput":{"type":"object","properties":{"product":{"type":"string","minLength":1,"description":"The name of the Plan to subscribe to, as the catalog lists it."},"redirectTo":{"type":"string","format":"uri","description":"Where Stripe sends the buyer after paying."},"failureRedirectTo":{"type":"string","format":"uri","description":"Where Stripe sends the buyer when they leave Checkout unpaid."},"quantityAddons":{"type":"array","items":{"type":"string"},"default":[],"description":"Names of the add-ons sold by quantity, such as Team seats, whose quantity the buyer sets in Checkout."},"oneTimeAddons":{"type":"array","items":{"type":"string"},"default":[],"description":"Names of the add-ons bought once, on top of the Plan."},"useYearly":{"type":"boolean","default":false,"description":"Bill yearly instead of monthly."}},"required":["product","redirectTo","failureRedirectTo"]},"PermanentCreditsCheckoutInput":{"type":"object","properties":{"redirectTo":{"type":"string","format":"uri","description":"Where Stripe sends the buyer after paying."},"failureRedirectTo":{"type":"string","format":"uri","description":"Where Stripe sends the buyer when they leave Checkout unpaid."},"quantity":{"type":"number","default":1,"description":"How many permanent calling credits to buy. A quantity outside the allowed range is clamped to it, not rejected."}},"required":["redirectTo","failureRedirectTo"]},"BillingDetailsRequired":{"type":"object","properties":{"error":{"type":"string","description":"Why the Plan stayed unchanged."},"code":{"type":"string","enum":["billing_details_required"],"description":"Billing details must be completed in Stripe first."},"missing":{"type":"array","items":{"type":"string","enum":["payment_method","address"]},"description":"The billing details Stripe still lacks: payment_method or address."}},"required":["error","code","missing"]},"PlanChangeInput":{"type":"object","properties":{"plan":{"type":"string","minLength":1,"description":"The name of the Plan to move to, as the catalog lists it."},"mode":{"type":"string","enum":["monthly","yearly"],"description":"Whether the new Plan is billed monthly or yearly."},"quantityAddons":{"type":"object","additionalProperties":{"type":"number"},"default":{},"description":"The add-ons sold by quantity, such as Team seats, by name, with the quantity to bill."},"oneTimeAddons":{"type":"object","additionalProperties":{"type":"boolean"},"default":{},"description":"The add-ons bought once, by name; true keeps one on the Plan."}},"required":["plan","mode"]},"StartTrialResult":{"type":"object","properties":{"status":{"type":"string","description":"The Subscription's Stripe status, such as trialing."},"created":{"type":"boolean","description":"False when the Organization already had a reusable Subscription, which is a success, not a conflict."}},"required":["status","created"]},"StartTrialInput":{"type":"object","properties":{"product":{"type":"string","minLength":1,"description":"The name of the Plan to trial, as the catalog lists it."},"customerName":{"type":"string","description":"The name written to a newly created Stripe customer."}},"required":["product"]},"BillingPortalSession":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The Stripe billing portal page for the Organization's customer."}},"required":["url"]},"QuantityAddonPricing":{"type":"object","properties":{"name":{"type":"string","description":"The add-on's name, as the catalog lists it."},"currency":{"type":"string","description":"The ISO currency code of both prices, lowercase."},"monthlyPrice":{"type":"number","description":"The price of one unit per month, in major currency units."},"yearlyPrice":{"type":"number","description":"The price of one unit per year, in major currency units."}},"required":["name","currency","monthlyPrice","yearlyPrice"]},"SubscriptionDetail":{"type":"object","properties":{"name":{"type":"string","description":"The Plan's product name in Stripe."},"price":{"type":"number","description":"The Plan's price per billing interval, in major currency units."},"currency":{"type":"string","description":"The ISO currency code of the price, lowercase."},"interval":{"type":"string","enum":["month","year"],"description":"How often the Plan is billed."},"productId":{"type":"string","description":"The Plan's Stripe product id."},"planKey":{"type":"string","nullable":true,"description":"The Plan's name in the catalog; null for a product the catalog doesn't sell."},"quantityAddons":{"type":"object","additionalProperties":{"type":"number"},"description":"The add-ons sold by quantity, such as Team seats, by name, with the quantity billed."},"pendingPlanKey":{"type":"string","nullable":true,"description":"The Plan a scheduled change moves to; null when none is scheduled."},"pendingPlanEffectiveDate":{"type":"number","nullable":true,"description":"When the scheduled Plan change takes effect, in Unix seconds; null when none is scheduled."},"cancelAtPeriodEnd":{"type":"boolean","description":"Whether the Subscription ends when the paid period does."},"cancelAtDate":{"type":"number","nullable":true,"description":"When the Subscription ends or ended, in Unix seconds; null while it runs on."}},"required":["name","price","currency","interval","productId","planKey","quantityAddons","pendingPlanKey","pendingPlanEffectiveDate","cancelAtPeriodEnd","cancelAtDate"]},"Entitlements":{"type":"object","properties":{"features":{"type":"object","properties":{"feat_flag_hunter_access":{"type":"boolean","description":"Whether the Members may use osiro.hunter."},"feat_flag_integrations":{"type":"boolean","description":"Whether the Organization may use integrations."},"feat_num_users":{"type":"number","description":"How many Members the Plan allows."},"feat_num_max_leads":{"type":"number","description":"How many Leads the Plan allows."},"feat_num_domains":{"type":"number","description":"How many Domains the Plan allows."},"feat_num_pages":{"type":"number","description":"How many pages the Plan allows."},"feat_num_workflows":{"type":"number","description":"How many Flows the Plan allows."},"feat_num_websites":{"type":"number","description":"How many Websites the Plan allows; 0 allows none."}},"description":"What the Organization's Plan unlocks; a feature left out means no access."},"status":{"type":"string","nullable":true,"description":"The Subscription's Stripe status; null for a manually granted Plan."},"trialEnd":{"type":"number","nullable":true,"description":"When the Trial ends, in Unix seconds; null when the Subscription has no Trial, as for a manually granted Plan."}},"required":["features","status","trialEnd"]},"TrainingCases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The training case's id: a slug for a built-in case, a uuid for an authored one."},"name":{"type":"string","description":"The training case's name."},"description":{"type":"string","description":"A short summary of the training case."},"situation":{"type":"string","description":"The situation the trainee starts the call in."},"objective":{"type":"string","description":"What the trainee should achieve in the call."},"successCriteria":{"type":"string","description":"What counts as a successful call."},"difficulty":{"type":"string","enum":["easy","medium","hard"],"description":"How hard the training case is."},"dos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The behaviour's id, kept stable across edits of the case."},"label":{"type":"string","description":"What the trainee should do on the call."}},"required":["id","label"]},"description":"The behaviours the call is scored on under Applied Knowledge."},"archivedAt":{"type":"string","nullable":true,"description":"When the training case was archived; null while it is active."}},"required":["id","name","description","situation","objective","successCriteria","difficulty","dos","archivedAt"]}},"TrainingCase":{"type":"object","properties":{"id":{"type":"string","description":"The training case's id: a slug for a built-in case, a uuid for an authored one."},"name":{"type":"string","description":"The training case's name."},"description":{"type":"string","description":"A short summary of the training case."},"situation":{"type":"string","description":"The situation the trainee starts the call in."},"objective":{"type":"string","description":"What the trainee should achieve in the call."},"successCriteria":{"type":"string","description":"What counts as a successful call."},"difficulty":{"type":"string","enum":["easy","medium","hard"],"description":"How hard the training case is."},"dos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The behaviour's id, kept stable across edits of the case."},"label":{"type":"string","description":"What the trainee should do on the call."}},"required":["id","label"]},"description":"The behaviours the call is scored on under Applied Knowledge."},"archivedAt":{"type":"string","nullable":true,"description":"When the training case was archived; null while it is active."}},"required":["id","name","description","situation","objective","successCriteria","difficulty","dos","archivedAt"]},"TrainingCaseInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"description":"The training case's name."},"description":{"type":"string","minLength":1,"maxLength":200,"description":"A short summary of the training case."},"situation":{"type":"string","minLength":1,"maxLength":1000,"description":"The situation the trainee starts the call in."},"objective":{"type":"string","minLength":1,"maxLength":500,"description":"What the trainee should achieve in the call."},"successCriteria":{"type":"string","minLength":1,"maxLength":500,"description":"What counts as a successful call."},"difficulty":{"type":"string","enum":["easy","medium","hard"],"description":"How hard the training case is."},"dos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"The id of a behaviour kept from a previous save; omit it for a new one."},"label":{"type":"string","minLength":1,"maxLength":160,"description":"What the trainee should do on the call."}},"required":["label"]},"minItems":1,"maxItems":10,"description":"The behaviours the call is scored on under Applied Knowledge, in order."}},"required":["name","description","situation","objective","successCriteria","difficulty","dos"]},"TrainingCaseUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"description":"The training case's name."},"description":{"type":"string","minLength":1,"maxLength":200,"description":"A short summary of the training case."},"situation":{"type":"string","minLength":1,"maxLength":1000,"description":"The situation the trainee starts the call in."},"objective":{"type":"string","minLength":1,"maxLength":500,"description":"What the trainee should achieve in the call."},"successCriteria":{"type":"string","minLength":1,"maxLength":500,"description":"What counts as a successful call."},"difficulty":{"type":"string","enum":["easy","medium","hard"],"description":"How hard the training case is."},"dos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"The id of a behaviour kept from a previous save; omit it for a new one."},"label":{"type":"string","minLength":1,"maxLength":160,"description":"What the trainee should do on the call."}},"required":["label"]},"minItems":1,"maxItems":10,"description":"The behaviours the call is scored on under Applied Knowledge, in order."},"archived":{"type":"boolean","description":"Whether the training case is archived."}}},"TrainingPersonas":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The persona's id."},"name":{"type":"string","description":"The persona's name."},"role":{"type":"string","description":"The persona's job title and company."},"description":{"type":"string","description":"How the persona behaves on a call."},"difficulty":{"type":"string","enum":["easy","medium","hard"],"description":"How hard the persona is to convince."}},"required":["id","name","role","description","difficulty"]}},"TrainingSession":{"type":"object","properties":{"token":{"type":"string","description":"The token that starts the voice conversation."},"systemPrompt":{"type":"string","description":"The prompt the AI persona plays the call by."},"firstMessage":{"type":"string","description":"The persona's opening line."},"trainingCallId":{"type":"string","format":"uuid","description":"The training call started for this session, still pending."}},"required":["token","systemPrompt","firstMessage","trainingCallId"]},"TrainingSessionBody":{"type":"object","properties":{"caseId":{"type":"string","minLength":1,"description":"The training case to practise."},"personaId":{"type":"string","minLength":1,"description":"The persona to practise against."}},"required":["caseId","personaId"]},"TrainingCallList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The training call's id."},"orgId":{"type":"string","format":"uuid","description":"The organization's id."},"userId":{"type":"string","format":"uuid","description":"The Member who made the training call."},"caseId":{"type":"string","description":"The training case practised."},"personaId":{"type":"string","description":"The persona practised against."},"conversationId":{"type":"string","nullable":true,"description":"The voice conversation's id; null when there is none."},"agentId":{"type":"string","nullable":true,"description":"The voice agent that played the persona; null when unknown."},"status":{"type":"string","enum":["pending","processing","ready","failed","abandoned"],"description":"Where the training call is in its lifecycle."},"durationSeconds":{"type":"integer","nullable":true,"description":"How long the call lasted, in seconds; null until known."},"recordingKey":{"type":"string","nullable":true,"description":"Where the call's recording is stored; null until it is saved."},"failureReason":{"type":"string","nullable":true,"description":"Why the training call failed or was abandoned; null otherwise."},"createdAt":{"type":"string","description":"When the training call started."},"updatedAt":{"type":"string","description":"When the training call last changed."}},"required":["id","orgId","userId","caseId","personaId","conversationId","agentId","status","durationSeconds","recordingKey","failureReason","createdAt","updatedAt"]}},"TrainingCall":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The training call's id."},"orgId":{"type":"string","format":"uuid","description":"The organization's id."},"userId":{"type":"string","format":"uuid","description":"The Member who made the training call."},"caseId":{"type":"string","description":"The training case practised."},"personaId":{"type":"string","description":"The persona practised against."},"conversationId":{"type":"string","nullable":true,"description":"The voice conversation's id; null when there is none."},"agentId":{"type":"string","nullable":true,"description":"The voice agent that played the persona; null when unknown."},"status":{"type":"string","enum":["pending","processing","ready","failed","abandoned"],"description":"Where the training call is in its lifecycle."},"durationSeconds":{"type":"integer","nullable":true,"description":"How long the call lasted, in seconds; null until known."},"recordingKey":{"type":"string","nullable":true,"description":"Where the call's recording is stored; null until it is saved."},"failureReason":{"type":"string","nullable":true,"description":"Why the training call failed or was abandoned; null otherwise."},"createdAt":{"type":"string","description":"When the training call started."},"updatedAt":{"type":"string","description":"When the training call last changed."},"transcript":{"nullable":true,"description":"The call's transcript, turn by turn; null until processed."},"analysis":{"nullable":true,"description":"The voice provider's analysis of the call; null until processed."},"score":{"nullable":true,"description":"The AI judge's score of the call; null until scored."},"caseSnapshot":{"type":"object","nullable":true,"properties":{"id":{"type":"string","description":"The training case's id: a slug for a built-in case, a uuid for an authored one."},"name":{"type":"string","description":"The training case's name."},"description":{"type":"string","description":"A short summary of the training case."},"situation":{"type":"string","description":"The situation the trainee starts the call in."},"objective":{"type":"string","description":"What the trainee should achieve in the call."},"successCriteria":{"type":"string","description":"What counts as a successful call."},"difficulty":{"type":"string","enum":["easy","medium","hard"],"description":"How hard the training case is."},"dos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The behaviour's id, kept stable across edits of the case."},"label":{"type":"string","description":"What the trainee should do on the call."}},"required":["id","label"]},"description":"The behaviours the call is scored on under Applied Knowledge."},"archivedAt":{"type":"string","nullable":true,"description":"When the training case was archived; null while it is active."}},"required":["id","name","description","situation","objective","successCriteria","difficulty","dos","archivedAt"],"description":"The training case as it stood when the call started; null for older calls."}},"required":["id","orgId","userId","caseId","personaId","conversationId","agentId","status","durationSeconds","recordingKey","failureReason","createdAt","updatedAt","caseSnapshot"]},"ShowcaseTemplate":{"type":"object","properties":{"id":{"type":"number","description":"The Template's id."},"name":{"type":"string","description":"The Template's name."},"thumbnailUrl":{"type":"string","description":"A preview image of the Template, changing with each version."}},"required":["id","name","thumbnailUrl"]},"PublicFunnel":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"The id of the Funnel."},"created_at":{"type":"string","description":"When the Funnel was created."},"funnel_data":{"nullable":true,"description":"The Funnel's content: its Steps and their Blocks."},"prepared_html":{"type":"object","additionalProperties":{"type":"string"},"description":"The HTML of each Custom HTML block, keyed by block id: rendered, sanitised and minified."},"funnel_version_id":{"type":"string","description":"The Version served: the Published version, or the Draft in a preview."},"lead_schema_id":{"type":"string","nullable":true,"description":"The Lead schema the Funnel's Leads are stored with."},"organization":{"type":"string","nullable":true,"description":"The id of the Organization that owns the Funnel."},"name":{"type":"string","description":"The Funnel's name."},"theme":{"nullable":true,"description":"The Theme the Funnel renders its Blocks with."},"status":{"type":"string","description":"Whether the Funnel is a `DRAFT` or `PUBLISHED`."},"style_guide_id":{"type":"string","nullable":true,"description":"The Style guide the Funnel renders with."},"external_domain":{"type":"array","nullable":true,"items":{"type":"string"},"description":"The extra origins allowed to embed the Funnel and call its public routes."},"gtm_id":{"type":"string","nullable":true,"description":"The Google Tag Manager container id to load."},"gtm_script_url":{"type":"string","nullable":true,"description":"The URL to load the Google Tag Manager script from."},"meta_pixel_id":{"type":"string","nullable":true,"description":"The Meta pixel id to send events to."},"meta_test_event_code":{"type":"string","nullable":true,"description":"The Meta test event code, which marks events as test events."},"linkedin_partner_id":{"type":"string","nullable":true,"description":"The LinkedIn Insight Tag partner id."},"linkedin_conversion_id":{"type":"string","nullable":true,"description":"The LinkedIn conversion a submission is reported as."},"tiktok_pixel_id":{"type":"string","nullable":true,"description":"The TikTok pixel id to send events to."},"meta_ad_platform_events":{"type":"array","nullable":true,"items":{"type":"object","properties":{"stepId":{"type":"string","minLength":1,"description":"The id of the Step that sends the event when a visitor reaches it."},"eventName":{"type":"string","minLength":1,"description":"The event the pixel gets: a standard event of the platform (such as ViewContent) or any other name for a custom event. Not the conversion event's name."},"field":{"type":"string","minLength":1,"description":"The block whose answer a simple condition checks; unused for a compound condition."},"condition":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["eq","neq","gt","lt","gte","lte","contains","in","is_set","before","after","is_past","is_future"],"description":"How the field's answer is compared with value."},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"nullable":true}],"description":"What the field is compared with; for a choice field an option id, or a list of them for `in`."}},"required":["operator","value"]},{"type":"object","properties":{"connector":{"type":"string","enum":["and","or"],"description":"How the conditions combine: and (all) or or (any)."},"conditions":{"type":"array","items":{"type":"object","properties":{"connector":{"type":"string","enum":["and","or"],"description":"Ignored by the renderer; the group's connector combines all conditions."},"field":{"type":"string","minLength":1,"description":"The block whose answer this condition checks."},"operator":{"type":"string","enum":["eq","neq","gt","lt","gte","lte","contains","in","is_set","before","after","is_past","is_future"],"description":"How the field's answer is compared with value."},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"nullable":true}],"description":"What the field is compared with; for a choice field an option id, or a list of them for `in`."}},"required":["field","operator","value"]},"description":"The conditions, in order."}},"required":["connector","conditions"]},{"nullable":true}],"description":"Send the event only when the visitor's answers so far meet this, as in funnel rules; null or omitted to send it always."}},"required":["stepId","eventName"],"additionalProperties":false},"description":"The Meta pixel's Ad platform events. Null sends ViewContent on the first Step."},"tiktok_ad_platform_events":{"type":"array","nullable":true,"items":{"type":"object","properties":{"stepId":{"type":"string","minLength":1,"description":"The id of the Step that sends the event when a visitor reaches it."},"eventName":{"type":"string","minLength":1,"description":"The event the pixel gets: a standard event of the platform (such as ViewContent) or any other name for a custom event. Not the conversion event's name."},"field":{"type":"string","minLength":1,"description":"The block whose answer a simple condition checks; unused for a compound condition."},"condition":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["eq","neq","gt","lt","gte","lte","contains","in","is_set","before","after","is_past","is_future"],"description":"How the field's answer is compared with value."},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"nullable":true}],"description":"What the field is compared with; for a choice field an option id, or a list of them for `in`."}},"required":["operator","value"]},{"type":"object","properties":{"connector":{"type":"string","enum":["and","or"],"description":"How the conditions combine: and (all) or or (any)."},"conditions":{"type":"array","items":{"type":"object","properties":{"connector":{"type":"string","enum":["and","or"],"description":"Ignored by the renderer; the group's connector combines all conditions."},"field":{"type":"string","minLength":1,"description":"The block whose answer this condition checks."},"operator":{"type":"string","enum":["eq","neq","gt","lt","gte","lte","contains","in","is_set","before","after","is_past","is_future"],"description":"How the field's answer is compared with value."},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"nullable":true}],"description":"What the field is compared with; for a choice field an option id, or a list of them for `in`."}},"required":["field","operator","value"]},"description":"The conditions, in order."}},"required":["connector","conditions"]},{"nullable":true}],"description":"Send the event only when the visitor's answers so far meet this, as in funnel rules; null or omitted to send it always."}},"required":["stepId","eventName"],"additionalProperties":false},"description":"The TikTok pixel's Ad platform events. Null sends ViewContent on the first Step."},"mfa_settings":{"type":"object","nullable":true,"properties":{"enabled":{"type":"boolean","description":"Whether the Funnel asks for Lead verification."},"methods":{"type":"object","additionalProperties":{"type":"boolean"},"description":"Whether each channel, such as email or SMS, can carry the code."}},"required":["enabled","methods"],"description":"The Funnel's Lead verification settings, if any."},"style_guide":{"nullable":true,"description":"The Style guide's colours, fonts and spacing to render with."}},"required":["id","created_at","prepared_html","funnel_version_id","lead_schema_id","organization","name","status","style_guide_id","external_domain","gtm_id","gtm_script_url","meta_pixel_id","meta_test_event_code","linkedin_partner_id","linkedin_conversion_id","tiktok_pixel_id","meta_ad_platform_events","tiktok_ad_platform_events","mfa_settings"],"description":"The Funnel, as the visitor gets it."},"test_variant_id":{"type":"string","nullable":true,"format":"uuid","description":"The Test variant this visitor was assigned; `data` then holds its content. Null for bots, `embed=true`, previews and Funnels under no running Experiment."}},"required":["data","test_variant_id"]},"FunnelSubmitResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"The Lead's id."},"update_token":{"type":"string","description":"Proves the visitor submitted the Lead: a later Step's submission and Lead verification send it back."}},"required":["id","update_token"],"description":"The Lead the submission created or updated."}},"required":["data"]},"FunnelSubmitErrorWithData":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"The Lead's id."},"update_token":{"type":"string","description":"Proves the visitor submitted the Lead: a later Step's submission and Lead verification send it back."}},"required":["id","update_token"],"description":"The Lead id and update token issued for this submission."},"error":{"type":"object","properties":{"code":{"type":"string","description":"A stable code for the error, for a client to act on."},"message":{"type":"string","description":"What went wrong, in plain English."},"validation_errors":{"nullable":true,"description":"The failing fields' messages, as `fieldErrors` by field and `formErrors`."}},"required":["code","message"],"description":"The error."}},"required":["error"]},"FunnelSubmitBody":{"type":"object","properties":{"lead_id":{"type":"string","description":"The Lead an earlier submission of the same visit created, to add answers to; absent on the first submission."},"update_token":{"type":"string","minLength":1,"description":"The update token the earlier submission answered with; required with lead_id."},"data":{"type":"object","additionalProperties":{"nullable":true},"description":"The visitor's answers, keyed by Block id."},"page_url":{"type":"string","format":"uri","description":"The URL of the page the Funnel ran on; its URL parameters and UTM tags are stored on the Lead."},"webcomponent_args":{"type":"object","additionalProperties":{"type":"string"},"description":"The attributes of the embedding web component, stored with the Lead's URL parameters and overriding those of the same name."},"cookie_consent":{"anyOf":[{"type":"object","properties":{"cmp":{"type":"string","enum":["usercentrics"],"description":"The consent manager that recorded the consent: Usercentrics."},"controllerId":{"type":"string","maxLength":128,"description":"Usercentrics' id for this visitor's consent history."},"status":{"type":"string","enum":["ALL_ACCEPTED","ALL_DENIED","SOME_ACCEPTED","SOME_DENIED"],"description":"Whether the visitor accepted or denied all or some services."},"type":{"type":"string","maxLength":64,"description":"How the consent was given, such as `EXPLICIT` or `IMPLICIT`."},"language":{"type":"string","maxLength":16,"description":"The language the consent banner was shown in."},"setting":{"type":"object","properties":{"id":{"type":"string","maxLength":128,"description":"The id of the Usercentrics configuration."},"type":{"type":"string","maxLength":64,"description":"The type of the configuration, as Usercentrics names it."},"version":{"type":"string","maxLength":64,"description":"The version of the configuration."}},"description":"The Usercentrics configuration the banner was shown with."},"createdAt":{"type":"integer","description":"When the consent was first given, in epoch milliseconds by Usercentrics' clock."},"updatedAt":{"type":"integer","description":"When the consent last changed, in epoch milliseconds by Usercentrics' clock."},"updatedBy":{"type":"string","maxLength":64,"description":"What last changed the consent, as Usercentrics names it."},"hash":{"type":"string","maxLength":256,"description":"Usercentrics' integrity hash of the consent, stored unverified."},"services":{"type":"object","additionalProperties":{"type":"object","properties":{"name":{"type":"string","maxLength":256,"description":"The name of the service."},"given":{"type":"boolean","description":"Whether the visitor consented to the service."},"type":{"type":"string","enum":["EXPLICIT","IMPLICIT"],"description":"Whether the consent was given explicitly or implicitly."},"gcm":{"type":"object","properties":{"analyticsStorage":{"type":"boolean","description":"Whether the service needs Google Consent Mode's analytics storage."},"adStorage":{"type":"boolean","description":"Whether the service needs Google Consent Mode's ad storage."}},"description":"The service's Google Consent Mode flags."}},"required":["given"]},"description":"The visitor's decision on each service, by service id."}},"required":["cmp"]},{"type":"object","properties":{"categories":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":20,"description":"The consent categories the visitor accepted."},"services":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":50},"description":"The services the visitor accepted, by category."},"revision":{"type":"integer","description":"The revision of the consent banner the visitor answered."},"consentId":{"type":"string","maxLength":64,"description":"The consent manager's id for this visitor's consent."},"consentTimestamp":{"type":"string","maxLength":64,"description":"When the visitor first gave consent."},"lastConsentTimestamp":{"type":"string","maxLength":64,"description":"When the visitor last changed their consent."},"cmp":{"type":"string","enum":["osiro"],"description":"The consent manager that recorded the consent: osiro's own."}},"required":["categories"]},{"nullable":true}],"description":"The visitor's cookie consent, in the consent manager's own shape, stored with the Lead legal."},"funnel_version_id":{"type":"string","description":"The Funnel version the visitor saw. Stored only when it belongs to this Funnel; otherwise the published version is.","format":"uuid"},"step_id":{"type":"string","description":"The Step the visitor submitted from, whose legal texts are stored with the Lead legal. An unknown Step stores none.","maxLength":64},"test_variant_id":{"type":"string","description":"The Test variant the visitor was served. Stored on the Lead only when it belongs to a running or paused Experiment on this Funnel or on a Landing page of its Organization.","format":"uuid"}}},"FunnelUploadResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"Always true: the file is stored."},"data":{"type":"object","properties":{"uuid":{"type":"string","description":"The stored file's id."},"name":{"type":"string","description":"The file name the visitor uploaded."},"size":{"type":"number","description":"The file's size in bytes."},"mimeType":{"type":"string","description":"The file's MIME type, as its content showed it."},"storagePath":{"type":"string","description":"Where the file is stored in the Lead files bucket."}},"required":["uuid","name","size","mimeType","storagePath"],"description":"The stored file."}},"required":["success","data"]},"FunnelAnalyticsResponse":{"type":"object","properties":{"received":{"type":"number","description":"How many events were recorded."}},"required":["received"]},"FunnelAnalyticsBatch":{"type":"object","properties":{"events":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"eventId":{"type":"string","format":"uuid","description":"Client-generated id of this event."},"sessionId":{"type":"string","description":"The id of the Funnel session, kept in memory while the Funnel is open."},"funnelId":{"type":"string","format":"uuid","description":"The Funnel the event happened in."},"stepId":{"type":"string","description":"The Step the event happened on."},"stepIndex":{"type":"integer","description":"The position of that Step in the Funnel."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened, by the client's clock."},"deviceType":{"type":"string","enum":["mobile","tablet","desktop"],"description":"The visitor's device type, detected from the user agent."},"browser":{"type":"string","enum":["chrome","firefox","safari","edge","opera","samsung","other"],"description":"The visitor's browser family, detected from the user agent."},"os":{"type":"string","enum":["ios","android","macos","windows","linux","other"],"description":"The visitor's operating system family, detected from the user agent."},"pageUrl":{"type":"string","description":"The URL of the page the event was sent from."},"referrer":{"type":"string","description":"The URL the visitor came from, or empty when there is none."},"language":{"type":"string","description":"The browser's language, such as `de-DE`."},"utmSource":{"type":"string","description":"The `utm_source` parameter of the page URL."},"utmMedium":{"type":"string","description":"The `utm_medium` parameter of the page URL."},"utmCampaign":{"type":"string","description":"The `utm_campaign` parameter of the page URL."},"utmTerm":{"type":"string","description":"The `utm_term` parameter of the page URL."},"utmContent":{"type":"string","description":"The `utm_content` parameter of the page URL."},"version":{"type":"integer","minimum":1,"default":1,"description":"The version of the event format the client sent."},"testVariantId":{"type":"string","format":"uuid","description":"The Test variant the visitor was served; kept only for a running Experiment on this Funnel."},"eventType":{"type":"string","enum":["funnel_started"],"description":"The visitor started the Funnel."},"payload":{"type":"object","properties":{"stepName":{"type":"string","description":"The name of the Step."},"totalSteps":{"type":"integer","description":"How many Steps the Funnel has."}},"description":"The Step the event is about."}},"required":["eventId","sessionId","funnelId","timestamp","deviceType","browser","os","pageUrl","referrer","language","eventType","payload"]},{"type":"object","properties":{"eventId":{"type":"string","format":"uuid","description":"Client-generated id of this event."},"sessionId":{"type":"string","description":"The id of the Funnel session, kept in memory while the Funnel is open."},"funnelId":{"type":"string","format":"uuid","description":"The Funnel the event happened in."},"stepId":{"type":"string","description":"The Step the event happened on."},"stepIndex":{"type":"integer","description":"The position of that Step in the Funnel."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened, by the client's clock."},"deviceType":{"type":"string","enum":["mobile","tablet","desktop"],"description":"The visitor's device type, detected from the user agent."},"browser":{"type":"string","enum":["chrome","firefox","safari","edge","opera","samsung","other"],"description":"The visitor's browser family, detected from the user agent."},"os":{"type":"string","enum":["ios","android","macos","windows","linux","other"],"description":"The visitor's operating system family, detected from the user agent."},"pageUrl":{"type":"string","description":"The URL of the page the event was sent from."},"referrer":{"type":"string","description":"The URL the visitor came from, or empty when there is none."},"language":{"type":"string","description":"The browser's language, such as `de-DE`."},"utmSource":{"type":"string","description":"The `utm_source` parameter of the page URL."},"utmMedium":{"type":"string","description":"The `utm_medium` parameter of the page URL."},"utmCampaign":{"type":"string","description":"The `utm_campaign` parameter of the page URL."},"utmTerm":{"type":"string","description":"The `utm_term` parameter of the page URL."},"utmContent":{"type":"string","description":"The `utm_content` parameter of the page URL."},"version":{"type":"integer","minimum":1,"default":1,"description":"The version of the event format the client sent."},"testVariantId":{"type":"string","format":"uuid","description":"The Test variant the visitor was served; kept only for a running Experiment on this Funnel."},"eventType":{"type":"string","enum":["step_viewed"],"description":"The visitor saw a Step."},"payload":{"type":"object","properties":{"stepName":{"type":"string","description":"The name of the Step."},"totalSteps":{"type":"integer","description":"How many Steps the Funnel has."}},"description":"The Step the event is about."}},"required":["eventId","sessionId","funnelId","timestamp","deviceType","browser","os","pageUrl","referrer","language","eventType","payload"]},{"type":"object","properties":{"eventId":{"type":"string","format":"uuid","description":"Client-generated id of this event."},"sessionId":{"type":"string","description":"The id of the Funnel session, kept in memory while the Funnel is open."},"funnelId":{"type":"string","format":"uuid","description":"The Funnel the event happened in."},"stepId":{"type":"string","description":"The Step the event happened on."},"stepIndex":{"type":"integer","description":"The position of that Step in the Funnel."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened, by the client's clock."},"deviceType":{"type":"string","enum":["mobile","tablet","desktop"],"description":"The visitor's device type, detected from the user agent."},"browser":{"type":"string","enum":["chrome","firefox","safari","edge","opera","samsung","other"],"description":"The visitor's browser family, detected from the user agent."},"os":{"type":"string","enum":["ios","android","macos","windows","linux","other"],"description":"The visitor's operating system family, detected from the user agent."},"pageUrl":{"type":"string","description":"The URL of the page the event was sent from."},"referrer":{"type":"string","description":"The URL the visitor came from, or empty when there is none."},"language":{"type":"string","description":"The browser's language, such as `de-DE`."},"utmSource":{"type":"string","description":"The `utm_source` parameter of the page URL."},"utmMedium":{"type":"string","description":"The `utm_medium` parameter of the page URL."},"utmCampaign":{"type":"string","description":"The `utm_campaign` parameter of the page URL."},"utmTerm":{"type":"string","description":"The `utm_term` parameter of the page URL."},"utmContent":{"type":"string","description":"The `utm_content` parameter of the page URL."},"version":{"type":"integer","minimum":1,"default":1,"description":"The version of the event format the client sent."},"testVariantId":{"type":"string","format":"uuid","description":"The Test variant the visitor was served; kept only for a running Experiment on this Funnel."},"eventType":{"type":"string","enum":["step_completed"],"description":"The visitor completed a Step."},"payload":{"type":"object","properties":{"stepName":{"type":"string","description":"The name of the Step."},"totalSteps":{"type":"integer","description":"How many Steps the Funnel has."}},"description":"The Step the event is about."}},"required":["eventId","sessionId","funnelId","timestamp","deviceType","browser","os","pageUrl","referrer","language","eventType","payload"]},{"type":"object","properties":{"eventId":{"type":"string","format":"uuid","description":"Client-generated id of this event."},"sessionId":{"type":"string","description":"The id of the Funnel session, kept in memory while the Funnel is open."},"funnelId":{"type":"string","format":"uuid","description":"The Funnel the event happened in."},"stepId":{"type":"string","description":"The Step the event happened on."},"stepIndex":{"type":"integer","description":"The position of that Step in the Funnel."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened, by the client's clock."},"deviceType":{"type":"string","enum":["mobile","tablet","desktop"],"description":"The visitor's device type, detected from the user agent."},"browser":{"type":"string","enum":["chrome","firefox","safari","edge","opera","samsung","other"],"description":"The visitor's browser family, detected from the user agent."},"os":{"type":"string","enum":["ios","android","macos","windows","linux","other"],"description":"The visitor's operating system family, detected from the user agent."},"pageUrl":{"type":"string","description":"The URL of the page the event was sent from."},"referrer":{"type":"string","description":"The URL the visitor came from, or empty when there is none."},"language":{"type":"string","description":"The browser's language, such as `de-DE`."},"utmSource":{"type":"string","description":"The `utm_source` parameter of the page URL."},"utmMedium":{"type":"string","description":"The `utm_medium` parameter of the page URL."},"utmCampaign":{"type":"string","description":"The `utm_campaign` parameter of the page URL."},"utmTerm":{"type":"string","description":"The `utm_term` parameter of the page URL."},"utmContent":{"type":"string","description":"The `utm_content` parameter of the page URL."},"version":{"type":"integer","minimum":1,"default":1,"description":"The version of the event format the client sent."},"testVariantId":{"type":"string","format":"uuid","description":"The Test variant the visitor was served; kept only for a running Experiment on this Funnel."},"eventType":{"type":"string","enum":["answer_recorded"],"description":"The visitor gave an answer in a Block."},"payload":{"type":"object","properties":{"blockId":{"type":"string","description":"The id of the Block that was answered."},"internalName":{"type":"string","description":"The Block's internal name, if it has one."},"blockType":{"type":"string","description":"The type of the Block."},"value":{"nullable":true,"description":"The answer, or null when it is redacted or too long."}},"required":["blockId","blockType"],"description":"The answer that was given."}},"required":["eventId","sessionId","funnelId","timestamp","deviceType","browser","os","pageUrl","referrer","language","eventType","payload"]},{"type":"object","properties":{"eventId":{"type":"string","format":"uuid","description":"Client-generated id of this event."},"sessionId":{"type":"string","description":"The id of the Funnel session, kept in memory while the Funnel is open."},"funnelId":{"type":"string","format":"uuid","description":"The Funnel the event happened in."},"stepId":{"type":"string","description":"The Step the event happened on."},"stepIndex":{"type":"integer","description":"The position of that Step in the Funnel."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened, by the client's clock."},"deviceType":{"type":"string","enum":["mobile","tablet","desktop"],"description":"The visitor's device type, detected from the user agent."},"browser":{"type":"string","enum":["chrome","firefox","safari","edge","opera","samsung","other"],"description":"The visitor's browser family, detected from the user agent."},"os":{"type":"string","enum":["ios","android","macos","windows","linux","other"],"description":"The visitor's operating system family, detected from the user agent."},"pageUrl":{"type":"string","description":"The URL of the page the event was sent from."},"referrer":{"type":"string","description":"The URL the visitor came from, or empty when there is none."},"language":{"type":"string","description":"The browser's language, such as `de-DE`."},"utmSource":{"type":"string","description":"The `utm_source` parameter of the page URL."},"utmMedium":{"type":"string","description":"The `utm_medium` parameter of the page URL."},"utmCampaign":{"type":"string","description":"The `utm_campaign` parameter of the page URL."},"utmTerm":{"type":"string","description":"The `utm_term` parameter of the page URL."},"utmContent":{"type":"string","description":"The `utm_content` parameter of the page URL."},"version":{"type":"integer","minimum":1,"default":1,"description":"The version of the event format the client sent."},"testVariantId":{"type":"string","format":"uuid","description":"The Test variant the visitor was served; kept only for a running Experiment on this Funnel."},"eventType":{"type":"string","enum":["form_submitted"],"description":"The visitor submitted the Funnel."},"payload":{"type":"object","properties":{"stepName":{"type":"string","description":"The name of the Step."},"leadId":{"type":"string","description":"The Lead the submission created, if any."}},"description":"The submission."}},"required":["eventId","sessionId","funnelId","timestamp","deviceType","browser","os","pageUrl","referrer","language","eventType","payload"]},{"type":"object","properties":{"eventId":{"type":"string","format":"uuid","description":"Client-generated id of this event."},"sessionId":{"type":"string","description":"The id of the Funnel session, kept in memory while the Funnel is open."},"funnelId":{"type":"string","format":"uuid","description":"The Funnel the event happened in."},"stepId":{"type":"string","description":"The Step the event happened on."},"stepIndex":{"type":"integer","description":"The position of that Step in the Funnel."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened, by the client's clock."},"deviceType":{"type":"string","enum":["mobile","tablet","desktop"],"description":"The visitor's device type, detected from the user agent."},"browser":{"type":"string","enum":["chrome","firefox","safari","edge","opera","samsung","other"],"description":"The visitor's browser family, detected from the user agent."},"os":{"type":"string","enum":["ios","android","macos","windows","linux","other"],"description":"The visitor's operating system family, detected from the user agent."},"pageUrl":{"type":"string","description":"The URL of the page the event was sent from."},"referrer":{"type":"string","description":"The URL the visitor came from, or empty when there is none."},"language":{"type":"string","description":"The browser's language, such as `de-DE`."},"utmSource":{"type":"string","description":"The `utm_source` parameter of the page URL."},"utmMedium":{"type":"string","description":"The `utm_medium` parameter of the page URL."},"utmCampaign":{"type":"string","description":"The `utm_campaign` parameter of the page URL."},"utmTerm":{"type":"string","description":"The `utm_term` parameter of the page URL."},"utmContent":{"type":"string","description":"The `utm_content` parameter of the page URL."},"version":{"type":"integer","minimum":1,"default":1,"description":"The version of the event format the client sent."},"testVariantId":{"type":"string","format":"uuid","description":"The Test variant the visitor was served; kept only for a running Experiment on this Funnel."},"eventType":{"type":"string","enum":["form_error"],"description":"The visitor's input on a Step failed validation."},"payload":{"type":"object","properties":{"stepName":{"type":"string","description":"The name of the Step."},"errorKeys":{"type":"array","items":{"type":"string"},"description":"The keys of the fields that failed validation."}},"required":["errorKeys"],"description":"The validation error."}},"required":["eventId","sessionId","funnelId","timestamp","deviceType","browser","os","pageUrl","referrer","language","eventType","payload"]}]},"minItems":1,"maxItems":20,"description":"The events to record, in the order they happened."}},"required":["events"]},"FunnelAiStreamBody":{"type":"object","properties":{"blockId":{"type":"string","minLength":1,"description":"Id of the funnel's AI text block to generate text for"},"values":{"type":"object","additionalProperties":{"nullable":true},"default":{},"description":"Visitor answers keyed by block id; only the blocks the AI text block's prompt references are used"}},"required":["blockId"]},"LeadVerificationChannelsResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"available_channels":{"type":"array","items":{"type":"string","enum":["email","sms"],"description":"A Lead verification channel: email sends the code to the Lead's email address, sms to their phone number."},"description":"The channels the Lead can verify on: enabled for the Funnel, and with the contact field the channel sends to filled in."}},"required":["available_channels"],"description":"The channels the Lead can receive a code on."}},"required":["data"]},"LeadVerificationSendResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"channel":{"type":"string","enum":["email","sms"],"description":"A Lead verification channel: email sends the code to the Lead's email address, sms to their phone number."},"masked_destination":{"type":"string","description":"Where the code went, partly hidden, for the Lead to recognise, e.g. m***@example.com."},"available_channels":{"type":"array","items":{"type":"string","enum":["email","sms"],"description":"A Lead verification channel: email sends the code to the Lead's email address, sms to their phone number."},"description":"The channels the Lead can verify on: enabled for the Funnel, and with the contact field the channel sends to filled in."}},"required":["channel","masked_destination","available_channels"],"description":"The code that was sent."}},"required":["data"]},"LeadVerificationCheckResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"verified":{"type":"boolean","description":"Whether the Lead is now verified."},"contact_field":{"type":"string","description":"The contact field the verification proves the Lead owns: email or phone_number."}},"required":["verified","contact_field"],"description":"The result of the check."}},"required":["data"]},"BookingSlots":{"type":"object","properties":{"slots":{"type":"array","items":{"type":"string","description":"A start, an ISO instant in UTC."},"description":"The bookable starts with seats left, ISO instants in UTC, earliest first."},"slotDetails":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","description":"The start, an ISO instant in UTC."},"capacity":{"type":"integer","description":"The event type's capacity."},"seatsTaken":{"type":"integer","description":"Seats already booked at this start."},"seatsLeft":{"type":"integer","description":"Seats a lead can still book at this start."}},"required":["start","capacity","seatsTaken","seatsLeft"]},"description":"Every offered start with its seats, full group slots included with seatsLeft 0."},"duration_minutes":{"type":"integer","description":"The duration option these slots are for, in minutes."},"duration_options":{"type":"array","items":{"type":"integer","description":"One duration option, in minutes."},"description":"Every duration option the lead can pick, the first preselected."}},"required":["slots"]},"Booking":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The new booking's id."},"start_at":{"type":"string","description":"When the meeting starts, ISO 8601 in UTC."},"end_at":{"type":"string","description":"When the meeting ends, ISO 8601 in UTC."},"location_kind":{"type":"string","enum":["phone","in_person","link","generated"],"description":"Where the meeting happens: phone, in_person, link or generated."}},"required":["id","start_at","end_at","location_kind"]},"LandingPageAnalyticsResponse":{"type":"object","properties":{"received":{"type":"number","description":"How many events were recorded."}},"required":["received"]},"LandingPageAnalyticsBatch":{"type":"object","properties":{"events":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"eventId":{"type":"string","format":"uuid","description":"Client-generated id of this event."},"pageviewId":{"type":"string","format":"uuid","description":"The id of the Pageview the event belongs to."},"pageviewStartedAt":{"type":"string","format":"date-time","description":"When the Pageview started; it picks the day the Visitor is counted on."},"deviceType":{"type":"string","enum":["mobile","tablet","desktop"],"description":"The visitor's device type, detected from the user agent."},"browser":{"type":"string","enum":["chrome","firefox","safari","edge","opera","samsung","other"],"description":"The visitor's browser family, detected from the user agent."},"os":{"type":"string","enum":["ios","android","macos","windows","linux","other"],"description":"The visitor's operating system family, detected from the user agent."},"pageUrl":{"type":"string","description":"The URL of the page the event was sent from."},"path":{"type":"string","description":"The path of the page URL."},"referrer":{"type":"string","description":"The URL the visitor came from, or empty when there is none."},"language":{"type":"string","description":"The browser's language, such as `de-DE`."},"utmSource":{"type":"string","description":"The `utm_source` parameter of the page URL."},"utmMedium":{"type":"string","description":"The `utm_medium` parameter of the page URL."},"utmCampaign":{"type":"string","description":"The `utm_campaign` parameter of the page URL."},"utmTerm":{"type":"string","description":"The `utm_term` parameter of the page URL."},"utmContent":{"type":"string","description":"The `utm_content` parameter of the page URL."},"version":{"type":"integer","minimum":1,"default":1,"description":"The version of the event format the client sent."},"testVariantId":{"type":"string","format":"uuid","description":"The Test variant the page was served as; kept only for a running Experiment on this page."},"eventType":{"type":"string","enum":["page_viewed"],"description":"The page was opened."},"versionId":{"type":"string","format":"uuid","description":"The Published version of the Landing page that was shown."},"payload":{"type":"object","properties":{},"additionalProperties":false,"description":"Empty for this event."}},"required":["eventId","pageviewId","pageviewStartedAt","deviceType","browser","os","pageUrl","path","referrer","language","eventType","versionId","payload"]},{"type":"object","properties":{"eventId":{"type":"string","format":"uuid","description":"Client-generated id of this event."},"pageviewId":{"type":"string","format":"uuid","description":"The id of the Pageview the event belongs to."},"pageviewStartedAt":{"type":"string","format":"date-time","description":"When the Pageview started; it picks the day the Visitor is counted on."},"deviceType":{"type":"string","enum":["mobile","tablet","desktop"],"description":"The visitor's device type, detected from the user agent."},"browser":{"type":"string","enum":["chrome","firefox","safari","edge","opera","samsung","other"],"description":"The visitor's browser family, detected from the user agent."},"os":{"type":"string","enum":["ios","android","macos","windows","linux","other"],"description":"The visitor's operating system family, detected from the user agent."},"pageUrl":{"type":"string","description":"The URL of the page the event was sent from."},"path":{"type":"string","description":"The path of the page URL."},"referrer":{"type":"string","description":"The URL the visitor came from, or empty when there is none."},"language":{"type":"string","description":"The browser's language, such as `de-DE`."},"utmSource":{"type":"string","description":"The `utm_source` parameter of the page URL."},"utmMedium":{"type":"string","description":"The `utm_medium` parameter of the page URL."},"utmCampaign":{"type":"string","description":"The `utm_campaign` parameter of the page URL."},"utmTerm":{"type":"string","description":"The `utm_term` parameter of the page URL."},"utmContent":{"type":"string","description":"The `utm_content` parameter of the page URL."},"version":{"type":"integer","minimum":1,"default":1,"description":"The version of the event format the client sent."},"testVariantId":{"type":"string","format":"uuid","description":"The Test variant the page was served as; kept only for a running Experiment on this page."},"eventType":{"type":"string","enum":["page_left"],"description":"The visitor left the page."},"blockId":{"type":"string","description":"The deepest Block the visitor scrolled to, or empty when none came into view."},"durationMs":{"type":"integer","minimum":0,"description":"How long the page was visible before the visitor left, in milliseconds."},"payload":{"type":"object","properties":{},"additionalProperties":false,"description":"Empty for this event."}},"required":["eventId","pageviewId","pageviewStartedAt","deviceType","browser","os","pageUrl","path","referrer","language","eventType","blockId","durationMs","payload"]},{"type":"object","properties":{"eventId":{"type":"string","format":"uuid","description":"Client-generated id of this event."},"pageviewId":{"type":"string","format":"uuid","description":"The id of the Pageview the event belongs to."},"pageviewStartedAt":{"type":"string","format":"date-time","description":"When the Pageview started; it picks the day the Visitor is counted on."},"deviceType":{"type":"string","enum":["mobile","tablet","desktop"],"description":"The visitor's device type, detected from the user agent."},"browser":{"type":"string","enum":["chrome","firefox","safari","edge","opera","samsung","other"],"description":"The visitor's browser family, detected from the user agent."},"os":{"type":"string","enum":["ios","android","macos","windows","linux","other"],"description":"The visitor's operating system family, detected from the user agent."},"pageUrl":{"type":"string","description":"The URL of the page the event was sent from."},"path":{"type":"string","description":"The path of the page URL."},"referrer":{"type":"string","description":"The URL the visitor came from, or empty when there is none."},"language":{"type":"string","description":"The browser's language, such as `de-DE`."},"utmSource":{"type":"string","description":"The `utm_source` parameter of the page URL."},"utmMedium":{"type":"string","description":"The `utm_medium` parameter of the page URL."},"utmCampaign":{"type":"string","description":"The `utm_campaign` parameter of the page URL."},"utmTerm":{"type":"string","description":"The `utm_term` parameter of the page URL."},"utmContent":{"type":"string","description":"The `utm_content` parameter of the page URL."},"version":{"type":"integer","minimum":1,"default":1,"description":"The version of the event format the client sent."},"testVariantId":{"type":"string","format":"uuid","description":"The Test variant the page was served as; kept only for a running Experiment on this page."},"eventType":{"type":"string","enum":["block_viewed"],"description":"A Block came into view."},"blockId":{"type":"string","description":"The id of the Block the event is about."},"payload":{"type":"object","properties":{"blockType":{"type":"string","description":"The type of the Block."},"blockIndex":{"type":"integer","description":"The position of the Block on the page."}},"required":["blockType","blockIndex"],"additionalProperties":false,"description":"The Block that came into view."}},"required":["eventId","pageviewId","pageviewStartedAt","deviceType","browser","os","pageUrl","path","referrer","language","eventType","blockId","payload"]},{"type":"object","properties":{"eventId":{"type":"string","format":"uuid","description":"Client-generated id of this event."},"pageviewId":{"type":"string","format":"uuid","description":"The id of the Pageview the event belongs to."},"pageviewStartedAt":{"type":"string","format":"date-time","description":"When the Pageview started; it picks the day the Visitor is counted on."},"deviceType":{"type":"string","enum":["mobile","tablet","desktop"],"description":"The visitor's device type, detected from the user agent."},"browser":{"type":"string","enum":["chrome","firefox","safari","edge","opera","samsung","other"],"description":"The visitor's browser family, detected from the user agent."},"os":{"type":"string","enum":["ios","android","macos","windows","linux","other"],"description":"The visitor's operating system family, detected from the user agent."},"pageUrl":{"type":"string","description":"The URL of the page the event was sent from."},"path":{"type":"string","description":"The path of the page URL."},"referrer":{"type":"string","description":"The URL the visitor came from, or empty when there is none."},"language":{"type":"string","description":"The browser's language, such as `de-DE`."},"utmSource":{"type":"string","description":"The `utm_source` parameter of the page URL."},"utmMedium":{"type":"string","description":"The `utm_medium` parameter of the page URL."},"utmCampaign":{"type":"string","description":"The `utm_campaign` parameter of the page URL."},"utmTerm":{"type":"string","description":"The `utm_term` parameter of the page URL."},"utmContent":{"type":"string","description":"The `utm_content` parameter of the page URL."},"version":{"type":"integer","minimum":1,"default":1,"description":"The version of the event format the client sent."},"testVariantId":{"type":"string","format":"uuid","description":"The Test variant the page was served as; kept only for a running Experiment on this page."},"eventType":{"type":"string","enum":["cta_clicked"],"description":"The visitor clicked a link or button in a Block."},"blockId":{"type":"string","description":"The id of the Block the event is about."},"payload":{"type":"object","properties":{"label":{"type":"string","maxLength":100,"description":"The visible text of the link or button."},"href":{"type":"string","description":"The link's target, or empty for a button."}},"required":["label","href"],"additionalProperties":false,"description":"The link or button that was clicked."}},"required":["eventId","pageviewId","pageviewStartedAt","deviceType","browser","os","pageUrl","path","referrer","language","eventType","blockId","payload"]},{"type":"object","properties":{"eventId":{"type":"string","format":"uuid","description":"Client-generated id of this event."},"pageviewId":{"type":"string","format":"uuid","description":"The id of the Pageview the event belongs to."},"pageviewStartedAt":{"type":"string","format":"date-time","description":"When the Pageview started; it picks the day the Visitor is counted on."},"deviceType":{"type":"string","enum":["mobile","tablet","desktop"],"description":"The visitor's device type, detected from the user agent."},"browser":{"type":"string","enum":["chrome","firefox","safari","edge","opera","samsung","other"],"description":"The visitor's browser family, detected from the user agent."},"os":{"type":"string","enum":["ios","android","macos","windows","linux","other"],"description":"The visitor's operating system family, detected from the user agent."},"pageUrl":{"type":"string","description":"The URL of the page the event was sent from."},"path":{"type":"string","description":"The path of the page URL."},"referrer":{"type":"string","description":"The URL the visitor came from, or empty when there is none."},"language":{"type":"string","description":"The browser's language, such as `de-DE`."},"utmSource":{"type":"string","description":"The `utm_source` parameter of the page URL."},"utmMedium":{"type":"string","description":"The `utm_medium` parameter of the page URL."},"utmCampaign":{"type":"string","description":"The `utm_campaign` parameter of the page URL."},"utmTerm":{"type":"string","description":"The `utm_term` parameter of the page URL."},"utmContent":{"type":"string","description":"The `utm_content` parameter of the page URL."},"version":{"type":"integer","minimum":1,"default":1,"description":"The version of the event format the client sent."},"testVariantId":{"type":"string","format":"uuid","description":"The Test variant the page was served as; kept only for a running Experiment on this page."},"eventType":{"type":"string","enum":["outbound_clicked"],"description":"The visitor clicked a link to another site."},"blockId":{"type":"string","description":"The id of the Block the event is about."},"payload":{"type":"object","properties":{"href":{"type":"string","description":"The URL of the link."},"host":{"type":"string","description":"The host of the link's URL."}},"required":["href","host"],"additionalProperties":false,"description":"The outbound link that was clicked."}},"required":["eventId","pageviewId","pageviewStartedAt","deviceType","browser","os","pageUrl","path","referrer","language","eventType","blockId","payload"]},{"type":"object","properties":{"eventId":{"type":"string","format":"uuid","description":"Client-generated id of this event."},"pageviewId":{"type":"string","format":"uuid","description":"The id of the Pageview the event belongs to."},"pageviewStartedAt":{"type":"string","format":"date-time","description":"When the Pageview started; it picks the day the Visitor is counted on."},"deviceType":{"type":"string","enum":["mobile","tablet","desktop"],"description":"The visitor's device type, detected from the user agent."},"browser":{"type":"string","enum":["chrome","firefox","safari","edge","opera","samsung","other"],"description":"The visitor's browser family, detected from the user agent."},"os":{"type":"string","enum":["ios","android","macos","windows","linux","other"],"description":"The visitor's operating system family, detected from the user agent."},"pageUrl":{"type":"string","description":"The URL of the page the event was sent from."},"path":{"type":"string","description":"The path of the page URL."},"referrer":{"type":"string","description":"The URL the visitor came from, or empty when there is none."},"language":{"type":"string","description":"The browser's language, such as `de-DE`."},"utmSource":{"type":"string","description":"The `utm_source` parameter of the page URL."},"utmMedium":{"type":"string","description":"The `utm_medium` parameter of the page URL."},"utmCampaign":{"type":"string","description":"The `utm_campaign` parameter of the page URL."},"utmTerm":{"type":"string","description":"The `utm_term` parameter of the page URL."},"utmContent":{"type":"string","description":"The `utm_content` parameter of the page URL."},"version":{"type":"integer","minimum":1,"default":1,"description":"The version of the event format the client sent."},"testVariantId":{"type":"string","format":"uuid","description":"The Test variant the page was served as; kept only for a running Experiment on this page."},"eventType":{"type":"string","enum":["funnel_started"],"description":"The visitor started a Funnel embedded in the page."},"payload":{"type":"object","properties":{"funnelId":{"type":"string","format":"uuid","description":"The embedded Funnel the event came from."},"stepId":{"type":"string","description":"The Funnel Step the event happened on."},"stepIndex":{"type":"integer","description":"The position of that Step in the Funnel."}},"required":["funnelId","stepId","stepIndex"],"additionalProperties":false,"description":"The Funnel that was started."}},"required":["eventId","pageviewId","pageviewStartedAt","deviceType","browser","os","pageUrl","path","referrer","language","eventType","payload"]},{"type":"object","properties":{"eventId":{"type":"string","format":"uuid","description":"Client-generated id of this event."},"pageviewId":{"type":"string","format":"uuid","description":"The id of the Pageview the event belongs to."},"pageviewStartedAt":{"type":"string","format":"date-time","description":"When the Pageview started; it picks the day the Visitor is counted on."},"deviceType":{"type":"string","enum":["mobile","tablet","desktop"],"description":"The visitor's device type, detected from the user agent."},"browser":{"type":"string","enum":["chrome","firefox","safari","edge","opera","samsung","other"],"description":"The visitor's browser family, detected from the user agent."},"os":{"type":"string","enum":["ios","android","macos","windows","linux","other"],"description":"The visitor's operating system family, detected from the user agent."},"pageUrl":{"type":"string","description":"The URL of the page the event was sent from."},"path":{"type":"string","description":"The path of the page URL."},"referrer":{"type":"string","description":"The URL the visitor came from, or empty when there is none."},"language":{"type":"string","description":"The browser's language, such as `de-DE`."},"utmSource":{"type":"string","description":"The `utm_source` parameter of the page URL."},"utmMedium":{"type":"string","description":"The `utm_medium` parameter of the page URL."},"utmCampaign":{"type":"string","description":"The `utm_campaign` parameter of the page URL."},"utmTerm":{"type":"string","description":"The `utm_term` parameter of the page URL."},"utmContent":{"type":"string","description":"The `utm_content` parameter of the page URL."},"version":{"type":"integer","minimum":1,"default":1,"description":"The version of the event format the client sent."},"testVariantId":{"type":"string","format":"uuid","description":"The Test variant the page was served as; kept only for a running Experiment on this page."},"eventType":{"type":"string","enum":["form_submitted"],"description":"The visitor submitted a Funnel embedded in the page."},"payload":{"type":"object","properties":{"funnelId":{"type":"string","format":"uuid","description":"The embedded Funnel the event came from."},"stepId":{"type":"string","description":"The Funnel Step the event happened on."},"stepIndex":{"type":"integer","description":"The position of that Step in the Funnel."},"leadId":{"type":"string","format":"uuid","description":"The Lead the submission created, if any."}},"required":["funnelId","stepId","stepIndex"],"additionalProperties":false,"description":"The Funnel that was submitted."}},"required":["eventId","pageviewId","pageviewStartedAt","deviceType","browser","os","pageUrl","path","referrer","language","eventType","payload"]}]},"minItems":1,"maxItems":20,"description":"The events to record, in the order they happened."}},"required":["events"]},"AttributionHandoffResponse":{"type":"object","properties":{"token":{"type":"string","description":"A signed token carrying the caller's PostHog distinct id, for the portal to verify."}},"required":["token"]},"ManagedBooking":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The booking's id."},"state":{"type":"string","enum":["open","cancelled","closed"],"description":"open (the lead can still cancel or reschedule), cancelled, or closed (the cut-off has passed)."},"start_at":{"type":"string","description":"When the meeting starts, ISO 8601 in UTC."},"end_at":{"type":"string","description":"When the meeting ends, ISO 8601 in UTC."},"cutoff_at":{"type":"string","description":"The cut-off: the last moment the lead can cancel or reschedule, ISO 8601 in UTC."},"lead_timezone":{"type":"string","description":"The lead's IANA time zone, which their emails use."},"can_reschedule":{"type":"boolean","description":"False when the event type was archived or its host removed; cancelling still works."},"event_type":{"type":"object","properties":{"title":{"type":"string","description":"The event type's title."},"duration_minutes":{"type":"number","description":"The booking's own length in minutes, from start_at to end_at."},"location_kind":{"type":"string","enum":["phone","in_person","link","generated"],"description":"Where the meeting happens: phone, in_person, link or generated."}},"required":["title","duration_minutes","location_kind"],"description":"The event type the lead booked."},"meeting_join_url":{"type":"string","nullable":true,"description":"The generated meeting's join URL, if it has one."},"host_name":{"type":"string","description":"The name of the host the lead booked."},"organization_name":{"type":"string","description":"The Organization's name."}},"required":["id","state","start_at","end_at","cutoff_at","lead_timezone","can_reschedule","event_type","host_name","organization_name"]},"ManagedBookingSlots":{"type":"object","properties":{"slots":{"type":"array","items":{"type":"string","description":"A start, an ISO instant in UTC."},"description":"The bookable starts with seats left, ISO instants in UTC, earliest first."},"slotDetails":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","description":"The start, an ISO instant in UTC."},"capacity":{"type":"integer","description":"The event type's capacity."},"seatsTaken":{"type":"integer","description":"Seats already booked at this start."},"seatsLeft":{"type":"integer","description":"Seats a lead can still book at this start."}},"required":["start","capacity","seatsTaken","seatsLeft"]},"description":"Every offered start with its seats, full group slots included with seatsLeft 0."},"duration_minutes":{"type":"integer","description":"The duration option these slots are for, in minutes."},"duration_options":{"type":"array","items":{"type":"integer","description":"One duration option, in minutes."},"description":"Every duration option the lead can pick, the first preselected."}},"required":["slots"]},"AssetGenerationCreated":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Asset generation's id."},"status":{"type":"string","enum":["queued"],"description":"A new Asset generation is always queued first."}},"required":["id","status"]},"AssetGenerationList":{"type":"object","properties":{"jobs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Asset generation's id."},"status":{"type":"string","enum":["queued","running","done","failed"],"description":"Where the Asset generation is: queued (waiting to start), running, done (the Asset is stored) or failed."},"type":{"type":"string","enum":["image"],"description":"The kind of Asset to generate."},"prompt":{"type":"string","description":"What the image should show, as sent."},"size":{"type":"object","properties":{"width":{"type":"integer","description":"The image's width in pixels."},"height":{"type":"integer","description":"The image's height in pixels."}},"required":["width","height"],"description":"The pixel size of the image."},"model":{"type":"string","description":"The model that generates the image."},"quality":{"type":"string","description":"The quality the model generates at."},"error":{"type":"string","nullable":true,"description":"Why the Asset generation failed, readable enough to change the prompt. Null unless status is failed."},"createdAt":{"type":"string","description":"When the Asset generation started."},"finishedAt":{"type":"string","nullable":true,"description":"When it finished, done or failed. Null while it runs."},"asset":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The generated image's Asset id."},"imageUrl":{"type":"string","description":"The generated image's public URL."}},"required":["id","imageUrl"],"description":"The generated image. Present only while status is done."}},"required":["id","status","type","prompt","size","model","quality","error","createdAt","finishedAt"]},"description":"The Organization's recent Asset generations, newest first."}},"required":["jobs"]},"AssetGenerationJob":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Asset generation's id."},"status":{"type":"string","enum":["queued","running","done","failed"],"description":"Where the Asset generation is: queued (waiting to start), running, done (the Asset is stored) or failed."},"type":{"type":"string","enum":["image"],"description":"The kind of Asset to generate."},"prompt":{"type":"string","description":"What the image should show, as sent."},"size":{"type":"object","properties":{"width":{"type":"integer","description":"The image's width in pixels."},"height":{"type":"integer","description":"The image's height in pixels."}},"required":["width","height"],"description":"The pixel size of the image."},"model":{"type":"string","description":"The model that generates the image."},"quality":{"type":"string","description":"The quality the model generates at."},"error":{"type":"string","nullable":true,"description":"Why the Asset generation failed, readable enough to change the prompt. Null unless status is failed."},"createdAt":{"type":"string","description":"When the Asset generation started."},"finishedAt":{"type":"string","nullable":true,"description":"When it finished, done or failed. Null while it runs."},"asset":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The generated image's Asset id."},"imageUrl":{"type":"string","description":"The generated image's public URL."}},"required":["id","imageUrl"],"description":"The generated image. Present only while status is done."}},"required":["id","status","type","prompt","size","model","quality","error","createdAt","finishedAt"]},"FunnelAnalyticsOverview":{"type":"object","properties":{"overview":{"type":"object","properties":{"totalStarts":{"type":"number","description":"Sessions that started the Funnel in the window."},"totalCompletions":{"type":"number","description":"Sessions that submitted in the window, including sessions started before it."},"startedCompletions":{"type":"number","description":"Sessions that both started and submitted in the window: the successes of the conversion rate out of totalStarts."},"conversionRate":{"type":"number","description":"totalCompletions out of totalStarts, as a percentage with one decimal."}},"required":["totalStarts","totalCompletions","startedCompletions","conversionRate"],"description":"The headline totals."},"devices":{"type":"array","items":{"type":"object","properties":{"deviceType":{"type":"string","description":"The device type."},"total":{"type":"number","description":"Sessions on this device type."},"starts":{"type":"number","description":"Sessions on this device type that started."},"completions":{"type":"number","description":"Sessions on this device type that submitted."}},"required":["deviceType","total","starts","completions"]},"description":"The sessions per device type."}},"required":["overview","devices"]},"FunnelAnalyticsSteps":{"type":"array","items":{"type":"object","properties":{"stepIndex":{"type":"number","description":"The step's 0-based position."},"stepName":{"type":"string","description":"The step's name."},"sessionsViewed":{"type":"number","description":"Sessions that viewed the step."},"sessionsCompleted":{"type":"number","description":"Sessions that completed the step."},"outboundRoutes":{"type":"array","items":{"type":"object","properties":{"stepId":{"type":"string","description":"The next step's short id."},"stepName":{"type":"string","description":"The next step's name."},"sessions":{"type":"number","description":"Sessions that viewed it right after this step."}},"required":["stepId","stepName","sessions"]},"description":"The steps sessions viewed right after this one. More than one means the step branches."}},"required":["stepIndex","stepName","sessionsViewed","sessionsCompleted","outboundRoutes"]},"description":"Each step's drop-off and routes, in order."},"FunnelAnalyticsAcquisition":{"type":"object","properties":{"hours":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"number","description":"The weekday, from 1 (Monday) to 7 (Sunday)."},"hour":{"type":"number","description":"The hour of the day, from 0 to 23."},"sessions":{"type":"number","description":"Sessions that started in this hour."}},"required":["weekday","hour","sessions"]},"description":"When sessions start, per weekday and hour."},"browsers":{"type":"array","items":{"type":"object","properties":{"browser":{"type":"string","description":"The browser."},"total":{"type":"number","description":"Sessions in this browser."}},"required":["browser","total"]},"description":"Sessions per browser."},"oses":{"type":"array","items":{"type":"object","properties":{"os":{"type":"string","description":"The operating system."},"total":{"type":"number","description":"Sessions on this operating system."}},"required":["os","total"]},"description":"Sessions per operating system."},"referrers":{"type":"array","items":{"type":"object","properties":{"referrer":{"type":"string","description":"The referrer host, or '(direct)'."},"total":{"type":"number","description":"Sessions from this referrer."}},"required":["referrer","total"]},"description":"Sessions per referrer host, most first."},"utmSources":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"The UTM value."},"total":{"type":"number","description":"Sessions with this value."}},"required":["value","total"]},"description":"Sessions per utm_source, most first."},"utmMediums":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"The UTM value."},"total":{"type":"number","description":"Sessions with this value."}},"required":["value","total"]},"description":"Sessions per utm_medium, most first."},"utmCampaigns":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"The UTM value."},"total":{"type":"number","description":"Sessions with this value."}},"required":["value","total"]},"description":"Sessions per utm_campaign, most first."},"utmTerms":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"The UTM value."},"total":{"type":"number","description":"Sessions with this value."}},"required":["value","total"]},"description":"Sessions per utm_term, most first."},"utmContents":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"The UTM value."},"total":{"type":"number","description":"Sessions with this value."}},"required":["value","total"]},"description":"Sessions per utm_content, most first."}},"required":["hours","browsers","oses","referrers","utmSources","utmMediums","utmCampaigns","utmTerms","utmContents"]},"FunnelAnalyticsAnswers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The input Block's internal name."},"blockType":{"type":"string","description":"The input Block's type."},"answerValue":{"type":"string","description":"The answer submitted."},"count":{"type":"number","description":"Submissions with this answer."}},"required":["fieldName","blockType","answerValue","count"]},"description":"How often each answer was submitted."},"FunnelAnalyticsTimeseries":{"type":"object","properties":{"granularity":{"type":"string","enum":["hour","day","week"],"description":"The bucket size of the series."},"since":{"type":"string","description":"Start of the window the series covers."},"until":{"type":"string","description":"End of the window the series covers."},"points":{"type":"array","items":{"type":"object","properties":{"bucket":{"type":"string","description":"The bucket's start as wall-clock time without a zone (e.g. '2026-06-03 14:00:00'): UTC for the MCP tools, the organization's timezone for the REST endpoint."},"starts":{"type":"number","description":"Sessions that started in the bucket."},"completions":{"type":"number","description":"Sessions that submitted in the bucket."},"conversionRate":{"type":"number","description":"The bucket's completions out of its starts, as a percentage with one decimal."}},"required":["bucket","starts","completions","conversionRate"]},"description":"The buckets, oldest first."}},"required":["granularity","since","until","points"]},"LandingPageAnalyticsOverview":{"type":"object","properties":{"current":{"type":"object","properties":{"visitors":{"type":"number","description":"Visitors: people on the Landing page, counted once per day."},"visits":{"type":"number","description":"Visits that started in the window."},"pageviews":{"type":"number","description":"Pageviews: loads of the Landing page."},"bounceRate":{"type":"number","description":"Share of Visits that bounced, with at most one Pageview and no Interaction, as a percentage."},"avgDurationMs":{"type":"number","description":"Average Visit duration, in milliseconds."},"medianDurationMs":{"type":"number","description":"Median Visit duration, in milliseconds."},"conversions":{"type":"number","description":"Conversions: Visits with at least one form submission."},"conversionRate":{"type":"number","description":"Share of Visits that converted, as a percentage."},"durationCoverage":{"type":"number","description":"Share of Visits with at least one `page_left`, so a duration is measured, as a percentage."}},"required":["visitors","visits","pageviews","bounceRate","avgDurationMs","medianDurationMs","conversions","conversionRate","durationCoverage"],"description":"The metrics over the requested window."},"previous":{"type":"object","nullable":true,"properties":{"visitors":{"type":"number","description":"Visitors: people on the Landing page, counted once per day."},"visits":{"type":"number","description":"Visits that started in the window."},"pageviews":{"type":"number","description":"Pageviews: loads of the Landing page."},"bounceRate":{"type":"number","description":"Share of Visits that bounced, with at most one Pageview and no Interaction, as a percentage."},"avgDurationMs":{"type":"number","description":"Average Visit duration, in milliseconds."},"medianDurationMs":{"type":"number","description":"Median Visit duration, in milliseconds."},"conversions":{"type":"number","description":"Conversions: Visits with at least one form submission."},"conversionRate":{"type":"number","description":"Share of Visits that converted, as a percentage."},"durationCoverage":{"type":"number","description":"Share of Visits with at least one `page_left`, so a duration is measured, as a percentage."}},"required":["visitors","visits","pageviews","bounceRate","avgDurationMs","medianDurationMs","conversions","conversionRate","durationCoverage"],"description":"The same metrics over the window just before, for comparison; null for all time."}},"required":["current","previous"]},"LandingPageAnalyticsAcquisition":{"type":"object","properties":{"referrers":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"The value, with a label such as '(direct)' for an empty one."},"total":{"type":"number","description":"Visits with this value."}},"required":["value","total"]},"description":"Visits per first-touch referrer host, most first."},"utmSources":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"The value, with a label such as '(direct)' for an empty one."},"total":{"type":"number","description":"Visits with this value."}},"required":["value","total"]},"description":"Visits per first-touch utm_source, most first."},"utmMediums":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"The value, with a label such as '(direct)' for an empty one."},"total":{"type":"number","description":"Visits with this value."}},"required":["value","total"]},"description":"Visits per first-touch utm_medium, most first."},"utmCampaigns":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"The value, with a label such as '(direct)' for an empty one."},"total":{"type":"number","description":"Visits with this value."}},"required":["value","total"]},"description":"Visits per first-touch utm_campaign, most first."},"utmTerms":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"The value, with a label such as '(direct)' for an empty one."},"total":{"type":"number","description":"Visits with this value."}},"required":["value","total"]},"description":"Visits per first-touch utm_term, most first."},"utmContents":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"The value, with a label such as '(direct)' for an empty one."},"total":{"type":"number","description":"Visits with this value."}},"required":["value","total"]},"description":"Visits per first-touch utm_content, most first."},"countries":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"The value, with a label such as '(direct)' for an empty one."},"total":{"type":"number","description":"Visits with this value."}},"required":["value","total"]},"description":"Visits per first-touch country, most first."},"devices":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"The value, with a label such as '(direct)' for an empty one."},"total":{"type":"number","description":"Visits with this value."}},"required":["value","total"]},"description":"Visits per first-touch device type, most first."},"browsers":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"The value, with a label such as '(direct)' for an empty one."},"total":{"type":"number","description":"Visits with this value."}},"required":["value","total"]},"description":"Visits per first-touch browser, most first."},"oses":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"The value, with a label such as '(direct)' for an empty one."},"total":{"type":"number","description":"Visits with this value."}},"required":["value","total"]},"description":"Visits per first-touch OS, most first."},"hours":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"number","description":"The weekday, 1 for Monday to 7 for Sunday."},"hour":{"type":"number","description":"The first hour of a two-hour bucket (0, 2, …, 22) in the organization's timezone."},"visits":{"type":"number","description":"Visits that started in this two-hour bucket."}},"required":["weekday","hour","visits"]},"description":"Visits by weekday and two-hour bucket, in the organization's timezone."}},"required":["referrers","utmSources","utmMediums","utmCampaigns","utmTerms","utmContents","countries","devices","browsers","oses","hours"]},"LandingPageAnalyticsBehaviour":{"type":"object","properties":{"viewedVisits":{"type":"number","description":"Visits with at least one Pageview: the denominator of Block reach."},"blocks":{"type":"array","items":{"type":"object","properties":{"blockId":{"type":"string","description":"The Block's id."},"label":{"type":"string","description":"The Block's label, as the analytics page shows it."},"blockType":{"type":"string","description":"The Block's type, e.g. 'lp-hero'."},"index":{"type":"number","nullable":true,"description":"Position on the Published version of the page; null for a Stale block."},"stale":{"type":"boolean","description":"Whether this is a Stale block: Visits reached it, but it is no longer on the Published version."},"reachedVisits":{"type":"number","description":"Visits in which the Block came into view."},"reach":{"type":"number","description":"Block reach: the share of viewed Visits, as a percentage."}},"required":["blockId","label","blockType","index","stale","reachedVisits","reach"]},"description":"How far Visits got down the page, Block by Block, in page order."},"ctas":{"type":"array","items":{"type":"object","properties":{"blockId":{"type":"string","description":"The Block the CTA is in."},"label":{"type":"string","description":"The CTA's text."},"href":{"type":"string","description":"Where the CTA links to."},"clicks":{"type":"number","description":"Clicks on the CTA."},"visits":{"type":"number","description":"Visits with at least one click on it."}},"required":["blockId","label","href","clicks","visits"]},"description":"Clicks on CTAs."},"outbound":{"type":"array","items":{"type":"object","properties":{"host":{"type":"string","description":"The host the link leads to."},"clicks":{"type":"number","description":"Clicks on links to the host."},"visits":{"type":"number","description":"Visits with at least one such click."}},"required":["host","clicks","visits"]},"description":"Clicks on links that leave the page, per host."},"conversions":{"type":"object","properties":{"total":{"type":"object","properties":{"startedVisits":{"type":"number","description":"Visits that started an embedded Funnel."},"submittedVisits":{"type":"number","description":"Visits that submitted an embedded Funnel."},"conversionRate":{"type":"number","description":"Share of all Visits that converted, as in the overview, as a percentage."}},"required":["startedVisits","submittedVisits","conversionRate"],"description":"Over every embedded Funnel."},"byFunnel":{"type":"array","items":{"type":"object","properties":{"funnelId":{"type":"string","description":"The Funnel's id."},"funnelName":{"type":"string","description":"The Funnel's name."},"isCurrent":{"type":"boolean","default":false,"description":"Whether the Funnel is embedded in the Published version and not deleted. False from an API that predates the field."},"startedVisits":{"type":"number","description":"Visits that started this Funnel."},"submittedVisits":{"type":"number","description":"Visits that submitted this Funnel."}},"required":["funnelId","funnelName","startedVisits","submittedVisits"]},"description":"Per embedded Funnel."}},"required":["total","byFunnel"],"description":"Starts and submissions of the embedded Funnels."}},"required":["viewedVisits","blocks","ctas","outbound","conversions"]},"LandingPageAnalyticsTimeseries":{"type":"object","properties":{"granularity":{"type":"string","enum":["hour","day","week"],"description":"The bucket size of the series."},"since":{"type":"string","description":"Start of the window."},"until":{"type":"string","description":"End of the window."},"points":{"type":"array","items":{"type":"object","properties":{"bucket":{"type":"string","description":"The bucket's start as wall-clock text in the organization's timezone, e.g. '2026-06-03 00:00:00'."},"visitors":{"type":"number","description":"Visitors, unique within the bucket, so buckets don't sum to the window's total."},"visits":{"type":"number","description":"Visits that started in the bucket."},"pageviews":{"type":"number","description":"Pageviews in the bucket."},"bounceRate":{"type":"number","description":"Share of Visits that bounced, as a percentage."},"avgDurationMs":{"type":"number","description":"Average Visit duration, in milliseconds."},"conversions":{"type":"number","description":"Visits that converted."},"conversionRate":{"type":"number","description":"Share of Visits that converted, as a percentage."}},"required":["bucket","visitors","visits","pageviews","bounceRate","avgDurationMs","conversions","conversionRate"]},"description":"The overview metrics per bucket, by Visit start."},"publishes":{"type":"array","items":{"type":"object","properties":{"version":{"type":"number","description":"The Version's number."},"publishedAt":{"type":"string","description":"When the Version was published, as a UTC ISO datetime."},"source":{"type":"string","enum":["experiment_winner"],"description":"Set when the Version is an Experiment's Winner; absent for an ordinary publish."},"experiment":{"type":"object","properties":{"experimentId":{"type":"string","description":"The Experiment's id."},"number":{"type":"number","description":"The Experiment's number among the page's Experiments, as in \"A/B-Test 1\"."},"letter":{"type":"string","enum":["A","B","C"],"description":"The letter of the Test variant that won."}},"required":["experimentId","number","letter"],"description":"The Experiment whose Winner this Version is."}},"required":["version","publishedAt"]},"description":"The page's publishes within the window, oldest first."}},"required":["granularity","since","until","points","publishes"]},"MessageAnalyticsOverview":{"type":"object","properties":{"current":{"type":"object","properties":{"sent":{"type":"number","description":"Deliveries the provider accepted."},"delivered":{"type":"object","properties":{"count":{"type":"number","description":"Deliveries that reached the state."},"rate":{"type":"number","nullable":true,"description":"count as a percentage of the state's denominator, to one decimal; null when the denominator is zero."}},"required":["count","rate"],"description":"Deliveries the provider reports as delivered, over Sent."},"opened":{"type":"object","properties":{"count":{"type":"number","description":"Deliveries that reached the state."},"rate":{"type":"number","nullable":true,"description":"count as a percentage of the state's denominator, to one decimal; null when the denominator is zero."}},"required":["count","rate"],"description":"Deliveries with at least one human open or one click, over Delivered."},"clicked":{"type":"object","properties":{"count":{"type":"number","description":"Deliveries that reached the state."},"rate":{"type":"number","nullable":true,"description":"count as a percentage of the state's denominator, to one decimal; null when the denominator is zero."}},"required":["count","rate"],"description":"Deliveries with at least one link click, over Delivered."},"bounced":{"type":"object","properties":{"count":{"type":"number","description":"Deliveries that reached the state."},"rate":{"type":"number","nullable":true,"description":"count as a percentage of the state's denominator, to one decimal; null when the denominator is zero."}},"required":["count","rate"],"description":"Deliveries the provider bounced or dropped, over Sent."},"unsubscribed":{"type":"object","properties":{"count":{"type":"number","description":"Deliveries that reached the state."},"rate":{"type":"number","nullable":true,"description":"count as a percentage of the state's denominator, to one decimal; null when the denominator is zero."}},"required":["count","rate"],"description":"Deliveries whose unsubscribe link the lead used, over Delivered."}},"required":["sent","delivered","opened","clicked","bounced","unsubscribed"],"description":"The stat-card figures of the window."},"secondary":{"type":"object","properties":{"failed":{"type":"number","description":"Deliveries that failed before the provider accepted them; keeps a window with only failed sends from reading as empty."},"machineOpened":{"type":"number","description":"Deliveries whose only opens are machine opens."},"clickToOpen":{"type":"object","properties":{"count":{"type":"number","description":"Deliveries that reached the state."},"rate":{"type":"number","nullable":true,"description":"count as a percentage of the state's denominator, to one decimal; null when the denominator is zero."}},"required":["count","rate"],"description":"Clicked Deliveries, over Opened."},"bounceSplit":{"type":"object","properties":{"hard":{"type":"number","description":"Hard-bounced Deliveries."},"soft":{"type":"number","description":"Soft-bounced (blocked) Deliveries."},"dropped":{"type":"number","description":"Deliveries the provider dropped."}},"required":["hard","soft","dropped"],"description":"How the Bounced Deliveries split."},"spamReported":{"type":"number","description":"Deliveries the lead reported as spam."}},"required":["failed","machineOpened","clickToOpen","bounceSplit","spamReported"],"description":"The secondary figures of the window."}},"required":["current","secondary"]},"MessageAnalyticsTimeseries":{"type":"object","properties":{"granularity":{"type":"string","enum":["hour","day","week"],"description":"The bucket size, which follows from the window."},"since":{"type":"string","description":"The window's start, as UTC ISO."},"until":{"type":"string","description":"The window's end, exclusive, as UTC ISO."},"points":{"type":"array","items":{"type":"object","properties":{"bucket":{"type":"string","description":"The bucket's start as Organization-local wall-clock text, e.g. \"2026-06-03 00:00:00\"."},"sent":{"type":"number","description":"Deliveries sent in the bucket."},"delivered":{"type":"number","description":"Deliveries sent in the bucket that were delivered."},"opened":{"type":"number","description":"Deliveries sent in the bucket that were opened."},"clicked":{"type":"number","description":"Deliveries sent in the bucket that were clicked."}},"required":["bucket","sent","delivered","opened","clicked"]},"description":"Every bucket of the window, zeros included, oldest first. All time starts at the first bucket with a Delivery, so it is empty when there is none."}},"required":["granularity","since","until","points"]},"MessageAnalyticsFlows":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"sourceId":{"type":"string","description":"The id of the Flow that sent the Deliveries."},"stepId":{"type":"string","description":"The id of the Flow step that sent them."},"flow":{"type":"object","nullable":true,"properties":{"id":{"type":"string","description":"The Flow's id."},"name":{"type":"string","description":"The Flow's name."},"step":{"type":"number","nullable":true,"description":"The step's position in the Flow, from 1; null when the Flow sends the Message only once, so the Flow's name alone labels the row."}},"required":["id","name","step"],"description":"The Flow and its step; null when the Flow or its step no longer exists. The row keeps its numbers, so the rows still add up to the stat cards."},"totals":{"type":"object","properties":{"sent":{"type":"number","description":"Deliveries the provider accepted."},"delivered":{"type":"object","properties":{"count":{"type":"number","description":"Deliveries that reached the state."},"rate":{"type":"number","nullable":true,"description":"count as a percentage of the state's denominator, to one decimal; null when the denominator is zero."}},"required":["count","rate"],"description":"Deliveries the provider reports as delivered, over Sent."},"opened":{"type":"object","properties":{"count":{"type":"number","description":"Deliveries that reached the state."},"rate":{"type":"number","nullable":true,"description":"count as a percentage of the state's denominator, to one decimal; null when the denominator is zero."}},"required":["count","rate"],"description":"Deliveries with at least one human open or one click, over Delivered."},"clicked":{"type":"object","properties":{"count":{"type":"number","description":"Deliveries that reached the state."},"rate":{"type":"number","nullable":true,"description":"count as a percentage of the state's denominator, to one decimal; null when the denominator is zero."}},"required":["count","rate"],"description":"Deliveries with at least one link click, over Delivered."},"bounced":{"type":"object","properties":{"count":{"type":"number","description":"Deliveries that reached the state."},"rate":{"type":"number","nullable":true,"description":"count as a percentage of the state's denominator, to one decimal; null when the denominator is zero."}},"required":["count","rate"],"description":"Deliveries the provider bounced or dropped, over Sent."},"unsubscribed":{"type":"object","properties":{"count":{"type":"number","description":"Deliveries that reached the state."},"rate":{"type":"number","nullable":true,"description":"count as a percentage of the state's denominator, to one decimal; null when the denominator is zero."}},"required":["count","rate"],"description":"Deliveries whose unsubscribe link the lead used, over Delivered."}},"required":["sent","delivered","opened","clicked","bounced","unsubscribed"],"description":"The stat-card figures of this Flow step's Deliveries."}},"required":["sourceId","stepId","flow","totals"]},"description":"One row per Flow step that sent the Message in the window."}},"required":["rows"]},"MessageAnalyticsLinks":{"type":"object","properties":{"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"The clicked URL without its query string and fragment."},"exampleUrl":{"type":"string","description":"One full URL as it was clicked, query string and fragment included."},"deliveries":{"type":"number","description":"Deliveries that clicked the link at least once."},"rate":{"type":"number","nullable":true,"description":"deliveries as a percentage of the window's Delivered, to one decimal; null when nothing was delivered."}},"required":["url","exampleUrl","deliveries","rate"]},"description":"The clicked links, most-clicked first."},"truncated":{"type":"boolean","description":"Whether more links were clicked than the response lists."}},"required":["links","truncated"]},"LandingPageList":{"type":"object","properties":{"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The item's id."},"name":{"type":"string","description":"The item's name."},"created_at":{"type":"string","description":"When the item was created."},"updated_at":{"type":"string","description":"When the item was last changed."},"is_published":{"type":"boolean","default":false,"description":"Whether the item has a Published version."}},"required":["id","name","created_at"]},"description":"The page of the Organization's Landing pages."},"total":{"type":"number","description":"Landing pages that match, on every page."}},"required":["pages","total"]},"LandingPageVersionList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Version's id."},"version":{"type":"number","description":"The Version's number, in publishing order."},"publishedAt":{"type":"string","description":"When the Version was published, as an ISO datetime."},"publishedBy":{"type":"string","nullable":true,"format":"uuid","description":"The User who published it; null when unknown."},"publisherName":{"type":"string","nullable":true,"description":"The publisher's name, or email without one; null when unknown."},"experimentWinner":{"type":"object","properties":{"experimentId":{"type":"string","format":"uuid","description":"The Experiment's id."},"number":{"type":"integer","description":"The Experiment's number among the page's Experiments, as in \"A/B-Test 1\"."},"letter":{"type":"string","enum":["A","B","C"],"description":"The letter of the Test variant that won."}},"required":["experimentId","number","letter"],"description":"Set on the Version the Winner of an Experiment published; absent otherwise."}},"required":["id","version","publishedAt","publishedBy","publisherName"]}},"WebsiteList":{"type":"object","properties":{"websites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Website's id."},"name":{"type":"string","description":"The Website's name."},"style_guide":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The Style guide's id."},"name":{"type":"string","nullable":true,"description":"The shared Style guide's name; null for a private one."}},"required":["id","name"],"description":"The Style guide of every Page of the Website; null once it is deleted."},"status":{"type":"string","enum":["draft","live","offline","unpublished_changes"],"description":"draft: nothing ever published. offline: every published Page was taken offline. unpublished_changes: a Page is live with newer Draft changes, or was never published. live: every Page that isn't offline is published, with no Unpublished changes."},"page_count":{"type":"integer","minimum":0,"description":"How many Pages it has."},"home_page_id":{"type":"string","nullable":true,"format":"uuid","description":"The Startseite, the Page at `/`; null when the Website has none."},"address":{"type":"object","properties":{"domain":{"type":"object","nullable":true,"properties":{"asset_id":{"type":"string","format":"uuid","description":"The Domain's asset id."},"hostname":{"type":"string","description":"The Domain's hostname."},"verified":{"type":"boolean","description":"Whether the Domain is verified."}},"required":["asset_id","hostname","verified"],"description":"The linked Domain; null when the Website has none."},"subdomain":{"type":"string","nullable":true,"description":"The claimed Subdomain label; null when the Website has none."}},"required":["domain","subdomain"],"description":"Where the Website is served; both null on the renderer's own host."},"created_at":{"type":"string","description":"When the Website was created."},"updated_at":{"type":"string","description":"When the Website last changed."}},"required":["id","name","style_guide","status","page_count","home_page_id","address","created_at","updated_at"]},"description":"The Organization's Websites, most recently updated first."}},"required":["websites"]},"Website":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Website's id."},"name":{"type":"string","description":"The Website's name."},"style_guide":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The Style guide's id."},"name":{"type":"string","nullable":true,"description":"The shared Style guide's name; null for a private one."}},"required":["id","name"],"description":"The Style guide of every Page of the Website; null once it is deleted."},"status":{"type":"string","enum":["draft","live","offline","unpublished_changes"],"description":"draft: nothing ever published. offline: every published Page was taken offline. unpublished_changes: a Page is live with newer Draft changes, or was never published. live: every Page that isn't offline is published, with no Unpublished changes."},"page_count":{"type":"integer","minimum":0,"description":"How many Pages it has."},"home_page_id":{"type":"string","nullable":true,"format":"uuid","description":"The Startseite, the Page at `/`; null when the Website has none."},"address":{"type":"object","properties":{"domain":{"type":"object","nullable":true,"properties":{"asset_id":{"type":"string","format":"uuid","description":"The Domain's asset id."},"hostname":{"type":"string","description":"The Domain's hostname."},"verified":{"type":"boolean","description":"Whether the Domain is verified."}},"required":["asset_id","hostname","verified"],"description":"The linked Domain; null when the Website has none."},"subdomain":{"type":"string","nullable":true,"description":"The claimed Subdomain label; null when the Website has none."}},"required":["domain","subdomain"],"description":"Where the Website is served; both null on the renderer's own host."},"created_at":{"type":"string","description":"When the Website was created."},"updated_at":{"type":"string","description":"When the Website last changed."},"pages":{"type":"array","items":{"type":"object","properties":{"landing_page_id":{"type":"string","format":"uuid","description":"The Page's id, which is also its Landing page id."},"name":{"type":"string","description":"The Page's name."},"path":{"type":"string","description":"Canonical: `/` for the Startseite, else `/segment[/segment…]`."},"parent_id":{"type":"string","nullable":true,"format":"uuid","default":null,"description":"The Page this one sits below; null at the top level."},"show_in_menu":{"type":"boolean","default":true,"description":"\"Im Menü zeigen\": whether it is offered when a Menu is built from the Pages."},"adopted":{"type":"boolean","default":false,"description":"Whether it was a Landing page before it was added."},"dataset_id":{"type":"string","nullable":true,"format":"uuid","default":null,"description":"A Dataset Page's Dataset: its path is a pattern (`/zahnarzt/[stadt]`) with one Generated Page per Live Row. Null on a static Page."},"is_published":{"type":"boolean","description":"Whether it has a Published version."},"is_offline":{"type":"boolean","default":false,"description":"Was published, then taken offline. Only publishing this Page on its own brings it back; publishing the whole Website skips it."},"has_unpublished_changes":{"type":"boolean","description":"Whether its Draft differs from its Published version."}},"required":["landing_page_id","name","path","is_published","has_unpublished_changes"]},"description":"In tree order: the Startseite, then each top-level Page followed by the Pages below it, siblings in the order they were arranged."}},"required":["id","name","style_guide","status","page_count","home_page_id","address","created_at","updated_at","pages"]},"DeleteWebsiteInput":{"type":"object","properties":{"pages":{"type":"string","enum":["detach","delete"],"default":"detach","description":"What happens to the Pages: detach keeps them as unpublished Landing pages without an address, delete removes them too."}}},"PublishedWebsitePage":{"type":"object","properties":{"version_id":{"type":"string","format":"uuid","description":"The new Version's id."},"version":{"type":"integer","nullable":true,"description":"The new Version's number."},"website_published":{"type":"boolean","description":"The Website was never published, so its Draft (Layout and Menus) went live with this Page."}},"required":["version_id","version","website_published"]},"PublishedWebsite":{"type":"object","properties":{"page_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The Pages that had Unpublished changes, ordered by path."},"website_published":{"type":"boolean","description":"Whether the Website's Draft (Layout and Menus) went live."}},"required":["page_ids","website_published"]},"WebsiteLayoutState":{"type":"object","properties":{"draft":{"type":"object","additionalProperties":{"nullable":true},"description":"The draft Layout: header, footer, Menus and the breadcrumbs switch."},"published":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The live Layout; null while the Website was never published."},"has_unpublished_changes":{"type":"boolean","description":"Whether the draft Layout differs from the live one."}},"required":["draft","published","has_unpublished_changes"]},"SaveWebsiteLayoutInput":{"type":"object","properties":{"layout":{"type":"object","additionalProperties":{"nullable":true},"description":"The whole Layout, in the shape of the draft the Website's Layout is read as."}},"required":["layout"]},"WebsitePage":{"type":"object","properties":{"landing_page_id":{"type":"string","format":"uuid","description":"The Page's id, which is also its Landing page id."},"name":{"type":"string","description":"The Page's name."},"path":{"type":"string","description":"Canonical: `/` for the Startseite, else `/segment[/segment…]`."},"parent_id":{"type":"string","nullable":true,"format":"uuid","default":null,"description":"The Page this one sits below; null at the top level."},"show_in_menu":{"type":"boolean","default":true,"description":"\"Im Menü zeigen\": whether it is offered when a Menu is built from the Pages."},"adopted":{"type":"boolean","default":false,"description":"Whether it was a Landing page before it was added."},"dataset_id":{"type":"string","nullable":true,"format":"uuid","default":null,"description":"A Dataset Page's Dataset: its path is a pattern (`/zahnarzt/[stadt]`) with one Generated Page per Live Row. Null on a static Page."},"is_published":{"type":"boolean","description":"Whether it has a Published version."},"is_offline":{"type":"boolean","default":false,"description":"Was published, then taken offline. Only publishing this Page on its own brings it back; publishing the whole Website skips it."},"has_unpublished_changes":{"type":"boolean","description":"Whether its Draft differs from its Published version."}},"required":["landing_page_id","name","path","is_published","has_unpublished_changes"]},"AdoptLandingPageInput":{"type":"object","properties":{"landing_page_id":{"type":"string","format":"uuid","description":"The Landing page to adopt."},"parent_id":{"type":"string","nullable":true,"format":"uuid","default":null,"description":"The Page to nest it under; null for the top level."},"segment":{"type":"string","maxLength":200,"description":"Its path segment, slugified by the server; defaults to the slugified Landing page name."}},"required":["landing_page_id"]},"CreatedWebsite":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The new Website's id."},"home_page_id":{"type":"string","format":"uuid","description":"The Startseite every new Website starts with."}},"required":["id","home_page_id"]},"WebsiteCreationError":{"allOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"landing_page_id":{"type":"string","format":"uuid","description":"The Landing page the error is about."},"landing_page":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Landing page's id."},"name":{"type":"string","description":"The Landing page's name."}},"required":["id","name"],"description":"The Landing page that holds the domain root."},"paths":{"type":"array","items":{"type":"string"},"description":"The clashing paths that Landing pages already hold."}}}]},"CreateWebsiteInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"The Website's name."},"site_name":{"type":"string","nullable":true,"maxLength":120,"description":"Appended to Page titles (`Title | Site name`); defaults to the name."},"style_guide_id":{"type":"string","nullable":true,"format":"uuid","description":"A shared Style guide; none gives the Website a new one."},"pages":{"type":"array","items":{"type":"object","properties":{"landing_page_id":{"type":"string","format":"uuid","description":"The Landing page to adopt."},"segment":{"type":"string","maxLength":200,"description":"Its path segment; defaults to its path on its Domain, else its slugified name."}},"required":["landing_page_id"]},"maxItems":200,"default":[],"description":"Existing Landing pages to adopt at the top level, in this order. Their old addresses then redirect (301) to their Website path."},"home_landing_page_id":{"type":"string","nullable":true,"format":"uuid","description":"One of `pages`, adopted as the Startseite instead of an empty one."},"address":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["domain"],"description":"Link a verified Domain."},"asset_id":{"type":"string","format":"uuid","description":"The Domain's asset id."},"root_landing_page":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","enum":["adopt"],"description":"It becomes the Startseite; the former Startseite moves below `/`."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","enum":["move"],"description":"It stays a Landing page, at `path`."},"path":{"type":"string","maxLength":200,"description":"The path the Landing page moves to on the Domain."}},"required":["action","path"]}],"description":"What happens to the Landing page at the Domain root; needed when one holds it."}},"required":["kind","asset_id"]},{"type":"object","properties":{"kind":{"type":"string","enum":["subdomain"],"description":"Claim a Subdomain."},"subdomain":{"type":"string","minLength":1,"maxLength":63,"description":"The Subdomain label, e.g. 'praxis-mueller'."}},"required":["kind","subdomain"]},{"nullable":true}],"description":"Where the Website is served: `{ kind: \"domain\", asset_id }` for a verified Domain (with `root_landing_page` when a Landing page holds its root), or `{ kind: \"subdomain\", subdomain }`. None keeps it on the renderer's host, to decide later."}},"required":["name"]},"WebsiteCreationPlan":{"type":"object","properties":{"pages":{"type":"array","items":{"type":"object","properties":{"landing_page_id":{"type":"string","format":"uuid","description":"The Page's id."},"name":{"type":"string","description":"The Page's name."},"path":{"type":"string","description":"The Page's path on the Website."}},"required":["landing_page_id","name","path"]},"description":"The Website's Pages, in tree order."},"address":{"type":"object","properties":{"domain":{"type":"object","nullable":true,"properties":{"asset_id":{"type":"string","format":"uuid","description":"The Domain's asset id."},"hostname":{"type":"string","description":"The Domain's hostname."},"verified":{"type":"boolean","description":"Whether the Domain is verified."}},"required":["asset_id","hostname","verified"],"description":"The linked Domain; null when the Website has none."},"subdomain":{"type":"string","nullable":true,"description":"The claimed Subdomain label; null when the Website has none."}},"required":["domain","subdomain"],"description":"Where the Website will be served."},"redirects":{"type":"array","items":{"type":"object","properties":{"landing_page_id":{"type":"string","format":"uuid","description":"The adopted Landing page."},"from":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["subdomain"],"description":"It was on a Subdomain."},"subdomain":{"type":"string","description":"The Subdomain label."}},"required":["kind","subdomain"]},{"type":"object","properties":{"kind":{"type":"string","enum":["domain"],"description":"It was on a Domain."},"hostname":{"type":"string","description":"The Domain's hostname."},"path":{"type":"string","description":"Its path on the Domain."}},"required":["kind","hostname","path"]}],"description":"The old address that redirects."},"to":{"type":"string","description":"The Page's path on the Website."}},"required":["landing_page_id","from","to"]},"description":"The move plan: which old addresses permanently redirect where."},"website_published":{"type":"boolean","description":"Whether the Website goes live: an adopted Page is live, so the Website's Layout goes live too."}},"required":["pages","address","redirects","website_published"]},"DatasetList":{"type":"object","properties":{"datasets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Dataset's id."},"key":{"type":"string","description":"Fixed once created. It names the Route Parameter of its Dataset Pages and its Placeholders, and is `website.datasets.<key>` in Liquid."},"name":{"type":"string","description":"The Dataset's name."},"fields":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"text, textarea, richtext, number, image, link, select or switch."},"name":{"type":"string","description":"The field key used in Placeholders: {{<datasetKey>.<name>}}."},"label":{"type":"string","description":"The field's label in the editor."}},"required":["type","name","label"],"additionalProperties":{"nullable":true}},"description":"The Dataset's fields, as template field definitions."},"source":{"type":"string","enum":["manual","references"],"description":"Where its Rows come from. manual: typed in or imported. references: the Website's Referenzen Dataset, one Row per Referenz of the Organization, kept in sync and Live while the Referenz is published; its fields are fixed and its Rows only take a Slug and SEO."},"row_count":{"type":"integer","minimum":0,"description":"How many Rows it has."},"live_row_count":{"type":"integer","minimum":0,"description":"How many of its Rows are Live; the editor adds them up for the Website's Live cap."},"created_at":{"type":"string","description":"When the Dataset was created."},"updated_at":{"type":"string","description":"When the Dataset last changed."}},"required":["id","key","name","fields","source","row_count","live_row_count","created_at","updated_at"]},"description":"The Website's Datasets."}},"required":["datasets"]},"Dataset":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Dataset's id."},"key":{"type":"string","description":"Fixed once created. It names the Route Parameter of its Dataset Pages and its Placeholders, and is `website.datasets.<key>` in Liquid."},"name":{"type":"string","description":"The Dataset's name."},"fields":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"text, textarea, richtext, number, image, link, select or switch."},"name":{"type":"string","description":"The field key used in Placeholders: {{<datasetKey>.<name>}}."},"label":{"type":"string","description":"The field's label in the editor."}},"required":["type","name","label"],"additionalProperties":{"nullable":true}},"description":"The Dataset's fields, as template field definitions."},"source":{"type":"string","enum":["manual","references"],"description":"Where its Rows come from. manual: typed in or imported. references: the Website's Referenzen Dataset, one Row per Referenz of the Organization, kept in sync and Live while the Referenz is published; its fields are fixed and its Rows only take a Slug and SEO."},"row_count":{"type":"integer","minimum":0,"description":"How many Rows it has."},"live_row_count":{"type":"integer","minimum":0,"description":"How many of its Rows are Live; the editor adds them up for the Website's Live cap."},"created_at":{"type":"string","description":"When the Dataset was created."},"updated_at":{"type":"string","description":"When the Dataset last changed."}},"required":["id","key","name","fields","source","row_count","live_row_count","created_at","updated_at"]},"CreateDatasetInput":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40,"description":"The Dataset's key, like `stadt`: letters, digits and _. Fixed once created: it names the Route Parameter of its Dataset Pages ([stadt]) and its Placeholders ({{stadt}} is a Row's Name, {{stadt.<field>}} a field)."},"name":{"type":"string","minLength":1,"maxLength":120,"description":"The Dataset's name."},"fields":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"text, textarea, richtext, number, image, link, select or switch."},"name":{"type":"string","description":"The field key used in Placeholders: {{<datasetKey>.<name>}}."},"label":{"type":"string","description":"The field's label in the editor."}},"required":["type","name","label"],"additionalProperties":{"nullable":true}},"maxItems":30,"default":[],"description":"The Dataset's fields, as template field definitions. A references Dataset ignores them: its fields are fixed."},"source":{"type":"string","enum":["manual","references"],"default":"manual","description":"Where its Rows come from. manual: typed in or imported. references: the Website's Referenzen Dataset, one Row per Referenz of the Organization, kept in sync and Live while the Referenz is published; its fields are fixed and its Rows only take a Slug and SEO."}},"required":["key","name"]},"UpdateDatasetInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"The Dataset's new name."},"fields":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"text, textarea, richtext, number, image, link, select or switch."},"name":{"type":"string","description":"The field key used in Placeholders: {{<datasetKey>.<name>}}."},"label":{"type":"string","description":"The field's label in the editor."}},"required":["type","name","label"],"additionalProperties":{"nullable":true}},"maxItems":30,"description":"The Dataset's fields, as template field definitions. Renaming a label is safe; renaming or removing a name breaks the Placeholders that use it."}}},"DeleteDatasetInput":{"type":"object","properties":{"pages":{"type":"string","enum":["keep","delete"],"default":"keep","description":"What happens to its Dataset Pages: delete removes them; keep is refused while the Dataset has any, as a pattern without its Dataset is never served."}}},"DatasetRowList":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Row's id."},"name":{"type":"string","description":"The Row's Name."},"slug":{"type":"string","description":"The Row's URL segment."},"status":{"type":"string","enum":["draft","live"],"description":"draft: not on the site. live: on the site."},"values":{"type":"object","additionalProperties":{"nullable":true},"description":"Field values by field name."},"seo_title":{"type":"string","nullable":true,"description":"Overrides the Dataset Page's title pattern for this Row; null for none."},"seo_description":{"type":"string","nullable":true,"description":"Overrides the Dataset Page's description pattern for this Row; null for none."},"noindex":{"type":"boolean","description":"Whether search engines are kept from indexing the Row's Generated Pages."},"created_at":{"type":"string","description":"When the Row was created."},"updated_at":{"type":"string","description":"When the Row last changed."}},"required":["id","name","slug","status","values","seo_title","seo_description","noindex","created_at","updated_at"]},"description":"The Dataset's Rows, by name."}},"required":["rows"]},"DatasetRow":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Row's id."},"name":{"type":"string","description":"The Row's Name."},"slug":{"type":"string","description":"The Row's URL segment."},"status":{"type":"string","enum":["draft","live"],"description":"draft: not on the site. live: on the site."},"values":{"type":"object","additionalProperties":{"nullable":true},"description":"Field values by field name."},"seo_title":{"type":"string","nullable":true,"description":"Overrides the Dataset Page's title pattern for this Row; null for none."},"seo_description":{"type":"string","nullable":true,"description":"Overrides the Dataset Page's description pattern for this Row; null for none."},"noindex":{"type":"boolean","description":"Whether search engines are kept from indexing the Row's Generated Pages."},"created_at":{"type":"string","description":"When the Row was created."},"updated_at":{"type":"string","description":"When the Row last changed."}},"required":["id","name","slug","status","values","seo_title","seo_description","noindex","created_at","updated_at"]},"CreateDatasetRowInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"The Row's Name, which {{<datasetKey>}} shows."},"slug":{"type":"string","minLength":1,"maxLength":64,"description":"The Row's URL segment, normalized like a path segment; generated from the Name when left out. A new Slug redirects from the old one."},"status":{"type":"string","enum":["draft","live"],"description":"draft (not on the site) or live (on the site as soon as it is saved). A Row goes live only once every field its Dataset Pages use is filled."},"values":{"type":"object","additionalProperties":{"nullable":true},"description":"Field values by field name; replaces all of them."},"seo_title":{"type":"string","nullable":true,"maxLength":200,"description":"Overrides the Dataset Page's title pattern for this Row."},"seo_description":{"type":"string","nullable":true,"maxLength":500,"description":"Overrides the Dataset Page's description pattern for this Row."},"noindex":{"type":"boolean","description":"Keeps search engines from indexing the Row's Generated Pages."}},"required":["name"]},"UpdateDatasetRowInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"The Row's Name, which {{<datasetKey>}} shows."},"slug":{"type":"string","minLength":1,"maxLength":64,"description":"The Row's URL segment, normalized like a path segment; generated from the Name when left out. A new Slug redirects from the old one."},"status":{"type":"string","enum":["draft","live"],"description":"draft (not on the site) or live (on the site as soon as it is saved). A Row goes live only once every field its Dataset Pages use is filled."},"values":{"type":"object","additionalProperties":{"nullable":true},"description":"Field values by field name; replaces all of them."},"seo_title":{"type":"string","nullable":true,"maxLength":200,"description":"Overrides the Dataset Page's title pattern for this Row."},"seo_description":{"type":"string","nullable":true,"maxLength":500,"description":"Overrides the Dataset Page's description pattern for this Row."},"noindex":{"type":"boolean","description":"Keeps search engines from indexing the Row's Generated Pages."}}},"DeletedDatasetRows":{"type":"object","properties":{"deleted_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The Rows that were deleted."}},"required":["deleted_ids"]},"DeleteDatasetRowsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":5000,"description":"The Rows to delete."}},"required":["ids"]},"DatasetRowImportReport":{"type":"object","properties":{"created":{"type":"integer","minimum":0,"description":"How many Rows were created."},"updated":{"type":"integer","minimum":0,"description":"How many Rows were updated."},"unchanged":{"type":"integer","minimum":0,"description":"Lines that match a Row and change nothing on it."},"skipped":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"line":{"type":"integer","description":"The line in the CSV file; line 1 is the header."},"reason":{"type":"string","enum":["missing_name"],"description":"The line has no Name."}},"required":["line","reason"]},{"type":"object","properties":{"line":{"type":"integer","description":"The line in the CSV file; line 1 is the header."},"reason":{"type":"string","enum":["invalid_slug","duplicate_slug"],"description":"The Slug is invalid, or an earlier line has it."},"slug":{"type":"string","description":"The Slug the line names."}},"required":["line","reason","slug"]},{"type":"object","properties":{"line":{"type":"integer","description":"The line in the CSV file; line 1 is the header."},"reason":{"type":"string","enum":["invalid_value"],"description":"A cell holds no valid value for its field."},"slug":{"type":"string","description":"The Slug the line names."},"column":{"type":"string","description":"The column of the invalid cell."}},"required":["line","reason","slug","column"]}]},"description":"The lines the import did not write, and why."},"kept_draft":{"type":"array","items":{"type":"object","properties":{"line":{"type":"integer","description":"The line in the CSV file; line 1 is the header."},"slug":{"type":"string","description":"The Slug the line names."},"fields":{"type":"array","items":{"type":"string"},"description":"The empty fields that keep it a draft."}},"required":["line","slug","fields"]},"description":"Lines that asked for Live and stay draft, with the empty fields."},"ignored_columns":{"type":"array","items":{"type":"string"},"description":"Header cells that name no column; their cells were not read."}},"required":["created","updated","unchanged","skipped","kept_draft","ignored_columns"]},"ImportDatasetRowsInput":{"type":"object","properties":{"csv":{"type":"string","minLength":1,"description":"The CSV file's text: a header line, then one line per Row."}},"required":["csv"]},"WebsiteDomainSettings":{"type":"object","properties":{"address":{"type":"object","properties":{"domain":{"type":"object","nullable":true,"properties":{"asset_id":{"type":"string","format":"uuid","description":"The Domain's asset id."},"hostname":{"type":"string","description":"The Domain's hostname."},"verified":{"type":"boolean","description":"Whether the Domain is verified."}},"required":["asset_id","hostname","verified"],"description":"The linked Domain; null when the Website has none."},"subdomain":{"type":"string","nullable":true,"description":"The claimed Subdomain label; null when the Website has none."}},"required":["domain","subdomain"],"description":"Where the Website is served now."},"domains":{"type":"array","items":{"type":"object","properties":{"asset_id":{"type":"string","format":"uuid","description":"The Domain's asset id."},"hostname":{"type":"string","description":"The Domain's hostname."},"verified":{"type":"boolean","description":"Whether the Domain is verified."},"website":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The Website's id."},"name":{"type":"string","description":"The Website's name."}},"required":["id","name"],"description":"The Website the Domain serves; null when it serves none."}},"required":["asset_id","hostname","verified","website"]},"description":"The Organization's own Domains, with the Website each one serves."}},"required":["address","domains"]},"WebsiteAddress":{"type":"object","properties":{"domain":{"type":"object","nullable":true,"properties":{"asset_id":{"type":"string","format":"uuid","description":"The Domain's asset id."},"hostname":{"type":"string","description":"The Domain's hostname."},"verified":{"type":"boolean","description":"Whether the Domain is verified."}},"required":["asset_id","hostname","verified"],"description":"The linked Domain; null when the Website has none."},"subdomain":{"type":"string","nullable":true,"description":"The claimed Subdomain label; null when the Website has none."}},"required":["domain","subdomain"]},"WebsiteDomainError":{"allOf":[{"$ref":"#/components/schemas/ApiError"},{"type":"object","properties":{"landing_page":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Landing page's id."},"name":{"type":"string","description":"The Landing page's name."}},"required":["id","name"],"description":"The Landing page that holds the domain root."},"paths":{"type":"array","items":{"type":"string"},"description":"The clashing paths that Landing pages already hold."}}}]},"LinkWebsiteDomainInput":{"type":"object","properties":{"asset_id":{"type":"string","format":"uuid","description":"The verified Domain to link."},"root_landing_page":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","enum":["adopt"],"description":"It becomes the Startseite; the former Startseite moves below `/`."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","enum":["move"],"description":"It stays a Landing page, at `path`."},"path":{"type":"string","maxLength":200,"description":"The path the Landing page moves to on the Domain."}},"required":["action","path"]}],"description":"What happens to the Landing page at the Domain root; needed when one holds it."}},"required":["asset_id"]},"ClaimWebsiteSubdomainInput":{"type":"object","properties":{"subdomain":{"type":"string","minLength":1,"maxLength":63,"description":"The Subdomain label to claim, e.g. 'praxis-mueller'."}},"required":["subdomain"]},"CreateWebsitePageInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"The Page's name."},"parent_id":{"type":"string","nullable":true,"format":"uuid","default":null,"description":"The Page to nest it under; null for the top level."},"segment":{"type":"string","maxLength":200,"description":"The Page's own path segment below its parent, slugified by the server (`leistungen`). Defaults to the slugified name. A Dataset Page's segment holds its Route Parameter named by the Dataset's key, as a whole segment: `zahnarzt/[stadt]`; it defaults to the parameter alone."},"dataset_id":{"type":"string","nullable":true,"format":"uuid","default":null,"description":"A Dataset of the Website, which makes the new Page a Dataset Page."}},"required":["name"]},"ReorderWebsitePagesInput":{"type":"object","properties":{"landing_page_ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":1000,"description":"Pages in their new order; every Page's position among its siblings follows it."}},"required":["landing_page_ids"]},"UpdateWebsitePageInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"The Page's name."},"parent_id":{"type":"string","nullable":true,"format":"uuid","description":"The Page to nest it under; null for the top level."},"segment":{"type":"string","maxLength":200,"description":"The Page's own path segment below its parent, slugified by the server (`leistungen`). A Dataset Page's segment holds its Route Parameter named by the Dataset's key, as a whole segment: `zahnarzt/[stadt]`."},"show_in_menu":{"type":"boolean","description":"\"Im Menü zeigen\": whether it shows in Menus built from the Pages."}}},"WebsiteRedirectList":{"type":"object","properties":{"redirects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The redirect's id."},"from_path":{"type":"string","description":"The old path it redirects."},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["page"],"description":"A Page of the Website."},"landing_page_id":{"type":"string","format":"uuid","description":"The Page's id."},"name":{"type":"string","description":"The Page's name."},"path":{"type":"string","description":"The Page's current path."}},"required":["kind","landing_page_id","name","path"]},{"type":"object","properties":{"kind":{"type":"string","enum":["row"],"description":"A Row's Generated Page; it follows the Row's Slug."},"landing_page_id":{"type":"string","format":"uuid","description":"The Dataset Page's id."},"row_id":{"type":"string","format":"uuid","description":"The Row's id."},"name":{"type":"string","description":"The Row's Name."},"path":{"type":"string","description":"The Row's Generated Page now."}},"required":["kind","landing_page_id","row_id","name","path"]},{"type":"object","properties":{"kind":{"type":"string","enum":["path"],"description":"Another path on the Website."},"path":{"type":"string","description":"The path it leads to."}},"required":["kind","path"]}],"description":"Where it leads now."},"manual":{"type":"boolean","description":"Added by hand, not left behind by a Page move."},"created_at":{"type":"string","description":"When the redirect was added."}},"required":["id","from_path","target","manual","created_at"]},"description":"Every redirect (301) of the Website by old path: the automatic ones from path and Slug changes and adoptions, and those added by hand."}},"required":["redirects"]},"CreateWebsiteRedirectInput":{"type":"object","properties":{"from_path":{"type":"string","maxLength":500,"description":"The old path, like /alte-seite."},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["page"],"description":"A Page of the Website."},"landing_page_id":{"type":"string","format":"uuid","description":"The Page's id."}},"required":["kind","landing_page_id"]},{"type":"object","properties":{"kind":{"type":"string","enum":["row"],"description":"A Row's Generated Page; it follows the Row's Slug."},"landing_page_id":{"type":"string","format":"uuid","description":"The Dataset Page's id."},"row_id":{"type":"string","format":"uuid","description":"The Row's id."}},"required":["kind","landing_page_id","row_id"]},{"type":"object","properties":{"kind":{"type":"string","enum":["path"],"description":"Another path on the Website."},"path":{"type":"string","minLength":1,"maxLength":2000,"description":"The path it leads to, like /neue-seite."}},"required":["kind","path"]}],"description":"Where the old path leads: a Page, a Row's Generated Page, or another path on the Website."}},"required":["from_path","target"]},"WebsiteSeo":{"type":"object","properties":{"site_name":{"type":"string","nullable":true,"description":"Appended to Page titles as \"Title | Site name\"; null for none."},"default_og_image":{"type":"string","nullable":true,"format":"uuid","description":"The file Asset id of the image Pages without their own share; null for none."},"pages":{"type":"array","items":{"type":"object","properties":{"landing_page_id":{"type":"string","format":"uuid","description":"The Page's id."},"name":{"type":"string","description":"The Page's name."},"path":{"type":"string","description":"Canonical: `/` for the Startseite, else `/segment[/segment…]`."},"title":{"type":"string","description":"The Page's title."},"meta_description":{"type":"string","nullable":true,"description":"The Page's meta description; null for none."},"page_indexed":{"type":"boolean","description":"Whether search engines may index the Page."},"og_image":{"type":"string","nullable":true,"format":"uuid","description":"The Page's sharing image, a file Asset id; null shares the Website's default image."},"og_image_alt":{"type":"string","nullable":true,"description":"The sharing image's alt text; null for none."},"site_name_suffix":{"type":"boolean","description":"Whether the site name is appended to the title; off sends the title without it."},"url":{"type":"string","description":"The Page's absolute self-canonical url."},"variables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The Variable's name."},"default_value":{"type":"string","description":"The value it shows without a URL parameter."}},"required":["name","default_value"]},"description":"The Page's Variables: their Placeholders resolve in its title and description too, to the default without URL parameters. Website Pages only keep those they had as a Landing page."},"broken_page_links":{"type":"integer","minimum":0,"description":"Links in the Page's Draft to Pages that no longer exist."},"dataset":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The Dataset's id."},"key":{"type":"string","description":"The Dataset's key."},"fields":{"type":"array","items":{"type":"string"},"description":"The Dataset's field names."},"content_fields":{"type":"array","items":{"type":"string"},"description":"The fields the Page's Draft content uses."},"shadowed_rows":{"type":"integer","minimum":0,"description":"Live Rows whose Generated Page a static Page holds."}},"required":["id","key","fields","content_fields","shadowed_rows"],"description":"A Dataset Page's Dataset, for its warnings; null on a static Page. Its title and description are patterns with Row Placeholders."}},"required":["landing_page_id","name","path","title","meta_description","page_indexed","og_image","og_image_alt","site_name_suffix","url","variables","broken_page_links","dataset"]},"description":"Every Page's search settings, ordered by path."}},"required":["site_name","default_og_image","pages"]},"UpdateWebsiteSeoInput":{"type":"object","properties":{"site_name":{"type":"string","nullable":true,"maxLength":120,"description":"Appended to Page titles; null or blank for none."},"default_og_image":{"type":"string","nullable":true,"format":"uuid","description":"The default sharing image, a file Asset id; null for none."}}},"WebsitePageSeo":{"type":"object","properties":{"landing_page_id":{"type":"string","format":"uuid","description":"The Page's id."},"name":{"type":"string","description":"The Page's name."},"path":{"type":"string","description":"Canonical: `/` for the Startseite, else `/segment[/segment…]`."},"title":{"type":"string","description":"The Page's title."},"meta_description":{"type":"string","nullable":true,"description":"The Page's meta description; null for none."},"page_indexed":{"type":"boolean","description":"Whether search engines may index the Page."},"og_image":{"type":"string","nullable":true,"format":"uuid","description":"The Page's sharing image, a file Asset id; null shares the Website's default image."},"og_image_alt":{"type":"string","nullable":true,"description":"The sharing image's alt text; null for none."},"site_name_suffix":{"type":"boolean","description":"Whether the site name is appended to the title; off sends the title without it."},"url":{"type":"string","description":"The Page's absolute self-canonical url."},"variables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The Variable's name."},"default_value":{"type":"string","description":"The value it shows without a URL parameter."}},"required":["name","default_value"]},"description":"The Page's Variables: their Placeholders resolve in its title and description too, to the default without URL parameters. Website Pages only keep those they had as a Landing page."},"broken_page_links":{"type":"integer","minimum":0,"description":"Links in the Page's Draft to Pages that no longer exist."},"dataset":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The Dataset's id."},"key":{"type":"string","description":"The Dataset's key."},"fields":{"type":"array","items":{"type":"string"},"description":"The Dataset's field names."},"content_fields":{"type":"array","items":{"type":"string"},"description":"The fields the Page's Draft content uses."},"shadowed_rows":{"type":"integer","minimum":0,"description":"Live Rows whose Generated Page a static Page holds."}},"required":["id","key","fields","content_fields","shadowed_rows"],"description":"A Dataset Page's Dataset, for its warnings; null on a static Page. Its title and description are patterns with Row Placeholders."}},"required":["landing_page_id","name","path","title","meta_description","page_indexed","og_image","og_image_alt","site_name_suffix","url","variables","broken_page_links","dataset"]},"UpdateWebsitePageSeoInput":{"type":"object","properties":{"title":{"type":"string","maxLength":200,"description":"The Page's title. On a Dataset Page it may hold Placeholders like {{stadt}}."},"meta_description":{"type":"string","nullable":true,"maxLength":500,"description":"The Page's meta description; null or blank for none. On a Dataset Page it may hold Placeholders like {{stadt}}."},"page_indexed":{"type":"boolean","description":"Whether search engines may index the Page. Pages are indexed by default."},"og_image":{"type":"string","nullable":true,"format":"uuid","description":"The Page's sharing image, a file Asset id; null shares the Website's default image."},"og_image_alt":{"type":"string","nullable":true,"maxLength":300,"description":"The sharing image's alt text; null or blank for none."},"site_name_suffix":{"type":"boolean","description":"Whether the site name is appended to the title."}}},"LandingPageWebsite":{"type":"object","properties":{"website_id":{"type":"string","nullable":true,"format":"uuid","description":"The Website the Landing page is a Page of; null for a standalone Landing page."}},"required":["website_id"]},"WebsiteSettings":{"type":"object","properties":{"name":{"type":"string","description":"The Website's name."},"favicon":{"type":"object","nullable":true,"properties":{"asset_id":{"type":"string","format":"uuid","description":"The favicon's file Asset id."},"url":{"type":"string","description":"The favicon's url."}},"required":["asset_id","url"],"description":"The favicon; null shows the browser's default icon."},"imprint_asset_id":{"type":"string","nullable":true,"format":"uuid","description":"The imprint Legal text's Asset id; null shows the Organization's default imprint."},"privacy_policy_asset_id":{"type":"string","nullable":true,"format":"uuid","description":"The privacy policy Legal text's Asset id; null shows the Organization's default privacy policy."},"legal_contact":{"type":"string","nullable":true,"description":"The legal contact email address; null for none."},"cookie_banner_enabled":{"type":"boolean","description":"Whether the built-in cookie banner shows."},"cookie_banner_layout":{"type":"string","enum":["box","cloud","bar"],"description":"The built-in cookie banner's layout."},"usercentrics_settings_id":{"type":"string","nullable":true,"description":"A Usercentrics settings id, whose banner replaces the built-in cookie banner; null for none."},"legal_documents":{"type":"array","items":{"type":"object","properties":{"asset_id":{"type":"string","format":"uuid","description":"The Legal text's Asset id."},"kind":{"type":"string","enum":["IMPRINT","PRIVACY"],"description":"Imprint or privacy policy."},"name":{"type":"string","description":"The Legal text's name."},"external_url":{"type":"string","nullable":true,"description":"Set for a Legal text hosted elsewhere."}},"required":["asset_id","kind","name","external_url"]},"description":"The Organization's Legal texts, which the settings can pick."},"organization_defaults":{"type":"object","properties":{"IMPRINT":{"type":"string","nullable":true,"format":"uuid","description":"The Organization's default imprint; null for none."},"PRIVACY":{"type":"string","nullable":true,"format":"uuid","description":"The Organization's default privacy policy; null for none."}},"required":["IMPRINT","PRIVACY"],"description":"The Legal texts a Website without its own one shows."}},"required":["name","favicon","imprint_asset_id","privacy_policy_asset_id","legal_contact","cookie_banner_enabled","cookie_banner_layout","usercentrics_settings_id","legal_documents","organization_defaults"]},"UpdateWebsiteSettingsInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"The Website's name."},"favicon_asset_id":{"type":"string","nullable":true,"format":"uuid","description":"The favicon, a file Asset id; null shows the browser's default icon."},"imprint_asset_id":{"type":"string","nullable":true,"format":"uuid","description":"The imprint Legal text's Asset id; null falls back to the Organization's default."},"privacy_policy_asset_id":{"type":"string","nullable":true,"format":"uuid","description":"The privacy policy Legal text's Asset id; null falls back to the Organization's default."},"legal_contact":{"anyOf":[{"type":"string","format":"email"},{"type":"string","enum":[""]},{"nullable":true}],"description":"The legal contact email address; null or blank for none."},"cookie_banner_enabled":{"type":"boolean","description":"Whether the built-in cookie banner shows."},"cookie_banner_layout":{"type":"string","enum":["box","cloud","bar"],"description":"The built-in cookie banner's layout."},"usercentrics_settings_id":{"type":"string","nullable":true,"maxLength":64,"description":"A Usercentrics settings id, whose banner replaces the built-in cookie banner; null or blank for none."}}},"ChangeReport":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Change report's id."},"landingPageId":{"type":"string","format":"uuid","description":"The Landing page's id."},"rangeFrom":{"type":"string","format":"date","description":"The Reporting Range's first day, a calendar date in Berlin."},"rangeTo":{"type":"string","format":"date","description":"The Reporting Range's last day, a calendar date in Berlin."},"baselineVersionId":{"type":"string","nullable":true,"format":"uuid","description":"The version live when the range started, which the changes are compared with; null when the page was created inside the range."},"lastVersionId":{"type":"string","nullable":true,"format":"uuid","description":"The last version published in the range; null when nothing was published in it (\"Keine Änderungen\")."},"status":{"type":"string","enum":["queued","running","done","failed"],"description":"Where the Change report stands: queued, running, done or failed."},"type":{"type":"string","enum":["visual","text"],"description":"How the Change report shows its Change sets: visual (before and after screenshots with a shortened change list) or text (every change in full, without screenshots)."},"diffVersion":{"type":"integer","description":"The version of osiro's comparison the Change report was made with; a newer one makes it stale."},"error":{"type":"string","nullable":true,"description":"Why a failed Change report failed; null otherwise."},"createdBy":{"type":"string","nullable":true,"format":"uuid","description":"The id of the user who requested it; null when unknown."},"createdByName":{"type":"string","nullable":true,"description":"That user's display name; null when unknown."},"createdAt":{"type":"string","description":"When it was requested, as ISO 8601."},"startedAt":{"type":"string","nullable":true,"description":"When it started being made, as ISO 8601; null before."},"finishedAt":{"type":"string","nullable":true,"description":"When it was done or failed, as ISO 8601; null before."},"downloads":{"type":"object","nullable":true,"properties":{"html":{"type":"string","description":"A short-lived signed URL of the HTML file."},"pdf":{"type":"string","description":"A short-lived signed URL of the PDF file."}},"required":["html","pdf"],"description":"Short-lived signed URLs of its files, on the detail route while it is done; null otherwise."}},"required":["id","landingPageId","rangeFrom","rangeTo","baselineVersionId","lastVersionId","status","type","diffVersion","error","createdBy","createdByName","createdAt","startedAt","finishedAt","downloads"]},"ChangeReportList":{"type":"object","properties":{"reports":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Change report's id."},"landingPageId":{"type":"string","format":"uuid","description":"The Landing page's id."},"rangeFrom":{"type":"string","format":"date","description":"The Reporting Range's first day, a calendar date in Berlin."},"rangeTo":{"type":"string","format":"date","description":"The Reporting Range's last day, a calendar date in Berlin."},"baselineVersionId":{"type":"string","nullable":true,"format":"uuid","description":"The version live when the range started, which the changes are compared with; null when the page was created inside the range."},"lastVersionId":{"type":"string","nullable":true,"format":"uuid","description":"The last version published in the range; null when nothing was published in it (\"Keine Änderungen\")."},"status":{"type":"string","enum":["queued","running","done","failed"],"description":"Where the Change report stands: queued, running, done or failed."},"type":{"type":"string","enum":["visual","text"],"description":"How the Change report shows its Change sets: visual (before and after screenshots with a shortened change list) or text (every change in full, without screenshots)."},"diffVersion":{"type":"integer","description":"The version of osiro's comparison the Change report was made with; a newer one makes it stale."},"error":{"type":"string","nullable":true,"description":"Why a failed Change report failed; null otherwise."},"createdBy":{"type":"string","nullable":true,"format":"uuid","description":"The id of the user who requested it; null when unknown."},"createdByName":{"type":"string","nullable":true,"description":"That user's display name; null when unknown."},"createdAt":{"type":"string","description":"When it was requested, as ISO 8601."},"startedAt":{"type":"string","nullable":true,"description":"When it started being made, as ISO 8601; null before."},"finishedAt":{"type":"string","nullable":true,"description":"When it was done or failed, as ISO 8601; null before."},"downloads":{"type":"object","nullable":true,"properties":{"html":{"type":"string","description":"A short-lived signed URL of the HTML file."},"pdf":{"type":"string","description":"A short-lived signed URL of the PDF file."}},"required":["html","pdf"],"description":"Short-lived signed URLs of its files, on the detail route while it is done; null otherwise."}},"required":["id","landingPageId","rangeFrom","rangeTo","baselineVersionId","lastVersionId","status","type","diffVersion","error","createdBy","createdByName","createdAt","startedAt","finishedAt","downloads"]},"description":"The Landing page's Change reports, newest first."},"total":{"type":"integer","description":"How many Change reports the Landing page has."}},"required":["reports","total"]},"ExperimentList":{"type":"object","properties":{"experiments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Experiment's id."},"organizationId":{"type":"string","format":"uuid","description":"The Experiment's Organization."},"subject":{"type":"object","properties":{"kind":{"type":"string","enum":["funnel","landing_page"],"description":"Whether a Funnel or a Landing page is under test."},"id":{"type":"string","format":"uuid","description":"The Funnel's or Landing page's id."}},"required":["kind","id"],"description":"The Funnel or Landing page under test."},"number":{"type":"integer","description":"1-based among the subject's Experiments: the UI names it \"A/B-Test {number}\"."},"status":{"type":"string","enum":["draft","running","paused","ended"],"description":"Whether it is a draft, running, paused or ended."},"primaryGoal":{"type":"string","enum":["conversion","completion_rate"],"description":"The Primary goal, which decides the Winner: conversion, or completion_rate (Funnels only)."},"startedAt":{"type":"string","nullable":true,"description":"When it first started; null while a draft."},"endedAt":{"type":"string","nullable":true,"description":"When it ended; null until then."},"endReason":{"type":"string","nullable":true,"enum":["winner","ended_without_winner","subject_gone",null],"description":"Why it ended: with a Winner, without one, or because the subject is gone; null until then."},"winnerTestVariantId":{"type":"string","nullable":true,"format":"uuid","description":"The Winner's Test variant; null without one."},"createdAt":{"type":"string","description":"When it was created."},"testVariants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Test variant's id."},"letter":{"type":"string","enum":["A","B","C"],"description":"A Test variant's letter: A is the original, B and C its copies."},"weight":{"type":"integer","description":"The share of visitors it gets, in whole percent."},"siblingId":{"type":"string","nullable":true,"format":"uuid","description":"The hidden copy of the subject that holds its content; null for A, the original."},"archivedAt":{"type":"string","nullable":true,"description":"When it was archived, as the Experiment ended; null while active."}},"required":["id","letter","weight","siblingId","archivedAt"]},"description":"Its Test variants."}},"required":["id","organizationId","subject","number","status","primaryGoal","startedAt","endedAt","endReason","winnerTestVariantId","createdAt","testVariants"]},"description":"The subject's Experiments, oldest first."}},"required":["experiments"]},"ExperimentDetail":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Experiment's id."},"organizationId":{"type":"string","format":"uuid","description":"The Experiment's Organization."},"subject":{"type":"object","properties":{"kind":{"type":"string","enum":["funnel","landing_page"],"description":"Whether a Funnel or a Landing page is under test."},"id":{"type":"string","format":"uuid","description":"The Funnel's or Landing page's id."}},"required":["kind","id"],"description":"The Funnel or Landing page under test."},"number":{"type":"integer","description":"1-based among the subject's Experiments: the UI names it \"A/B-Test {number}\"."},"status":{"type":"string","enum":["draft","running","paused","ended"],"description":"Whether it is a draft, running, paused or ended."},"primaryGoal":{"type":"string","enum":["conversion","completion_rate"],"description":"The Primary goal, which decides the Winner: conversion, or completion_rate (Funnels only)."},"startedAt":{"type":"string","nullable":true,"description":"When it first started; null while a draft."},"endedAt":{"type":"string","nullable":true,"description":"When it ended; null until then."},"endReason":{"type":"string","nullable":true,"enum":["winner","ended_without_winner","subject_gone",null],"description":"Why it ended: with a Winner, without one, or because the subject is gone; null until then."},"winnerTestVariantId":{"type":"string","nullable":true,"format":"uuid","description":"The Winner's Test variant; null without one."},"createdAt":{"type":"string","description":"When it was created."},"testVariants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Test variant's id."},"letter":{"type":"string","enum":["A","B","C"],"description":"A Test variant's letter: A is the original, B and C its copies."},"weight":{"type":"integer","description":"The share of visitors it gets, in whole percent."},"siblingId":{"type":"string","nullable":true,"format":"uuid","description":"The hidden copy of the subject that holds its content; null for A, the original."},"archivedAt":{"type":"string","nullable":true,"description":"When it was archived, as the Experiment ended; null while active."}},"required":["id","letter","weight","siblingId","archivedAt"]},"description":"Its Test variants."},"markers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The marker's id."},"kind":{"type":"string","enum":["started","paused","resumed","published","weights_changed","ended"],"description":"What happened to the Experiment."},"testVariantId":{"type":"string","nullable":true,"format":"uuid","description":"The Test variant it happened to; null for the whole Experiment."},"versionId":{"type":"string","nullable":true,"format":"uuid","description":"The Version a published marker published; null otherwise."},"memberId":{"type":"string","nullable":true,"format":"uuid","description":"The Member who did it; null when the system did."},"createdAt":{"type":"string","description":"When it happened."}},"required":["id","kind","testVariantId","versionId","memberId","createdAt"]},"description":"What happened to it, oldest first."},"autopilotProposal":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The osiro.autopilot proposal's id."},"kind":{"type":"string","enum":["edit_landing_page","edit_funnel"],"description":"Which edit osiro.autopilot proposed."}},"required":["id","kind"],"description":"The osiro.autopilot edit whose approval started it; null for a Member's own."}},"required":["id","organizationId","subject","number","status","primaryGoal","startedAt","endedAt","endReason","winnerTestVariantId","createdAt","testVariants","markers","autopilotProposal"]},"ExperimentProblems":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["start_checks_failed","weights_invalid"],"description":"Whether the start checks or the weights failed."},"message":{"type":"string","description":"What went wrong, for people."},"problems":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"The failing check."},"letter":{"type":"string","enum":["A","B","C"],"description":"The Test variant it failed for."}},"required":["code"]},"description":"Each failing check."}},"required":["code","message","problems"],"description":"The refusal."}},"required":["error"]},"PublishedTestVariant":{"type":"object","properties":{"experiment":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Experiment's id."},"organizationId":{"type":"string","format":"uuid","description":"The Experiment's Organization."},"subject":{"type":"object","properties":{"kind":{"type":"string","enum":["funnel","landing_page"],"description":"Whether a Funnel or a Landing page is under test."},"id":{"type":"string","format":"uuid","description":"The Funnel's or Landing page's id."}},"required":["kind","id"],"description":"The Funnel or Landing page under test."},"number":{"type":"integer","description":"1-based among the subject's Experiments: the UI names it \"A/B-Test {number}\"."},"status":{"type":"string","enum":["draft","running","paused","ended"],"description":"Whether it is a draft, running, paused or ended."},"primaryGoal":{"type":"string","enum":["conversion","completion_rate"],"description":"The Primary goal, which decides the Winner: conversion, or completion_rate (Funnels only)."},"startedAt":{"type":"string","nullable":true,"description":"When it first started; null while a draft."},"endedAt":{"type":"string","nullable":true,"description":"When it ended; null until then."},"endReason":{"type":"string","nullable":true,"enum":["winner","ended_without_winner","subject_gone",null],"description":"Why it ended: with a Winner, without one, or because the subject is gone; null until then."},"winnerTestVariantId":{"type":"string","nullable":true,"format":"uuid","description":"The Winner's Test variant; null without one."},"createdAt":{"type":"string","description":"When it was created."},"testVariants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Test variant's id."},"letter":{"type":"string","enum":["A","B","C"],"description":"A Test variant's letter: A is the original, B and C its copies."},"weight":{"type":"integer","description":"The share of visitors it gets, in whole percent."},"siblingId":{"type":"string","nullable":true,"format":"uuid","description":"The hidden copy of the subject that holds its content; null for A, the original."},"archivedAt":{"type":"string","nullable":true,"description":"When it was archived, as the Experiment ended; null while active."}},"required":["id","letter","weight","siblingId","archivedAt"]},"description":"Its Test variants."},"markers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The marker's id."},"kind":{"type":"string","enum":["started","paused","resumed","published","weights_changed","ended"],"description":"What happened to the Experiment."},"testVariantId":{"type":"string","nullable":true,"format":"uuid","description":"The Test variant it happened to; null for the whole Experiment."},"versionId":{"type":"string","nullable":true,"format":"uuid","description":"The Version a published marker published; null otherwise."},"memberId":{"type":"string","nullable":true,"format":"uuid","description":"The Member who did it; null when the system did."},"createdAt":{"type":"string","description":"When it happened."}},"required":["id","kind","testVariantId","versionId","memberId","createdAt"]},"description":"What happened to it, oldest first."},"autopilotProposal":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The osiro.autopilot proposal's id."},"kind":{"type":"string","enum":["edit_landing_page","edit_funnel"],"description":"Which edit osiro.autopilot proposed."}},"required":["id","kind"],"description":"The osiro.autopilot edit whose approval started it; null for a Member's own."}},"required":["id","organizationId","subject","number","status","primaryGoal","startedAt","endedAt","endReason","winnerTestVariantId","createdAt","testVariants","markers","autopilotProposal"],"description":"The Experiment now."},"versionId":{"type":"string","format":"uuid","description":"The Test variant's new published Version."}},"required":["experiment","versionId"]},"ExperimentResults":{"type":"object","properties":{"experimentId":{"type":"string","format":"uuid","description":"The Experiment's id."},"fullDays":{"type":"integer","description":"Full days the Experiment ran, paused periods excluded."},"computedAt":{"type":"string","description":"When the results were computed."},"primary":{"type":"object","properties":{"goal":{"type":"string","enum":["conversion","completion_rate"],"description":"The Experiment goal."},"verdict":{"type":"string","nullable":true,"enum":["not_enough_data","no_clear_difference","ahead","very_likely_best",null],"description":"What the numbers allow to claim; only the Primary goal has one."},"leader":{"type":"string","nullable":true,"enum":["A","B","C",null],"description":"The leading Test variant, at ahead or very_likely_best."},"testVariants":{"type":"array","items":{"type":"object","properties":{"testVariantId":{"type":"string","format":"uuid","description":"The Test variant's id."},"letter":{"type":"string","enum":["A","B","C"],"description":"A Test variant's letter: A is the original, B and C its copies."},"units":{"type":"integer","description":"Visitor-days (\"Besucher pro Tag\") the Test variant had."},"successes":{"type":"integer","description":"The Visitor-days that reached the goal."},"rate":{"type":"number","description":"successes out of units, as a fraction."},"probabilityToBeBest":{"type":"number","nullable":true,"description":"The probability that it is the best, as a fraction; null while there isn't enough data."},"expectedLoss":{"type":"number","nullable":true,"description":"The rate lost by choosing it if another is better; null while there isn't enough data."}},"required":["testVariantId","letter","units","successes","rate","probabilityToBeBest","expectedLoss"]},"description":"Each Test variant's numbers."},"daily":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","description":"The UTC day the Visitor-days began."},"testVariantId":{"type":"string","format":"uuid","description":"The Test variant's id."},"units":{"type":"integer","description":"The day's Visitor-days."},"successes":{"type":"integer","description":"The day's Visitor-days that reached the goal."}},"required":["date","testVariantId","units","successes"]},"description":"Per UTC day the Visitor-day began, when asked for."}},"required":["goal","verdict","leader","testVariants"],"description":"The Primary goal's results."},"secondary":{"type":"array","items":{"type":"object","properties":{"goal":{"type":"string","enum":["conversion","completion_rate"],"description":"The Experiment goal."},"verdict":{"type":"string","nullable":true,"enum":["not_enough_data","no_clear_difference","ahead","very_likely_best",null],"description":"What the numbers allow to claim; only the Primary goal has one."},"leader":{"type":"string","nullable":true,"enum":["A","B","C",null],"description":"The leading Test variant, at ahead or very_likely_best."},"testVariants":{"type":"array","items":{"type":"object","properties":{"testVariantId":{"type":"string","format":"uuid","description":"The Test variant's id."},"letter":{"type":"string","enum":["A","B","C"],"description":"A Test variant's letter: A is the original, B and C its copies."},"units":{"type":"integer","description":"Visitor-days (\"Besucher pro Tag\") the Test variant had."},"successes":{"type":"integer","description":"The Visitor-days that reached the goal."},"rate":{"type":"number","description":"successes out of units, as a fraction."},"probabilityToBeBest":{"type":"number","nullable":true,"description":"The probability that it is the best, as a fraction; null while there isn't enough data."},"expectedLoss":{"type":"number","nullable":true,"description":"The rate lost by choosing it if another is better; null while there isn't enough data."}},"required":["testVariantId","letter","units","successes","rate","probabilityToBeBest","expectedLoss"]},"description":"Each Test variant's numbers."},"daily":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","description":"The UTC day the Visitor-days began."},"testVariantId":{"type":"string","format":"uuid","description":"The Test variant's id."},"units":{"type":"integer","description":"The day's Visitor-days."},"successes":{"type":"integer","description":"The day's Visitor-days that reached the goal."}},"required":["date","testVariantId","units","successes"]},"description":"Per UTC day the Visitor-day began, when asked for."}},"required":["goal","verdict","leader","testVariants"]},"description":"The other goals' results, which have no verdict."},"summary":{"type":"string","description":"One German line, the same in the web UI and the MCP tools."}},"required":["experimentId","fullDays","computedAt","primary","secondary","summary"]},"ExperimentReadiness":{"type":"object","properties":{"startProblems":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["original_unpublished","test_variant_unpublished","weights_not_100","identical_to_a"],"description":"The failing start check."},"letter":{"type":"string","enum":["A","B","C"],"description":"The Test variant it fails for."}},"required":["code"]},"description":"The start checks that fail right now; empty unless the Experiment is a draft."},"testVariants":{"type":"array","items":{"type":"object","properties":{"testVariantId":{"type":"string","format":"uuid","description":"The Test variant's id."},"name":{"type":"string","description":"The name of the Funnel or Landing page it is."},"published":{"type":"boolean","description":"Whether it has a published Version."},"hasUnpublishedChanges":{"type":"boolean","description":"Whether its Draft differs from its published Version."}},"required":["testVariantId","name","published","hasUnpublishedChanges"]},"description":"Each Test variant's publish state."}},"required":["startProblems","testVariants"]},"TestVariantVersionList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Version's id."},"version":{"type":"number","description":"The Version's number."},"publishedAt":{"type":"string","description":"When it was published."},"publisherName":{"type":"string","nullable":true,"description":"Who published it; null when unknown."}},"required":["id","version","publishedAt","publisherName"]},"description":"The Test variant's published Versions, newest first."},"ExportJob":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Export's id."},"type":{"type":"string","description":"What the Export exports, e.g. leads."},"status":{"type":"string","enum":["queued","running","done","failed"],"description":"Where the Export stands: queued, running, done (the file is ready) or failed."},"payload":{"nullable":true,"description":"The Export's filters as validated on create; a retry posts them back unchanged."},"error":{"type":"string","nullable":true,"description":"Why the Export failed; null unless it did."},"createdAt":{"type":"string","description":"When the Export was requested."},"startedAt":{"type":"string","nullable":true,"description":"When generating the file started; null while queued."},"finishedAt":{"type":"string","nullable":true,"description":"When the Export finished or failed; null until then."},"downloadUrl":{"type":"string","nullable":true,"description":"A signed, short-lived URL of the file; only while the status is done, and never in the list."}},"required":["id","type","status","error","createdAt","startedAt","finishedAt","downloadUrl"]},"ExportList":{"type":"object","properties":{"jobs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Export's id."},"type":{"type":"string","description":"What the Export exports, e.g. leads."},"status":{"type":"string","enum":["queued","running","done","failed"],"description":"Where the Export stands: queued, running, done (the file is ready) or failed."},"payload":{"nullable":true,"description":"The Export's filters as validated on create; a retry posts them back unchanged."},"error":{"type":"string","nullable":true,"description":"Why the Export failed; null unless it did."},"createdAt":{"type":"string","description":"When the Export was requested."},"startedAt":{"type":"string","nullable":true,"description":"When generating the file started; null while queued."},"finishedAt":{"type":"string","nullable":true,"description":"When the Export finished or failed; null until then."},"downloadUrl":{"type":"string","nullable":true,"description":"A signed, short-lived URL of the file; only while the status is done, and never in the list."}},"required":["id","type","status","error","createdAt","startedAt","finishedAt","downloadUrl"]},"description":"The caller's recent Exports of the type, newest first; the file of each stays downloadable as long as it is listed."}},"required":["jobs"]},"FunnelList":{"type":"object","properties":{"funnels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The item's id."},"name":{"type":"string","description":"The item's name."},"created_at":{"type":"string","description":"When the item was created."},"updated_at":{"type":"string","description":"When the item was last changed."},"is_published":{"type":"boolean","default":false,"description":"Whether the item has a Published version."}},"required":["id","name","created_at"]},"description":"The page of the Organization's Funnels."},"total":{"type":"number","description":"Funnels that match, on every page."}},"required":["funnels","total"]},"FlowList":{"type":"object","properties":{"flows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The item's id."},"name":{"type":"string","description":"The item's name."},"created_at":{"type":"string","description":"When the item was created."},"updated_at":{"type":"string","description":"When the item was last changed."},"enabled":{"type":"boolean","description":"Whether the Flow is live and enrolls leads; false while it is paused."}},"required":["id","name","created_at","enabled"]},"description":"The page of the Organization's Flows."},"total":{"type":"number","description":"Flows that match, on every page."}},"required":["flows","total"]},"MessageList":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The item's id."},"name":{"type":"string","description":"The item's name."},"created_at":{"type":"string","description":"When the item was created."},"updated_at":{"type":"string","description":"When the item was last changed."},"has_email":{"type":"boolean","description":"Whether the Message has an email version."},"has_whatsapp":{"type":"boolean","description":"Whether the Message has a WhatsApp template."},"whatsapp_approval":{"type":"string","nullable":true,"description":"The WhatsApp template's approval status at Meta; null without a WhatsApp template."},"locked":{"type":"boolean","description":"Whether the Message is a System message: it can be duplicated but never deleted."}},"required":["id","name","created_at","has_email","has_whatsapp","whatsapp_approval","locked"]},"description":"The page of the Organization's Messages."},"total":{"type":"number","description":"Messages that match, on every page."}},"required":["messages","total"]},"ContactList":{"type":"object","properties":{"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The Lead buyer's id."},"created_at":{"type":"string","description":"When the Lead buyer was added."},"first_name":{"type":"string","description":"The Lead buyer's first name."},"last_name":{"type":"string","description":"The Lead buyer's last name."},"email":{"type":"string","description":"The Lead buyer's email address."},"state":{"type":"string","enum":["ACTIVE","PAUSED","INACTIVE"],"description":"ACTIVE receives leads, PAUSED is in a pause and receives none until it ends, INACTIVE receives none."},"max_single_leads_per_month":{"type":"number","description":"The most single leads the Lead buyer takes in a month."},"contact_sale_stats":{"type":"object","properties":{"sales_total":{"type":"number","description":"Leads ever sold to the Lead buyer."},"sales_this_month":{"type":"number","description":"Leads sold to the Lead buyer this calendar month."},"refunds_this_month":{"type":"number","description":"This month's sales to the Lead buyer that were refunded."},"refund_rate":{"type":"number","description":"The share of this month's sales that were refunded, as a fraction from 0 to 1, not a percentage."}},"required":["sales_total","sales_this_month","refunds_this_month","refund_rate"],"description":"The Lead buyer's sales and refunds, for the current month and in total."},"lead_filter_needs_review":{"type":"boolean","default":false,"description":"The Lead buyer's lead filter is unreadable or names a deleted option, so automatic sales to them are held back until it is repaired."}},"required":["id","created_at","first_name","last_name","email","state","max_single_leads_per_month","contact_sale_stats"]},"description":"One page of the Organization's Lead buyers."},"total":{"type":"number","description":"Every Lead buyer that matches, across pages."}},"required":["contacts","total"]},"PostcodeLookup":{"type":"object","properties":{"entries":{"type":"object","additionalProperties":{"type":"object","properties":{"cities":{"type":"array","items":{"type":"string"},"description":"The entry's city names, the most frequent first."},"cityCount":{"type":"integer","description":"How many different cities the entry covers, listed or not."},"point":{"type":"object","nullable":true,"properties":{"lat":{"type":"number","description":"The latitude."},"lon":{"type":"number","description":"The longitude."}},"required":["lat","lon"],"description":"The point of a full PLZ; null for a prefix."}},"required":["cities","cityCount","point"]},"description":"The known entries, keyed by entry; unknown entries are left out."}},"required":["entries"]},"LeadFilterFieldCatalogue":{"type":"object","properties":{"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","nullable":true,"description":"The key a condition sends; null for the Funnel pseudo-field, which conditions name by funnelIds."},"kind":{"type":"string","enum":["number","choice","multi","funnel"],"description":"The condition kind that checks the field."},"type":{"type":"string","enum":["number","currency","single_choice","multi_select","yes_no","funnel"],"description":"The field's type in the lead schema."},"group":{"type":"string","enum":["funnel_field","computed_field","funnel"],"description":"Where the field comes from: a funnel's field, a computed field, or the Funnel pseudo-field."},"label":{"type":"string","description":"The field's label."},"choices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The id a condition sends: option-n, \"true\"/\"false\" for a yes/no field, or a funnel id."},"label":{"type":"string","description":"The choice's label in the newest lead schema that has it."},"labels":{"type":"array","items":{"type":"string"},"description":"Every label the id has across lead schemas."},"conflict":{"type":"boolean","description":"The id is labelled differently in different lead schemas."}},"required":["id","label","labels","conflict"]},"description":"The ids a condition on the field may send, with their labels."},"appliesTo":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["funnel","schema"],"description":"A funnel, or a lead schema without a funnel."},"id":{"type":"string","description":"The funnel's or lead schema's id."},"name":{"type":"string","description":"The funnel's or lead schema's name."}},"required":["kind","id","name"]},"description":"The funnels, or lead schemas without a funnel, where the field's conditions apply."}},"required":["key","kind","type","group","label","choices","appliesTo"]},"description":"Every field a lead filter can use in the Organization."}},"required":["fields"]},"LeadFilterPreview":{"type":"object","properties":{"total":{"type":"integer","description":"Every lead of the Organization in the last 30 days."},"matching":{"type":"integer","description":"The leads in the service area that pass the filter."},"outsideArea":{"type":"integer","description":"The leads outside the service area."},"filter":{"type":"integer","description":"The leads in the service area that the filter rejects."},"missingOnly":{"type":"integer","description":"The leads in the service area rejected only because an answer is missing."},"warnings":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["unreadable"],"description":"The stored filter can't be read."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["field_gone"],"description":"No funnel uses the condition's field any more, so it no longer restricts."},"index":{"type":"integer","description":"The stale condition's 0-based position in the filter."},"key":{"type":"string","description":"The field key the condition names."}},"required":["type","index","key"]},{"type":"object","properties":{"type":{"type":"string","enum":["option_gone"],"description":"A chosen option or funnel was deleted."},"index":{"type":"integer","description":"The stale condition's 0-based position in the filter."},"key":{"type":"string","nullable":true,"description":"The field key the condition names; null for the funnel."},"missing":{"type":"array","items":{"type":"string"},"description":"The deleted option or funnel ids."}},"required":["type","index","key","missing"]}]},"description":"The draft filter's stale conditions."}},"required":["total","matching","outsideArea","filter","missingOnly","warnings"]},"BuyerFilterChecks":{"type":"object","properties":{"buyers":{"type":"array","items":{"type":"object","properties":{"contactId":{"type":"string","description":"The Lead buyer's id."},"status":{"type":"string","enum":["passes","rejected","broken"],"description":"Whether the lead passes the Lead buyer's filter, is rejected, or the filter is broken: unreadable, or a chosen option was deleted."},"conditions":{"type":"array","items":{"type":"string"},"description":"The readable conditions that keep the lead from the Lead buyer, in filter order."}},"required":["contactId","status","conditions"]},"description":"Every Lead buyer with a lead filter."}},"required":["buyers"]},"CampaignList":{"type":"object","properties":{"campaigns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Campaign's id."},"name":{"type":"string","description":"The Campaign's name."},"description":{"type":"string","nullable":true,"description":"The Campaign's description; null when it has none."},"status":{"type":"string","enum":["active","archived","draft"],"description":"Where the Campaign stands: active (running), archived (put away; it takes only a status change) or draft (built by a Campaign generation, not launched yet)."},"landing_page":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The Landing page's id."},"name":{"type":"string","description":"The Landing page's name."},"is_published":{"type":"boolean","description":"Whether the Landing page is published."}},"required":["id","name","is_published"],"description":"The Landing page the Campaign's ads send visitors to; null until one is linked, and again once it is deleted."},"creator":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The creating user's id."},"name":{"type":"string","nullable":true,"description":"The creating user's display name; their email when they never filled in their profile."}},"required":["id","name"],"description":"The user who created the Campaign; null once that user is deleted."},"created_at":{"type":"string","description":"When the Campaign was created, as ISO 8601."},"updated_at":{"type":"string","description":"When the Campaign was last changed, as ISO 8601."},"pending_proposals":{"type":"integer","minimum":0,"description":"How many of the Campaign's osiro.autopilot Proposals wait for a decision."}},"required":["id","name","description","status","landing_page","creator","created_at","updated_at","pending_proposals"]},"description":"The Campaigns on this page."},"total":{"type":"number","description":"How many Campaigns match, on every page."}},"required":["campaigns","total"]},"CampaignDetail":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Campaign's id."},"name":{"type":"string","description":"The Campaign's name."},"description":{"type":"string","nullable":true,"description":"The Campaign's description; null when it has none."},"status":{"type":"string","enum":["active","archived","draft"],"description":"Where the Campaign stands: active (running), archived (put away; it takes only a status change) or draft (built by a Campaign generation, not launched yet)."},"landing_page":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The Landing page's id."},"name":{"type":"string","description":"The Landing page's name."},"is_published":{"type":"boolean","description":"Whether the Landing page is published."}},"required":["id","name","is_published"],"description":"The Landing page the Campaign's ads send visitors to; null until one is linked, and again once it is deleted."},"creator":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The creating user's id."},"name":{"type":"string","nullable":true,"description":"The creating user's display name; their email when they never filled in their profile."},"initials":{"type":"string","description":"The creating user's initials, drawn as their avatar: users have no profile picture."}},"required":["id","name","initials"],"description":"The user who created the Campaign."},"created_at":{"type":"string","description":"When the Campaign was created, as ISO 8601."},"updated_at":{"type":"string","description":"When the Campaign was last changed, as ISO 8601."},"meta_ads":{"type":"object","properties":{"ad_account_id":{"type":"string","nullable":true,"pattern":"^\\d+$","description":"The Meta ad account the Campaign reports on, without its act_ prefix; null when none is linked."},"enabled_campaigns":{"type":"array","items":{"type":"string","pattern":"^\\d+$","description":"A Meta object's numeric id; an ad account's without its act_ prefix."},"maxItems":5000,"description":"The Meta campaigns in the Meta selection, each with every Ad set and ad in it, including ones added later."},"enabled_ad_groups":{"type":"array","items":{"type":"string","pattern":"^\\d+$","description":"A Meta object's numeric id; an ad account's without its act_ prefix."},"maxItems":5000,"description":"The Ad sets in the Meta selection, each with every ad in it, including ones added later."},"enabled_ads":{"type":"array","items":{"type":"string","pattern":"^\\d+$","description":"A Meta object's numeric id; an ad account's without its act_ prefix."},"maxItems":5000,"description":"The single ads in the Meta selection."}},"required":["ad_account_id","enabled_campaigns","enabled_ad_groups","enabled_ads"],"description":"The Meta ad account the Campaign reports on and its Meta selection."},"autopilot":{"type":"object","properties":{"brief":{"type":"string","nullable":true,"description":"The Campaign's brief for osiro.autopilot: what it advertises, to whom, its goal, angle, and the facts and limits its ads and pages keep to. null when there is none."},"enabled":{"type":"boolean","description":"Whether osiro.autopilot reviews the Campaign every day."}},"required":["brief","enabled"],"description":"What osiro.autopilot knows about the Campaign and whether it works on it."}},"required":["id","name","description","status","landing_page","creator","created_at","updated_at","meta_ads","autopilot"]},"CampaignCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"The Campaign's name."},"description":{"type":"string","nullable":true,"maxLength":2000,"description":"The Campaign's description; null or blank for none."},"landing_page_id":{"type":"string","format":"uuid","description":"The id of the Landing page the Campaign's ads send visitors to; omitted, it can be linked later."}},"required":["name"]},"CampaignUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"The Campaign's new name; omitted, it stays."},"description":{"type":"string","nullable":true,"maxLength":2000,"description":"The Campaign's new description; null or blank clears it, omitted it stays."},"landing_page_id":{"type":"string","format":"uuid","description":"The id of the Landing page the Campaign's ads now send visitors to; omitted, it stays. It can't be cleared."},"status":{"type":"string","enum":["active","archived"],"description":"The Campaign's new status: active or archived. Only a Campaign generation makes a draft. Omitted, it stays."},"meta_ads":{"type":"object","properties":{"ad_account_id":{"type":"string","nullable":true,"pattern":"^\\d+$","description":"The Meta ad account the Campaign reports on, without its act_ prefix; null when none is linked."},"enabled_campaigns":{"type":"array","items":{"type":"string","pattern":"^\\d+$","description":"A Meta object's numeric id; an ad account's without its act_ prefix."},"maxItems":5000,"description":"The Meta campaigns in the Meta selection, each with every Ad set and ad in it, including ones added later."},"enabled_ad_groups":{"type":"array","items":{"type":"string","pattern":"^\\d+$","description":"A Meta object's numeric id; an ad account's without its act_ prefix."},"maxItems":5000,"description":"The Ad sets in the Meta selection, each with every ad in it, including ones added later."},"enabled_ads":{"type":"array","items":{"type":"string","pattern":"^\\d+$","description":"A Meta object's numeric id; an ad account's without its act_ prefix."},"maxItems":5000,"description":"The single ads in the Meta selection."}},"required":["ad_account_id","enabled_campaigns","enabled_ad_groups","enabled_ads"],"description":"Replaces the Meta ad account and the whole Meta selection; a null ad account clears both and switches osiro.autopilot off. Omitted, they stay."},"autopilot":{"type":"object","properties":{"brief":{"type":"string","nullable":true,"maxLength":4000,"description":"The Campaign's new brief for osiro.autopilot: what it advertises, to whom, its goal, angle, and the facts and limits its ads and pages keep to. null or blank clears it; omitted, it stays."},"enabled":{"type":"boolean","description":"Whether osiro.autopilot reviews the Campaign every day; only while a Meta ad account is linked. Omitted, it stays."}},"description":"The osiro.autopilot settings to change; omitted, they stay."}}},"ControlPanelLeadList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The Lead's id."},"created_at":{"type":"string","description":"When the Lead came in."},"branch":{"type":"string","description":"The Lead's Industry."},"schema_version_id":{"type":"string","nullable":true,"description":"The Lead schema version the Lead was captured with."},"fields":{"nullable":true,"description":"The Lead's answers, keyed as its Lead schema names them."},"contact_fields":{"nullable":true,"description":"The Lead's Contact details: name, email, phone number."},"mfa_fields":{"nullable":true,"description":"The Lead verification of each contact field: when it started, when it succeeded and on which channel."},"total_calls":{"type":"integer","description":"Calls to the Lead so far."},"daily_calls":{"type":"integer","description":"Calls to the Lead today."},"visible_at":{"type":"string","nullable":true,"description":"When the Lead comes back into the Call queue; null until its first call."},"state":{"type":"string","nullable":true,"enum":["AUTO_SCHEDULED","RESCHEDULED","INVISIBLE","EXPORTED","NOT_REACHABLE",null],"description":"The Lead state; null before the first call."},"domain":{"type":"string","description":"The domain the Lead came in through."},"is_duplicate":{"type":"boolean","description":"The Lead is a buyer Organization's copy of a Duplicate lead, shown as \"Duplikat\"."},"lead_lock":{"type":"object","nullable":true,"properties":{"user":{"type":"object","nullable":true,"properties":{"first_name":{"type":"string","description":"The Member's first name."},"last_name":{"type":"string","description":"The Member's last name."}},"required":["first_name","last_name"],"description":"The Member who holds the Lead lock; null when their user is gone."},"is_stale":{"type":"boolean","description":"Nobody pinged the Lead lock for 15 minutes, so another Member may take it over."}},"required":["user","is_stale"],"description":"Who has the Lead open; null when nobody does."},"lead_tag":{"type":"object","nullable":true,"properties":{"tag":{"type":"object","properties":{"id":{"type":"string","description":"The Tag's id."},"name":{"type":"string","description":"The Tag's name."},"color":{"type":"string","description":"The Tag's colour."}},"required":["id","name","color"],"description":"The Tag."}},"required":["tag"],"description":"The Lead's Tag; a Lead has at most one."},"owner_user":{"type":"object","nullable":true,"properties":{"id":{"type":"string","description":"The Assignee's user id."},"first_name":{"type":"string","description":"The Assignee's first name."},"last_name":{"type":"string","description":"The Assignee's last name."}},"required":["id","first_name","last_name"],"description":"The Lead's Assignee; null when nobody is."},"latest_event":{"type":"object","nullable":true,"properties":{"type":{"type":"string","description":"The Lead event's type."},"status_label":{"type":"string","nullable":true,"description":"The Lead status a STATUS_CHANGED event set; null for other events."}},"required":["type","status_label"],"description":"The latest Lead event that can explain why the Lead is out of the Call queue; null without one."}},"required":["id","created_at","branch","schema_version_id","total_calls","daily_calls","visible_at","state","domain","is_duplicate","lead_lock","lead_tag","owner_user","latest_event"]},"description":"One page of leads."},"total":{"type":"integer","minimum":0,"description":"Every lead that matches, across pages; may be an estimate, but always at least one past the page when another page follows."}},"required":["items","total"]},"UnlockedLeadList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The Lead's id."},"created_at":{"type":"string","description":"When the Lead came in."},"branch":{"type":"string","description":"The Lead's Industry."},"schema_version_id":{"type":"string","nullable":true,"description":"The Lead schema version the Lead was captured with."},"fields":{"nullable":true,"description":"The Lead's answers, keyed as its Lead schema names them."},"contact_fields":{"nullable":true,"description":"The Lead's Contact details: name, email, phone number."},"mfa_fields":{"nullable":true,"description":"The Lead verification of each contact field: when it started, when it succeeded and on which channel."},"total_calls":{"type":"integer","description":"Calls to the Lead so far."},"daily_calls":{"type":"integer","description":"Calls to the Lead today."},"visible_at":{"type":"string","nullable":true,"description":"When the Lead comes back into the Call queue; null until its first call."},"state":{"type":"string","nullable":true,"enum":["AUTO_SCHEDULED","RESCHEDULED","INVISIBLE","EXPORTED","NOT_REACHABLE",null],"description":"The Lead state; null before the first call."},"domain":{"type":"string","description":"The domain the Lead came in through."},"is_duplicate":{"type":"boolean","description":"The Lead is a buyer Organization's copy of a Duplicate lead, shown as \"Duplikat\"."},"lead_lock":{"type":"object","nullable":true,"properties":{"user":{"type":"object","nullable":true,"properties":{"first_name":{"type":"string","description":"The Member's first name."},"last_name":{"type":"string","description":"The Member's last name."}},"required":["first_name","last_name"],"description":"The Member who holds the Lead lock; null when their user is gone."},"is_stale":{"type":"boolean","description":"Nobody pinged the Lead lock for 15 minutes, so another Member may take it over."}},"required":["user","is_stale"],"description":"Who has the Lead open; null when nobody does."},"lead_tag":{"type":"object","nullable":true,"properties":{"tag":{"type":"object","properties":{"id":{"type":"string","description":"The Tag's id."},"name":{"type":"string","description":"The Tag's name."},"color":{"type":"string","description":"The Tag's colour."}},"required":["id","name","color"],"description":"The Tag."}},"required":["tag"],"description":"The Lead's Tag; a Lead has at most one."}},"required":["id","created_at","branch","schema_version_id","total_calls","daily_calls","visible_at","state","domain","is_duplicate","lead_lock","lead_tag"]},"description":"One page of leads."},"total":{"type":"integer","minimum":0,"description":"Every item that matches, across pages."}},"required":["items","total"]},"RescheduledLeadList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The Lead's id."},"created_at":{"type":"string","description":"When the Lead came in."},"branch":{"type":"string","description":"The Lead's Industry."},"schema_version_id":{"type":"string","nullable":true,"description":"The Lead schema version the Lead was captured with."},"fields":{"nullable":true,"description":"The Lead's answers, keyed as its Lead schema names them."},"contact_fields":{"nullable":true,"description":"The Lead's Contact details: name, email, phone number."},"mfa_fields":{"nullable":true,"description":"The Lead verification of each contact field: when it started, when it succeeded and on which channel."},"total_calls":{"type":"integer","description":"Calls to the Lead so far."},"daily_calls":{"type":"integer","description":"Calls to the Lead today."},"visible_at":{"type":"string","nullable":true,"description":"When the Lead comes back into the Call queue; null until its first call."},"state":{"type":"string","nullable":true,"enum":["AUTO_SCHEDULED","RESCHEDULED","INVISIBLE","EXPORTED","NOT_REACHABLE",null],"description":"The Lead state; null before the first call."},"domain":{"type":"string","description":"The domain the Lead came in through."},"is_duplicate":{"type":"boolean","description":"The Lead is a buyer Organization's copy of a Duplicate lead, shown as \"Duplikat\"."},"lead_lock":{"type":"object","nullable":true,"properties":{"user":{"type":"object","nullable":true,"properties":{"first_name":{"type":"string","description":"The Member's first name."},"last_name":{"type":"string","description":"The Member's last name."}},"required":["first_name","last_name"],"description":"The Member who holds the Lead lock; null when their user is gone."},"is_stale":{"type":"boolean","description":"Nobody pinged the Lead lock for 15 minutes, so another Member may take it over."}},"required":["user","is_stale"],"description":"Who has the Lead open; null when nobody does."},"lead_tag":{"type":"object","nullable":true,"properties":{"tag":{"type":"object","properties":{"id":{"type":"string","description":"The Tag's id."},"name":{"type":"string","description":"The Tag's name."},"color":{"type":"string","description":"The Tag's colour."}},"required":["id","name","color"],"description":"The Tag."}},"required":["tag"],"description":"The Lead's Tag; a Lead has at most one."}},"required":["id","created_at","branch","schema_version_id","total_calls","daily_calls","visible_at","state","domain","is_duplicate","lead_lock","lead_tag"]},"description":"The leads due for their callback, latest first."}},"required":["items"]},"LeadCount":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"description":"How many leads the caller can see are in the sale state."}},"required":["count"]},"SoldLeadList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"created_at":{"type":"string","description":"When the Lead sale was made."},"price":{"type":"number","description":"The Lead sale's price in euros."},"lead":{"type":"object","properties":{"id":{"type":"string","description":"The Lead's id."},"salutation":{"type":"string","nullable":true,"description":"mr or mrs where the Lead gave one; null otherwise."},"first_name":{"type":"string","nullable":true,"description":"The Lead's first name."},"last_name":{"type":"string","nullable":true,"description":"The Lead's last name."}},"required":["id","salutation","first_name","last_name"],"description":"The sold Lead."},"contact":{"type":"object","properties":{"id":{"type":"string","description":"The Lead buyer's id."},"first_name":{"type":"string","description":"The Lead buyer's first name."},"last_name":{"type":"string","description":"The Lead buyer's last name."}},"required":["id","first_name","last_name"],"description":"The Lead buyer the Lead was sold to."},"duplicate_of":{"type":"object","nullable":true,"properties":{"lead_id":{"type":"string","description":"The first sold Lead's id."},"name":{"type":"string","nullable":true,"description":"The first sold Lead's name; null when it left none."},"sold_at":{"type":"string","nullable":true,"description":"Its sale to the same Lead buyer, else its first sale; null when no sale of it is left."}},"required":["lead_id","name","sold_at"],"description":"Set when the sale gave a Duplicate lead free (€0): the first sold Lead of the same person."}},"required":["created_at","price","lead","contact","duplicate_of"]},"description":"One page of Lead sales."},"total":{"type":"integer","minimum":0,"description":"Every item that matches, across pages."}},"required":["items","total"]},"RefundRequestList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"lead":{"type":"object","properties":{"id":{"type":"string","description":"The Lead's id."},"salutation":{"type":"string","nullable":true,"description":"mr or mrs where the Lead gave one; null otherwise."},"first_name":{"type":"string","nullable":true,"description":"The Lead's first name."},"last_name":{"type":"string","nullable":true,"description":"The Lead's last name."}},"required":["id","salutation","first_name","last_name"],"description":"The sold Lead."},"sale":{"type":"object","properties":{"contact_id":{"type":"string","description":"The Lead buyer's id. With lead.id, it names the Lead sale: a Lead can be sold to several Lead buyers."},"created_at":{"type":"string","description":"When the Lead sale was made."},"price":{"type":"number","description":"The Lead sale's price in euros."},"refund":{"type":"object","properties":{"reason":{"type":"string","description":"One of the predefined reasons, or the Lead buyer's own text."},"status":{"type":"string","enum":["REQUESTED","APPROVED","DECLINED"],"description":"Where the Complaint stands: REQUESTED, APPROVED (refunded) or DECLINED."},"decline_reason":{"type":"string","nullable":true,"description":"Why the Complaint was declined. Null unless declined, and on declines that predate decline reasons."}},"required":["reason","status","decline_reason"],"description":"The Complaint."}},"required":["contact_id","created_at","price","refund"],"description":"The Lead sale the Complaint is about."}},"required":["lead","sale"]},"description":"One page of Complaints."},"total":{"type":"integer","minimum":0,"description":"Every item that matches, across pages."}},"required":["items","total"]},"RefundRequestStats":{"type":"object","properties":{"pending":{"type":"integer","minimum":0,"description":"Complaints waiting for a decision."},"resolved_this_month":{"type":"integer","minimum":0,"description":"Decided Complaints on Lead sales made this month, approved or declined."},"refunded_amount_this_month":{"type":"number","minimum":0,"description":"What approved Complaints on this month's Lead sales refunded, in euros."}},"required":["pending","resolved_this_month","refunded_amount_this_month"]},"LeadDashboard":{"type":"object","properties":{"month":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"A month as yyyy-MM, in UTC."},"is_current_month":{"type":"boolean","description":"Whether the month is the current one (UTC)."},"buyers":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","description":"The Lead buyer's email address."},"sold":{"type":"integer","minimum":0,"description":"Non-refunded Lead sales in the month, Shared sales included, as Auto-sale counts them."},"sold_today":{"type":"integer","minimum":0,"description":"Non-refunded Lead sales today; 0 for a past month."},"monthly_cap":{"type":"integer","minimum":0,"description":"Exclusive leads per month: the cap Auto-sale fills."},"saturation":{"type":"number","minimum":0,"description":"How Auto-sale ranks the Lead buyer, 0 to 1: sold / monthly_cap, plus a thirtieth per whole day of their latest finished pause this month."},"daily_cap_reached":{"type":"boolean","description":"sold_today reached a thirtieth of the cap, rounded up, as Auto-sale counts it."},"monthly_cap_reached":{"type":"boolean","description":"sold reached monthly_cap."}},"required":["email","sold","sold_today","monthly_cap","saturation","daily_cap_reached","monthly_cap_reached"]},"description":"The Lead buyers Auto-sale sells to now, by saturation, lowest first."},"refunds":{"type":"object","properties":{"monthly_rate":{"type":"number","minimum":0,"description":"Approved Complaints decided in the month per Lead sale made in it, in percent."},"days":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","format":"date","description":"The day."},"sold":{"type":"integer","minimum":0,"description":"Lead sales made on the day."},"refund_rate":{"type":"number","minimum":0,"description":"Approved Complaints on the day's Lead sales, in percent."}},"required":["day","sold","refund_rate"]},"description":"Day by day up to today, or to the month's end for a past month."}},"required":["monthly_rate","days"],"description":"The month's Complaints."},"runway":{"type":"object","properties":{"demand":{"type":"integer","minimum":0,"description":"The sum of the Lead buyers' monthly caps."},"sold":{"type":"integer","minimum":0,"description":"Non-refunded Exclusive sales in the month."},"remaining":{"type":"integer","minimum":0,"description":"Exclusive leads still to sell: demand minus sold."},"reachable":{"type":"integer","minimum":0,"description":"The capacity the daily caps still let Auto-sale fill before the month ends."},"days_elapsed":{"type":"number","minimum":0,"description":"Days of the month gone."},"days_left":{"type":"number","minimum":0,"description":"Days of the month left."},"generated_per_day":{"type":"number","minimum":0,"description":"Leads that came in per day of the month so far."},"sell_through":{"type":"number","nullable":true,"minimum":0,"maximum":1,"description":"The share of incoming leads that sold, 0 to 1; null before any lead came in."},"refund_rate":{"type":"number","minimum":0,"maximum":1,"description":"The share of Lead sales refunded, 0 to 1."},"needed_generated":{"type":"integer","nullable":true,"minimum":0,"description":"Leads still to come in to fill the reachable capacity; for a past month, those that would have filled what stayed empty. Null when leads came in but none sold, so no number of them is known to fill a slot."},"needed_per_day":{"type":"number","nullable":true,"minimum":0,"description":"needed_generated spread over the days left; null once the month ended or without an estimate."},"projected_generated":{"type":"integer","minimum":0,"description":"Leads the current pace brings in before the month ends."},"projected_fill":{"type":"number","minimum":0,"description":"The capacity filled at month end at the current pace, 0 to 1."},"gap":{"type":"integer","nullable":true,"minimum":0,"description":"Leads the current pace falls short of needed_generated by; null when needed_generated is."},"series":{"type":"array","items":{"type":"object","properties":{"day":{"type":"integer","minimum":1,"maximum":31,"description":"The day of the month."},"generated":{"type":"number","nullable":true,"minimum":0,"description":"Leads that came in up to the day; null for days still ahead."},"projected":{"type":"number","nullable":true,"minimum":0,"description":"Where generated lands at the current pace; null before today."},"needed":{"type":"number","nullable":true,"minimum":0,"description":"Where generated has to land to fill the reachable capacity; null before today or without an estimate."}},"required":["day","generated","projected","needed"]},"description":"Cumulative leads per day of the month, plus the forward lines from today."}},"required":["demand","sold","remaining","reachable","days_elapsed","days_left","generated_per_day","sell_through","refund_rate","needed_generated","needed_per_day","projected_generated","projected_fill","gap","series"],"description":"How many leads it takes to fill the Lead buyers' Exclusive lead capacity."}},"required":["month","is_current_month","buyers","refunds","runway"]},"LeadTagResult":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"Always true: the Lead has the Tag."}},"required":["success"]},"LeadTagInput":{"type":"object","properties":{"tagId":{"type":"string","nullable":true,"format":"uuid","description":"The Tag to give the Lead, replacing any it has; null removes it. A Tag with a Call cadence schedules the Lead."}},"required":["tagId"]},"LeadOwnerUpdate":{"type":"object","properties":{"ownerId":{"type":"string","nullable":true,"format":"uuid","description":"The user id of the Member to make the Lead's Assignee; null leaves it without one."}},"required":["ownerId"]},"TagList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The Tag's id."},"name":{"type":"string","description":"The Tag's name."},"color":{"type":"string","description":"The Tag's colour; older Tags may hold a value from before the colour list."},"created_at":{"type":"string","description":"When the Tag was added."},"schedulers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"The Call cadence's id."},"data":{"nullable":true,"description":"The Call cadence's configuration."}},"required":["id"]},"description":"The Tag's Call cadences; only with include=scheduler."}},"required":["id","name","color","created_at"]},"description":"Every Tag of the Organization, newest first."}},"required":["items"]},"Tag":{"type":"object","properties":{"id":{"type":"string","description":"The Tag's id."},"name":{"type":"string","description":"The Tag's name."},"color":{"type":"string","description":"The Tag's colour; older Tags may hold a value from before the colour list."},"created_at":{"type":"string","description":"When the Tag was added."}},"required":["id","name","color","created_at"]},"CreateTagInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"description":"The Tag's name."},"color":{"type":"string","enum":["blue","green","yellow","red","purple","pink"],"description":"The Tag's colour."}},"required":["name","color"]},"UpdateTagInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"description":"The Tag's name."},"color":{"type":"string","enum":["blue","green","yellow","red","purple","pink"],"description":"The Tag's colour."}}},"LeadChart":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","description":"The bucket's hour or day, as the chart labels it."},"called":{"type":"integer","minimum":0,"description":"Calls in the bucket."},"not_reached":{"type":"integer","minimum":0,"description":"Calls that didn't reach the lead."},"wrong_phone":{"type":"integer","minimum":0,"description":"Calls that found a wrong phone number."},"rescheduled":{"type":"integer","minimum":0,"description":"Callbacks set."},"exported":{"type":"integer","minimum":0,"description":"Leads Converted."}},"required":["label","called","not_reached","wrong_phone","rescheduled","exported"]},"description":"One bucket per hour for a single day, per day otherwise."}},"required":["items"]},"RefundChart":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","description":"The bucket's hour or day, as the chart labels it."},"REFUND_REQUESTED":{"type":"integer","minimum":0,"description":"Complaints filed."},"REFUND_APPROVED":{"type":"integer","minimum":0,"description":"Complaints approved."},"REFUND_DECLINED":{"type":"integer","minimum":0,"description":"Complaints declined."}},"required":["label","REFUND_REQUESTED","REFUND_APPROVED","REFUND_DECLINED"]},"description":"One bucket per hour for a single day, per day otherwise."}},"required":["items"]},"QuickStats":{"type":"object","properties":{"total_leads":{"type":"integer","minimum":0,"description":"Unsold leads the caller may see that came in during the window."},"total_called":{"type":"integer","minimum":0,"description":"Call events on those leads."},"total_converted":{"type":"integer","minimum":0,"description":"Conversion events on those leads."},"total_leads_change":{"type":"number","nullable":true,"description":"The change of total_leads in percent against the previous window of the same length; null when that window is empty or the time frame is all."},"total_called_change":{"type":"number","nullable":true,"description":"The change of total_called in percent against the previous window of the same length; null when that window is empty or the time frame is all."},"total_converted_change":{"type":"number","nullable":true,"description":"The change of total_converted in percent against the previous window of the same length; null when that window is empty or the time frame is all."}},"required":["total_leads","total_called","total_converted","total_leads_change","total_called_change","total_converted_change"]},"AdGuidelines":{"type":"object","properties":{"adGuidelines":{"type":"string","description":"The Organization's Ad guidelines: free text on tone, structure, rules, facts and example ads that Meta (Facebook/Instagram) ad copy follows. The built-in default while the Organization has saved none."},"isDefault":{"type":"boolean","description":"True while the Organization has not saved its own Ad guidelines."}},"required":["adGuidelines","isDefault"]},"CompanyProfile":{"type":"object","properties":{"basis":{"type":"object","properties":{"name":{"type":"string","nullable":true,"description":"The company's name."},"primaryCategory":{"type":"string","nullable":true,"description":"What the company is, in a few words, e.g. \"Dachdecker\"."},"additionalCategories":{"type":"array","items":{"type":"string"},"description":"Further categories the company fits."},"description":{"type":"string","nullable":true,"description":"What the company is and does."},"oneLineDescription":{"type":"string","nullable":true,"description":"The company in one sentence."},"foundedYear":{"type":"integer","nullable":true,"description":"The year the company was founded."},"logoAssetId":{"type":"string","nullable":true,"format":"uuid","description":"The company's logo: one of the Organization's image Assets."}},"required":["name","primaryCategory","additionalCategories","description","oneLineDescription","foundedYear","logoAssetId"],"description":"What the company is and does."},"contact":{"type":"object","properties":{"phone":{"type":"string","nullable":true,"description":"The company's main phone number."},"morePhoneNumbers":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","description":"What the number is for, e.g. \"Notdienst\"."},"number":{"type":"string","description":"The phone number."}},"required":["label","number"]},"description":"Further phone numbers, each with a label."},"whatsapp":{"type":"string","nullable":true,"description":"The company's WhatsApp number."},"email":{"type":"string","nullable":true,"description":"The company's contact email address."},"website":{"type":"string","nullable":true,"description":"The company's website."},"bookingUrl":{"type":"string","nullable":true,"description":"Where customers book an appointment online."},"socialProfiles":{"type":"array","items":{"type":"string"},"description":"Links to the company's social media profiles."}},"required":["phone","morePhoneNumbers","whatsapp","email","website","bookingUrl","socialProfiles"],"description":"How to reach the company."},"location":{"type":"object","properties":{"address":{"type":"object","properties":{"street":{"type":"string","nullable":true,"description":"The street of the company's address."},"houseNumber":{"type":"string","nullable":true,"description":"The house number of the company's address."},"postalCode":{"type":"string","nullable":true,"description":"The postal code of the company's address."},"city":{"type":"string","nullable":true,"description":"The city of the company's address."},"country":{"type":"string","nullable":true,"description":"The country of the company's address."}},"required":["street","houseNumber","postalCode","city","country"],"description":"The company's address."},"serviceArea":{"type":"array","items":{"type":"string"},"description":"The places the company works in."},"radiusKm":{"type":"integer","nullable":true,"description":"How far from its address the company works, in kilometres."},"postalCodeAreas":{"type":"array","items":{"type":"string"},"description":"The postal code areas the company works in, each a postal code or its first digits."}},"required":["address","serviceArea","radiusKm","postalCodeAreas"],"description":"Where the company works."},"services":{"type":"object","properties":{"services":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The service's name."},"description":{"type":"string","description":"What the service includes."},"priceRange":{"type":"string","description":"What the service costs, as the company puts it, e.g. \"ab 500 €\"."}},"required":["name","description","priceRange"]},"description":"The services the company offers."},"processAndDuration":{"type":"string","nullable":true,"description":"How a job runs and how long it takes."}},"required":["services","processAndDuration"],"description":"What the company offers and how a job runs."},"attributes":{"type":"object","properties":{"attributes":{"type":"array","items":{"type":"string"},"description":"What sets the company apart, as short tags, e.g. \"Meisterbetrieb\"."},"certifications":{"type":"array","items":{"type":"string"},"description":"The company's certifications."},"awards":{"type":"array","items":{"type":"string"},"description":"The company's awards."}},"required":["attributes","certifications","awards"],"description":"The company's attributes, certifications and awards."},"whyUs":{"type":"object","properties":{"targetGroups":{"type":"array","items":{"type":"string"},"description":"Who the company's customers are."},"usps":{"type":"array","items":{"type":"string"},"description":"Why customers choose the company: its unique selling points."},"keyFigures":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"The figure, e.g. \"500+\"."},"label":{"type":"string","description":"What the figure counts, e.g. \"finished jobs\"."}},"required":["value","label"]},"description":"Figures that prove the company's work, each with a label."},"objections":{"type":"array","items":{"type":"object","properties":{"objection":{"type":"string","description":"The doubt, as a customer puts it."},"answer":{"type":"string","description":"The company's answer to the doubt."}},"required":["objection","answer"]},"description":"Doubts customers raise, each with the company's answer."},"guarantees":{"type":"string","nullable":true,"description":"What the company guarantees."},"whatWeDontDo":{"type":"string","nullable":true,"description":"What the company doesn't do."},"primaryGoal":{"type":"string","nullable":true,"enum":["call","on_site_appointment","inquiry","booking",null],"description":"What a visitor should do first: call, book an on-site appointment, send an inquiry or book online."}},"required":["targetGroups","usps","keyFigures","objections","guarantees","whatWeDontDo","primaryGoal"],"description":"Why customers choose the company."},"voice":{"type":"object","properties":{"toneAndAddress":{"type":"string","nullable":true,"description":"How the company speaks: its tone, and whether it says du or Sie."},"wordsWeUse":{"type":"array","items":{"type":"string"},"description":"Words the company likes to use."},"wordsWeAvoid":{"type":"array","items":{"type":"object","properties":{"word":{"type":"string","description":"The word the company avoids."},"replacement":{"type":"string","description":"What the company says instead."}},"required":["word","replacement"]},"description":"Words the company avoids, each with what it says instead."},"taboos":{"type":"array","items":{"type":"string"},"description":"Topics and claims the company never uses."}},"required":["toneAndAddress","wordsWeUse","wordsWeAvoid","taboos"],"description":"How the company speaks: its Voice."}},"required":["basis","contact","location","services","attributes","whyUs","voice"]},"CompanyProfilePatch":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The company's name."},"primaryCategory":{"type":"string","nullable":true,"maxLength":100,"description":"What the company is, in a few words, e.g. \"Dachdecker\"."},"additionalCategories":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":10,"description":"Further categories the company fits."},"description":{"type":"string","nullable":true,"maxLength":750,"description":"What the company is and does."},"oneLineDescription":{"type":"string","nullable":true,"maxLength":160,"description":"The company in one sentence."},"foundedYear":{"type":"integer","nullable":true,"minimum":1800,"description":"The year the company was founded."},"logoAssetId":{"type":"string","nullable":true,"format":"uuid","description":"The company's logo: one of the Organization's image Assets."},"phone":{"type":"string","nullable":true,"maxLength":100,"description":"The company's main phone number."},"morePhoneNumbers":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","maxLength":100,"description":"What the number is for, e.g. \"Notdienst\"."},"number":{"type":"string","maxLength":100,"description":"The phone number."}},"required":["label","number"],"additionalProperties":false},"maxItems":5,"description":"Further phone numbers, each with a label."},"whatsapp":{"type":"string","nullable":true,"maxLength":100,"description":"The company's WhatsApp number."},"email":{"type":"string","nullable":true,"maxLength":2048,"format":"email","description":"The company's contact email address."},"website":{"type":"string","nullable":true,"maxLength":2048,"format":"uri","description":"The company's website."},"bookingUrl":{"type":"string","nullable":true,"maxLength":2048,"format":"uri","description":"Where customers book an appointment online."},"socialProfiles":{"type":"array","items":{"type":"string","maxLength":2048,"format":"uri"},"maxItems":10,"description":"Links to the company's social media profiles."},"street":{"type":"string","nullable":true,"maxLength":100,"description":"The street of the company's address."},"houseNumber":{"type":"string","nullable":true,"maxLength":100,"description":"The house number of the company's address."},"postalCode":{"type":"string","nullable":true,"maxLength":100,"description":"The postal code of the company's address."},"city":{"type":"string","nullable":true,"maxLength":100,"description":"The city of the company's address."},"country":{"type":"string","nullable":true,"maxLength":100,"description":"The country of the company's address."},"serviceArea":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":20,"description":"The places the company works in."},"radiusKm":{"type":"integer","nullable":true,"minimum":1,"maximum":500,"description":"How far from its address the company works, in kilometres."},"postalCodeAreas":{"type":"array","items":{"type":"string","pattern":"^\\d{1,5}$"},"maxItems":20,"description":"The postal code areas the company works in, each a postal code or its first digits."},"services":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The service's name."},"description":{"type":"string","maxLength":1000,"description":"What the service includes."},"priceRange":{"type":"string","maxLength":100,"description":"What the service costs, as the company puts it, e.g. \"ab 500 €\"."}},"required":["name","description","priceRange"],"additionalProperties":false},"maxItems":20,"description":"The services the company offers."},"processAndDuration":{"type":"string","nullable":true,"maxLength":1000,"description":"How a job runs and how long it takes."},"attributes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":20,"description":"What sets the company apart, as short tags, e.g. \"Meisterbetrieb\"."},"certifications":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":20,"description":"The company's certifications."},"awards":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":20,"description":"The company's awards."},"targetGroups":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":10,"description":"Who the company's customers are."},"usps":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":5,"description":"Why customers choose the company: its unique selling points."},"keyFigures":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":100,"description":"The figure, e.g. \"500+\"."},"label":{"type":"string","minLength":1,"maxLength":100,"description":"What the figure counts, e.g. \"finished jobs\"."}},"required":["value","label"],"additionalProperties":false},"maxItems":6,"description":"Figures that prove the company's work, each with a label."},"objections":{"type":"array","items":{"type":"object","properties":{"objection":{"type":"string","minLength":1,"maxLength":100,"description":"The doubt, as a customer puts it."},"answer":{"type":"string","minLength":1,"maxLength":1000,"description":"The company's answer to the doubt."}},"required":["objection","answer"],"additionalProperties":false},"maxItems":10,"description":"Doubts customers raise, each with the company's answer."},"guarantees":{"type":"string","nullable":true,"maxLength":1000,"description":"What the company guarantees."},"whatWeDontDo":{"type":"string","nullable":true,"maxLength":1000,"description":"What the company doesn't do."},"primaryGoal":{"type":"string","nullable":true,"enum":["call","on_site_appointment","inquiry","booking",null],"description":"What a visitor should do first: call, book an on-site appointment, send an inquiry or book online."},"toneAndAddress":{"type":"string","nullable":true,"maxLength":1000,"description":"How the company speaks: its tone, and whether it says du or Sie."},"wordsWeUse":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":30,"description":"Words the company likes to use."},"wordsWeAvoid":{"type":"array","items":{"type":"object","properties":{"word":{"type":"string","minLength":1,"maxLength":100,"description":"The word the company avoids."},"replacement":{"type":"string","maxLength":100,"description":"What the company says instead."}},"required":["word","replacement"],"additionalProperties":false},"maxItems":30,"description":"Words the company avoids, each with what it says instead."},"taboos":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":20,"description":"Topics and claims the company never uses."}},"additionalProperties":false},"CompanyProfilePrefillJob":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The prefill job's id."},"status":{"type":"string","enum":["queued","running","done","failed","cancelled"],"description":"Where the job stands: queued and running haven't ended; done, failed and cancelled have."},"url":{"type":"string","description":"The website the job reads."},"pagesRead":{"type":"integer","minimum":0,"description":"The pages of the website the job has read so far."},"filledFields":{"type":"array","items":{"type":"string","enum":["logoAssetId","name","primaryCategory","additionalCategories","description","oneLineDescription","foundedYear","phone","morePhoneNumbers","whatsapp","email","website","bookingUrl","socialProfiles","address","serviceArea","radiusKm","postalCodeAreas","services","processAndDuration","attributes","certifications","awards","targetGroups","usps","keyFigures","objections","guarantees","whatWeDontDo","primaryGoal","toneAndAddress","wordsWeUse","wordsWeAvoid","taboos"]},"description":"The Company profile fields the job saved; set once it is done."},"droppedFields":{"type":"array","items":{"type":"string"},"description":"The fields whose suggestion failed validation and wasn't saved."},"styleGuideId":{"type":"string","nullable":true,"format":"uuid","description":"The Style guide the job created from the website's colours, fonts and corners. Only an Organization without a shared Style guide gets one."},"errorCode":{"type":"string","nullable":true,"enum":["unreachable","no_content","model_failed","interrupted",null],"description":"Why the job failed: unreachable, the website couldn't be loaded or isn't public; no_content, nothing could be read from it; model_failed, the model call failed; interrupted, the server stopped mid-run or the run took too long."},"createdAt":{"type":"string","format":"date-time","description":"When the job was started."},"finishedAt":{"type":"string","nullable":true,"format":"date-time","description":"When the job ended; null while it runs."}},"required":["id","status","url","pagesRead","filledFields","droppedFields","styleGuideId","errorCode","createdAt","finishedAt"]},"CompanyProfilePrefillCreate":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri","description":"The company's website to read the Company profile from."}},"required":["url"],"additionalProperties":false},"CompanyProfilePrefillActive":{"type":"object","properties":{"job":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The prefill job's id."},"status":{"type":"string","enum":["queued","running","done","failed","cancelled"],"description":"Where the job stands: queued and running haven't ended; done, failed and cancelled have."},"url":{"type":"string","description":"The website the job reads."},"pagesRead":{"type":"integer","minimum":0,"description":"The pages of the website the job has read so far."},"filledFields":{"type":"array","items":{"type":"string","enum":["logoAssetId","name","primaryCategory","additionalCategories","description","oneLineDescription","foundedYear","phone","morePhoneNumbers","whatsapp","email","website","bookingUrl","socialProfiles","address","serviceArea","radiusKm","postalCodeAreas","services","processAndDuration","attributes","certifications","awards","targetGroups","usps","keyFigures","objections","guarantees","whatWeDontDo","primaryGoal","toneAndAddress","wordsWeUse","wordsWeAvoid","taboos"]},"description":"The Company profile fields the job saved; set once it is done."},"droppedFields":{"type":"array","items":{"type":"string"},"description":"The fields whose suggestion failed validation and wasn't saved."},"styleGuideId":{"type":"string","nullable":true,"format":"uuid","description":"The Style guide the job created from the website's colours, fonts and corners. Only an Organization without a shared Style guide gets one."},"errorCode":{"type":"string","nullable":true,"enum":["unreachable","no_content","model_failed","interrupted",null],"description":"Why the job failed: unreachable, the website couldn't be loaded or isn't public; no_content, nothing could be read from it; model_failed, the model call failed; interrupted, the server stopped mid-run or the run took too long."},"createdAt":{"type":"string","format":"date-time","description":"When the job was started."},"finishedAt":{"type":"string","nullable":true,"format":"date-time","description":"When the job ended; null while it runs."}},"required":["id","status","url","pagesRead","filledFields","droppedFields","styleGuideId","errorCode","createdAt","finishedAt"],"description":"The Organization's prefill job that hasn't ended; null when none runs."}},"required":["job"]},"GeneratedAdCopy":{"type":"object","properties":{"ads":{"type":"array","items":{"type":"object","properties":{"headline":{"type":"string","minLength":1,"description":"The ad's headline: Meta's title."},"primaryText":{"type":"string","minLength":1,"description":"The ad's main text: Meta's body."},"callToActionType":{"type":"string","enum":["LEARN_MORE","APPLY_NOW","SIGN_UP","CONTACT_US","GET_QUOTE","BOOK_NOW","SUBSCRIBE","DOWNLOAD","SHOP_NOW","ORDER_NOW","GET_OFFER","GET_STARTED","REQUEST_TIME","CALL_NOW","MESSAGE_PAGE","WHATSAPP_MESSAGE"],"description":"The ad's Meta call_to_action_type, the button under the ad."}},"required":["headline","primaryText","callToActionType"]},"description":"The ready-to-paste Meta ads, one per variant."}},"required":["ads"]},"MetaAdAccountList":{"type":"object","properties":{"connected":{"type":"boolean","description":"False until the Organization saves a Meta token."},"ad_accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d+$","description":"The ad account's Meta id."},"name":{"type":"string","description":"The ad account's name in Meta."},"currency":{"type":"string","description":"The ad account's currency, an ISO 4217 code such as EUR."}},"required":["id","name","currency"]},"description":"The ad accounts the Organization's token can read."}},"required":["connected","ad_accounts"]},"MetaAdTree":{"type":"object","properties":{"campaigns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The object's Meta id."},"name":{"type":"string","description":"The object's name in Meta."},"status":{"type":"string","description":"Meta's effective_status, e.g. ACTIVE, PAUSED or CAMPAIGN_PAUSED."},"ad_sets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The object's Meta id."},"name":{"type":"string","description":"The object's name in Meta."},"status":{"type":"string","description":"Meta's effective_status, e.g. ACTIVE, PAUSED or CAMPAIGN_PAUSED."},"ads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The object's Meta id."},"name":{"type":"string","description":"The object's name in Meta."},"status":{"type":"string","description":"Meta's effective_status, e.g. ACTIVE, PAUSED or CAMPAIGN_PAUSED."}},"required":["id","name","status"]},"description":"The Ad set's ads."}},"required":["id","name","status","ads"]},"description":"The Meta campaign's Ad sets."}},"required":["id","name","status","ad_sets"]},"description":"The ad account's Meta campaigns."}},"required":["campaigns"]},"MetaInsights":{"type":"object","properties":{"currency":{"type":"string","description":"The ad account's currency, an ISO 4217 code such as EUR."},"days":{"type":"array","items":{"type":"object","properties":{"impressions":{"type":"number","description":"How often the ads were shown."},"reach":{"type":"number","description":"People reached, summed over ads: a person two ads reached counts twice."},"clicks":{"type":"number","description":"Link clicks."},"spend":{"type":"number","description":"Ad spend, in minor units of currency."},"conversions":{"type":"number","description":"Leads: Meta's lead action."},"date":{"type":"string","format":"date","description":"The day, in the ad account's timezone."}},"required":["impressions","reach","clicks","spend","conversions","date"]},"description":"One row per day of the range."},"totals":{"type":"object","properties":{"impressions":{"type":"number","description":"How often the ads were shown."},"reach":{"type":"number","description":"People reached, summed over ads: a person two ads reached counts twice."},"clicks":{"type":"number","description":"Link clicks."},"spend":{"type":"number","description":"Ad spend, in minor units of currency."},"conversions":{"type":"number","description":"Leads: Meta's lead action."},"ctr":{"type":"number","nullable":true,"description":"Click-through rate: clicks per impression, as a fraction. Null without impressions."},"cpc":{"type":"number","nullable":true,"description":"Spend per click, in minor units. Null without clicks."},"cpm":{"type":"number","nullable":true,"description":"Spend per thousand impressions, in minor units. Null without impressions."},"cpa":{"type":"number","nullable":true,"description":"Cost per lead, in minor units. Null without leads."},"frequency":{"type":"number","nullable":true,"description":"Impressions per person reached. Null without reach."}},"required":["impressions","reach","clicks","spend","conversions","ctr","cpc","cpm","cpa","frequency"],"description":"The whole range's totals and rates."}},"required":["currency","days","totals"]},"MetaAdsReport":{"type":"object","properties":{"currency":{"type":"string","description":"The ad account's currency, an ISO 4217 code such as EUR."},"ads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The ad's Meta id."},"name":{"type":"string","description":"The ad's name in Meta."},"status":{"type":"string","description":"Meta's effective_status of the ad."},"campaign":{"type":"object","properties":{"id":{"type":"string","description":"The Meta campaign's Meta id."},"name":{"type":"string","nullable":true,"description":"The Meta campaign's name in Meta. Null when Meta doesn't say."}},"required":["id","name"],"description":"The Meta campaign the ad is in."},"ad_set":{"type":"object","properties":{"id":{"type":"string","description":"The Ad set's Meta id."},"name":{"type":"string","nullable":true,"description":"The Ad set's name in Meta. Null when Meta doesn't say."}},"required":["id","name"],"description":"The Ad set the ad is in."},"creative":{"type":"object","nullable":true,"properties":{"format":{"type":"string","enum":["image","video","carousel"],"description":"What the ad shows: one image, a video or a carousel of cards."},"image_url":{"type":"string","nullable":true,"description":"The ad's image, or the video's thumbnail. Null without one."},"primary_text":{"type":"string","nullable":true,"description":"The ad's main text. Null without one."},"headline":{"type":"string","nullable":true,"description":"The ad's headline. Null without one."},"description":{"type":"string","nullable":true,"description":"The line under the headline. Null without one."},"cta":{"type":"string","nullable":true,"description":"Meta's call-to-action type, e.g. LEARN_MORE. Null without one."},"lead_form":{"type":"boolean","description":"True when the ad opens Meta's instant form rather than a website."},"cards":{"type":"array","items":{"type":"object","properties":{"headline":{"type":"string","nullable":true,"description":"The card's headline. Null without one."},"description":{"type":"string","nullable":true,"description":"The card's description. Null without one."},"image_url":{"type":"string","nullable":true,"description":"The card's image. Null without one."}},"required":["headline","description","image_url"]},"description":"A carousel's cards, in order. Empty for other formats."},"page":{"type":"object","nullable":true,"properties":{"id":{"type":"string","description":"The Facebook Page's Meta id."},"name":{"type":"string","description":"The Facebook Page's name."},"picture_url":{"type":"string","nullable":true,"description":"The Facebook Page's profile picture. Null without one."}},"required":["id","name","picture_url"],"description":"The Facebook Page the ad runs as. Null when Meta doesn't say."}},"required":["format","image_url","primary_text","headline","description","cta","lead_form","cards","page"],"description":"What the ad shows. Null when Meta doesn't say."},"reach":{"type":"number","description":"People reached over the whole range; daily reach doesn't add up to it."},"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date","description":"The day, in the ad account's timezone."},"spend":{"type":"number","description":"Ad spend, in minor units of the report's currency."},"impressions":{"type":"number","description":"How often the ad was shown."},"reach":{"type":"number","description":"People the ad reached that day."},"clicks":{"type":"number","description":"Link clicks."},"leads":{"type":"number","description":"Leads: Meta's lead action."}},"required":["date","spend","impressions","reach","clicks","leads"]},"description":"One row per day of the range."}},"required":["id","name","status","campaign","ad_set","creative","reach","days"]},"description":"Every ad the Campaign has enabled, paused and archived ones included."}},"required":["currency","ads"]},"AutopilotProposalList":{"type":"object","properties":{"proposals":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Proposal's id."},"run_id":{"type":"string","format":"uuid","description":"The id of the Run that made it."},"campaign_id":{"type":"string","nullable":true,"format":"uuid","description":"The Campaign, for a Proposal of a Campaign Run; null for a Landing page or Funnel Run's."},"status":{"type":"string","enum":["generating","pending","approved","executing","executed","failed","rejected","superseded"],"description":"Where the Proposal stands: generating (its Ad or images are being built), pending (waits for a decision), approved, executing, executed, failed, rejected or superseded (replaced by a newer Run's Proposal)."},"reason":{"type":"string","description":"Why osiro.autopilot proposes it."},"rejected_alternative":{"type":"object","nullable":true,"properties":{"layer":{"type":"string","enum":["ad","landing_page","funnel"],"description":"The layer autopilot considered changing instead."},"why":{"type":"string","minLength":1,"maxLength":1000,"description":"Why changing that layer is not the better move, briefly."}},"required":["layer","why"],"description":"The other layer osiro.autopilot considered changing instead; null for Proposals made before it named one."},"rejection_reason":{"type":"string","nullable":true,"description":"A rejected Proposal's reason, if the Member gave one."},"failure":{"type":"string","nullable":true,"enum":["generation","meta","meta_auth","outdated","interrupted","validation","publish",null],"description":"Why a failed Proposal failed; null otherwise."},"error":{"type":"string","nullable":true,"description":"Meta's message for a meta failure, the reason code for an outdated one, or what went wrong for another failure; null otherwise."},"decision":{"type":"object","nullable":true,"properties":{"by":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The deciding user's id."},"name":{"type":"string","nullable":true,"description":"The deciding user's display name; null when unknown."}},"required":["id","name"],"description":"Who decided; null once that user is deleted."},"at":{"type":"string","description":"When it was decided, as ISO 8601."}},"required":["by","at"],"description":"Who approved or rejected it, and when; null before."},"executed_at":{"type":"string","nullable":true,"description":"When it was carried out, as ISO 8601; null before."},"outcome":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending"],"description":"Not measured yet: too few days have passed, or its A/B-Test still runs."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"source":{"type":"string","enum":["experiment","before_after"],"description":"How the Outcome was measured: experiment (from the A/B-Test the edit ran as) or before_after (from the days before and after a directly published edit). Absent on older Outcomes, which compare before and after with a verdict."}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["measured"],"description":"Measured, with a verdict."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"source":{"type":"string","enum":["experiment","before_after"],"description":"How the Outcome was measured: experiment (from the A/B-Test the edit ran as) or before_after (from the days before and after a directly published edit). Absent on older Outcomes, which compare before and after with a verdict."},"verdict":{"type":"string","enum":["better","worse","unchanged","inconclusive"],"description":"Whether the deciding rate improved, worsened or held: better, worse, unchanged or inconclusive (for cost per lead, one window had no spend or neither had a lead; for a rate, not clear yet)."},"final":{"type":"boolean","description":"false while the verdict is unclear before day 28, so the next Run measures it again; absent means final."},"measured_at":{"type":"string","description":"When the Run measured it, as ISO 8601."},"before":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window before the change."},"after":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window after the change."},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["cost_per_lead","ad_set_cost_per_lead","bounce_rate","median_duration_ms","conversion_rate","visits","starts","completion_rate","block_reach","step_drop_off"],"description":"What the metric measures: cost_per_lead (the Campaign's), ad_set_cost_per_lead, bounce_rate, median_duration_ms, conversion_rate, visits, starts, completion_rate, block_reach (of one changed block) or step_drop_off (of one changed step). Money in minor units, rates in percent."},"block_id":{"type":"string","description":"The changed block, for block_reach."},"step_id":{"type":"string","description":"The changed step, for step_drop_off."},"before":{"type":"number","nullable":true,"description":"The value in the window before; null without data, such as a cost per lead without a lead."},"after":{"type":"number","nullable":true,"description":"The value in the window after; null without data, such as a cost per lead without a lead."},"change":{"type":"number","nullable":true,"description":"after ÷ before − 1, in percent; null when either is missing or before is 0."}},"required":["metric","before","after","change"]},"description":"Each compared metric, before and after."},"probability_better":{"type":"number","description":"The probability that the deciding rate is better after than before, in percent."},"interval":{"type":"object","properties":{"low":{"type":"number","description":"The interval's low end, in percent."},"high":{"type":"number","description":"The interval's high end, in percent."}},"required":["low","high"],"description":"The 90 % credible interval of the deciding rate's after ÷ before − 1."},"traffic_sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","description":"The Traffic source: a utm_source, (none) or (other)."},"before":{"type":"number","description":"Its share of visits or starts before, in percent."},"after":{"type":"number","description":"Its share of visits or starts after, in percent."}},"required":["source","before","after"]},"description":"The largest Traffic sources' shares of visits or starts, before and after."},"overlapping":{"type":"array","items":{"type":"object","properties":{"proposal_id":{"type":"string","description":"The other edit's Proposal id."},"kind":{"type":"string","enum":["edit_landing_page","edit_funnel"],"description":"What the edit changed: edit_landing_page or edit_funnel."},"landing_page_id":{"type":"string","nullable":true,"description":"The Landing page it edited; null for a Funnel edit."},"funnel_id":{"type":"string","nullable":true,"description":"The Funnel it edited; null for a Landing page edit."},"executed_at":{"type":"string","description":"When it was carried out, as ISO 8601."}},"required":["proposal_id","kind","landing_page_id","funnel_id","executed_at"]},"description":"Other executed edits of the same Landing page or Funnel within the windows."},"winner":{"type":"string","enum":["A","B","none"],"description":"With source experiment: the Test variant the Experiment kept, A or B, or none."},"ended_by":{"type":"string","enum":["proposal","member"],"description":"With source experiment: who ended the Experiment, the approved end_experiment proposal or a member."},"test_variant_edited":{"type":"boolean","description":"With source experiment: whether Test variant B was published again after the test started."},"end_reason":{"type":"string","enum":["subject_gone"],"description":"With source experiment: the test ended because a Member unpublished or deleted its Landing page or Funnel. Unclear, without a Winner or numbers."}},"required":["status","verdict","measured_at","before","after","metrics"]},{"type":"object","properties":{"status":{"type":"string","enum":["observed"],"description":"A directly published edit's numbers before and after, without a verdict."},"source":{"type":"string","enum":["before_after"],"description":"Measured from the days before and after the edit."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"measured_at":{"type":"string","description":"When the Run measured it, as ISO 8601."},"before":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window before the change."},"after":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window after the change."},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["cost_per_lead","ad_set_cost_per_lead","bounce_rate","median_duration_ms","conversion_rate","visits","starts","completion_rate","block_reach","step_drop_off"],"description":"What the metric measures: cost_per_lead (the Campaign's), ad_set_cost_per_lead, bounce_rate, median_duration_ms, conversion_rate, visits, starts, completion_rate, block_reach (of one changed block) or step_drop_off (of one changed step). Money in minor units, rates in percent."},"block_id":{"type":"string","description":"The changed block, for block_reach."},"step_id":{"type":"string","description":"The changed step, for step_drop_off."},"before":{"type":"number","nullable":true,"description":"The value in the window before; null without data, such as a cost per lead without a lead."},"after":{"type":"number","nullable":true,"description":"The value in the window after; null without data, such as a cost per lead without a lead."},"change":{"type":"number","nullable":true,"description":"after ÷ before − 1, in percent; null when either is missing or before is 0."}},"required":["metric","before","after","change"]},"description":"Each compared metric, before and after."}},"required":["status","source","measured_at","before","after","metrics"]},{"nullable":true}],"description":"Whether it helped, once carried out; null before. Pending until a Run measures it."},"created_at":{"type":"string","description":"When the Run made it, as ISO 8601."},"kind":{"type":"string","enum":["pause_ad"],"description":"Pauses a Meta ad."},"ad_id":{"type":"string","pattern":"^\\d+$","description":"The Meta ad to pause."},"ad_name":{"type":"string","nullable":true,"description":"The ad's name as the Run saw it; null when the Run's snapshot lacks the ad."}},"required":["id","run_id","campaign_id","status","reason","rejected_alternative","rejection_reason","failure","error","decision","executed_at","outcome","created_at","kind","ad_id","ad_name"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Proposal's id."},"run_id":{"type":"string","format":"uuid","description":"The id of the Run that made it."},"campaign_id":{"type":"string","nullable":true,"format":"uuid","description":"The Campaign, for a Proposal of a Campaign Run; null for a Landing page or Funnel Run's."},"status":{"type":"string","enum":["generating","pending","approved","executing","executed","failed","rejected","superseded"],"description":"Where the Proposal stands: generating (its Ad or images are being built), pending (waits for a decision), approved, executing, executed, failed, rejected or superseded (replaced by a newer Run's Proposal)."},"reason":{"type":"string","description":"Why osiro.autopilot proposes it."},"rejected_alternative":{"type":"object","nullable":true,"properties":{"layer":{"type":"string","enum":["ad","landing_page","funnel"],"description":"The layer autopilot considered changing instead."},"why":{"type":"string","minLength":1,"maxLength":1000,"description":"Why changing that layer is not the better move, briefly."}},"required":["layer","why"],"description":"The other layer osiro.autopilot considered changing instead; null for Proposals made before it named one."},"rejection_reason":{"type":"string","nullable":true,"description":"A rejected Proposal's reason, if the Member gave one."},"failure":{"type":"string","nullable":true,"enum":["generation","meta","meta_auth","outdated","interrupted","validation","publish",null],"description":"Why a failed Proposal failed; null otherwise."},"error":{"type":"string","nullable":true,"description":"Meta's message for a meta failure, the reason code for an outdated one, or what went wrong for another failure; null otherwise."},"decision":{"type":"object","nullable":true,"properties":{"by":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The deciding user's id."},"name":{"type":"string","nullable":true,"description":"The deciding user's display name; null when unknown."}},"required":["id","name"],"description":"Who decided; null once that user is deleted."},"at":{"type":"string","description":"When it was decided, as ISO 8601."}},"required":["by","at"],"description":"Who approved or rejected it, and when; null before."},"executed_at":{"type":"string","nullable":true,"description":"When it was carried out, as ISO 8601; null before."},"outcome":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending"],"description":"Not measured yet: too few days have passed, or its A/B-Test still runs."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"source":{"type":"string","enum":["experiment","before_after"],"description":"How the Outcome was measured: experiment (from the A/B-Test the edit ran as) or before_after (from the days before and after a directly published edit). Absent on older Outcomes, which compare before and after with a verdict."}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["measured"],"description":"Measured, with a verdict."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"source":{"type":"string","enum":["experiment","before_after"],"description":"How the Outcome was measured: experiment (from the A/B-Test the edit ran as) or before_after (from the days before and after a directly published edit). Absent on older Outcomes, which compare before and after with a verdict."},"verdict":{"type":"string","enum":["better","worse","unchanged","inconclusive"],"description":"Whether the deciding rate improved, worsened or held: better, worse, unchanged or inconclusive (for cost per lead, one window had no spend or neither had a lead; for a rate, not clear yet)."},"final":{"type":"boolean","description":"false while the verdict is unclear before day 28, so the next Run measures it again; absent means final."},"measured_at":{"type":"string","description":"When the Run measured it, as ISO 8601."},"before":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window before the change."},"after":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window after the change."},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["cost_per_lead","ad_set_cost_per_lead","bounce_rate","median_duration_ms","conversion_rate","visits","starts","completion_rate","block_reach","step_drop_off"],"description":"What the metric measures: cost_per_lead (the Campaign's), ad_set_cost_per_lead, bounce_rate, median_duration_ms, conversion_rate, visits, starts, completion_rate, block_reach (of one changed block) or step_drop_off (of one changed step). Money in minor units, rates in percent."},"block_id":{"type":"string","description":"The changed block, for block_reach."},"step_id":{"type":"string","description":"The changed step, for step_drop_off."},"before":{"type":"number","nullable":true,"description":"The value in the window before; null without data, such as a cost per lead without a lead."},"after":{"type":"number","nullable":true,"description":"The value in the window after; null without data, such as a cost per lead without a lead."},"change":{"type":"number","nullable":true,"description":"after ÷ before − 1, in percent; null when either is missing or before is 0."}},"required":["metric","before","after","change"]},"description":"Each compared metric, before and after."},"probability_better":{"type":"number","description":"The probability that the deciding rate is better after than before, in percent."},"interval":{"type":"object","properties":{"low":{"type":"number","description":"The interval's low end, in percent."},"high":{"type":"number","description":"The interval's high end, in percent."}},"required":["low","high"],"description":"The 90 % credible interval of the deciding rate's after ÷ before − 1."},"traffic_sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","description":"The Traffic source: a utm_source, (none) or (other)."},"before":{"type":"number","description":"Its share of visits or starts before, in percent."},"after":{"type":"number","description":"Its share of visits or starts after, in percent."}},"required":["source","before","after"]},"description":"The largest Traffic sources' shares of visits or starts, before and after."},"overlapping":{"type":"array","items":{"type":"object","properties":{"proposal_id":{"type":"string","description":"The other edit's Proposal id."},"kind":{"type":"string","enum":["edit_landing_page","edit_funnel"],"description":"What the edit changed: edit_landing_page or edit_funnel."},"landing_page_id":{"type":"string","nullable":true,"description":"The Landing page it edited; null for a Funnel edit."},"funnel_id":{"type":"string","nullable":true,"description":"The Funnel it edited; null for a Landing page edit."},"executed_at":{"type":"string","description":"When it was carried out, as ISO 8601."}},"required":["proposal_id","kind","landing_page_id","funnel_id","executed_at"]},"description":"Other executed edits of the same Landing page or Funnel within the windows."},"winner":{"type":"string","enum":["A","B","none"],"description":"With source experiment: the Test variant the Experiment kept, A or B, or none."},"ended_by":{"type":"string","enum":["proposal","member"],"description":"With source experiment: who ended the Experiment, the approved end_experiment proposal or a member."},"test_variant_edited":{"type":"boolean","description":"With source experiment: whether Test variant B was published again after the test started."},"end_reason":{"type":"string","enum":["subject_gone"],"description":"With source experiment: the test ended because a Member unpublished or deleted its Landing page or Funnel. Unclear, without a Winner or numbers."}},"required":["status","verdict","measured_at","before","after","metrics"]},{"type":"object","properties":{"status":{"type":"string","enum":["observed"],"description":"A directly published edit's numbers before and after, without a verdict."},"source":{"type":"string","enum":["before_after"],"description":"Measured from the days before and after the edit."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"measured_at":{"type":"string","description":"When the Run measured it, as ISO 8601."},"before":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window before the change."},"after":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window after the change."},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["cost_per_lead","ad_set_cost_per_lead","bounce_rate","median_duration_ms","conversion_rate","visits","starts","completion_rate","block_reach","step_drop_off"],"description":"What the metric measures: cost_per_lead (the Campaign's), ad_set_cost_per_lead, bounce_rate, median_duration_ms, conversion_rate, visits, starts, completion_rate, block_reach (of one changed block) or step_drop_off (of one changed step). Money in minor units, rates in percent."},"block_id":{"type":"string","description":"The changed block, for block_reach."},"step_id":{"type":"string","description":"The changed step, for step_drop_off."},"before":{"type":"number","nullable":true,"description":"The value in the window before; null without data, such as a cost per lead without a lead."},"after":{"type":"number","nullable":true,"description":"The value in the window after; null without data, such as a cost per lead without a lead."},"change":{"type":"number","nullable":true,"description":"after ÷ before − 1, in percent; null when either is missing or before is 0."}},"required":["metric","before","after","change"]},"description":"Each compared metric, before and after."}},"required":["status","source","measured_at","before","after","metrics"]},{"nullable":true}],"description":"Whether it helped, once carried out; null before. Pending until a Run measures it."},"created_at":{"type":"string","description":"When the Run made it, as ISO 8601."},"kind":{"type":"string","enum":["add_variant"],"description":"Adds a new Ad to an Ad set."},"ad_set_id":{"type":"string","pattern":"^\\d+$","description":"The Meta ad set to add the new Ad to."},"ad_set_name":{"type":"string","nullable":true,"description":"The Ad set's name as the Run saw it; null when the Run's snapshot lacks it."},"creative_brief":{"type":"object","properties":{"angle":{"type":"string","minLength":1,"maxLength":500,"description":"The ad's selling angle."},"hook":{"type":"string","minLength":1,"maxLength":500,"description":"The opening line idea that stops the scroll."},"image_prompt":{"type":"string","minLength":1,"maxLength":2000,"description":"A prompt for the ad's image."}},"required":["angle","hook","image_prompt"],"description":"What the new Ad should say and show."},"variant":{"type":"object","nullable":true,"properties":{"headline":{"type":"string","description":"The Ad's headline."},"primary_text":{"type":"string","description":"The Ad's primary text."},"call_to_action_type":{"type":"string","enum":["LEARN_MORE","APPLY_NOW","SIGN_UP","CONTACT_US","GET_QUOTE","BOOK_NOW","SUBSCRIBE","DOWNLOAD","SHOP_NOW","ORDER_NOW","GET_OFFER","GET_STARTED","REQUEST_TIME","CALL_NOW","MESSAGE_PAGE","WHATSAPP_MESSAGE"],"description":"The Ad's Call to action."},"image_url":{"type":"string","nullable":true,"description":"The Ad's image URL; null for an Ad without an image."},"link":{"type":"string","nullable":true,"description":"Where the Ad sends people; null when unknown."},"page_id":{"type":"string","nullable":true,"description":"The Facebook page the Ad runs under; null when unknown."}},"required":["headline","primary_text","call_to_action_type","image_url","link","page_id"],"description":"The finished Ad; null until osiro has built it."},"ad_id":{"type":"string","nullable":true,"pattern":"^\\d+$","description":"The Meta ad created on approval; null before."}},"required":["id","run_id","campaign_id","status","reason","rejected_alternative","rejection_reason","failure","error","decision","executed_at","outcome","created_at","kind","ad_set_id","ad_set_name","creative_brief","variant","ad_id"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Proposal's id."},"run_id":{"type":"string","format":"uuid","description":"The id of the Run that made it."},"campaign_id":{"type":"string","nullable":true,"format":"uuid","description":"The Campaign, for a Proposal of a Campaign Run; null for a Landing page or Funnel Run's."},"status":{"type":"string","enum":["generating","pending","approved","executing","executed","failed","rejected","superseded"],"description":"Where the Proposal stands: generating (its Ad or images are being built), pending (waits for a decision), approved, executing, executed, failed, rejected or superseded (replaced by a newer Run's Proposal)."},"reason":{"type":"string","description":"Why osiro.autopilot proposes it."},"rejected_alternative":{"type":"object","nullable":true,"properties":{"layer":{"type":"string","enum":["ad","landing_page","funnel"],"description":"The layer autopilot considered changing instead."},"why":{"type":"string","minLength":1,"maxLength":1000,"description":"Why changing that layer is not the better move, briefly."}},"required":["layer","why"],"description":"The other layer osiro.autopilot considered changing instead; null for Proposals made before it named one."},"rejection_reason":{"type":"string","nullable":true,"description":"A rejected Proposal's reason, if the Member gave one."},"failure":{"type":"string","nullable":true,"enum":["generation","meta","meta_auth","outdated","interrupted","validation","publish",null],"description":"Why a failed Proposal failed; null otherwise."},"error":{"type":"string","nullable":true,"description":"Meta's message for a meta failure, the reason code for an outdated one, or what went wrong for another failure; null otherwise."},"decision":{"type":"object","nullable":true,"properties":{"by":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The deciding user's id."},"name":{"type":"string","nullable":true,"description":"The deciding user's display name; null when unknown."}},"required":["id","name"],"description":"Who decided; null once that user is deleted."},"at":{"type":"string","description":"When it was decided, as ISO 8601."}},"required":["by","at"],"description":"Who approved or rejected it, and when; null before."},"executed_at":{"type":"string","nullable":true,"description":"When it was carried out, as ISO 8601; null before."},"outcome":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending"],"description":"Not measured yet: too few days have passed, or its A/B-Test still runs."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"source":{"type":"string","enum":["experiment","before_after"],"description":"How the Outcome was measured: experiment (from the A/B-Test the edit ran as) or before_after (from the days before and after a directly published edit). Absent on older Outcomes, which compare before and after with a verdict."}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["measured"],"description":"Measured, with a verdict."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"source":{"type":"string","enum":["experiment","before_after"],"description":"How the Outcome was measured: experiment (from the A/B-Test the edit ran as) or before_after (from the days before and after a directly published edit). Absent on older Outcomes, which compare before and after with a verdict."},"verdict":{"type":"string","enum":["better","worse","unchanged","inconclusive"],"description":"Whether the deciding rate improved, worsened or held: better, worse, unchanged or inconclusive (for cost per lead, one window had no spend or neither had a lead; for a rate, not clear yet)."},"final":{"type":"boolean","description":"false while the verdict is unclear before day 28, so the next Run measures it again; absent means final."},"measured_at":{"type":"string","description":"When the Run measured it, as ISO 8601."},"before":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window before the change."},"after":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window after the change."},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["cost_per_lead","ad_set_cost_per_lead","bounce_rate","median_duration_ms","conversion_rate","visits","starts","completion_rate","block_reach","step_drop_off"],"description":"What the metric measures: cost_per_lead (the Campaign's), ad_set_cost_per_lead, bounce_rate, median_duration_ms, conversion_rate, visits, starts, completion_rate, block_reach (of one changed block) or step_drop_off (of one changed step). Money in minor units, rates in percent."},"block_id":{"type":"string","description":"The changed block, for block_reach."},"step_id":{"type":"string","description":"The changed step, for step_drop_off."},"before":{"type":"number","nullable":true,"description":"The value in the window before; null without data, such as a cost per lead without a lead."},"after":{"type":"number","nullable":true,"description":"The value in the window after; null without data, such as a cost per lead without a lead."},"change":{"type":"number","nullable":true,"description":"after ÷ before − 1, in percent; null when either is missing or before is 0."}},"required":["metric","before","after","change"]},"description":"Each compared metric, before and after."},"probability_better":{"type":"number","description":"The probability that the deciding rate is better after than before, in percent."},"interval":{"type":"object","properties":{"low":{"type":"number","description":"The interval's low end, in percent."},"high":{"type":"number","description":"The interval's high end, in percent."}},"required":["low","high"],"description":"The 90 % credible interval of the deciding rate's after ÷ before − 1."},"traffic_sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","description":"The Traffic source: a utm_source, (none) or (other)."},"before":{"type":"number","description":"Its share of visits or starts before, in percent."},"after":{"type":"number","description":"Its share of visits or starts after, in percent."}},"required":["source","before","after"]},"description":"The largest Traffic sources' shares of visits or starts, before and after."},"overlapping":{"type":"array","items":{"type":"object","properties":{"proposal_id":{"type":"string","description":"The other edit's Proposal id."},"kind":{"type":"string","enum":["edit_landing_page","edit_funnel"],"description":"What the edit changed: edit_landing_page or edit_funnel."},"landing_page_id":{"type":"string","nullable":true,"description":"The Landing page it edited; null for a Funnel edit."},"funnel_id":{"type":"string","nullable":true,"description":"The Funnel it edited; null for a Landing page edit."},"executed_at":{"type":"string","description":"When it was carried out, as ISO 8601."}},"required":["proposal_id","kind","landing_page_id","funnel_id","executed_at"]},"description":"Other executed edits of the same Landing page or Funnel within the windows."},"winner":{"type":"string","enum":["A","B","none"],"description":"With source experiment: the Test variant the Experiment kept, A or B, or none."},"ended_by":{"type":"string","enum":["proposal","member"],"description":"With source experiment: who ended the Experiment, the approved end_experiment proposal or a member."},"test_variant_edited":{"type":"boolean","description":"With source experiment: whether Test variant B was published again after the test started."},"end_reason":{"type":"string","enum":["subject_gone"],"description":"With source experiment: the test ended because a Member unpublished or deleted its Landing page or Funnel. Unclear, without a Winner or numbers."}},"required":["status","verdict","measured_at","before","after","metrics"]},{"type":"object","properties":{"status":{"type":"string","enum":["observed"],"description":"A directly published edit's numbers before and after, without a verdict."},"source":{"type":"string","enum":["before_after"],"description":"Measured from the days before and after the edit."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"measured_at":{"type":"string","description":"When the Run measured it, as ISO 8601."},"before":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window before the change."},"after":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window after the change."},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["cost_per_lead","ad_set_cost_per_lead","bounce_rate","median_duration_ms","conversion_rate","visits","starts","completion_rate","block_reach","step_drop_off"],"description":"What the metric measures: cost_per_lead (the Campaign's), ad_set_cost_per_lead, bounce_rate, median_duration_ms, conversion_rate, visits, starts, completion_rate, block_reach (of one changed block) or step_drop_off (of one changed step). Money in minor units, rates in percent."},"block_id":{"type":"string","description":"The changed block, for block_reach."},"step_id":{"type":"string","description":"The changed step, for step_drop_off."},"before":{"type":"number","nullable":true,"description":"The value in the window before; null without data, such as a cost per lead without a lead."},"after":{"type":"number","nullable":true,"description":"The value in the window after; null without data, such as a cost per lead without a lead."},"change":{"type":"number","nullable":true,"description":"after ÷ before − 1, in percent; null when either is missing or before is 0."}},"required":["metric","before","after","change"]},"description":"Each compared metric, before and after."}},"required":["status","source","measured_at","before","after","metrics"]},{"nullable":true}],"description":"Whether it helped, once carried out; null before. Pending until a Run measures it."},"created_at":{"type":"string","description":"When the Run made it, as ISO 8601."},"kind":{"type":"string","enum":["edit_landing_page"],"description":"Edits a Landing page."},"edit_path":{"type":"string","nullable":true,"enum":["experiment","direct",null],"default":null,"description":"How approving carries the edit out; null for edits made before Runs decided a path, which publish directly."},"visitor_days_per_day":{"type":"integer","nullable":true,"default":null,"description":"The subject's Visitor-days a day when the Run decided the path, rounded down; null before."},"experiment_id":{"type":"string","nullable":true,"format":"uuid","default":null,"description":"The A/B-Test approving started; null on the direct path or before approval."},"experiment_end":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The end_experiment Proposal's id."},"status":{"type":"string","enum":["generating","pending","approved","executing","executed","failed","rejected","superseded"],"description":"Where the Proposal stands: generating (its Ad or images are being built), pending (waits for a decision), approved, executing, executed, failed, rejected or superseded (replaced by a newer Run's Proposal)."},"winner":{"type":"string","enum":["A","B"],"description":"The Test variant approving keeps: B publishes the edit, A keeps the page as it was."},"results":{"type":"object","properties":{"checkpoint_day":{"anyOf":[{"type":"number","enum":[14]},{"type":"number","enum":[28]}],"description":"The Checkpoint the Run read them at, in counted days."},"counted_days":{"type":"integer","description":"Whole days the test had run, paused days left out."},"goal":{"type":"string","enum":["conversion","completion_rate"],"description":"The test's Primary goal."},"verdict":{"type":"string","enum":["not_enough_data","no_clear_difference","ahead","very_likely_best"],"description":"What the results say."},"leader":{"type":"string","nullable":true,"enum":["A","B","C",null],"description":"The leading Test variant, at the ahead or very_likely_best verdict; null otherwise."},"test_variants":{"type":"array","items":{"type":"object","properties":{"letter":{"type":"string","enum":["A","B","C"],"description":"The Test variant."},"units":{"type":"integer","description":"Its Visitor-days."},"successes":{"type":"integer","description":"Its successes on the Primary goal."},"rate":{"type":"number","description":"successes ÷ units, as a fraction."},"probability_to_be_best":{"type":"number","nullable":true,"description":"The probability it is the best Test variant, as a fraction; null while there isn't enough data."}},"required":["letter","units","successes","rate","probability_to_be_best"]},"description":"The Primary goal per Test variant."}},"required":["checkpoint_day","counted_days","goal","verdict","leader","test_variants"],"description":"The test's results as the Checkpoint Run read them."},"failure":{"type":"string","nullable":true,"enum":["generation","meta","meta_auth","outdated","interrupted","validation","publish",null],"description":"Why it failed; null unless failed."},"error":{"type":"string","nullable":true,"description":"What went wrong for a failed one; null otherwise."},"created_at":{"type":"string","description":"When the Run made it, as ISO 8601."}},"default":null,"required":["id","status","winner","results","failure","error","created_at"],"description":"The latest \"Test beenden\" Proposal still to decide or carried out; null when there is none."},"landing_page":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Landing page's id."},"name":{"type":"string","nullable":true,"description":"The Landing page's name; null once the page is gone."}},"required":["id","name"],"description":"The edited Landing page."},"base_version_id":{"type":"string","description":"The published version the edit was made against."},"changes":{"type":"array","items":{"type":"object","properties":{"block_id":{"type":"string","description":"The block's id."},"type":{"type":"string","description":"The block's type."},"label":{"type":"string","description":"The block's readable name."},"kind":{"type":"string","enum":["added","removed","changed"],"description":"What the edit does to it: added, removed or changed."},"position":{"type":"object","properties":{"before":{"type":"number","nullable":true,"description":"Its position before the edit; null when it is new."},"after":{"type":"number","nullable":true,"description":"Its position after the edit; null when it is removed."}},"required":["before","after"],"description":"Its 1-based position among the page's blocks, before and after."},"moved":{"type":"boolean","description":"Whether the edit moved it, not merely shifted it by a block added or removed before it."},"fields":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The dotted path into the block's config, e.g. items[q2].answer."},"kind":{"type":"string","enum":["set","unset","changed","asset"],"description":"What happened to the field: set (it had no value), unset (it has none now), changed, or asset (its image changed; no values)."},"before":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}],"description":"The value before; absent for an asset change."},"after":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}],"description":"The value after; absent for an asset change."}},"required":["path","kind"]},"description":"The block's changed config fields."},"truncated":{"type":"number","description":"How many changed fields are left out of fields."}},"required":["block_id","type","label","kind","position","moved","fields","truncated"]},"description":"Block by block, what the edit changes on that version."},"variables":{"type":"array","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string","pattern":"^\\w+$","description":"Token written as {{name}} in text: letters, digits and underscores."},"searchParam":{"type":"string","description":"The URL search param to read, e.g. `city` for ?city=berlin."},"defaultValue":{"type":"string","description":"The text when the param is missing or unmapped."},"values":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"A raw param value, matched ignoring case."},"value":{"type":"string","description":"The text shown for it."}},"required":["name","value"]},"description":"Raw param values mapped to the text shown; [] for none."}},"required":["name","searchParam","defaultValue","values"]},"description":"The page's URL variables after the edit; null when it keeps them."},"evidence":{"type":"object","nullable":true,"properties":{"signals":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["high_bounce","low_median_duration","block_reach_drop"],"description":"What is worth a look: high_bounce, low_median_duration or block_reach_drop."},"window":{"type":"string","enum":["current_version","last_30_days"],"description":"The analytics window it was computed on: current_version (since the published version went live) or last_30_days."},"traffic":{"type":"string","enum":["meta","all"],"description":"The traffic it was computed on: meta (visits tagged as coming from Meta) or all."},"value":{"type":"number","description":"The bounce rate in percent, the median duration in milliseconds, or the drop in reach in percentage points."},"threshold":{"type":"number","description":"The value past which the signal fires, in the same unit."},"block_id":{"type":"string","nullable":true,"description":"For a reach drop, the block where reach falls; null otherwise."}},"required":["kind","window","traffic","value","threshold","block_id"]},"description":"The page's signals that made the Run propose the edit."},"campaign_traffic_share":{"type":"object","properties":{"current_version":{"type":"number","nullable":true,"description":"Since the published version went live, in percent; null without data."},"last_30_days":{"type":"number","nullable":true,"description":"Over the last 30 days, in percent; null without data."}},"required":["current_version","last_30_days"],"description":"The visits tagged as coming from Meta, as a share of all visits."}},"required":["signals","campaign_traffic_share"],"description":"What the Run saw on the page that made it propose the edit; null when its snapshot lacks the page."},"images":{"type":"array","items":{"type":"object","properties":{"operation_index":{"type":"integer","minimum":0,"description":"0-based index into `operations` of the add_block or edit_block whose config gets the image."},"field":{"type":"string","minLength":1,"description":"The config field that holds the image's asset id, e.g. `assetId`; dotted for nested fields, with list positions as numbers, e.g. `items.0.assetId`."},"prompt":{"type":"string","minLength":1,"maxLength":2000,"description":"A prompt for the image."},"aspect":{"type":"string","enum":["square","landscape","portrait"],"description":"The image's shape."},"image_url":{"type":"string","nullable":true,"description":"The generated image's URL; null while it is being generated."}},"required":["operation_index","field","prompt","aspect","image_url"]},"description":"The new images the edit asks for; [] for none."}},"required":["id","run_id","campaign_id","status","reason","rejected_alternative","rejection_reason","failure","error","decision","executed_at","outcome","created_at","kind","landing_page","base_version_id","changes","variables","evidence","images"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Proposal's id."},"run_id":{"type":"string","format":"uuid","description":"The id of the Run that made it."},"campaign_id":{"type":"string","nullable":true,"format":"uuid","description":"The Campaign, for a Proposal of a Campaign Run; null for a Landing page or Funnel Run's."},"status":{"type":"string","enum":["generating","pending","approved","executing","executed","failed","rejected","superseded"],"description":"Where the Proposal stands: generating (its Ad or images are being built), pending (waits for a decision), approved, executing, executed, failed, rejected or superseded (replaced by a newer Run's Proposal)."},"reason":{"type":"string","description":"Why osiro.autopilot proposes it."},"rejected_alternative":{"type":"object","nullable":true,"properties":{"layer":{"type":"string","enum":["ad","landing_page","funnel"],"description":"The layer autopilot considered changing instead."},"why":{"type":"string","minLength":1,"maxLength":1000,"description":"Why changing that layer is not the better move, briefly."}},"required":["layer","why"],"description":"The other layer osiro.autopilot considered changing instead; null for Proposals made before it named one."},"rejection_reason":{"type":"string","nullable":true,"description":"A rejected Proposal's reason, if the Member gave one."},"failure":{"type":"string","nullable":true,"enum":["generation","meta","meta_auth","outdated","interrupted","validation","publish",null],"description":"Why a failed Proposal failed; null otherwise."},"error":{"type":"string","nullable":true,"description":"Meta's message for a meta failure, the reason code for an outdated one, or what went wrong for another failure; null otherwise."},"decision":{"type":"object","nullable":true,"properties":{"by":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The deciding user's id."},"name":{"type":"string","nullable":true,"description":"The deciding user's display name; null when unknown."}},"required":["id","name"],"description":"Who decided; null once that user is deleted."},"at":{"type":"string","description":"When it was decided, as ISO 8601."}},"required":["by","at"],"description":"Who approved or rejected it, and when; null before."},"executed_at":{"type":"string","nullable":true,"description":"When it was carried out, as ISO 8601; null before."},"outcome":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending"],"description":"Not measured yet: too few days have passed, or its A/B-Test still runs."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"source":{"type":"string","enum":["experiment","before_after"],"description":"How the Outcome was measured: experiment (from the A/B-Test the edit ran as) or before_after (from the days before and after a directly published edit). Absent on older Outcomes, which compare before and after with a verdict."}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["measured"],"description":"Measured, with a verdict."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"source":{"type":"string","enum":["experiment","before_after"],"description":"How the Outcome was measured: experiment (from the A/B-Test the edit ran as) or before_after (from the days before and after a directly published edit). Absent on older Outcomes, which compare before and after with a verdict."},"verdict":{"type":"string","enum":["better","worse","unchanged","inconclusive"],"description":"Whether the deciding rate improved, worsened or held: better, worse, unchanged or inconclusive (for cost per lead, one window had no spend or neither had a lead; for a rate, not clear yet)."},"final":{"type":"boolean","description":"false while the verdict is unclear before day 28, so the next Run measures it again; absent means final."},"measured_at":{"type":"string","description":"When the Run measured it, as ISO 8601."},"before":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window before the change."},"after":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window after the change."},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["cost_per_lead","ad_set_cost_per_lead","bounce_rate","median_duration_ms","conversion_rate","visits","starts","completion_rate","block_reach","step_drop_off"],"description":"What the metric measures: cost_per_lead (the Campaign's), ad_set_cost_per_lead, bounce_rate, median_duration_ms, conversion_rate, visits, starts, completion_rate, block_reach (of one changed block) or step_drop_off (of one changed step). Money in minor units, rates in percent."},"block_id":{"type":"string","description":"The changed block, for block_reach."},"step_id":{"type":"string","description":"The changed step, for step_drop_off."},"before":{"type":"number","nullable":true,"description":"The value in the window before; null without data, such as a cost per lead without a lead."},"after":{"type":"number","nullable":true,"description":"The value in the window after; null without data, such as a cost per lead without a lead."},"change":{"type":"number","nullable":true,"description":"after ÷ before − 1, in percent; null when either is missing or before is 0."}},"required":["metric","before","after","change"]},"description":"Each compared metric, before and after."},"probability_better":{"type":"number","description":"The probability that the deciding rate is better after than before, in percent."},"interval":{"type":"object","properties":{"low":{"type":"number","description":"The interval's low end, in percent."},"high":{"type":"number","description":"The interval's high end, in percent."}},"required":["low","high"],"description":"The 90 % credible interval of the deciding rate's after ÷ before − 1."},"traffic_sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","description":"The Traffic source: a utm_source, (none) or (other)."},"before":{"type":"number","description":"Its share of visits or starts before, in percent."},"after":{"type":"number","description":"Its share of visits or starts after, in percent."}},"required":["source","before","after"]},"description":"The largest Traffic sources' shares of visits or starts, before and after."},"overlapping":{"type":"array","items":{"type":"object","properties":{"proposal_id":{"type":"string","description":"The other edit's Proposal id."},"kind":{"type":"string","enum":["edit_landing_page","edit_funnel"],"description":"What the edit changed: edit_landing_page or edit_funnel."},"landing_page_id":{"type":"string","nullable":true,"description":"The Landing page it edited; null for a Funnel edit."},"funnel_id":{"type":"string","nullable":true,"description":"The Funnel it edited; null for a Landing page edit."},"executed_at":{"type":"string","description":"When it was carried out, as ISO 8601."}},"required":["proposal_id","kind","landing_page_id","funnel_id","executed_at"]},"description":"Other executed edits of the same Landing page or Funnel within the windows."},"winner":{"type":"string","enum":["A","B","none"],"description":"With source experiment: the Test variant the Experiment kept, A or B, or none."},"ended_by":{"type":"string","enum":["proposal","member"],"description":"With source experiment: who ended the Experiment, the approved end_experiment proposal or a member."},"test_variant_edited":{"type":"boolean","description":"With source experiment: whether Test variant B was published again after the test started."},"end_reason":{"type":"string","enum":["subject_gone"],"description":"With source experiment: the test ended because a Member unpublished or deleted its Landing page or Funnel. Unclear, without a Winner or numbers."}},"required":["status","verdict","measured_at","before","after","metrics"]},{"type":"object","properties":{"status":{"type":"string","enum":["observed"],"description":"A directly published edit's numbers before and after, without a verdict."},"source":{"type":"string","enum":["before_after"],"description":"Measured from the days before and after the edit."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"measured_at":{"type":"string","description":"When the Run measured it, as ISO 8601."},"before":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window before the change."},"after":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window after the change."},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["cost_per_lead","ad_set_cost_per_lead","bounce_rate","median_duration_ms","conversion_rate","visits","starts","completion_rate","block_reach","step_drop_off"],"description":"What the metric measures: cost_per_lead (the Campaign's), ad_set_cost_per_lead, bounce_rate, median_duration_ms, conversion_rate, visits, starts, completion_rate, block_reach (of one changed block) or step_drop_off (of one changed step). Money in minor units, rates in percent."},"block_id":{"type":"string","description":"The changed block, for block_reach."},"step_id":{"type":"string","description":"The changed step, for step_drop_off."},"before":{"type":"number","nullable":true,"description":"The value in the window before; null without data, such as a cost per lead without a lead."},"after":{"type":"number","nullable":true,"description":"The value in the window after; null without data, such as a cost per lead without a lead."},"change":{"type":"number","nullable":true,"description":"after ÷ before − 1, in percent; null when either is missing or before is 0."}},"required":["metric","before","after","change"]},"description":"Each compared metric, before and after."}},"required":["status","source","measured_at","before","after","metrics"]},{"nullable":true}],"description":"Whether it helped, once carried out; null before. Pending until a Run measures it."},"created_at":{"type":"string","description":"When the Run made it, as ISO 8601."},"kind":{"type":"string","enum":["edit_funnel"],"description":"Edits a Funnel."},"edit_path":{"type":"string","nullable":true,"enum":["experiment","direct",null],"default":null,"description":"How approving carries the edit out; null for edits made before Runs decided a path, which publish directly."},"visitor_days_per_day":{"type":"integer","nullable":true,"default":null,"description":"The subject's Visitor-days a day when the Run decided the path, rounded down; null before."},"experiment_id":{"type":"string","nullable":true,"format":"uuid","default":null,"description":"The A/B-Test approving started; null on the direct path or before approval."},"experiment_end":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The end_experiment Proposal's id."},"status":{"type":"string","enum":["generating","pending","approved","executing","executed","failed","rejected","superseded"],"description":"Where the Proposal stands: generating (its Ad or images are being built), pending (waits for a decision), approved, executing, executed, failed, rejected or superseded (replaced by a newer Run's Proposal)."},"winner":{"type":"string","enum":["A","B"],"description":"The Test variant approving keeps: B publishes the edit, A keeps the page as it was."},"results":{"type":"object","properties":{"checkpoint_day":{"anyOf":[{"type":"number","enum":[14]},{"type":"number","enum":[28]}],"description":"The Checkpoint the Run read them at, in counted days."},"counted_days":{"type":"integer","description":"Whole days the test had run, paused days left out."},"goal":{"type":"string","enum":["conversion","completion_rate"],"description":"The test's Primary goal."},"verdict":{"type":"string","enum":["not_enough_data","no_clear_difference","ahead","very_likely_best"],"description":"What the results say."},"leader":{"type":"string","nullable":true,"enum":["A","B","C",null],"description":"The leading Test variant, at the ahead or very_likely_best verdict; null otherwise."},"test_variants":{"type":"array","items":{"type":"object","properties":{"letter":{"type":"string","enum":["A","B","C"],"description":"The Test variant."},"units":{"type":"integer","description":"Its Visitor-days."},"successes":{"type":"integer","description":"Its successes on the Primary goal."},"rate":{"type":"number","description":"successes ÷ units, as a fraction."},"probability_to_be_best":{"type":"number","nullable":true,"description":"The probability it is the best Test variant, as a fraction; null while there isn't enough data."}},"required":["letter","units","successes","rate","probability_to_be_best"]},"description":"The Primary goal per Test variant."}},"required":["checkpoint_day","counted_days","goal","verdict","leader","test_variants"],"description":"The test's results as the Checkpoint Run read them."},"failure":{"type":"string","nullable":true,"enum":["generation","meta","meta_auth","outdated","interrupted","validation","publish",null],"description":"Why it failed; null unless failed."},"error":{"type":"string","nullable":true,"description":"What went wrong for a failed one; null otherwise."},"created_at":{"type":"string","description":"When the Run made it, as ISO 8601."}},"default":null,"required":["id","status","winner","results","failure","error","created_at"],"description":"The latest \"Test beenden\" Proposal still to decide or carried out; null when there is none."},"funnel":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Funnel's id."},"name":{"type":"string","nullable":true,"description":"The Funnel's name; null once the Funnel is gone."}},"required":["id","name"],"description":"The edited Funnel."},"base_version_id":{"type":"string","description":"The published version the edit was made against."},"changes":{"type":"array","items":{"type":"object","properties":{"block_id":{"type":"string","description":"The block's id."},"type":{"type":"string","description":"The block's type."},"label":{"type":"string","description":"The block's readable name."},"kind":{"type":"string","enum":["added","removed","changed"],"description":"What the edit does to it: added, removed or changed."},"position":{"type":"object","properties":{"before":{"type":"number","nullable":true,"description":"Its position before the edit; null when it is new."},"after":{"type":"number","nullable":true,"description":"Its position after the edit; null when it is removed."}},"required":["before","after"],"description":"Its 1-based position among the page's blocks, before and after."},"moved":{"type":"boolean","description":"Whether the edit moved it, not merely shifted it by a block added or removed before it."},"fields":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The dotted path into the block's config, e.g. items[q2].answer."},"kind":{"type":"string","enum":["set","unset","changed","asset"],"description":"What happened to the field: set (it had no value), unset (it has none now), changed, or asset (its image changed; no values)."},"before":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}],"description":"The value before; absent for an asset change."},"after":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}],"description":"The value after; absent for an asset change."}},"required":["path","kind"]},"description":"The block's changed config fields."},"truncated":{"type":"number","description":"How many changed fields are left out of fields."},"step":{"type":"string","nullable":true,"description":"The name of the block's step after the edit, or before it for a removed block; null when unknown."}},"required":["block_id","type","label","kind","position","moved","fields","truncated","step"]},"description":"Block by block, what the edit changes on that version."},"steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string","description":"The step's id."},"name":{"type":"string","nullable":true,"description":"The step's name after the edit, or before it for a removed step; null when it has none."},"kind":{"type":"string","enum":["added","removed","changed"],"description":"What the edit does to it: added, removed or changed."},"position":{"type":"object","properties":{"before":{"type":"number","nullable":true,"description":"Its position before the edit; null when it is new."},"after":{"type":"number","nullable":true,"description":"Its position after the edit; null when it is removed."}},"required":["before","after"],"description":"Its 1-based position among the steps, before and after."},"moved":{"type":"boolean","description":"Whether the edit moved it, not merely shifted it by a step added or removed before it."},"renamed_from":{"type":"string","nullable":true,"description":"The step's name before a rename; null when kept."},"rules":{"type":"array","nullable":true,"items":{"type":"object","properties":{"field":{"type":"string","description":"The checked field's internal name or label."},"connector":{"type":"string","nullable":true,"enum":["and","or",null],"description":"How the conditions combine: and (all) or or (any); null for a single condition."},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"The checked field's internal name or label."},"operator":{"type":"string","description":"How the answer is compared."},"value":{"type":"string","nullable":true,"description":"What the answer is compared with, option ids as their labels; null for no value."}},"required":["field","operator","value"]},"description":"The rule's conditions; [] when it always fires."},"actions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"What the action does."},"step":{"type":"string","nullable":true,"description":"The target step's name, for go_to_step; null otherwise."},"url":{"type":"string","nullable":true,"description":"The target URL, for redirect; null otherwise."}},"required":["type","step","url"]},"description":"What the rule does when it fires, in order."},"behavior":{"type":"string","enum":["auto","on_click"],"description":"When the rule fires: auto (as soon as the answer matches) or on_click (when triggeredBy is clicked)."}},"required":["field","connector","conditions","actions","behavior"]},"description":"The step's rules after the edit, when it changes them; null otherwise."}},"required":["step_id","name","kind","position","moved","renamed_from","rules"]},"description":"Step by step, what the edit changes: added, removed, moved, renamed, new rules."},"evidence":{"type":"object","nullable":true,"properties":{"signals":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["step_drop_off"],"description":"What is worth a look: step_drop_off."},"window":{"type":"string","enum":["current_version","last_30_days"],"description":"The analytics window it was computed on: current_version (since the published version went live) or last_30_days."},"traffic":{"type":"string","enum":["meta","all"],"description":"The traffic it was computed on: meta (visits tagged as coming from Meta) or all."},"value":{"type":"number","description":"The step's drop-off, in percent."},"threshold":{"type":"number","description":"The drop-off from which the signal fires, in percent."},"step_id":{"type":"string","description":"The step where sessions drop off."}},"required":["kind","window","traffic","value","threshold","step_id"]},"description":"The Funnel's signals that made the Run propose the edit."},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The step's id."},"name":{"type":"string","description":"The step's name."}},"required":["id","name"]},"description":"The published version's steps, to name the signals' steps."},"campaign_start_share":{"type":"object","properties":{"current_version":{"type":"number","nullable":true,"description":"Since the published version went live, in percent; null without data."},"last_30_days":{"type":"number","nullable":true,"description":"Over the last 30 days, in percent; null without data."}},"required":["current_version","last_30_days"],"description":"The Funnel starts tagged as coming from Meta, as a share of all starts."},"other_landing_pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The Landing page's id."},"name":{"type":"string","description":"The Landing page's name."}},"required":["id","name"]},"description":"Other published Landing pages embedding the Funnel; the edit changes them too."}},"required":["signals","steps","campaign_start_share","other_landing_pages"],"description":"What the Run saw of the Funnel that made it propose the edit; null when its snapshot lacks the Funnel."},"images":{"type":"array","items":{"type":"object","properties":{"operation_index":{"type":"integer","minimum":0,"description":"0-based index into `operations` of the add_block or edit_block whose config gets the image."},"field":{"type":"string","minLength":1,"description":"The config field that holds the image's asset id, e.g. `assetId`; dotted for nested fields, with list positions as numbers, e.g. `items.0.assetId`."},"prompt":{"type":"string","minLength":1,"maxLength":2000,"description":"A prompt for the image."},"aspect":{"type":"string","enum":["square","landscape","portrait"],"description":"The image's shape."},"image_url":{"type":"string","nullable":true,"description":"The generated image's URL; null while it is being generated."}},"required":["operation_index","field","prompt","aspect","image_url"]},"description":"The new images the edit asks for; [] for none."}},"required":["id","run_id","campaign_id","status","reason","rejected_alternative","rejection_reason","failure","error","decision","executed_at","outcome","created_at","kind","funnel","base_version_id","changes","steps","evidence","images"]}]},"description":"The Proposals being generated, waiting for a decision, being carried out or failed, newest first."},"executed":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Proposal's id."},"run_id":{"type":"string","format":"uuid","description":"The id of the Run that made it."},"campaign_id":{"type":"string","nullable":true,"format":"uuid","description":"The Campaign, for a Proposal of a Campaign Run; null for a Landing page or Funnel Run's."},"status":{"type":"string","enum":["generating","pending","approved","executing","executed","failed","rejected","superseded"],"description":"Where the Proposal stands: generating (its Ad or images are being built), pending (waits for a decision), approved, executing, executed, failed, rejected or superseded (replaced by a newer Run's Proposal)."},"reason":{"type":"string","description":"Why osiro.autopilot proposes it."},"rejected_alternative":{"type":"object","nullable":true,"properties":{"layer":{"type":"string","enum":["ad","landing_page","funnel"],"description":"The layer autopilot considered changing instead."},"why":{"type":"string","minLength":1,"maxLength":1000,"description":"Why changing that layer is not the better move, briefly."}},"required":["layer","why"],"description":"The other layer osiro.autopilot considered changing instead; null for Proposals made before it named one."},"rejection_reason":{"type":"string","nullable":true,"description":"A rejected Proposal's reason, if the Member gave one."},"failure":{"type":"string","nullable":true,"enum":["generation","meta","meta_auth","outdated","interrupted","validation","publish",null],"description":"Why a failed Proposal failed; null otherwise."},"error":{"type":"string","nullable":true,"description":"Meta's message for a meta failure, the reason code for an outdated one, or what went wrong for another failure; null otherwise."},"decision":{"type":"object","nullable":true,"properties":{"by":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The deciding user's id."},"name":{"type":"string","nullable":true,"description":"The deciding user's display name; null when unknown."}},"required":["id","name"],"description":"Who decided; null once that user is deleted."},"at":{"type":"string","description":"When it was decided, as ISO 8601."}},"required":["by","at"],"description":"Who approved or rejected it, and when; null before."},"executed_at":{"type":"string","nullable":true,"description":"When it was carried out, as ISO 8601; null before."},"outcome":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending"],"description":"Not measured yet: too few days have passed, or its A/B-Test still runs."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"source":{"type":"string","enum":["experiment","before_after"],"description":"How the Outcome was measured: experiment (from the A/B-Test the edit ran as) or before_after (from the days before and after a directly published edit). Absent on older Outcomes, which compare before and after with a verdict."}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["measured"],"description":"Measured, with a verdict."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"source":{"type":"string","enum":["experiment","before_after"],"description":"How the Outcome was measured: experiment (from the A/B-Test the edit ran as) or before_after (from the days before and after a directly published edit). Absent on older Outcomes, which compare before and after with a verdict."},"verdict":{"type":"string","enum":["better","worse","unchanged","inconclusive"],"description":"Whether the deciding rate improved, worsened or held: better, worse, unchanged or inconclusive (for cost per lead, one window had no spend or neither had a lead; for a rate, not clear yet)."},"final":{"type":"boolean","description":"false while the verdict is unclear before day 28, so the next Run measures it again; absent means final."},"measured_at":{"type":"string","description":"When the Run measured it, as ISO 8601."},"before":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window before the change."},"after":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window after the change."},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["cost_per_lead","ad_set_cost_per_lead","bounce_rate","median_duration_ms","conversion_rate","visits","starts","completion_rate","block_reach","step_drop_off"],"description":"What the metric measures: cost_per_lead (the Campaign's), ad_set_cost_per_lead, bounce_rate, median_duration_ms, conversion_rate, visits, starts, completion_rate, block_reach (of one changed block) or step_drop_off (of one changed step). Money in minor units, rates in percent."},"block_id":{"type":"string","description":"The changed block, for block_reach."},"step_id":{"type":"string","description":"The changed step, for step_drop_off."},"before":{"type":"number","nullable":true,"description":"The value in the window before; null without data, such as a cost per lead without a lead."},"after":{"type":"number","nullable":true,"description":"The value in the window after; null without data, such as a cost per lead without a lead."},"change":{"type":"number","nullable":true,"description":"after ÷ before − 1, in percent; null when either is missing or before is 0."}},"required":["metric","before","after","change"]},"description":"Each compared metric, before and after."},"probability_better":{"type":"number","description":"The probability that the deciding rate is better after than before, in percent."},"interval":{"type":"object","properties":{"low":{"type":"number","description":"The interval's low end, in percent."},"high":{"type":"number","description":"The interval's high end, in percent."}},"required":["low","high"],"description":"The 90 % credible interval of the deciding rate's after ÷ before − 1."},"traffic_sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","description":"The Traffic source: a utm_source, (none) or (other)."},"before":{"type":"number","description":"Its share of visits or starts before, in percent."},"after":{"type":"number","description":"Its share of visits or starts after, in percent."}},"required":["source","before","after"]},"description":"The largest Traffic sources' shares of visits or starts, before and after."},"overlapping":{"type":"array","items":{"type":"object","properties":{"proposal_id":{"type":"string","description":"The other edit's Proposal id."},"kind":{"type":"string","enum":["edit_landing_page","edit_funnel"],"description":"What the edit changed: edit_landing_page or edit_funnel."},"landing_page_id":{"type":"string","nullable":true,"description":"The Landing page it edited; null for a Funnel edit."},"funnel_id":{"type":"string","nullable":true,"description":"The Funnel it edited; null for a Landing page edit."},"executed_at":{"type":"string","description":"When it was carried out, as ISO 8601."}},"required":["proposal_id","kind","landing_page_id","funnel_id","executed_at"]},"description":"Other executed edits of the same Landing page or Funnel within the windows."},"winner":{"type":"string","enum":["A","B","none"],"description":"With source experiment: the Test variant the Experiment kept, A or B, or none."},"ended_by":{"type":"string","enum":["proposal","member"],"description":"With source experiment: who ended the Experiment, the approved end_experiment proposal or a member."},"test_variant_edited":{"type":"boolean","description":"With source experiment: whether Test variant B was published again after the test started."},"end_reason":{"type":"string","enum":["subject_gone"],"description":"With source experiment: the test ended because a Member unpublished or deleted its Landing page or Funnel. Unclear, without a Winner or numbers."}},"required":["status","verdict","measured_at","before","after","metrics"]},{"type":"object","properties":{"status":{"type":"string","enum":["observed"],"description":"A directly published edit's numbers before and after, without a verdict."},"source":{"type":"string","enum":["before_after"],"description":"Measured from the days before and after the edit."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"measured_at":{"type":"string","description":"When the Run measured it, as ISO 8601."},"before":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window before the change."},"after":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window after the change."},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["cost_per_lead","ad_set_cost_per_lead","bounce_rate","median_duration_ms","conversion_rate","visits","starts","completion_rate","block_reach","step_drop_off"],"description":"What the metric measures: cost_per_lead (the Campaign's), ad_set_cost_per_lead, bounce_rate, median_duration_ms, conversion_rate, visits, starts, completion_rate, block_reach (of one changed block) or step_drop_off (of one changed step). Money in minor units, rates in percent."},"block_id":{"type":"string","description":"The changed block, for block_reach."},"step_id":{"type":"string","description":"The changed step, for step_drop_off."},"before":{"type":"number","nullable":true,"description":"The value in the window before; null without data, such as a cost per lead without a lead."},"after":{"type":"number","nullable":true,"description":"The value in the window after; null without data, such as a cost per lead without a lead."},"change":{"type":"number","nullable":true,"description":"after ÷ before − 1, in percent; null when either is missing or before is 0."}},"required":["metric","before","after","change"]},"description":"Each compared metric, before and after."}},"required":["status","source","measured_at","before","after","metrics"]},{"nullable":true}],"description":"Whether it helped, once carried out; null before. Pending until a Run measures it."},"created_at":{"type":"string","description":"When the Run made it, as ISO 8601."},"kind":{"type":"string","enum":["pause_ad"],"description":"Pauses a Meta ad."},"ad_id":{"type":"string","pattern":"^\\d+$","description":"The Meta ad to pause."},"ad_name":{"type":"string","nullable":true,"description":"The ad's name as the Run saw it; null when the Run's snapshot lacks the ad."}},"required":["id","run_id","campaign_id","status","reason","rejected_alternative","rejection_reason","failure","error","decision","executed_at","outcome","created_at","kind","ad_id","ad_name"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Proposal's id."},"run_id":{"type":"string","format":"uuid","description":"The id of the Run that made it."},"campaign_id":{"type":"string","nullable":true,"format":"uuid","description":"The Campaign, for a Proposal of a Campaign Run; null for a Landing page or Funnel Run's."},"status":{"type":"string","enum":["generating","pending","approved","executing","executed","failed","rejected","superseded"],"description":"Where the Proposal stands: generating (its Ad or images are being built), pending (waits for a decision), approved, executing, executed, failed, rejected or superseded (replaced by a newer Run's Proposal)."},"reason":{"type":"string","description":"Why osiro.autopilot proposes it."},"rejected_alternative":{"type":"object","nullable":true,"properties":{"layer":{"type":"string","enum":["ad","landing_page","funnel"],"description":"The layer autopilot considered changing instead."},"why":{"type":"string","minLength":1,"maxLength":1000,"description":"Why changing that layer is not the better move, briefly."}},"required":["layer","why"],"description":"The other layer osiro.autopilot considered changing instead; null for Proposals made before it named one."},"rejection_reason":{"type":"string","nullable":true,"description":"A rejected Proposal's reason, if the Member gave one."},"failure":{"type":"string","nullable":true,"enum":["generation","meta","meta_auth","outdated","interrupted","validation","publish",null],"description":"Why a failed Proposal failed; null otherwise."},"error":{"type":"string","nullable":true,"description":"Meta's message for a meta failure, the reason code for an outdated one, or what went wrong for another failure; null otherwise."},"decision":{"type":"object","nullable":true,"properties":{"by":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The deciding user's id."},"name":{"type":"string","nullable":true,"description":"The deciding user's display name; null when unknown."}},"required":["id","name"],"description":"Who decided; null once that user is deleted."},"at":{"type":"string","description":"When it was decided, as ISO 8601."}},"required":["by","at"],"description":"Who approved or rejected it, and when; null before."},"executed_at":{"type":"string","nullable":true,"description":"When it was carried out, as ISO 8601; null before."},"outcome":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending"],"description":"Not measured yet: too few days have passed, or its A/B-Test still runs."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"source":{"type":"string","enum":["experiment","before_after"],"description":"How the Outcome was measured: experiment (from the A/B-Test the edit ran as) or before_after (from the days before and after a directly published edit). Absent on older Outcomes, which compare before and after with a verdict."}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["measured"],"description":"Measured, with a verdict."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"source":{"type":"string","enum":["experiment","before_after"],"description":"How the Outcome was measured: experiment (from the A/B-Test the edit ran as) or before_after (from the days before and after a directly published edit). Absent on older Outcomes, which compare before and after with a verdict."},"verdict":{"type":"string","enum":["better","worse","unchanged","inconclusive"],"description":"Whether the deciding rate improved, worsened or held: better, worse, unchanged or inconclusive (for cost per lead, one window had no spend or neither had a lead; for a rate, not clear yet)."},"final":{"type":"boolean","description":"false while the verdict is unclear before day 28, so the next Run measures it again; absent means final."},"measured_at":{"type":"string","description":"When the Run measured it, as ISO 8601."},"before":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window before the change."},"after":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window after the change."},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["cost_per_lead","ad_set_cost_per_lead","bounce_rate","median_duration_ms","conversion_rate","visits","starts","completion_rate","block_reach","step_drop_off"],"description":"What the metric measures: cost_per_lead (the Campaign's), ad_set_cost_per_lead, bounce_rate, median_duration_ms, conversion_rate, visits, starts, completion_rate, block_reach (of one changed block) or step_drop_off (of one changed step). Money in minor units, rates in percent."},"block_id":{"type":"string","description":"The changed block, for block_reach."},"step_id":{"type":"string","description":"The changed step, for step_drop_off."},"before":{"type":"number","nullable":true,"description":"The value in the window before; null without data, such as a cost per lead without a lead."},"after":{"type":"number","nullable":true,"description":"The value in the window after; null without data, such as a cost per lead without a lead."},"change":{"type":"number","nullable":true,"description":"after ÷ before − 1, in percent; null when either is missing or before is 0."}},"required":["metric","before","after","change"]},"description":"Each compared metric, before and after."},"probability_better":{"type":"number","description":"The probability that the deciding rate is better after than before, in percent."},"interval":{"type":"object","properties":{"low":{"type":"number","description":"The interval's low end, in percent."},"high":{"type":"number","description":"The interval's high end, in percent."}},"required":["low","high"],"description":"The 90 % credible interval of the deciding rate's after ÷ before − 1."},"traffic_sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","description":"The Traffic source: a utm_source, (none) or (other)."},"before":{"type":"number","description":"Its share of visits or starts before, in percent."},"after":{"type":"number","description":"Its share of visits or starts after, in percent."}},"required":["source","before","after"]},"description":"The largest Traffic sources' shares of visits or starts, before and after."},"overlapping":{"type":"array","items":{"type":"object","properties":{"proposal_id":{"type":"string","description":"The other edit's Proposal id."},"kind":{"type":"string","enum":["edit_landing_page","edit_funnel"],"description":"What the edit changed: edit_landing_page or edit_funnel."},"landing_page_id":{"type":"string","nullable":true,"description":"The Landing page it edited; null for a Funnel edit."},"funnel_id":{"type":"string","nullable":true,"description":"The Funnel it edited; null for a Landing page edit."},"executed_at":{"type":"string","description":"When it was carried out, as ISO 8601."}},"required":["proposal_id","kind","landing_page_id","funnel_id","executed_at"]},"description":"Other executed edits of the same Landing page or Funnel within the windows."},"winner":{"type":"string","enum":["A","B","none"],"description":"With source experiment: the Test variant the Experiment kept, A or B, or none."},"ended_by":{"type":"string","enum":["proposal","member"],"description":"With source experiment: who ended the Experiment, the approved end_experiment proposal or a member."},"test_variant_edited":{"type":"boolean","description":"With source experiment: whether Test variant B was published again after the test started."},"end_reason":{"type":"string","enum":["subject_gone"],"description":"With source experiment: the test ended because a Member unpublished or deleted its Landing page or Funnel. Unclear, without a Winner or numbers."}},"required":["status","verdict","measured_at","before","after","metrics"]},{"type":"object","properties":{"status":{"type":"string","enum":["observed"],"description":"A directly published edit's numbers before and after, without a verdict."},"source":{"type":"string","enum":["before_after"],"description":"Measured from the days before and after the edit."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"measured_at":{"type":"string","description":"When the Run measured it, as ISO 8601."},"before":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window before the change."},"after":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window after the change."},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["cost_per_lead","ad_set_cost_per_lead","bounce_rate","median_duration_ms","conversion_rate","visits","starts","completion_rate","block_reach","step_drop_off"],"description":"What the metric measures: cost_per_lead (the Campaign's), ad_set_cost_per_lead, bounce_rate, median_duration_ms, conversion_rate, visits, starts, completion_rate, block_reach (of one changed block) or step_drop_off (of one changed step). Money in minor units, rates in percent."},"block_id":{"type":"string","description":"The changed block, for block_reach."},"step_id":{"type":"string","description":"The changed step, for step_drop_off."},"before":{"type":"number","nullable":true,"description":"The value in the window before; null without data, such as a cost per lead without a lead."},"after":{"type":"number","nullable":true,"description":"The value in the window after; null without data, such as a cost per lead without a lead."},"change":{"type":"number","nullable":true,"description":"after ÷ before − 1, in percent; null when either is missing or before is 0."}},"required":["metric","before","after","change"]},"description":"Each compared metric, before and after."}},"required":["status","source","measured_at","before","after","metrics"]},{"nullable":true}],"description":"Whether it helped, once carried out; null before. Pending until a Run measures it."},"created_at":{"type":"string","description":"When the Run made it, as ISO 8601."},"kind":{"type":"string","enum":["add_variant"],"description":"Adds a new Ad to an Ad set."},"ad_set_id":{"type":"string","pattern":"^\\d+$","description":"The Meta ad set to add the new Ad to."},"ad_set_name":{"type":"string","nullable":true,"description":"The Ad set's name as the Run saw it; null when the Run's snapshot lacks it."},"creative_brief":{"type":"object","properties":{"angle":{"type":"string","minLength":1,"maxLength":500,"description":"The ad's selling angle."},"hook":{"type":"string","minLength":1,"maxLength":500,"description":"The opening line idea that stops the scroll."},"image_prompt":{"type":"string","minLength":1,"maxLength":2000,"description":"A prompt for the ad's image."}},"required":["angle","hook","image_prompt"],"description":"What the new Ad should say and show."},"variant":{"type":"object","nullable":true,"properties":{"headline":{"type":"string","description":"The Ad's headline."},"primary_text":{"type":"string","description":"The Ad's primary text."},"call_to_action_type":{"type":"string","enum":["LEARN_MORE","APPLY_NOW","SIGN_UP","CONTACT_US","GET_QUOTE","BOOK_NOW","SUBSCRIBE","DOWNLOAD","SHOP_NOW","ORDER_NOW","GET_OFFER","GET_STARTED","REQUEST_TIME","CALL_NOW","MESSAGE_PAGE","WHATSAPP_MESSAGE"],"description":"The Ad's Call to action."},"image_url":{"type":"string","nullable":true,"description":"The Ad's image URL; null for an Ad without an image."},"link":{"type":"string","nullable":true,"description":"Where the Ad sends people; null when unknown."},"page_id":{"type":"string","nullable":true,"description":"The Facebook page the Ad runs under; null when unknown."}},"required":["headline","primary_text","call_to_action_type","image_url","link","page_id"],"description":"The finished Ad; null until osiro has built it."},"ad_id":{"type":"string","nullable":true,"pattern":"^\\d+$","description":"The Meta ad created on approval; null before."}},"required":["id","run_id","campaign_id","status","reason","rejected_alternative","rejection_reason","failure","error","decision","executed_at","outcome","created_at","kind","ad_set_id","ad_set_name","creative_brief","variant","ad_id"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Proposal's id."},"run_id":{"type":"string","format":"uuid","description":"The id of the Run that made it."},"campaign_id":{"type":"string","nullable":true,"format":"uuid","description":"The Campaign, for a Proposal of a Campaign Run; null for a Landing page or Funnel Run's."},"status":{"type":"string","enum":["generating","pending","approved","executing","executed","failed","rejected","superseded"],"description":"Where the Proposal stands: generating (its Ad or images are being built), pending (waits for a decision), approved, executing, executed, failed, rejected or superseded (replaced by a newer Run's Proposal)."},"reason":{"type":"string","description":"Why osiro.autopilot proposes it."},"rejected_alternative":{"type":"object","nullable":true,"properties":{"layer":{"type":"string","enum":["ad","landing_page","funnel"],"description":"The layer autopilot considered changing instead."},"why":{"type":"string","minLength":1,"maxLength":1000,"description":"Why changing that layer is not the better move, briefly."}},"required":["layer","why"],"description":"The other layer osiro.autopilot considered changing instead; null for Proposals made before it named one."},"rejection_reason":{"type":"string","nullable":true,"description":"A rejected Proposal's reason, if the Member gave one."},"failure":{"type":"string","nullable":true,"enum":["generation","meta","meta_auth","outdated","interrupted","validation","publish",null],"description":"Why a failed Proposal failed; null otherwise."},"error":{"type":"string","nullable":true,"description":"Meta's message for a meta failure, the reason code for an outdated one, or what went wrong for another failure; null otherwise."},"decision":{"type":"object","nullable":true,"properties":{"by":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The deciding user's id."},"name":{"type":"string","nullable":true,"description":"The deciding user's display name; null when unknown."}},"required":["id","name"],"description":"Who decided; null once that user is deleted."},"at":{"type":"string","description":"When it was decided, as ISO 8601."}},"required":["by","at"],"description":"Who approved or rejected it, and when; null before."},"executed_at":{"type":"string","nullable":true,"description":"When it was carried out, as ISO 8601; null before."},"outcome":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending"],"description":"Not measured yet: too few days have passed, or its A/B-Test still runs."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"source":{"type":"string","enum":["experiment","before_after"],"description":"How the Outcome was measured: experiment (from the A/B-Test the edit ran as) or before_after (from the days before and after a directly published edit). Absent on older Outcomes, which compare before and after with a verdict."}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["measured"],"description":"Measured, with a verdict."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"source":{"type":"string","enum":["experiment","before_after"],"description":"How the Outcome was measured: experiment (from the A/B-Test the edit ran as) or before_after (from the days before and after a directly published edit). Absent on older Outcomes, which compare before and after with a verdict."},"verdict":{"type":"string","enum":["better","worse","unchanged","inconclusive"],"description":"Whether the deciding rate improved, worsened or held: better, worse, unchanged or inconclusive (for cost per lead, one window had no spend or neither had a lead; for a rate, not clear yet)."},"final":{"type":"boolean","description":"false while the verdict is unclear before day 28, so the next Run measures it again; absent means final."},"measured_at":{"type":"string","description":"When the Run measured it, as ISO 8601."},"before":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window before the change."},"after":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window after the change."},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["cost_per_lead","ad_set_cost_per_lead","bounce_rate","median_duration_ms","conversion_rate","visits","starts","completion_rate","block_reach","step_drop_off"],"description":"What the metric measures: cost_per_lead (the Campaign's), ad_set_cost_per_lead, bounce_rate, median_duration_ms, conversion_rate, visits, starts, completion_rate, block_reach (of one changed block) or step_drop_off (of one changed step). Money in minor units, rates in percent."},"block_id":{"type":"string","description":"The changed block, for block_reach."},"step_id":{"type":"string","description":"The changed step, for step_drop_off."},"before":{"type":"number","nullable":true,"description":"The value in the window before; null without data, such as a cost per lead without a lead."},"after":{"type":"number","nullable":true,"description":"The value in the window after; null without data, such as a cost per lead without a lead."},"change":{"type":"number","nullable":true,"description":"after ÷ before − 1, in percent; null when either is missing or before is 0."}},"required":["metric","before","after","change"]},"description":"Each compared metric, before and after."},"probability_better":{"type":"number","description":"The probability that the deciding rate is better after than before, in percent."},"interval":{"type":"object","properties":{"low":{"type":"number","description":"The interval's low end, in percent."},"high":{"type":"number","description":"The interval's high end, in percent."}},"required":["low","high"],"description":"The 90 % credible interval of the deciding rate's after ÷ before − 1."},"traffic_sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","description":"The Traffic source: a utm_source, (none) or (other)."},"before":{"type":"number","description":"Its share of visits or starts before, in percent."},"after":{"type":"number","description":"Its share of visits or starts after, in percent."}},"required":["source","before","after"]},"description":"The largest Traffic sources' shares of visits or starts, before and after."},"overlapping":{"type":"array","items":{"type":"object","properties":{"proposal_id":{"type":"string","description":"The other edit's Proposal id."},"kind":{"type":"string","enum":["edit_landing_page","edit_funnel"],"description":"What the edit changed: edit_landing_page or edit_funnel."},"landing_page_id":{"type":"string","nullable":true,"description":"The Landing page it edited; null for a Funnel edit."},"funnel_id":{"type":"string","nullable":true,"description":"The Funnel it edited; null for a Landing page edit."},"executed_at":{"type":"string","description":"When it was carried out, as ISO 8601."}},"required":["proposal_id","kind","landing_page_id","funnel_id","executed_at"]},"description":"Other executed edits of the same Landing page or Funnel within the windows."},"winner":{"type":"string","enum":["A","B","none"],"description":"With source experiment: the Test variant the Experiment kept, A or B, or none."},"ended_by":{"type":"string","enum":["proposal","member"],"description":"With source experiment: who ended the Experiment, the approved end_experiment proposal or a member."},"test_variant_edited":{"type":"boolean","description":"With source experiment: whether Test variant B was published again after the test started."},"end_reason":{"type":"string","enum":["subject_gone"],"description":"With source experiment: the test ended because a Member unpublished or deleted its Landing page or Funnel. Unclear, without a Winner or numbers."}},"required":["status","verdict","measured_at","before","after","metrics"]},{"type":"object","properties":{"status":{"type":"string","enum":["observed"],"description":"A directly published edit's numbers before and after, without a verdict."},"source":{"type":"string","enum":["before_after"],"description":"Measured from the days before and after the edit."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"measured_at":{"type":"string","description":"When the Run measured it, as ISO 8601."},"before":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window before the change."},"after":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window after the change."},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["cost_per_lead","ad_set_cost_per_lead","bounce_rate","median_duration_ms","conversion_rate","visits","starts","completion_rate","block_reach","step_drop_off"],"description":"What the metric measures: cost_per_lead (the Campaign's), ad_set_cost_per_lead, bounce_rate, median_duration_ms, conversion_rate, visits, starts, completion_rate, block_reach (of one changed block) or step_drop_off (of one changed step). Money in minor units, rates in percent."},"block_id":{"type":"string","description":"The changed block, for block_reach."},"step_id":{"type":"string","description":"The changed step, for step_drop_off."},"before":{"type":"number","nullable":true,"description":"The value in the window before; null without data, such as a cost per lead without a lead."},"after":{"type":"number","nullable":true,"description":"The value in the window after; null without data, such as a cost per lead without a lead."},"change":{"type":"number","nullable":true,"description":"after ÷ before − 1, in percent; null when either is missing or before is 0."}},"required":["metric","before","after","change"]},"description":"Each compared metric, before and after."}},"required":["status","source","measured_at","before","after","metrics"]},{"nullable":true}],"description":"Whether it helped, once carried out; null before. Pending until a Run measures it."},"created_at":{"type":"string","description":"When the Run made it, as ISO 8601."},"kind":{"type":"string","enum":["edit_landing_page"],"description":"Edits a Landing page."},"edit_path":{"type":"string","nullable":true,"enum":["experiment","direct",null],"default":null,"description":"How approving carries the edit out; null for edits made before Runs decided a path, which publish directly."},"visitor_days_per_day":{"type":"integer","nullable":true,"default":null,"description":"The subject's Visitor-days a day when the Run decided the path, rounded down; null before."},"experiment_id":{"type":"string","nullable":true,"format":"uuid","default":null,"description":"The A/B-Test approving started; null on the direct path or before approval."},"experiment_end":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The end_experiment Proposal's id."},"status":{"type":"string","enum":["generating","pending","approved","executing","executed","failed","rejected","superseded"],"description":"Where the Proposal stands: generating (its Ad or images are being built), pending (waits for a decision), approved, executing, executed, failed, rejected or superseded (replaced by a newer Run's Proposal)."},"winner":{"type":"string","enum":["A","B"],"description":"The Test variant approving keeps: B publishes the edit, A keeps the page as it was."},"results":{"type":"object","properties":{"checkpoint_day":{"anyOf":[{"type":"number","enum":[14]},{"type":"number","enum":[28]}],"description":"The Checkpoint the Run read them at, in counted days."},"counted_days":{"type":"integer","description":"Whole days the test had run, paused days left out."},"goal":{"type":"string","enum":["conversion","completion_rate"],"description":"The test's Primary goal."},"verdict":{"type":"string","enum":["not_enough_data","no_clear_difference","ahead","very_likely_best"],"description":"What the results say."},"leader":{"type":"string","nullable":true,"enum":["A","B","C",null],"description":"The leading Test variant, at the ahead or very_likely_best verdict; null otherwise."},"test_variants":{"type":"array","items":{"type":"object","properties":{"letter":{"type":"string","enum":["A","B","C"],"description":"The Test variant."},"units":{"type":"integer","description":"Its Visitor-days."},"successes":{"type":"integer","description":"Its successes on the Primary goal."},"rate":{"type":"number","description":"successes ÷ units, as a fraction."},"probability_to_be_best":{"type":"number","nullable":true,"description":"The probability it is the best Test variant, as a fraction; null while there isn't enough data."}},"required":["letter","units","successes","rate","probability_to_be_best"]},"description":"The Primary goal per Test variant."}},"required":["checkpoint_day","counted_days","goal","verdict","leader","test_variants"],"description":"The test's results as the Checkpoint Run read them."},"failure":{"type":"string","nullable":true,"enum":["generation","meta","meta_auth","outdated","interrupted","validation","publish",null],"description":"Why it failed; null unless failed."},"error":{"type":"string","nullable":true,"description":"What went wrong for a failed one; null otherwise."},"created_at":{"type":"string","description":"When the Run made it, as ISO 8601."}},"default":null,"required":["id","status","winner","results","failure","error","created_at"],"description":"The latest \"Test beenden\" Proposal still to decide or carried out; null when there is none."},"landing_page":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Landing page's id."},"name":{"type":"string","nullable":true,"description":"The Landing page's name; null once the page is gone."}},"required":["id","name"],"description":"The edited Landing page."},"base_version_id":{"type":"string","description":"The published version the edit was made against."},"changes":{"type":"array","items":{"type":"object","properties":{"block_id":{"type":"string","description":"The block's id."},"type":{"type":"string","description":"The block's type."},"label":{"type":"string","description":"The block's readable name."},"kind":{"type":"string","enum":["added","removed","changed"],"description":"What the edit does to it: added, removed or changed."},"position":{"type":"object","properties":{"before":{"type":"number","nullable":true,"description":"Its position before the edit; null when it is new."},"after":{"type":"number","nullable":true,"description":"Its position after the edit; null when it is removed."}},"required":["before","after"],"description":"Its 1-based position among the page's blocks, before and after."},"moved":{"type":"boolean","description":"Whether the edit moved it, not merely shifted it by a block added or removed before it."},"fields":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The dotted path into the block's config, e.g. items[q2].answer."},"kind":{"type":"string","enum":["set","unset","changed","asset"],"description":"What happened to the field: set (it had no value), unset (it has none now), changed, or asset (its image changed; no values)."},"before":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}],"description":"The value before; absent for an asset change."},"after":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}],"description":"The value after; absent for an asset change."}},"required":["path","kind"]},"description":"The block's changed config fields."},"truncated":{"type":"number","description":"How many changed fields are left out of fields."}},"required":["block_id","type","label","kind","position","moved","fields","truncated"]},"description":"Block by block, what the edit changes on that version."},"variables":{"type":"array","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string","pattern":"^\\w+$","description":"Token written as {{name}} in text: letters, digits and underscores."},"searchParam":{"type":"string","description":"The URL search param to read, e.g. `city` for ?city=berlin."},"defaultValue":{"type":"string","description":"The text when the param is missing or unmapped."},"values":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"A raw param value, matched ignoring case."},"value":{"type":"string","description":"The text shown for it."}},"required":["name","value"]},"description":"Raw param values mapped to the text shown; [] for none."}},"required":["name","searchParam","defaultValue","values"]},"description":"The page's URL variables after the edit; null when it keeps them."},"evidence":{"type":"object","nullable":true,"properties":{"signals":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["high_bounce","low_median_duration","block_reach_drop"],"description":"What is worth a look: high_bounce, low_median_duration or block_reach_drop."},"window":{"type":"string","enum":["current_version","last_30_days"],"description":"The analytics window it was computed on: current_version (since the published version went live) or last_30_days."},"traffic":{"type":"string","enum":["meta","all"],"description":"The traffic it was computed on: meta (visits tagged as coming from Meta) or all."},"value":{"type":"number","description":"The bounce rate in percent, the median duration in milliseconds, or the drop in reach in percentage points."},"threshold":{"type":"number","description":"The value past which the signal fires, in the same unit."},"block_id":{"type":"string","nullable":true,"description":"For a reach drop, the block where reach falls; null otherwise."}},"required":["kind","window","traffic","value","threshold","block_id"]},"description":"The page's signals that made the Run propose the edit."},"campaign_traffic_share":{"type":"object","properties":{"current_version":{"type":"number","nullable":true,"description":"Since the published version went live, in percent; null without data."},"last_30_days":{"type":"number","nullable":true,"description":"Over the last 30 days, in percent; null without data."}},"required":["current_version","last_30_days"],"description":"The visits tagged as coming from Meta, as a share of all visits."}},"required":["signals","campaign_traffic_share"],"description":"What the Run saw on the page that made it propose the edit; null when its snapshot lacks the page."},"images":{"type":"array","items":{"type":"object","properties":{"operation_index":{"type":"integer","minimum":0,"description":"0-based index into `operations` of the add_block or edit_block whose config gets the image."},"field":{"type":"string","minLength":1,"description":"The config field that holds the image's asset id, e.g. `assetId`; dotted for nested fields, with list positions as numbers, e.g. `items.0.assetId`."},"prompt":{"type":"string","minLength":1,"maxLength":2000,"description":"A prompt for the image."},"aspect":{"type":"string","enum":["square","landscape","portrait"],"description":"The image's shape."},"image_url":{"type":"string","nullable":true,"description":"The generated image's URL; null while it is being generated."}},"required":["operation_index","field","prompt","aspect","image_url"]},"description":"The new images the edit asks for; [] for none."}},"required":["id","run_id","campaign_id","status","reason","rejected_alternative","rejection_reason","failure","error","decision","executed_at","outcome","created_at","kind","landing_page","base_version_id","changes","variables","evidence","images"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Proposal's id."},"run_id":{"type":"string","format":"uuid","description":"The id of the Run that made it."},"campaign_id":{"type":"string","nullable":true,"format":"uuid","description":"The Campaign, for a Proposal of a Campaign Run; null for a Landing page or Funnel Run's."},"status":{"type":"string","enum":["generating","pending","approved","executing","executed","failed","rejected","superseded"],"description":"Where the Proposal stands: generating (its Ad or images are being built), pending (waits for a decision), approved, executing, executed, failed, rejected or superseded (replaced by a newer Run's Proposal)."},"reason":{"type":"string","description":"Why osiro.autopilot proposes it."},"rejected_alternative":{"type":"object","nullable":true,"properties":{"layer":{"type":"string","enum":["ad","landing_page","funnel"],"description":"The layer autopilot considered changing instead."},"why":{"type":"string","minLength":1,"maxLength":1000,"description":"Why changing that layer is not the better move, briefly."}},"required":["layer","why"],"description":"The other layer osiro.autopilot considered changing instead; null for Proposals made before it named one."},"rejection_reason":{"type":"string","nullable":true,"description":"A rejected Proposal's reason, if the Member gave one."},"failure":{"type":"string","nullable":true,"enum":["generation","meta","meta_auth","outdated","interrupted","validation","publish",null],"description":"Why a failed Proposal failed; null otherwise."},"error":{"type":"string","nullable":true,"description":"Meta's message for a meta failure, the reason code for an outdated one, or what went wrong for another failure; null otherwise."},"decision":{"type":"object","nullable":true,"properties":{"by":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The deciding user's id."},"name":{"type":"string","nullable":true,"description":"The deciding user's display name; null when unknown."}},"required":["id","name"],"description":"Who decided; null once that user is deleted."},"at":{"type":"string","description":"When it was decided, as ISO 8601."}},"required":["by","at"],"description":"Who approved or rejected it, and when; null before."},"executed_at":{"type":"string","nullable":true,"description":"When it was carried out, as ISO 8601; null before."},"outcome":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending"],"description":"Not measured yet: too few days have passed, or its A/B-Test still runs."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"source":{"type":"string","enum":["experiment","before_after"],"description":"How the Outcome was measured: experiment (from the A/B-Test the edit ran as) or before_after (from the days before and after a directly published edit). Absent on older Outcomes, which compare before and after with a verdict."}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["measured"],"description":"Measured, with a verdict."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"source":{"type":"string","enum":["experiment","before_after"],"description":"How the Outcome was measured: experiment (from the A/B-Test the edit ran as) or before_after (from the days before and after a directly published edit). Absent on older Outcomes, which compare before and after with a verdict."},"verdict":{"type":"string","enum":["better","worse","unchanged","inconclusive"],"description":"Whether the deciding rate improved, worsened or held: better, worse, unchanged or inconclusive (for cost per lead, one window had no spend or neither had a lead; for a rate, not clear yet)."},"final":{"type":"boolean","description":"false while the verdict is unclear before day 28, so the next Run measures it again; absent means final."},"measured_at":{"type":"string","description":"When the Run measured it, as ISO 8601."},"before":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window before the change."},"after":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window after the change."},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["cost_per_lead","ad_set_cost_per_lead","bounce_rate","median_duration_ms","conversion_rate","visits","starts","completion_rate","block_reach","step_drop_off"],"description":"What the metric measures: cost_per_lead (the Campaign's), ad_set_cost_per_lead, bounce_rate, median_duration_ms, conversion_rate, visits, starts, completion_rate, block_reach (of one changed block) or step_drop_off (of one changed step). Money in minor units, rates in percent."},"block_id":{"type":"string","description":"The changed block, for block_reach."},"step_id":{"type":"string","description":"The changed step, for step_drop_off."},"before":{"type":"number","nullable":true,"description":"The value in the window before; null without data, such as a cost per lead without a lead."},"after":{"type":"number","nullable":true,"description":"The value in the window after; null without data, such as a cost per lead without a lead."},"change":{"type":"number","nullable":true,"description":"after ÷ before − 1, in percent; null when either is missing or before is 0."}},"required":["metric","before","after","change"]},"description":"Each compared metric, before and after."},"probability_better":{"type":"number","description":"The probability that the deciding rate is better after than before, in percent."},"interval":{"type":"object","properties":{"low":{"type":"number","description":"The interval's low end, in percent."},"high":{"type":"number","description":"The interval's high end, in percent."}},"required":["low","high"],"description":"The 90 % credible interval of the deciding rate's after ÷ before − 1."},"traffic_sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","description":"The Traffic source: a utm_source, (none) or (other)."},"before":{"type":"number","description":"Its share of visits or starts before, in percent."},"after":{"type":"number","description":"Its share of visits or starts after, in percent."}},"required":["source","before","after"]},"description":"The largest Traffic sources' shares of visits or starts, before and after."},"overlapping":{"type":"array","items":{"type":"object","properties":{"proposal_id":{"type":"string","description":"The other edit's Proposal id."},"kind":{"type":"string","enum":["edit_landing_page","edit_funnel"],"description":"What the edit changed: edit_landing_page or edit_funnel."},"landing_page_id":{"type":"string","nullable":true,"description":"The Landing page it edited; null for a Funnel edit."},"funnel_id":{"type":"string","nullable":true,"description":"The Funnel it edited; null for a Landing page edit."},"executed_at":{"type":"string","description":"When it was carried out, as ISO 8601."}},"required":["proposal_id","kind","landing_page_id","funnel_id","executed_at"]},"description":"Other executed edits of the same Landing page or Funnel within the windows."},"winner":{"type":"string","enum":["A","B","none"],"description":"With source experiment: the Test variant the Experiment kept, A or B, or none."},"ended_by":{"type":"string","enum":["proposal","member"],"description":"With source experiment: who ended the Experiment, the approved end_experiment proposal or a member."},"test_variant_edited":{"type":"boolean","description":"With source experiment: whether Test variant B was published again after the test started."},"end_reason":{"type":"string","enum":["subject_gone"],"description":"With source experiment: the test ended because a Member unpublished or deleted its Landing page or Funnel. Unclear, without a Winner or numbers."}},"required":["status","verdict","measured_at","before","after","metrics"]},{"type":"object","properties":{"status":{"type":"string","enum":["observed"],"description":"A directly published edit's numbers before and after, without a verdict."},"source":{"type":"string","enum":["before_after"],"description":"Measured from the days before and after the edit."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"measured_at":{"type":"string","description":"When the Run measured it, as ISO 8601."},"before":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window before the change."},"after":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window after the change."},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["cost_per_lead","ad_set_cost_per_lead","bounce_rate","median_duration_ms","conversion_rate","visits","starts","completion_rate","block_reach","step_drop_off"],"description":"What the metric measures: cost_per_lead (the Campaign's), ad_set_cost_per_lead, bounce_rate, median_duration_ms, conversion_rate, visits, starts, completion_rate, block_reach (of one changed block) or step_drop_off (of one changed step). Money in minor units, rates in percent."},"block_id":{"type":"string","description":"The changed block, for block_reach."},"step_id":{"type":"string","description":"The changed step, for step_drop_off."},"before":{"type":"number","nullable":true,"description":"The value in the window before; null without data, such as a cost per lead without a lead."},"after":{"type":"number","nullable":true,"description":"The value in the window after; null without data, such as a cost per lead without a lead."},"change":{"type":"number","nullable":true,"description":"after ÷ before − 1, in percent; null when either is missing or before is 0."}},"required":["metric","before","after","change"]},"description":"Each compared metric, before and after."}},"required":["status","source","measured_at","before","after","metrics"]},{"nullable":true}],"description":"Whether it helped, once carried out; null before. Pending until a Run measures it."},"created_at":{"type":"string","description":"When the Run made it, as ISO 8601."},"kind":{"type":"string","enum":["edit_funnel"],"description":"Edits a Funnel."},"edit_path":{"type":"string","nullable":true,"enum":["experiment","direct",null],"default":null,"description":"How approving carries the edit out; null for edits made before Runs decided a path, which publish directly."},"visitor_days_per_day":{"type":"integer","nullable":true,"default":null,"description":"The subject's Visitor-days a day when the Run decided the path, rounded down; null before."},"experiment_id":{"type":"string","nullable":true,"format":"uuid","default":null,"description":"The A/B-Test approving started; null on the direct path or before approval."},"experiment_end":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The end_experiment Proposal's id."},"status":{"type":"string","enum":["generating","pending","approved","executing","executed","failed","rejected","superseded"],"description":"Where the Proposal stands: generating (its Ad or images are being built), pending (waits for a decision), approved, executing, executed, failed, rejected or superseded (replaced by a newer Run's Proposal)."},"winner":{"type":"string","enum":["A","B"],"description":"The Test variant approving keeps: B publishes the edit, A keeps the page as it was."},"results":{"type":"object","properties":{"checkpoint_day":{"anyOf":[{"type":"number","enum":[14]},{"type":"number","enum":[28]}],"description":"The Checkpoint the Run read them at, in counted days."},"counted_days":{"type":"integer","description":"Whole days the test had run, paused days left out."},"goal":{"type":"string","enum":["conversion","completion_rate"],"description":"The test's Primary goal."},"verdict":{"type":"string","enum":["not_enough_data","no_clear_difference","ahead","very_likely_best"],"description":"What the results say."},"leader":{"type":"string","nullable":true,"enum":["A","B","C",null],"description":"The leading Test variant, at the ahead or very_likely_best verdict; null otherwise."},"test_variants":{"type":"array","items":{"type":"object","properties":{"letter":{"type":"string","enum":["A","B","C"],"description":"The Test variant."},"units":{"type":"integer","description":"Its Visitor-days."},"successes":{"type":"integer","description":"Its successes on the Primary goal."},"rate":{"type":"number","description":"successes ÷ units, as a fraction."},"probability_to_be_best":{"type":"number","nullable":true,"description":"The probability it is the best Test variant, as a fraction; null while there isn't enough data."}},"required":["letter","units","successes","rate","probability_to_be_best"]},"description":"The Primary goal per Test variant."}},"required":["checkpoint_day","counted_days","goal","verdict","leader","test_variants"],"description":"The test's results as the Checkpoint Run read them."},"failure":{"type":"string","nullable":true,"enum":["generation","meta","meta_auth","outdated","interrupted","validation","publish",null],"description":"Why it failed; null unless failed."},"error":{"type":"string","nullable":true,"description":"What went wrong for a failed one; null otherwise."},"created_at":{"type":"string","description":"When the Run made it, as ISO 8601."}},"default":null,"required":["id","status","winner","results","failure","error","created_at"],"description":"The latest \"Test beenden\" Proposal still to decide or carried out; null when there is none."},"funnel":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Funnel's id."},"name":{"type":"string","nullable":true,"description":"The Funnel's name; null once the Funnel is gone."}},"required":["id","name"],"description":"The edited Funnel."},"base_version_id":{"type":"string","description":"The published version the edit was made against."},"changes":{"type":"array","items":{"type":"object","properties":{"block_id":{"type":"string","description":"The block's id."},"type":{"type":"string","description":"The block's type."},"label":{"type":"string","description":"The block's readable name."},"kind":{"type":"string","enum":["added","removed","changed"],"description":"What the edit does to it: added, removed or changed."},"position":{"type":"object","properties":{"before":{"type":"number","nullable":true,"description":"Its position before the edit; null when it is new."},"after":{"type":"number","nullable":true,"description":"Its position after the edit; null when it is removed."}},"required":["before","after"],"description":"Its 1-based position among the page's blocks, before and after."},"moved":{"type":"boolean","description":"Whether the edit moved it, not merely shifted it by a block added or removed before it."},"fields":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The dotted path into the block's config, e.g. items[q2].answer."},"kind":{"type":"string","enum":["set","unset","changed","asset"],"description":"What happened to the field: set (it had no value), unset (it has none now), changed, or asset (its image changed; no values)."},"before":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}],"description":"The value before; absent for an asset change."},"after":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}],"description":"The value after; absent for an asset change."}},"required":["path","kind"]},"description":"The block's changed config fields."},"truncated":{"type":"number","description":"How many changed fields are left out of fields."},"step":{"type":"string","nullable":true,"description":"The name of the block's step after the edit, or before it for a removed block; null when unknown."}},"required":["block_id","type","label","kind","position","moved","fields","truncated","step"]},"description":"Block by block, what the edit changes on that version."},"steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string","description":"The step's id."},"name":{"type":"string","nullable":true,"description":"The step's name after the edit, or before it for a removed step; null when it has none."},"kind":{"type":"string","enum":["added","removed","changed"],"description":"What the edit does to it: added, removed or changed."},"position":{"type":"object","properties":{"before":{"type":"number","nullable":true,"description":"Its position before the edit; null when it is new."},"after":{"type":"number","nullable":true,"description":"Its position after the edit; null when it is removed."}},"required":["before","after"],"description":"Its 1-based position among the steps, before and after."},"moved":{"type":"boolean","description":"Whether the edit moved it, not merely shifted it by a step added or removed before it."},"renamed_from":{"type":"string","nullable":true,"description":"The step's name before a rename; null when kept."},"rules":{"type":"array","nullable":true,"items":{"type":"object","properties":{"field":{"type":"string","description":"The checked field's internal name or label."},"connector":{"type":"string","nullable":true,"enum":["and","or",null],"description":"How the conditions combine: and (all) or or (any); null for a single condition."},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"The checked field's internal name or label."},"operator":{"type":"string","description":"How the answer is compared."},"value":{"type":"string","nullable":true,"description":"What the answer is compared with, option ids as their labels; null for no value."}},"required":["field","operator","value"]},"description":"The rule's conditions; [] when it always fires."},"actions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"What the action does."},"step":{"type":"string","nullable":true,"description":"The target step's name, for go_to_step; null otherwise."},"url":{"type":"string","nullable":true,"description":"The target URL, for redirect; null otherwise."}},"required":["type","step","url"]},"description":"What the rule does when it fires, in order."},"behavior":{"type":"string","enum":["auto","on_click"],"description":"When the rule fires: auto (as soon as the answer matches) or on_click (when triggeredBy is clicked)."}},"required":["field","connector","conditions","actions","behavior"]},"description":"The step's rules after the edit, when it changes them; null otherwise."}},"required":["step_id","name","kind","position","moved","renamed_from","rules"]},"description":"Step by step, what the edit changes: added, removed, moved, renamed, new rules."},"evidence":{"type":"object","nullable":true,"properties":{"signals":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["step_drop_off"],"description":"What is worth a look: step_drop_off."},"window":{"type":"string","enum":["current_version","last_30_days"],"description":"The analytics window it was computed on: current_version (since the published version went live) or last_30_days."},"traffic":{"type":"string","enum":["meta","all"],"description":"The traffic it was computed on: meta (visits tagged as coming from Meta) or all."},"value":{"type":"number","description":"The step's drop-off, in percent."},"threshold":{"type":"number","description":"The drop-off from which the signal fires, in percent."},"step_id":{"type":"string","description":"The step where sessions drop off."}},"required":["kind","window","traffic","value","threshold","step_id"]},"description":"The Funnel's signals that made the Run propose the edit."},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The step's id."},"name":{"type":"string","description":"The step's name."}},"required":["id","name"]},"description":"The published version's steps, to name the signals' steps."},"campaign_start_share":{"type":"object","properties":{"current_version":{"type":"number","nullable":true,"description":"Since the published version went live, in percent; null without data."},"last_30_days":{"type":"number","nullable":true,"description":"Over the last 30 days, in percent; null without data."}},"required":["current_version","last_30_days"],"description":"The Funnel starts tagged as coming from Meta, as a share of all starts."},"other_landing_pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The Landing page's id."},"name":{"type":"string","description":"The Landing page's name."}},"required":["id","name"]},"description":"Other published Landing pages embedding the Funnel; the edit changes them too."}},"required":["signals","steps","campaign_start_share","other_landing_pages"],"description":"What the Run saw of the Funnel that made it propose the edit; null when its snapshot lacks the Funnel."},"images":{"type":"array","items":{"type":"object","properties":{"operation_index":{"type":"integer","minimum":0,"description":"0-based index into `operations` of the add_block or edit_block whose config gets the image."},"field":{"type":"string","minLength":1,"description":"The config field that holds the image's asset id, e.g. `assetId`; dotted for nested fields, with list positions as numbers, e.g. `items.0.assetId`."},"prompt":{"type":"string","minLength":1,"maxLength":2000,"description":"A prompt for the image."},"aspect":{"type":"string","enum":["square","landscape","portrait"],"description":"The image's shape."},"image_url":{"type":"string","nullable":true,"description":"The generated image's URL; null while it is being generated."}},"required":["operation_index","field","prompt","aspect","image_url"]},"description":"The new images the edit asks for; [] for none."}},"required":["id","run_id","campaign_id","status","reason","rejected_alternative","rejection_reason","failure","error","decision","executed_at","outcome","created_at","kind","funnel","base_version_id","changes","steps","evidence","images"]}]},"description":"The latest executed Proposals with their Outcomes, latest first."},"generating":{"type":"integer","description":"How many Proposals are still being generated; check back until none are."}},"required":["proposals","executed","generating"]},"AutopilotProposal":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Proposal's id."},"run_id":{"type":"string","format":"uuid","description":"The id of the Run that made it."},"campaign_id":{"type":"string","nullable":true,"format":"uuid","description":"The Campaign, for a Proposal of a Campaign Run; null for a Landing page or Funnel Run's."},"status":{"type":"string","enum":["generating","pending","approved","executing","executed","failed","rejected","superseded"],"description":"Where the Proposal stands: generating (its Ad or images are being built), pending (waits for a decision), approved, executing, executed, failed, rejected or superseded (replaced by a newer Run's Proposal)."},"reason":{"type":"string","description":"Why osiro.autopilot proposes it."},"rejected_alternative":{"type":"object","nullable":true,"properties":{"layer":{"type":"string","enum":["ad","landing_page","funnel"],"description":"The layer autopilot considered changing instead."},"why":{"type":"string","minLength":1,"maxLength":1000,"description":"Why changing that layer is not the better move, briefly."}},"required":["layer","why"],"description":"The other layer osiro.autopilot considered changing instead; null for Proposals made before it named one."},"rejection_reason":{"type":"string","nullable":true,"description":"A rejected Proposal's reason, if the Member gave one."},"failure":{"type":"string","nullable":true,"enum":["generation","meta","meta_auth","outdated","interrupted","validation","publish",null],"description":"Why a failed Proposal failed; null otherwise."},"error":{"type":"string","nullable":true,"description":"Meta's message for a meta failure, the reason code for an outdated one, or what went wrong for another failure; null otherwise."},"decision":{"type":"object","nullable":true,"properties":{"by":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The deciding user's id."},"name":{"type":"string","nullable":true,"description":"The deciding user's display name; null when unknown."}},"required":["id","name"],"description":"Who decided; null once that user is deleted."},"at":{"type":"string","description":"When it was decided, as ISO 8601."}},"required":["by","at"],"description":"Who approved or rejected it, and when; null before."},"executed_at":{"type":"string","nullable":true,"description":"When it was carried out, as ISO 8601; null before."},"outcome":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending"],"description":"Not measured yet: too few days have passed, or its A/B-Test still runs."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"source":{"type":"string","enum":["experiment","before_after"],"description":"How the Outcome was measured: experiment (from the A/B-Test the edit ran as) or before_after (from the days before and after a directly published edit). Absent on older Outcomes, which compare before and after with a verdict."}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["measured"],"description":"Measured, with a verdict."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"source":{"type":"string","enum":["experiment","before_after"],"description":"How the Outcome was measured: experiment (from the A/B-Test the edit ran as) or before_after (from the days before and after a directly published edit). Absent on older Outcomes, which compare before and after with a verdict."},"verdict":{"type":"string","enum":["better","worse","unchanged","inconclusive"],"description":"Whether the deciding rate improved, worsened or held: better, worse, unchanged or inconclusive (for cost per lead, one window had no spend or neither had a lead; for a rate, not clear yet)."},"final":{"type":"boolean","description":"false while the verdict is unclear before day 28, so the next Run measures it again; absent means final."},"measured_at":{"type":"string","description":"When the Run measured it, as ISO 8601."},"before":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window before the change."},"after":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window after the change."},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["cost_per_lead","ad_set_cost_per_lead","bounce_rate","median_duration_ms","conversion_rate","visits","starts","completion_rate","block_reach","step_drop_off"],"description":"What the metric measures: cost_per_lead (the Campaign's), ad_set_cost_per_lead, bounce_rate, median_duration_ms, conversion_rate, visits, starts, completion_rate, block_reach (of one changed block) or step_drop_off (of one changed step). Money in minor units, rates in percent."},"block_id":{"type":"string","description":"The changed block, for block_reach."},"step_id":{"type":"string","description":"The changed step, for step_drop_off."},"before":{"type":"number","nullable":true,"description":"The value in the window before; null without data, such as a cost per lead without a lead."},"after":{"type":"number","nullable":true,"description":"The value in the window after; null without data, such as a cost per lead without a lead."},"change":{"type":"number","nullable":true,"description":"after ÷ before − 1, in percent; null when either is missing or before is 0."}},"required":["metric","before","after","change"]},"description":"Each compared metric, before and after."},"probability_better":{"type":"number","description":"The probability that the deciding rate is better after than before, in percent."},"interval":{"type":"object","properties":{"low":{"type":"number","description":"The interval's low end, in percent."},"high":{"type":"number","description":"The interval's high end, in percent."}},"required":["low","high"],"description":"The 90 % credible interval of the deciding rate's after ÷ before − 1."},"traffic_sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","description":"The Traffic source: a utm_source, (none) or (other)."},"before":{"type":"number","description":"Its share of visits or starts before, in percent."},"after":{"type":"number","description":"Its share of visits or starts after, in percent."}},"required":["source","before","after"]},"description":"The largest Traffic sources' shares of visits or starts, before and after."},"overlapping":{"type":"array","items":{"type":"object","properties":{"proposal_id":{"type":"string","description":"The other edit's Proposal id."},"kind":{"type":"string","enum":["edit_landing_page","edit_funnel"],"description":"What the edit changed: edit_landing_page or edit_funnel."},"landing_page_id":{"type":"string","nullable":true,"description":"The Landing page it edited; null for a Funnel edit."},"funnel_id":{"type":"string","nullable":true,"description":"The Funnel it edited; null for a Landing page edit."},"executed_at":{"type":"string","description":"When it was carried out, as ISO 8601."}},"required":["proposal_id","kind","landing_page_id","funnel_id","executed_at"]},"description":"Other executed edits of the same Landing page or Funnel within the windows."},"winner":{"type":"string","enum":["A","B","none"],"description":"With source experiment: the Test variant the Experiment kept, A or B, or none."},"ended_by":{"type":"string","enum":["proposal","member"],"description":"With source experiment: who ended the Experiment, the approved end_experiment proposal or a member."},"test_variant_edited":{"type":"boolean","description":"With source experiment: whether Test variant B was published again after the test started."},"end_reason":{"type":"string","enum":["subject_gone"],"description":"With source experiment: the test ended because a Member unpublished or deleted its Landing page or Funnel. Unclear, without a Winner or numbers."}},"required":["status","verdict","measured_at","before","after","metrics"]},{"type":"object","properties":{"status":{"type":"string","enum":["observed"],"description":"A directly published edit's numbers before and after, without a verdict."},"source":{"type":"string","enum":["before_after"],"description":"Measured from the days before and after the edit."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"measured_at":{"type":"string","description":"When the Run measured it, as ISO 8601."},"before":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window before the change."},"after":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window after the change."},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["cost_per_lead","ad_set_cost_per_lead","bounce_rate","median_duration_ms","conversion_rate","visits","starts","completion_rate","block_reach","step_drop_off"],"description":"What the metric measures: cost_per_lead (the Campaign's), ad_set_cost_per_lead, bounce_rate, median_duration_ms, conversion_rate, visits, starts, completion_rate, block_reach (of one changed block) or step_drop_off (of one changed step). Money in minor units, rates in percent."},"block_id":{"type":"string","description":"The changed block, for block_reach."},"step_id":{"type":"string","description":"The changed step, for step_drop_off."},"before":{"type":"number","nullable":true,"description":"The value in the window before; null without data, such as a cost per lead without a lead."},"after":{"type":"number","nullable":true,"description":"The value in the window after; null without data, such as a cost per lead without a lead."},"change":{"type":"number","nullable":true,"description":"after ÷ before − 1, in percent; null when either is missing or before is 0."}},"required":["metric","before","after","change"]},"description":"Each compared metric, before and after."}},"required":["status","source","measured_at","before","after","metrics"]},{"nullable":true}],"description":"Whether it helped, once carried out; null before. Pending until a Run measures it."},"created_at":{"type":"string","description":"When the Run made it, as ISO 8601."},"kind":{"type":"string","enum":["pause_ad"],"description":"Pauses a Meta ad."},"ad_id":{"type":"string","pattern":"^\\d+$","description":"The Meta ad to pause."},"ad_name":{"type":"string","nullable":true,"description":"The ad's name as the Run saw it; null when the Run's snapshot lacks the ad."}},"required":["id","run_id","campaign_id","status","reason","rejected_alternative","rejection_reason","failure","error","decision","executed_at","outcome","created_at","kind","ad_id","ad_name"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Proposal's id."},"run_id":{"type":"string","format":"uuid","description":"The id of the Run that made it."},"campaign_id":{"type":"string","nullable":true,"format":"uuid","description":"The Campaign, for a Proposal of a Campaign Run; null for a Landing page or Funnel Run's."},"status":{"type":"string","enum":["generating","pending","approved","executing","executed","failed","rejected","superseded"],"description":"Where the Proposal stands: generating (its Ad or images are being built), pending (waits for a decision), approved, executing, executed, failed, rejected or superseded (replaced by a newer Run's Proposal)."},"reason":{"type":"string","description":"Why osiro.autopilot proposes it."},"rejected_alternative":{"type":"object","nullable":true,"properties":{"layer":{"type":"string","enum":["ad","landing_page","funnel"],"description":"The layer autopilot considered changing instead."},"why":{"type":"string","minLength":1,"maxLength":1000,"description":"Why changing that layer is not the better move, briefly."}},"required":["layer","why"],"description":"The other layer osiro.autopilot considered changing instead; null for Proposals made before it named one."},"rejection_reason":{"type":"string","nullable":true,"description":"A rejected Proposal's reason, if the Member gave one."},"failure":{"type":"string","nullable":true,"enum":["generation","meta","meta_auth","outdated","interrupted","validation","publish",null],"description":"Why a failed Proposal failed; null otherwise."},"error":{"type":"string","nullable":true,"description":"Meta's message for a meta failure, the reason code for an outdated one, or what went wrong for another failure; null otherwise."},"decision":{"type":"object","nullable":true,"properties":{"by":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The deciding user's id."},"name":{"type":"string","nullable":true,"description":"The deciding user's display name; null when unknown."}},"required":["id","name"],"description":"Who decided; null once that user is deleted."},"at":{"type":"string","description":"When it was decided, as ISO 8601."}},"required":["by","at"],"description":"Who approved or rejected it, and when; null before."},"executed_at":{"type":"string","nullable":true,"description":"When it was carried out, as ISO 8601; null before."},"outcome":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending"],"description":"Not measured yet: too few days have passed, or its A/B-Test still runs."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"source":{"type":"string","enum":["experiment","before_after"],"description":"How the Outcome was measured: experiment (from the A/B-Test the edit ran as) or before_after (from the days before and after a directly published edit). Absent on older Outcomes, which compare before and after with a verdict."}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["measured"],"description":"Measured, with a verdict."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"source":{"type":"string","enum":["experiment","before_after"],"description":"How the Outcome was measured: experiment (from the A/B-Test the edit ran as) or before_after (from the days before and after a directly published edit). Absent on older Outcomes, which compare before and after with a verdict."},"verdict":{"type":"string","enum":["better","worse","unchanged","inconclusive"],"description":"Whether the deciding rate improved, worsened or held: better, worse, unchanged or inconclusive (for cost per lead, one window had no spend or neither had a lead; for a rate, not clear yet)."},"final":{"type":"boolean","description":"false while the verdict is unclear before day 28, so the next Run measures it again; absent means final."},"measured_at":{"type":"string","description":"When the Run measured it, as ISO 8601."},"before":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window before the change."},"after":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window after the change."},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["cost_per_lead","ad_set_cost_per_lead","bounce_rate","median_duration_ms","conversion_rate","visits","starts","completion_rate","block_reach","step_drop_off"],"description":"What the metric measures: cost_per_lead (the Campaign's), ad_set_cost_per_lead, bounce_rate, median_duration_ms, conversion_rate, visits, starts, completion_rate, block_reach (of one changed block) or step_drop_off (of one changed step). Money in minor units, rates in percent."},"block_id":{"type":"string","description":"The changed block, for block_reach."},"step_id":{"type":"string","description":"The changed step, for step_drop_off."},"before":{"type":"number","nullable":true,"description":"The value in the window before; null without data, such as a cost per lead without a lead."},"after":{"type":"number","nullable":true,"description":"The value in the window after; null without data, such as a cost per lead without a lead."},"change":{"type":"number","nullable":true,"description":"after ÷ before − 1, in percent; null when either is missing or before is 0."}},"required":["metric","before","after","change"]},"description":"Each compared metric, before and after."},"probability_better":{"type":"number","description":"The probability that the deciding rate is better after than before, in percent."},"interval":{"type":"object","properties":{"low":{"type":"number","description":"The interval's low end, in percent."},"high":{"type":"number","description":"The interval's high end, in percent."}},"required":["low","high"],"description":"The 90 % credible interval of the deciding rate's after ÷ before − 1."},"traffic_sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","description":"The Traffic source: a utm_source, (none) or (other)."},"before":{"type":"number","description":"Its share of visits or starts before, in percent."},"after":{"type":"number","description":"Its share of visits or starts after, in percent."}},"required":["source","before","after"]},"description":"The largest Traffic sources' shares of visits or starts, before and after."},"overlapping":{"type":"array","items":{"type":"object","properties":{"proposal_id":{"type":"string","description":"The other edit's Proposal id."},"kind":{"type":"string","enum":["edit_landing_page","edit_funnel"],"description":"What the edit changed: edit_landing_page or edit_funnel."},"landing_page_id":{"type":"string","nullable":true,"description":"The Landing page it edited; null for a Funnel edit."},"funnel_id":{"type":"string","nullable":true,"description":"The Funnel it edited; null for a Landing page edit."},"executed_at":{"type":"string","description":"When it was carried out, as ISO 8601."}},"required":["proposal_id","kind","landing_page_id","funnel_id","executed_at"]},"description":"Other executed edits of the same Landing page or Funnel within the windows."},"winner":{"type":"string","enum":["A","B","none"],"description":"With source experiment: the Test variant the Experiment kept, A or B, or none."},"ended_by":{"type":"string","enum":["proposal","member"],"description":"With source experiment: who ended the Experiment, the approved end_experiment proposal or a member."},"test_variant_edited":{"type":"boolean","description":"With source experiment: whether Test variant B was published again after the test started."},"end_reason":{"type":"string","enum":["subject_gone"],"description":"With source experiment: the test ended because a Member unpublished or deleted its Landing page or Funnel. Unclear, without a Winner or numbers."}},"required":["status","verdict","measured_at","before","after","metrics"]},{"type":"object","properties":{"status":{"type":"string","enum":["observed"],"description":"A directly published edit's numbers before and after, without a verdict."},"source":{"type":"string","enum":["before_after"],"description":"Measured from the days before and after the edit."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"measured_at":{"type":"string","description":"When the Run measured it, as ISO 8601."},"before":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window before the change."},"after":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window after the change."},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["cost_per_lead","ad_set_cost_per_lead","bounce_rate","median_duration_ms","conversion_rate","visits","starts","completion_rate","block_reach","step_drop_off"],"description":"What the metric measures: cost_per_lead (the Campaign's), ad_set_cost_per_lead, bounce_rate, median_duration_ms, conversion_rate, visits, starts, completion_rate, block_reach (of one changed block) or step_drop_off (of one changed step). Money in minor units, rates in percent."},"block_id":{"type":"string","description":"The changed block, for block_reach."},"step_id":{"type":"string","description":"The changed step, for step_drop_off."},"before":{"type":"number","nullable":true,"description":"The value in the window before; null without data, such as a cost per lead without a lead."},"after":{"type":"number","nullable":true,"description":"The value in the window after; null without data, such as a cost per lead without a lead."},"change":{"type":"number","nullable":true,"description":"after ÷ before − 1, in percent; null when either is missing or before is 0."}},"required":["metric","before","after","change"]},"description":"Each compared metric, before and after."}},"required":["status","source","measured_at","before","after","metrics"]},{"nullable":true}],"description":"Whether it helped, once carried out; null before. Pending until a Run measures it."},"created_at":{"type":"string","description":"When the Run made it, as ISO 8601."},"kind":{"type":"string","enum":["add_variant"],"description":"Adds a new Ad to an Ad set."},"ad_set_id":{"type":"string","pattern":"^\\d+$","description":"The Meta ad set to add the new Ad to."},"ad_set_name":{"type":"string","nullable":true,"description":"The Ad set's name as the Run saw it; null when the Run's snapshot lacks it."},"creative_brief":{"type":"object","properties":{"angle":{"type":"string","minLength":1,"maxLength":500,"description":"The ad's selling angle."},"hook":{"type":"string","minLength":1,"maxLength":500,"description":"The opening line idea that stops the scroll."},"image_prompt":{"type":"string","minLength":1,"maxLength":2000,"description":"A prompt for the ad's image."}},"required":["angle","hook","image_prompt"],"description":"What the new Ad should say and show."},"variant":{"type":"object","nullable":true,"properties":{"headline":{"type":"string","description":"The Ad's headline."},"primary_text":{"type":"string","description":"The Ad's primary text."},"call_to_action_type":{"type":"string","enum":["LEARN_MORE","APPLY_NOW","SIGN_UP","CONTACT_US","GET_QUOTE","BOOK_NOW","SUBSCRIBE","DOWNLOAD","SHOP_NOW","ORDER_NOW","GET_OFFER","GET_STARTED","REQUEST_TIME","CALL_NOW","MESSAGE_PAGE","WHATSAPP_MESSAGE"],"description":"The Ad's Call to action."},"image_url":{"type":"string","nullable":true,"description":"The Ad's image URL; null for an Ad without an image."},"link":{"type":"string","nullable":true,"description":"Where the Ad sends people; null when unknown."},"page_id":{"type":"string","nullable":true,"description":"The Facebook page the Ad runs under; null when unknown."}},"required":["headline","primary_text","call_to_action_type","image_url","link","page_id"],"description":"The finished Ad; null until osiro has built it."},"ad_id":{"type":"string","nullable":true,"pattern":"^\\d+$","description":"The Meta ad created on approval; null before."}},"required":["id","run_id","campaign_id","status","reason","rejected_alternative","rejection_reason","failure","error","decision","executed_at","outcome","created_at","kind","ad_set_id","ad_set_name","creative_brief","variant","ad_id"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Proposal's id."},"run_id":{"type":"string","format":"uuid","description":"The id of the Run that made it."},"campaign_id":{"type":"string","nullable":true,"format":"uuid","description":"The Campaign, for a Proposal of a Campaign Run; null for a Landing page or Funnel Run's."},"status":{"type":"string","enum":["generating","pending","approved","executing","executed","failed","rejected","superseded"],"description":"Where the Proposal stands: generating (its Ad or images are being built), pending (waits for a decision), approved, executing, executed, failed, rejected or superseded (replaced by a newer Run's Proposal)."},"reason":{"type":"string","description":"Why osiro.autopilot proposes it."},"rejected_alternative":{"type":"object","nullable":true,"properties":{"layer":{"type":"string","enum":["ad","landing_page","funnel"],"description":"The layer autopilot considered changing instead."},"why":{"type":"string","minLength":1,"maxLength":1000,"description":"Why changing that layer is not the better move, briefly."}},"required":["layer","why"],"description":"The other layer osiro.autopilot considered changing instead; null for Proposals made before it named one."},"rejection_reason":{"type":"string","nullable":true,"description":"A rejected Proposal's reason, if the Member gave one."},"failure":{"type":"string","nullable":true,"enum":["generation","meta","meta_auth","outdated","interrupted","validation","publish",null],"description":"Why a failed Proposal failed; null otherwise."},"error":{"type":"string","nullable":true,"description":"Meta's message for a meta failure, the reason code for an outdated one, or what went wrong for another failure; null otherwise."},"decision":{"type":"object","nullable":true,"properties":{"by":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The deciding user's id."},"name":{"type":"string","nullable":true,"description":"The deciding user's display name; null when unknown."}},"required":["id","name"],"description":"Who decided; null once that user is deleted."},"at":{"type":"string","description":"When it was decided, as ISO 8601."}},"required":["by","at"],"description":"Who approved or rejected it, and when; null before."},"executed_at":{"type":"string","nullable":true,"description":"When it was carried out, as ISO 8601; null before."},"outcome":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending"],"description":"Not measured yet: too few days have passed, or its A/B-Test still runs."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"source":{"type":"string","enum":["experiment","before_after"],"description":"How the Outcome was measured: experiment (from the A/B-Test the edit ran as) or before_after (from the days before and after a directly published edit). Absent on older Outcomes, which compare before and after with a verdict."}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["measured"],"description":"Measured, with a verdict."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"source":{"type":"string","enum":["experiment","before_after"],"description":"How the Outcome was measured: experiment (from the A/B-Test the edit ran as) or before_after (from the days before and after a directly published edit). Absent on older Outcomes, which compare before and after with a verdict."},"verdict":{"type":"string","enum":["better","worse","unchanged","inconclusive"],"description":"Whether the deciding rate improved, worsened or held: better, worse, unchanged or inconclusive (for cost per lead, one window had no spend or neither had a lead; for a rate, not clear yet)."},"final":{"type":"boolean","description":"false while the verdict is unclear before day 28, so the next Run measures it again; absent means final."},"measured_at":{"type":"string","description":"When the Run measured it, as ISO 8601."},"before":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window before the change."},"after":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window after the change."},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["cost_per_lead","ad_set_cost_per_lead","bounce_rate","median_duration_ms","conversion_rate","visits","starts","completion_rate","block_reach","step_drop_off"],"description":"What the metric measures: cost_per_lead (the Campaign's), ad_set_cost_per_lead, bounce_rate, median_duration_ms, conversion_rate, visits, starts, completion_rate, block_reach (of one changed block) or step_drop_off (of one changed step). Money in minor units, rates in percent."},"block_id":{"type":"string","description":"The changed block, for block_reach."},"step_id":{"type":"string","description":"The changed step, for step_drop_off."},"before":{"type":"number","nullable":true,"description":"The value in the window before; null without data, such as a cost per lead without a lead."},"after":{"type":"number","nullable":true,"description":"The value in the window after; null without data, such as a cost per lead without a lead."},"change":{"type":"number","nullable":true,"description":"after ÷ before − 1, in percent; null when either is missing or before is 0."}},"required":["metric","before","after","change"]},"description":"Each compared metric, before and after."},"probability_better":{"type":"number","description":"The probability that the deciding rate is better after than before, in percent."},"interval":{"type":"object","properties":{"low":{"type":"number","description":"The interval's low end, in percent."},"high":{"type":"number","description":"The interval's high end, in percent."}},"required":["low","high"],"description":"The 90 % credible interval of the deciding rate's after ÷ before − 1."},"traffic_sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","description":"The Traffic source: a utm_source, (none) or (other)."},"before":{"type":"number","description":"Its share of visits or starts before, in percent."},"after":{"type":"number","description":"Its share of visits or starts after, in percent."}},"required":["source","before","after"]},"description":"The largest Traffic sources' shares of visits or starts, before and after."},"overlapping":{"type":"array","items":{"type":"object","properties":{"proposal_id":{"type":"string","description":"The other edit's Proposal id."},"kind":{"type":"string","enum":["edit_landing_page","edit_funnel"],"description":"What the edit changed: edit_landing_page or edit_funnel."},"landing_page_id":{"type":"string","nullable":true,"description":"The Landing page it edited; null for a Funnel edit."},"funnel_id":{"type":"string","nullable":true,"description":"The Funnel it edited; null for a Landing page edit."},"executed_at":{"type":"string","description":"When it was carried out, as ISO 8601."}},"required":["proposal_id","kind","landing_page_id","funnel_id","executed_at"]},"description":"Other executed edits of the same Landing page or Funnel within the windows."},"winner":{"type":"string","enum":["A","B","none"],"description":"With source experiment: the Test variant the Experiment kept, A or B, or none."},"ended_by":{"type":"string","enum":["proposal","member"],"description":"With source experiment: who ended the Experiment, the approved end_experiment proposal or a member."},"test_variant_edited":{"type":"boolean","description":"With source experiment: whether Test variant B was published again after the test started."},"end_reason":{"type":"string","enum":["subject_gone"],"description":"With source experiment: the test ended because a Member unpublished or deleted its Landing page or Funnel. Unclear, without a Winner or numbers."}},"required":["status","verdict","measured_at","before","after","metrics"]},{"type":"object","properties":{"status":{"type":"string","enum":["observed"],"description":"A directly published edit's numbers before and after, without a verdict."},"source":{"type":"string","enum":["before_after"],"description":"Measured from the days before and after the edit."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"measured_at":{"type":"string","description":"When the Run measured it, as ISO 8601."},"before":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window before the change."},"after":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window after the change."},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["cost_per_lead","ad_set_cost_per_lead","bounce_rate","median_duration_ms","conversion_rate","visits","starts","completion_rate","block_reach","step_drop_off"],"description":"What the metric measures: cost_per_lead (the Campaign's), ad_set_cost_per_lead, bounce_rate, median_duration_ms, conversion_rate, visits, starts, completion_rate, block_reach (of one changed block) or step_drop_off (of one changed step). Money in minor units, rates in percent."},"block_id":{"type":"string","description":"The changed block, for block_reach."},"step_id":{"type":"string","description":"The changed step, for step_drop_off."},"before":{"type":"number","nullable":true,"description":"The value in the window before; null without data, such as a cost per lead without a lead."},"after":{"type":"number","nullable":true,"description":"The value in the window after; null without data, such as a cost per lead without a lead."},"change":{"type":"number","nullable":true,"description":"after ÷ before − 1, in percent; null when either is missing or before is 0."}},"required":["metric","before","after","change"]},"description":"Each compared metric, before and after."}},"required":["status","source","measured_at","before","after","metrics"]},{"nullable":true}],"description":"Whether it helped, once carried out; null before. Pending until a Run measures it."},"created_at":{"type":"string","description":"When the Run made it, as ISO 8601."},"kind":{"type":"string","enum":["edit_landing_page"],"description":"Edits a Landing page."},"edit_path":{"type":"string","nullable":true,"enum":["experiment","direct",null],"default":null,"description":"How approving carries the edit out; null for edits made before Runs decided a path, which publish directly."},"visitor_days_per_day":{"type":"integer","nullable":true,"default":null,"description":"The subject's Visitor-days a day when the Run decided the path, rounded down; null before."},"experiment_id":{"type":"string","nullable":true,"format":"uuid","default":null,"description":"The A/B-Test approving started; null on the direct path or before approval."},"experiment_end":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The end_experiment Proposal's id."},"status":{"type":"string","enum":["generating","pending","approved","executing","executed","failed","rejected","superseded"],"description":"Where the Proposal stands: generating (its Ad or images are being built), pending (waits for a decision), approved, executing, executed, failed, rejected or superseded (replaced by a newer Run's Proposal)."},"winner":{"type":"string","enum":["A","B"],"description":"The Test variant approving keeps: B publishes the edit, A keeps the page as it was."},"results":{"type":"object","properties":{"checkpoint_day":{"anyOf":[{"type":"number","enum":[14]},{"type":"number","enum":[28]}],"description":"The Checkpoint the Run read them at, in counted days."},"counted_days":{"type":"integer","description":"Whole days the test had run, paused days left out."},"goal":{"type":"string","enum":["conversion","completion_rate"],"description":"The test's Primary goal."},"verdict":{"type":"string","enum":["not_enough_data","no_clear_difference","ahead","very_likely_best"],"description":"What the results say."},"leader":{"type":"string","nullable":true,"enum":["A","B","C",null],"description":"The leading Test variant, at the ahead or very_likely_best verdict; null otherwise."},"test_variants":{"type":"array","items":{"type":"object","properties":{"letter":{"type":"string","enum":["A","B","C"],"description":"The Test variant."},"units":{"type":"integer","description":"Its Visitor-days."},"successes":{"type":"integer","description":"Its successes on the Primary goal."},"rate":{"type":"number","description":"successes ÷ units, as a fraction."},"probability_to_be_best":{"type":"number","nullable":true,"description":"The probability it is the best Test variant, as a fraction; null while there isn't enough data."}},"required":["letter","units","successes","rate","probability_to_be_best"]},"description":"The Primary goal per Test variant."}},"required":["checkpoint_day","counted_days","goal","verdict","leader","test_variants"],"description":"The test's results as the Checkpoint Run read them."},"failure":{"type":"string","nullable":true,"enum":["generation","meta","meta_auth","outdated","interrupted","validation","publish",null],"description":"Why it failed; null unless failed."},"error":{"type":"string","nullable":true,"description":"What went wrong for a failed one; null otherwise."},"created_at":{"type":"string","description":"When the Run made it, as ISO 8601."}},"default":null,"required":["id","status","winner","results","failure","error","created_at"],"description":"The latest \"Test beenden\" Proposal still to decide or carried out; null when there is none."},"landing_page":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Landing page's id."},"name":{"type":"string","nullable":true,"description":"The Landing page's name; null once the page is gone."}},"required":["id","name"],"description":"The edited Landing page."},"base_version_id":{"type":"string","description":"The published version the edit was made against."},"changes":{"type":"array","items":{"type":"object","properties":{"block_id":{"type":"string","description":"The block's id."},"type":{"type":"string","description":"The block's type."},"label":{"type":"string","description":"The block's readable name."},"kind":{"type":"string","enum":["added","removed","changed"],"description":"What the edit does to it: added, removed or changed."},"position":{"type":"object","properties":{"before":{"type":"number","nullable":true,"description":"Its position before the edit; null when it is new."},"after":{"type":"number","nullable":true,"description":"Its position after the edit; null when it is removed."}},"required":["before","after"],"description":"Its 1-based position among the page's blocks, before and after."},"moved":{"type":"boolean","description":"Whether the edit moved it, not merely shifted it by a block added or removed before it."},"fields":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The dotted path into the block's config, e.g. items[q2].answer."},"kind":{"type":"string","enum":["set","unset","changed","asset"],"description":"What happened to the field: set (it had no value), unset (it has none now), changed, or asset (its image changed; no values)."},"before":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}],"description":"The value before; absent for an asset change."},"after":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}],"description":"The value after; absent for an asset change."}},"required":["path","kind"]},"description":"The block's changed config fields."},"truncated":{"type":"number","description":"How many changed fields are left out of fields."}},"required":["block_id","type","label","kind","position","moved","fields","truncated"]},"description":"Block by block, what the edit changes on that version."},"variables":{"type":"array","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string","pattern":"^\\w+$","description":"Token written as {{name}} in text: letters, digits and underscores."},"searchParam":{"type":"string","description":"The URL search param to read, e.g. `city` for ?city=berlin."},"defaultValue":{"type":"string","description":"The text when the param is missing or unmapped."},"values":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"A raw param value, matched ignoring case."},"value":{"type":"string","description":"The text shown for it."}},"required":["name","value"]},"description":"Raw param values mapped to the text shown; [] for none."}},"required":["name","searchParam","defaultValue","values"]},"description":"The page's URL variables after the edit; null when it keeps them."},"evidence":{"type":"object","nullable":true,"properties":{"signals":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["high_bounce","low_median_duration","block_reach_drop"],"description":"What is worth a look: high_bounce, low_median_duration or block_reach_drop."},"window":{"type":"string","enum":["current_version","last_30_days"],"description":"The analytics window it was computed on: current_version (since the published version went live) or last_30_days."},"traffic":{"type":"string","enum":["meta","all"],"description":"The traffic it was computed on: meta (visits tagged as coming from Meta) or all."},"value":{"type":"number","description":"The bounce rate in percent, the median duration in milliseconds, or the drop in reach in percentage points."},"threshold":{"type":"number","description":"The value past which the signal fires, in the same unit."},"block_id":{"type":"string","nullable":true,"description":"For a reach drop, the block where reach falls; null otherwise."}},"required":["kind","window","traffic","value","threshold","block_id"]},"description":"The page's signals that made the Run propose the edit."},"campaign_traffic_share":{"type":"object","properties":{"current_version":{"type":"number","nullable":true,"description":"Since the published version went live, in percent; null without data."},"last_30_days":{"type":"number","nullable":true,"description":"Over the last 30 days, in percent; null without data."}},"required":["current_version","last_30_days"],"description":"The visits tagged as coming from Meta, as a share of all visits."}},"required":["signals","campaign_traffic_share"],"description":"What the Run saw on the page that made it propose the edit; null when its snapshot lacks the page."},"images":{"type":"array","items":{"type":"object","properties":{"operation_index":{"type":"integer","minimum":0,"description":"0-based index into `operations` of the add_block or edit_block whose config gets the image."},"field":{"type":"string","minLength":1,"description":"The config field that holds the image's asset id, e.g. `assetId`; dotted for nested fields, with list positions as numbers, e.g. `items.0.assetId`."},"prompt":{"type":"string","minLength":1,"maxLength":2000,"description":"A prompt for the image."},"aspect":{"type":"string","enum":["square","landscape","portrait"],"description":"The image's shape."},"image_url":{"type":"string","nullable":true,"description":"The generated image's URL; null while it is being generated."}},"required":["operation_index","field","prompt","aspect","image_url"]},"description":"The new images the edit asks for; [] for none."}},"required":["id","run_id","campaign_id","status","reason","rejected_alternative","rejection_reason","failure","error","decision","executed_at","outcome","created_at","kind","landing_page","base_version_id","changes","variables","evidence","images"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Proposal's id."},"run_id":{"type":"string","format":"uuid","description":"The id of the Run that made it."},"campaign_id":{"type":"string","nullable":true,"format":"uuid","description":"The Campaign, for a Proposal of a Campaign Run; null for a Landing page or Funnel Run's."},"status":{"type":"string","enum":["generating","pending","approved","executing","executed","failed","rejected","superseded"],"description":"Where the Proposal stands: generating (its Ad or images are being built), pending (waits for a decision), approved, executing, executed, failed, rejected or superseded (replaced by a newer Run's Proposal)."},"reason":{"type":"string","description":"Why osiro.autopilot proposes it."},"rejected_alternative":{"type":"object","nullable":true,"properties":{"layer":{"type":"string","enum":["ad","landing_page","funnel"],"description":"The layer autopilot considered changing instead."},"why":{"type":"string","minLength":1,"maxLength":1000,"description":"Why changing that layer is not the better move, briefly."}},"required":["layer","why"],"description":"The other layer osiro.autopilot considered changing instead; null for Proposals made before it named one."},"rejection_reason":{"type":"string","nullable":true,"description":"A rejected Proposal's reason, if the Member gave one."},"failure":{"type":"string","nullable":true,"enum":["generation","meta","meta_auth","outdated","interrupted","validation","publish",null],"description":"Why a failed Proposal failed; null otherwise."},"error":{"type":"string","nullable":true,"description":"Meta's message for a meta failure, the reason code for an outdated one, or what went wrong for another failure; null otherwise."},"decision":{"type":"object","nullable":true,"properties":{"by":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The deciding user's id."},"name":{"type":"string","nullable":true,"description":"The deciding user's display name; null when unknown."}},"required":["id","name"],"description":"Who decided; null once that user is deleted."},"at":{"type":"string","description":"When it was decided, as ISO 8601."}},"required":["by","at"],"description":"Who approved or rejected it, and when; null before."},"executed_at":{"type":"string","nullable":true,"description":"When it was carried out, as ISO 8601; null before."},"outcome":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending"],"description":"Not measured yet: too few days have passed, or its A/B-Test still runs."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"source":{"type":"string","enum":["experiment","before_after"],"description":"How the Outcome was measured: experiment (from the A/B-Test the edit ran as) or before_after (from the days before and after a directly published edit). Absent on older Outcomes, which compare before and after with a verdict."}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["measured"],"description":"Measured, with a verdict."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"source":{"type":"string","enum":["experiment","before_after"],"description":"How the Outcome was measured: experiment (from the A/B-Test the edit ran as) or before_after (from the days before and after a directly published edit). Absent on older Outcomes, which compare before and after with a verdict."},"verdict":{"type":"string","enum":["better","worse","unchanged","inconclusive"],"description":"Whether the deciding rate improved, worsened or held: better, worse, unchanged or inconclusive (for cost per lead, one window had no spend or neither had a lead; for a rate, not clear yet)."},"final":{"type":"boolean","description":"false while the verdict is unclear before day 28, so the next Run measures it again; absent means final."},"measured_at":{"type":"string","description":"When the Run measured it, as ISO 8601."},"before":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window before the change."},"after":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window after the change."},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["cost_per_lead","ad_set_cost_per_lead","bounce_rate","median_duration_ms","conversion_rate","visits","starts","completion_rate","block_reach","step_drop_off"],"description":"What the metric measures: cost_per_lead (the Campaign's), ad_set_cost_per_lead, bounce_rate, median_duration_ms, conversion_rate, visits, starts, completion_rate, block_reach (of one changed block) or step_drop_off (of one changed step). Money in minor units, rates in percent."},"block_id":{"type":"string","description":"The changed block, for block_reach."},"step_id":{"type":"string","description":"The changed step, for step_drop_off."},"before":{"type":"number","nullable":true,"description":"The value in the window before; null without data, such as a cost per lead without a lead."},"after":{"type":"number","nullable":true,"description":"The value in the window after; null without data, such as a cost per lead without a lead."},"change":{"type":"number","nullable":true,"description":"after ÷ before − 1, in percent; null when either is missing or before is 0."}},"required":["metric","before","after","change"]},"description":"Each compared metric, before and after."},"probability_better":{"type":"number","description":"The probability that the deciding rate is better after than before, in percent."},"interval":{"type":"object","properties":{"low":{"type":"number","description":"The interval's low end, in percent."},"high":{"type":"number","description":"The interval's high end, in percent."}},"required":["low","high"],"description":"The 90 % credible interval of the deciding rate's after ÷ before − 1."},"traffic_sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","description":"The Traffic source: a utm_source, (none) or (other)."},"before":{"type":"number","description":"Its share of visits or starts before, in percent."},"after":{"type":"number","description":"Its share of visits or starts after, in percent."}},"required":["source","before","after"]},"description":"The largest Traffic sources' shares of visits or starts, before and after."},"overlapping":{"type":"array","items":{"type":"object","properties":{"proposal_id":{"type":"string","description":"The other edit's Proposal id."},"kind":{"type":"string","enum":["edit_landing_page","edit_funnel"],"description":"What the edit changed: edit_landing_page or edit_funnel."},"landing_page_id":{"type":"string","nullable":true,"description":"The Landing page it edited; null for a Funnel edit."},"funnel_id":{"type":"string","nullable":true,"description":"The Funnel it edited; null for a Landing page edit."},"executed_at":{"type":"string","description":"When it was carried out, as ISO 8601."}},"required":["proposal_id","kind","landing_page_id","funnel_id","executed_at"]},"description":"Other executed edits of the same Landing page or Funnel within the windows."},"winner":{"type":"string","enum":["A","B","none"],"description":"With source experiment: the Test variant the Experiment kept, A or B, or none."},"ended_by":{"type":"string","enum":["proposal","member"],"description":"With source experiment: who ended the Experiment, the approved end_experiment proposal or a member."},"test_variant_edited":{"type":"boolean","description":"With source experiment: whether Test variant B was published again after the test started."},"end_reason":{"type":"string","enum":["subject_gone"],"description":"With source experiment: the test ended because a Member unpublished or deleted its Landing page or Funnel. Unclear, without a Winner or numbers."}},"required":["status","verdict","measured_at","before","after","metrics"]},{"type":"object","properties":{"status":{"type":"string","enum":["observed"],"description":"A directly published edit's numbers before and after, without a verdict."},"source":{"type":"string","enum":["before_after"],"description":"Measured from the days before and after the edit."},"basis":{"type":"string","enum":["cost_per_lead","conversion_rate","completion_rate"],"description":"The rate the verdict follows: the Campaign's cost_per_lead, the page's conversion_rate or the Funnel's completion_rate. Absent means cost_per_lead."},"measured_at":{"type":"string","description":"When the Run measured it, as ISO 8601."},"before":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window before the change."},"after":{"type":"object","properties":{"since":{"type":"string","description":"The window's first day, as YYYY-MM-DD."},"until":{"type":"string","description":"The window's last day, as YYYY-MM-DD."},"days":{"type":"integer","description":"How many days the window has."},"spend":{"type":"number","description":"A Campaign Run's: the Campaign's Meta spend, in minor units of its currency."},"leads":{"type":"number","description":"A Campaign Run's: the Campaign's leads on Meta."},"trials":{"type":"number","description":"A Landing page or Funnel Run's: the visits or Funnel starts the deciding rate counts."},"successes":{"type":"number","description":"A Landing page or Funnel Run's: the conversions or completions out of trials."}},"required":["since","until","days"],"description":"The window after the change."},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["cost_per_lead","ad_set_cost_per_lead","bounce_rate","median_duration_ms","conversion_rate","visits","starts","completion_rate","block_reach","step_drop_off"],"description":"What the metric measures: cost_per_lead (the Campaign's), ad_set_cost_per_lead, bounce_rate, median_duration_ms, conversion_rate, visits, starts, completion_rate, block_reach (of one changed block) or step_drop_off (of one changed step). Money in minor units, rates in percent."},"block_id":{"type":"string","description":"The changed block, for block_reach."},"step_id":{"type":"string","description":"The changed step, for step_drop_off."},"before":{"type":"number","nullable":true,"description":"The value in the window before; null without data, such as a cost per lead without a lead."},"after":{"type":"number","nullable":true,"description":"The value in the window after; null without data, such as a cost per lead without a lead."},"change":{"type":"number","nullable":true,"description":"after ÷ before − 1, in percent; null when either is missing or before is 0."}},"required":["metric","before","after","change"]},"description":"Each compared metric, before and after."}},"required":["status","source","measured_at","before","after","metrics"]},{"nullable":true}],"description":"Whether it helped, once carried out; null before. Pending until a Run measures it."},"created_at":{"type":"string","description":"When the Run made it, as ISO 8601."},"kind":{"type":"string","enum":["edit_funnel"],"description":"Edits a Funnel."},"edit_path":{"type":"string","nullable":true,"enum":["experiment","direct",null],"default":null,"description":"How approving carries the edit out; null for edits made before Runs decided a path, which publish directly."},"visitor_days_per_day":{"type":"integer","nullable":true,"default":null,"description":"The subject's Visitor-days a day when the Run decided the path, rounded down; null before."},"experiment_id":{"type":"string","nullable":true,"format":"uuid","default":null,"description":"The A/B-Test approving started; null on the direct path or before approval."},"experiment_end":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The end_experiment Proposal's id."},"status":{"type":"string","enum":["generating","pending","approved","executing","executed","failed","rejected","superseded"],"description":"Where the Proposal stands: generating (its Ad or images are being built), pending (waits for a decision), approved, executing, executed, failed, rejected or superseded (replaced by a newer Run's Proposal)."},"winner":{"type":"string","enum":["A","B"],"description":"The Test variant approving keeps: B publishes the edit, A keeps the page as it was."},"results":{"type":"object","properties":{"checkpoint_day":{"anyOf":[{"type":"number","enum":[14]},{"type":"number","enum":[28]}],"description":"The Checkpoint the Run read them at, in counted days."},"counted_days":{"type":"integer","description":"Whole days the test had run, paused days left out."},"goal":{"type":"string","enum":["conversion","completion_rate"],"description":"The test's Primary goal."},"verdict":{"type":"string","enum":["not_enough_data","no_clear_difference","ahead","very_likely_best"],"description":"What the results say."},"leader":{"type":"string","nullable":true,"enum":["A","B","C",null],"description":"The leading Test variant, at the ahead or very_likely_best verdict; null otherwise."},"test_variants":{"type":"array","items":{"type":"object","properties":{"letter":{"type":"string","enum":["A","B","C"],"description":"The Test variant."},"units":{"type":"integer","description":"Its Visitor-days."},"successes":{"type":"integer","description":"Its successes on the Primary goal."},"rate":{"type":"number","description":"successes ÷ units, as a fraction."},"probability_to_be_best":{"type":"number","nullable":true,"description":"The probability it is the best Test variant, as a fraction; null while there isn't enough data."}},"required":["letter","units","successes","rate","probability_to_be_best"]},"description":"The Primary goal per Test variant."}},"required":["checkpoint_day","counted_days","goal","verdict","leader","test_variants"],"description":"The test's results as the Checkpoint Run read them."},"failure":{"type":"string","nullable":true,"enum":["generation","meta","meta_auth","outdated","interrupted","validation","publish",null],"description":"Why it failed; null unless failed."},"error":{"type":"string","nullable":true,"description":"What went wrong for a failed one; null otherwise."},"created_at":{"type":"string","description":"When the Run made it, as ISO 8601."}},"default":null,"required":["id","status","winner","results","failure","error","created_at"],"description":"The latest \"Test beenden\" Proposal still to decide or carried out; null when there is none."},"funnel":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Funnel's id."},"name":{"type":"string","nullable":true,"description":"The Funnel's name; null once the Funnel is gone."}},"required":["id","name"],"description":"The edited Funnel."},"base_version_id":{"type":"string","description":"The published version the edit was made against."},"changes":{"type":"array","items":{"type":"object","properties":{"block_id":{"type":"string","description":"The block's id."},"type":{"type":"string","description":"The block's type."},"label":{"type":"string","description":"The block's readable name."},"kind":{"type":"string","enum":["added","removed","changed"],"description":"What the edit does to it: added, removed or changed."},"position":{"type":"object","properties":{"before":{"type":"number","nullable":true,"description":"Its position before the edit; null when it is new."},"after":{"type":"number","nullable":true,"description":"Its position after the edit; null when it is removed."}},"required":["before","after"],"description":"Its 1-based position among the page's blocks, before and after."},"moved":{"type":"boolean","description":"Whether the edit moved it, not merely shifted it by a block added or removed before it."},"fields":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The dotted path into the block's config, e.g. items[q2].answer."},"kind":{"type":"string","enum":["set","unset","changed","asset"],"description":"What happened to the field: set (it had no value), unset (it has none now), changed, or asset (its image changed; no values)."},"before":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}],"description":"The value before; absent for an asset change."},"after":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}],"description":"The value after; absent for an asset change."}},"required":["path","kind"]},"description":"The block's changed config fields."},"truncated":{"type":"number","description":"How many changed fields are left out of fields."},"step":{"type":"string","nullable":true,"description":"The name of the block's step after the edit, or before it for a removed block; null when unknown."}},"required":["block_id","type","label","kind","position","moved","fields","truncated","step"]},"description":"Block by block, what the edit changes on that version."},"steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string","description":"The step's id."},"name":{"type":"string","nullable":true,"description":"The step's name after the edit, or before it for a removed step; null when it has none."},"kind":{"type":"string","enum":["added","removed","changed"],"description":"What the edit does to it: added, removed or changed."},"position":{"type":"object","properties":{"before":{"type":"number","nullable":true,"description":"Its position before the edit; null when it is new."},"after":{"type":"number","nullable":true,"description":"Its position after the edit; null when it is removed."}},"required":["before","after"],"description":"Its 1-based position among the steps, before and after."},"moved":{"type":"boolean","description":"Whether the edit moved it, not merely shifted it by a step added or removed before it."},"renamed_from":{"type":"string","nullable":true,"description":"The step's name before a rename; null when kept."},"rules":{"type":"array","nullable":true,"items":{"type":"object","properties":{"field":{"type":"string","description":"The checked field's internal name or label."},"connector":{"type":"string","nullable":true,"enum":["and","or",null],"description":"How the conditions combine: and (all) or or (any); null for a single condition."},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"The checked field's internal name or label."},"operator":{"type":"string","description":"How the answer is compared."},"value":{"type":"string","nullable":true,"description":"What the answer is compared with, option ids as their labels; null for no value."}},"required":["field","operator","value"]},"description":"The rule's conditions; [] when it always fires."},"actions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"What the action does."},"step":{"type":"string","nullable":true,"description":"The target step's name, for go_to_step; null otherwise."},"url":{"type":"string","nullable":true,"description":"The target URL, for redirect; null otherwise."}},"required":["type","step","url"]},"description":"What the rule does when it fires, in order."},"behavior":{"type":"string","enum":["auto","on_click"],"description":"When the rule fires: auto (as soon as the answer matches) or on_click (when triggeredBy is clicked)."}},"required":["field","connector","conditions","actions","behavior"]},"description":"The step's rules after the edit, when it changes them; null otherwise."}},"required":["step_id","name","kind","position","moved","renamed_from","rules"]},"description":"Step by step, what the edit changes: added, removed, moved, renamed, new rules."},"evidence":{"type":"object","nullable":true,"properties":{"signals":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["step_drop_off"],"description":"What is worth a look: step_drop_off."},"window":{"type":"string","enum":["current_version","last_30_days"],"description":"The analytics window it was computed on: current_version (since the published version went live) or last_30_days."},"traffic":{"type":"string","enum":["meta","all"],"description":"The traffic it was computed on: meta (visits tagged as coming from Meta) or all."},"value":{"type":"number","description":"The step's drop-off, in percent."},"threshold":{"type":"number","description":"The drop-off from which the signal fires, in percent."},"step_id":{"type":"string","description":"The step where sessions drop off."}},"required":["kind","window","traffic","value","threshold","step_id"]},"description":"The Funnel's signals that made the Run propose the edit."},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The step's id."},"name":{"type":"string","description":"The step's name."}},"required":["id","name"]},"description":"The published version's steps, to name the signals' steps."},"campaign_start_share":{"type":"object","properties":{"current_version":{"type":"number","nullable":true,"description":"Since the published version went live, in percent; null without data."},"last_30_days":{"type":"number","nullable":true,"description":"Over the last 30 days, in percent; null without data."}},"required":["current_version","last_30_days"],"description":"The Funnel starts tagged as coming from Meta, as a share of all starts."},"other_landing_pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The Landing page's id."},"name":{"type":"string","description":"The Landing page's name."}},"required":["id","name"]},"description":"Other published Landing pages embedding the Funnel; the edit changes them too."}},"required":["signals","steps","campaign_start_share","other_landing_pages"],"description":"What the Run saw of the Funnel that made it propose the edit; null when its snapshot lacks the Funnel."},"images":{"type":"array","items":{"type":"object","properties":{"operation_index":{"type":"integer","minimum":0,"description":"0-based index into `operations` of the add_block or edit_block whose config gets the image."},"field":{"type":"string","minLength":1,"description":"The config field that holds the image's asset id, e.g. `assetId`; dotted for nested fields, with list positions as numbers, e.g. `items.0.assetId`."},"prompt":{"type":"string","minLength":1,"maxLength":2000,"description":"A prompt for the image."},"aspect":{"type":"string","enum":["square","landscape","portrait"],"description":"The image's shape."},"image_url":{"type":"string","nullable":true,"description":"The generated image's URL; null while it is being generated."}},"required":["operation_index","field","prompt","aspect","image_url"]},"description":"The new images the edit asks for; [] for none."}},"required":["id","run_id","campaign_id","status","reason","rejected_alternative","rejection_reason","failure","error","decision","executed_at","outcome","created_at","kind","funnel","base_version_id","changes","steps","evidence","images"]}]},"AutopilotReject":{"type":"object","properties":{"reason":{"type":"string","nullable":true,"maxLength":1000,"description":"Why the Member rejects the Proposal, so later Runs learn from it; blank or omitted for none."}}},"AutopilotRun":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Run's id."},"campaign_id":{"type":"string","nullable":true,"format":"uuid","description":"The reviewed Campaign; null when the Run reviews another subject."},"landing_page_id":{"type":"string","nullable":true,"format":"uuid","description":"The reviewed Landing page; null when the Run reviews another subject."},"funnel_id":{"type":"string","nullable":true,"format":"uuid","description":"The reviewed Funnel; null when the Run reviews another subject."},"trigger":{"type":"string","enum":["schedule","manual"],"description":"What started the Run: schedule (the daily review) or manual (Run now)."},"status":{"type":"string","enum":["running","succeeded","failed"],"description":"Where the Run stands: running, succeeded or failed."},"started_at":{"type":"string","description":"When the Run started, as ISO 8601."},"finished_at":{"type":"string","nullable":true,"description":"When the Run ended, as ISO 8601; null while it runs."},"summary":{"type":"string","nullable":true,"description":"What osiro.autopilot saw and decided; null until it has answered."},"error":{"type":"string","nullable":true,"description":"Why a failed Run failed; null otherwise."},"proposals":{"type":"integer","minimum":0,"description":"How many Proposals the Run stored."},"dropped_proposals":{"type":"array","items":{"type":"object","properties":{"proposal":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["pause_ad"],"description":"Pauses a Meta ad."},"ad_id":{"type":"string","pattern":"^\\d+$","description":"The Meta ad to pause."},"reason":{"type":"string","minLength":1,"maxLength":1000,"description":"Why, in one or two sentences the user can judge quickly."},"rejected_alternative":{"type":"object","properties":{"layer":{"type":"string","enum":["ad","landing_page","funnel"],"description":"The layer autopilot considered changing instead."},"why":{"type":"string","minLength":1,"maxLength":1000,"description":"Why changing that layer is not the better move, briefly."}},"required":["layer","why"],"description":"The other layer osiro.autopilot considered changing instead, and why it didn't."}},"required":["kind","ad_id","reason","rejected_alternative"]},{"type":"object","properties":{"kind":{"type":"string","enum":["add_variant"],"description":"Adds a new Ad to an Ad set."},"ad_set_id":{"type":"string","pattern":"^\\d+$","description":"The Meta ad set to add the new ad to."},"creative_brief":{"type":"object","properties":{"angle":{"type":"string","minLength":1,"maxLength":500,"description":"The ad's selling angle."},"hook":{"type":"string","minLength":1,"maxLength":500,"description":"The opening line idea that stops the scroll."},"image_prompt":{"type":"string","minLength":1,"maxLength":2000,"description":"A prompt for the ad's image."}},"required":["angle","hook","image_prompt"],"description":"What the new Ad should say and show; osiro turns it into copy and an image."},"reason":{"type":"string","minLength":1,"maxLength":1000,"description":"Why, in one or two sentences the user can judge quickly."},"rejected_alternative":{"type":"object","properties":{"layer":{"type":"string","enum":["ad","landing_page","funnel"],"description":"The layer autopilot considered changing instead."},"why":{"type":"string","minLength":1,"maxLength":1000,"description":"Why changing that layer is not the better move, briefly."}},"required":["layer","why"],"description":"The other layer osiro.autopilot considered changing instead, and why it didn't."}},"required":["kind","ad_set_id","creative_brief","reason","rejected_alternative"]},{"type":"object","properties":{"kind":{"type":"string","enum":["edit_landing_page"],"description":"Edits a Landing page."},"landing_page_id":{"type":"string","description":"The snapshot's `landing_page.id`."},"base_version_id":{"type":"string","description":"The snapshot's `landing_page.published_version_id`."},"operations":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"op":{"type":"string","enum":["add_block"],"description":"Adds a block."},"block":{"type":"object","properties":{"type":{"type":"string","minLength":1,"description":"A block type from `block_types`."},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"The fields that differ from the block's defaults."}},"required":["type"],"description":"The new block."},"index":{"type":"integer","minimum":0,"description":"0-based position among the blocks; appends if omitted."}},"required":["op","block"]},{"type":"object","properties":{"op":{"type":"string","enum":["edit_block"],"description":"Changes a block's config."},"blockId":{"type":"string","minLength":1,"description":"The block's id in the landing page's `page_data`."},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"The config fields to change, merged over the current ones."}},"required":["op","blockId","config"]},{"type":"object","properties":{"op":{"type":"string","enum":["remove_block"],"description":"Removes a block."},"blockId":{"type":"string","minLength":1,"description":"The block's id in the landing page's `page_data`."}},"required":["op","blockId"]},{"type":"object","properties":{"op":{"type":"string","enum":["move_block"],"description":"Moves a block."},"blockId":{"type":"string","minLength":1,"description":"The block's id in the landing page's `page_data`."},"index":{"type":"integer","minimum":0,"description":"0-based target position after removal; the end if omitted."}},"required":["op","blockId"]},{"type":"object","properties":{"op":{"type":"string","enum":["set_variables"],"description":"Replaces the page's URL variables."},"variables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^\\w+$","description":"Token written as {{name}} in text: letters, digits and underscores."},"searchParam":{"type":"string","description":"The URL search param to read, e.g. `city` for ?city=berlin."},"defaultValue":{"type":"string","description":"The text when the param is missing or unmapped."},"values":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"A raw param value, matched ignoring case."},"value":{"type":"string","description":"The text shown for it."}},"required":["name","value"]},"description":"Raw param values mapped to the text shown; [] for none."}},"required":["name","searchParam","defaultValue","values"]},"description":"The page's complete variable list; [] removes all."}},"required":["op","variables"]}]},"minItems":1,"maxItems":30,"description":"Applied in order to the published page."},"image_briefs":{"type":"array","items":{"type":"object","properties":{"operation_index":{"type":"integer","minimum":0,"description":"0-based index into `operations` of the add_block or edit_block whose config gets the image."},"field":{"type":"string","minLength":1,"description":"The config field that holds the image's asset id, e.g. `assetId`; dotted for nested fields, with list positions as numbers, e.g. `items.0.assetId`."},"prompt":{"type":"string","minLength":1,"maxLength":2000,"description":"A prompt for the image."},"aspect":{"type":"string","enum":["square","landscape","portrait"],"description":"The image's shape."}},"required":["operation_index","field","prompt","aspect"]},"maxItems":3,"description":"New images to generate for the edit; leave the fields they fill out of the operations' configs."},"reason":{"type":"string","minLength":1,"maxLength":1000,"description":"Why, in one or two sentences the user can judge quickly."},"rejected_alternative":{"type":"object","properties":{"layer":{"type":"string","enum":["ad","landing_page","funnel"],"description":"The layer autopilot considered changing instead."},"why":{"type":"string","minLength":1,"maxLength":1000,"description":"Why changing that layer is not the better move, briefly."}},"required":["layer","why"],"description":"The other layer osiro.autopilot considered changing instead, and why it didn't."}},"required":["kind","landing_page_id","base_version_id","operations","reason","rejected_alternative"]},{"type":"object","properties":{"kind":{"type":"string","enum":["edit_funnel"],"description":"Edits a Funnel."},"funnel_id":{"type":"string","description":"The `id` of one of the snapshot's `funnels`."},"base_version_id":{"type":"string","description":"That funnel's `published_version_id`."},"operations":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"op":{"type":"string","enum":["add_block"],"description":"Adds a block to a step."},"stepId":{"type":"string","minLength":1,"description":"The step's id in the funnel's `funnel_data`."},"block":{"type":"object","properties":{"type":{"type":"string","minLength":1,"description":"A funnel block type."},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"The fields that differ from the block's defaults."},"children":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"description":"A funnel block type."},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"The fields that differ from the block's defaults."}},"required":["type"]},"description":"Only for a `container`: its blocks, top to bottom."}},"required":["type"],"description":"The new block."},"parentId":{"type":"string","minLength":1,"description":"A container on the step to add the block to."},"index":{"type":"integer","minimum":0,"description":"0-based position; appends if omitted."}},"required":["op","stepId","block"]},{"type":"object","properties":{"op":{"type":"string","enum":["edit_block"],"description":"Changes a block's config."},"blockId":{"type":"string","minLength":1,"description":"The block's id in the funnel's `funnel_data`."},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"The config fields to change, merged over the current ones."}},"required":["op","blockId","config"]},{"type":"object","properties":{"op":{"type":"string","enum":["remove_block"],"description":"Removes a block."},"blockId":{"type":"string","minLength":1,"description":"The block's id in the funnel's `funnel_data`."}},"required":["op","blockId"]},{"type":"object","properties":{"op":{"type":"string","enum":["move_block"],"description":"Moves a block."},"blockId":{"type":"string","minLength":1,"description":"The block's id in the funnel's `funnel_data`."},"toStepId":{"type":"string","minLength":1,"description":"The step to move it to; omit to reorder within its step."},"index":{"type":"integer","minimum":0,"description":"0-based target position after removal; the end if omitted."}},"required":["op","blockId"]},{"type":"object","properties":{"op":{"type":"string","enum":["add_step"],"description":"Adds a step."},"name":{"type":"string","description":"The step's internal name."},"blocks":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"description":"A funnel block type."},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"The fields that differ from the block's defaults."},"children":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"description":"A funnel block type."},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"The fields that differ from the block's defaults."}},"required":["type"]},"description":"Only for a `container`: its blocks, top to bottom."}},"required":["type"]},"description":"The step's blocks, top to bottom."},"index":{"type":"integer","minimum":0,"description":"0-based position among the steps; appends if omitted."}},"required":["op"]},{"type":"object","properties":{"op":{"type":"string","enum":["remove_step"],"description":"Removes a step."},"stepId":{"type":"string","minLength":1,"description":"The step's id in the funnel's `funnel_data`."}},"required":["op","stepId"]},{"type":"object","properties":{"op":{"type":"string","enum":["move_step"],"description":"Moves a step."},"stepId":{"type":"string","minLength":1,"description":"The step's id in the funnel's `funnel_data`."},"index":{"type":"integer","minimum":0,"description":"The step's new 0-based position."}},"required":["op","stepId","index"]},{"type":"object","properties":{"op":{"type":"string","enum":["rename_step"],"description":"Renames a step."},"stepId":{"type":"string","minLength":1,"description":"The step's id in the funnel's `funnel_data`."},"name":{"type":"string","description":"The step's new internal name."}},"required":["op","stepId","name"]},{"type":"object","properties":{"op":{"type":"string","enum":["set_step_rules"],"description":"Replaces a step's rules."},"stepId":{"type":"string","minLength":1,"description":"The step's id in the funnel's `funnel_data`."},"rules":{"type":"array","items":{"type":"object","properties":{"triggeredBy":{"type":"string","minLength":1,"description":"A block on the same step whose click or answer fires the rule."},"field":{"type":"string","minLength":1,"description":"The block whose answer the rule checks."},"condition":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["eq","neq","gt","lt","gte","lte","contains","in","is_set","before","after","is_past","is_future"],"description":"How the field's answer is compared with value."},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"nullable":true}],"description":"What the field is compared with; for a choice field an option id, or a list of them for `in`."}},"required":["operator","value"]},{"type":"object","properties":{"connector":{"type":"string","enum":["and","or"],"description":"How the conditions combine: and (all) or or (any)."},"conditions":{"type":"array","items":{"type":"object","properties":{"connector":{"type":"string","enum":["and","or"],"description":"Ignored by the renderer; the group's connector combines all conditions."},"field":{"type":"string","minLength":1,"description":"The block whose answer this condition checks."},"operator":{"type":"string","enum":["eq","neq","gt","lt","gte","lte","contains","in","is_set","before","after","is_past","is_future"],"description":"How the field's answer is compared with value."},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"nullable":true}],"description":"What the field is compared with; for a choice field an option id, or a list of them for `in`."}},"required":["field","operator","value"]},"description":"The conditions, in order."}},"required":["connector","conditions"]},{"nullable":true}],"description":"Null to fire always."},"action":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["next_step"],"description":"Goes to the next step."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["submit_form"],"description":"Submits the form."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["go_to_step"],"description":"Goes to stepId."},"stepId":{"type":"string","minLength":1,"description":"The step's id in the funnel's `funnel_data`."}},"required":["type","stepId"]},{"type":"object","properties":{"type":{"type":"string","enum":["redirect"],"description":"Sends the visitor to url."},"url":{"type":"string","description":"An http(s) or relative URL."}},"required":["type","url"]},{"type":"object","properties":{"type":{"type":"string","enum":["reset_form"],"description":"Clears every answer."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["previous_step"],"description":"Goes back to the previous step."}},"required":["type"]}]},"description":"What the rule does when it fires, in order."},"behavior":{"type":"string","enum":["auto","on_click"],"description":"When the rule fires: auto (as soon as the answer matches) or on_click (when triggeredBy is clicked)."}},"required":["field","condition","action","behavior"]},"description":"The step's complete rule list; [] removes all."}},"required":["op","stepId","rules"]}]},"minItems":1,"maxItems":30,"description":"Applied in order to the published funnel."},"image_briefs":{"type":"array","items":{"type":"object","properties":{"operation_index":{"type":"integer","minimum":0,"description":"0-based index into `operations` of the add_block or edit_block whose config gets the image."},"field":{"type":"string","minLength":1,"description":"The config field that holds the image's asset id, e.g. `assetId`; dotted for nested fields, with list positions as numbers, e.g. `items.0.assetId`."},"prompt":{"type":"string","minLength":1,"maxLength":2000,"description":"A prompt for the image."},"aspect":{"type":"string","enum":["square","landscape","portrait"],"description":"The image's shape."}},"required":["operation_index","field","prompt","aspect"]},"maxItems":3,"description":"New images to generate for the edit; leave the fields they fill out of the operations' configs."},"reason":{"type":"string","minLength":1,"maxLength":1000,"description":"Why, in one or two sentences the user can judge quickly."},"rejected_alternative":{"type":"object","properties":{"layer":{"type":"string","enum":["ad","landing_page","funnel"],"description":"The layer autopilot considered changing instead."},"why":{"type":"string","minLength":1,"maxLength":1000,"description":"Why changing that layer is not the better move, briefly."}},"required":["layer","why"],"description":"The other layer osiro.autopilot considered changing instead, and why it didn't."}},"required":["kind","funnel_id","base_version_id","operations","reason","rejected_alternative"]}],"description":"The Proposal as osiro.autopilot made it."},"reason":{"type":"string","enum":["out_of_scope","ad_not_active","duplicate","last_active_ad","too_many_variants","too_many_active_ads","ad_set_all_good","invalid_edit","already_edited","outcome_running","one_edit_per_run","experiment_open"],"description":"Why osiro's hard limits stopped the Proposal: out_of_scope (the ad or Ad set is outside the Meta selection), ad_not_active (the ad doesn't deliver), duplicate (the Run already proposes the same pause), last_active_ad (pausing it would leave its Ad set without an active ad), too_many_variants (more new Ads for one Ad set than a Run may propose), too_many_active_ads (the Ad set would have more active Ads than allowed), ad_set_all_good (every active Ad of the Ad set performs well), invalid_edit (the edit doesn't apply to the published version or leaves it invalid), already_edited (the Run already proposes an edit to the same page), outcome_running (the last executed edit's Outcome is still being measured), one_edit_per_run (a Landing page or Funnel Run proposes one edit) or experiment_open (the Funnel has an open A/B-Test)."},"detail":{"type":"string","description":"What exactly is wrong, for an invalid_edit."}},"required":["proposal","reason"]},"description":"The Proposals osiro's hard limits stopped, with why."},"snapshot":{"nullable":true,"description":"What osiro.autopilot was sent, as sent; null if the Run failed before."},"output":{"nullable":true,"description":"osiro.autopilot's answer before validation; null if there was none."}},"required":["id","campaign_id","landing_page_id","funnel_id","trigger","status","started_at","finished_at","summary","error","proposals","dropped_proposals"]},"AutopilotLastRun":{"type":"object","properties":{"run":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The Run's id."},"campaign_id":{"type":"string","nullable":true,"format":"uuid","description":"The reviewed Campaign; null when the Run reviews another subject."},"landing_page_id":{"type":"string","nullable":true,"format":"uuid","description":"The reviewed Landing page; null when the Run reviews another subject."},"funnel_id":{"type":"string","nullable":true,"format":"uuid","description":"The reviewed Funnel; null when the Run reviews another subject."},"trigger":{"type":"string","enum":["schedule","manual"],"description":"What started the Run: schedule (the daily review) or manual (Run now)."},"status":{"type":"string","enum":["running","succeeded","failed"],"description":"Where the Run stands: running, succeeded or failed."},"started_at":{"type":"string","description":"When the Run started, as ISO 8601."},"finished_at":{"type":"string","nullable":true,"description":"When the Run ended, as ISO 8601; null while it runs."},"summary":{"type":"string","nullable":true,"description":"What osiro.autopilot saw and decided; null until it has answered."},"error":{"type":"string","nullable":true,"description":"Why a failed Run failed; null otherwise."},"proposals":{"type":"integer","minimum":0,"description":"How many Proposals the Run stored."},"dropped_proposals":{"type":"array","items":{"type":"object","properties":{"proposal":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["pause_ad"],"description":"Pauses a Meta ad."},"ad_id":{"type":"string","pattern":"^\\d+$","description":"The Meta ad to pause."},"reason":{"type":"string","minLength":1,"maxLength":1000,"description":"Why, in one or two sentences the user can judge quickly."},"rejected_alternative":{"type":"object","properties":{"layer":{"type":"string","enum":["ad","landing_page","funnel"],"description":"The layer autopilot considered changing instead."},"why":{"type":"string","minLength":1,"maxLength":1000,"description":"Why changing that layer is not the better move, briefly."}},"required":["layer","why"],"description":"The other layer osiro.autopilot considered changing instead, and why it didn't."}},"required":["kind","ad_id","reason","rejected_alternative"]},{"type":"object","properties":{"kind":{"type":"string","enum":["add_variant"],"description":"Adds a new Ad to an Ad set."},"ad_set_id":{"type":"string","pattern":"^\\d+$","description":"The Meta ad set to add the new ad to."},"creative_brief":{"type":"object","properties":{"angle":{"type":"string","minLength":1,"maxLength":500,"description":"The ad's selling angle."},"hook":{"type":"string","minLength":1,"maxLength":500,"description":"The opening line idea that stops the scroll."},"image_prompt":{"type":"string","minLength":1,"maxLength":2000,"description":"A prompt for the ad's image."}},"required":["angle","hook","image_prompt"],"description":"What the new Ad should say and show; osiro turns it into copy and an image."},"reason":{"type":"string","minLength":1,"maxLength":1000,"description":"Why, in one or two sentences the user can judge quickly."},"rejected_alternative":{"type":"object","properties":{"layer":{"type":"string","enum":["ad","landing_page","funnel"],"description":"The layer autopilot considered changing instead."},"why":{"type":"string","minLength":1,"maxLength":1000,"description":"Why changing that layer is not the better move, briefly."}},"required":["layer","why"],"description":"The other layer osiro.autopilot considered changing instead, and why it didn't."}},"required":["kind","ad_set_id","creative_brief","reason","rejected_alternative"]},{"type":"object","properties":{"kind":{"type":"string","enum":["edit_landing_page"],"description":"Edits a Landing page."},"landing_page_id":{"type":"string","description":"The snapshot's `landing_page.id`."},"base_version_id":{"type":"string","description":"The snapshot's `landing_page.published_version_id`."},"operations":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"op":{"type":"string","enum":["add_block"],"description":"Adds a block."},"block":{"type":"object","properties":{"type":{"type":"string","minLength":1,"description":"A block type from `block_types`."},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"The fields that differ from the block's defaults."}},"required":["type"],"description":"The new block."},"index":{"type":"integer","minimum":0,"description":"0-based position among the blocks; appends if omitted."}},"required":["op","block"]},{"type":"object","properties":{"op":{"type":"string","enum":["edit_block"],"description":"Changes a block's config."},"blockId":{"type":"string","minLength":1,"description":"The block's id in the landing page's `page_data`."},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"The config fields to change, merged over the current ones."}},"required":["op","blockId","config"]},{"type":"object","properties":{"op":{"type":"string","enum":["remove_block"],"description":"Removes a block."},"blockId":{"type":"string","minLength":1,"description":"The block's id in the landing page's `page_data`."}},"required":["op","blockId"]},{"type":"object","properties":{"op":{"type":"string","enum":["move_block"],"description":"Moves a block."},"blockId":{"type":"string","minLength":1,"description":"The block's id in the landing page's `page_data`."},"index":{"type":"integer","minimum":0,"description":"0-based target position after removal; the end if omitted."}},"required":["op","blockId"]},{"type":"object","properties":{"op":{"type":"string","enum":["set_variables"],"description":"Replaces the page's URL variables."},"variables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^\\w+$","description":"Token written as {{name}} in text: letters, digits and underscores."},"searchParam":{"type":"string","description":"The URL search param to read, e.g. `city` for ?city=berlin."},"defaultValue":{"type":"string","description":"The text when the param is missing or unmapped."},"values":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"A raw param value, matched ignoring case."},"value":{"type":"string","description":"The text shown for it."}},"required":["name","value"]},"description":"Raw param values mapped to the text shown; [] for none."}},"required":["name","searchParam","defaultValue","values"]},"description":"The page's complete variable list; [] removes all."}},"required":["op","variables"]}]},"minItems":1,"maxItems":30,"description":"Applied in order to the published page."},"image_briefs":{"type":"array","items":{"type":"object","properties":{"operation_index":{"type":"integer","minimum":0,"description":"0-based index into `operations` of the add_block or edit_block whose config gets the image."},"field":{"type":"string","minLength":1,"description":"The config field that holds the image's asset id, e.g. `assetId`; dotted for nested fields, with list positions as numbers, e.g. `items.0.assetId`."},"prompt":{"type":"string","minLength":1,"maxLength":2000,"description":"A prompt for the image."},"aspect":{"type":"string","enum":["square","landscape","portrait"],"description":"The image's shape."}},"required":["operation_index","field","prompt","aspect"]},"maxItems":3,"description":"New images to generate for the edit; leave the fields they fill out of the operations' configs."},"reason":{"type":"string","minLength":1,"maxLength":1000,"description":"Why, in one or two sentences the user can judge quickly."},"rejected_alternative":{"type":"object","properties":{"layer":{"type":"string","enum":["ad","landing_page","funnel"],"description":"The layer autopilot considered changing instead."},"why":{"type":"string","minLength":1,"maxLength":1000,"description":"Why changing that layer is not the better move, briefly."}},"required":["layer","why"],"description":"The other layer osiro.autopilot considered changing instead, and why it didn't."}},"required":["kind","landing_page_id","base_version_id","operations","reason","rejected_alternative"]},{"type":"object","properties":{"kind":{"type":"string","enum":["edit_funnel"],"description":"Edits a Funnel."},"funnel_id":{"type":"string","description":"The `id` of one of the snapshot's `funnels`."},"base_version_id":{"type":"string","description":"That funnel's `published_version_id`."},"operations":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"op":{"type":"string","enum":["add_block"],"description":"Adds a block to a step."},"stepId":{"type":"string","minLength":1,"description":"The step's id in the funnel's `funnel_data`."},"block":{"type":"object","properties":{"type":{"type":"string","minLength":1,"description":"A funnel block type."},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"The fields that differ from the block's defaults."},"children":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"description":"A funnel block type."},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"The fields that differ from the block's defaults."}},"required":["type"]},"description":"Only for a `container`: its blocks, top to bottom."}},"required":["type"],"description":"The new block."},"parentId":{"type":"string","minLength":1,"description":"A container on the step to add the block to."},"index":{"type":"integer","minimum":0,"description":"0-based position; appends if omitted."}},"required":["op","stepId","block"]},{"type":"object","properties":{"op":{"type":"string","enum":["edit_block"],"description":"Changes a block's config."},"blockId":{"type":"string","minLength":1,"description":"The block's id in the funnel's `funnel_data`."},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"The config fields to change, merged over the current ones."}},"required":["op","blockId","config"]},{"type":"object","properties":{"op":{"type":"string","enum":["remove_block"],"description":"Removes a block."},"blockId":{"type":"string","minLength":1,"description":"The block's id in the funnel's `funnel_data`."}},"required":["op","blockId"]},{"type":"object","properties":{"op":{"type":"string","enum":["move_block"],"description":"Moves a block."},"blockId":{"type":"string","minLength":1,"description":"The block's id in the funnel's `funnel_data`."},"toStepId":{"type":"string","minLength":1,"description":"The step to move it to; omit to reorder within its step."},"index":{"type":"integer","minimum":0,"description":"0-based target position after removal; the end if omitted."}},"required":["op","blockId"]},{"type":"object","properties":{"op":{"type":"string","enum":["add_step"],"description":"Adds a step."},"name":{"type":"string","description":"The step's internal name."},"blocks":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"description":"A funnel block type."},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"The fields that differ from the block's defaults."},"children":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"description":"A funnel block type."},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"The fields that differ from the block's defaults."}},"required":["type"]},"description":"Only for a `container`: its blocks, top to bottom."}},"required":["type"]},"description":"The step's blocks, top to bottom."},"index":{"type":"integer","minimum":0,"description":"0-based position among the steps; appends if omitted."}},"required":["op"]},{"type":"object","properties":{"op":{"type":"string","enum":["remove_step"],"description":"Removes a step."},"stepId":{"type":"string","minLength":1,"description":"The step's id in the funnel's `funnel_data`."}},"required":["op","stepId"]},{"type":"object","properties":{"op":{"type":"string","enum":["move_step"],"description":"Moves a step."},"stepId":{"type":"string","minLength":1,"description":"The step's id in the funnel's `funnel_data`."},"index":{"type":"integer","minimum":0,"description":"The step's new 0-based position."}},"required":["op","stepId","index"]},{"type":"object","properties":{"op":{"type":"string","enum":["rename_step"],"description":"Renames a step."},"stepId":{"type":"string","minLength":1,"description":"The step's id in the funnel's `funnel_data`."},"name":{"type":"string","description":"The step's new internal name."}},"required":["op","stepId","name"]},{"type":"object","properties":{"op":{"type":"string","enum":["set_step_rules"],"description":"Replaces a step's rules."},"stepId":{"type":"string","minLength":1,"description":"The step's id in the funnel's `funnel_data`."},"rules":{"type":"array","items":{"type":"object","properties":{"triggeredBy":{"type":"string","minLength":1,"description":"A block on the same step whose click or answer fires the rule."},"field":{"type":"string","minLength":1,"description":"The block whose answer the rule checks."},"condition":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["eq","neq","gt","lt","gte","lte","contains","in","is_set","before","after","is_past","is_future"],"description":"How the field's answer is compared with value."},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"nullable":true}],"description":"What the field is compared with; for a choice field an option id, or a list of them for `in`."}},"required":["operator","value"]},{"type":"object","properties":{"connector":{"type":"string","enum":["and","or"],"description":"How the conditions combine: and (all) or or (any)."},"conditions":{"type":"array","items":{"type":"object","properties":{"connector":{"type":"string","enum":["and","or"],"description":"Ignored by the renderer; the group's connector combines all conditions."},"field":{"type":"string","minLength":1,"description":"The block whose answer this condition checks."},"operator":{"type":"string","enum":["eq","neq","gt","lt","gte","lte","contains","in","is_set","before","after","is_past","is_future"],"description":"How the field's answer is compared with value."},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"nullable":true}],"description":"What the field is compared with; for a choice field an option id, or a list of them for `in`."}},"required":["field","operator","value"]},"description":"The conditions, in order."}},"required":["connector","conditions"]},{"nullable":true}],"description":"Null to fire always."},"action":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["next_step"],"description":"Goes to the next step."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["submit_form"],"description":"Submits the form."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["go_to_step"],"description":"Goes to stepId."},"stepId":{"type":"string","minLength":1,"description":"The step's id in the funnel's `funnel_data`."}},"required":["type","stepId"]},{"type":"object","properties":{"type":{"type":"string","enum":["redirect"],"description":"Sends the visitor to url."},"url":{"type":"string","description":"An http(s) or relative URL."}},"required":["type","url"]},{"type":"object","properties":{"type":{"type":"string","enum":["reset_form"],"description":"Clears every answer."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["previous_step"],"description":"Goes back to the previous step."}},"required":["type"]}]},"description":"What the rule does when it fires, in order."},"behavior":{"type":"string","enum":["auto","on_click"],"description":"When the rule fires: auto (as soon as the answer matches) or on_click (when triggeredBy is clicked)."}},"required":["field","condition","action","behavior"]},"description":"The step's complete rule list; [] removes all."}},"required":["op","stepId","rules"]}]},"minItems":1,"maxItems":30,"description":"Applied in order to the published funnel."},"image_briefs":{"type":"array","items":{"type":"object","properties":{"operation_index":{"type":"integer","minimum":0,"description":"0-based index into `operations` of the add_block or edit_block whose config gets the image."},"field":{"type":"string","minLength":1,"description":"The config field that holds the image's asset id, e.g. `assetId`; dotted for nested fields, with list positions as numbers, e.g. `items.0.assetId`."},"prompt":{"type":"string","minLength":1,"maxLength":2000,"description":"A prompt for the image."},"aspect":{"type":"string","enum":["square","landscape","portrait"],"description":"The image's shape."}},"required":["operation_index","field","prompt","aspect"]},"maxItems":3,"description":"New images to generate for the edit; leave the fields they fill out of the operations' configs."},"reason":{"type":"string","minLength":1,"maxLength":1000,"description":"Why, in one or two sentences the user can judge quickly."},"rejected_alternative":{"type":"object","properties":{"layer":{"type":"string","enum":["ad","landing_page","funnel"],"description":"The layer autopilot considered changing instead."},"why":{"type":"string","minLength":1,"maxLength":1000,"description":"Why changing that layer is not the better move, briefly."}},"required":["layer","why"],"description":"The other layer osiro.autopilot considered changing instead, and why it didn't."}},"required":["kind","funnel_id","base_version_id","operations","reason","rejected_alternative"]}],"description":"The Proposal as osiro.autopilot made it."},"reason":{"type":"string","enum":["out_of_scope","ad_not_active","duplicate","last_active_ad","too_many_variants","too_many_active_ads","ad_set_all_good","invalid_edit","already_edited","outcome_running","one_edit_per_run","experiment_open"],"description":"Why osiro's hard limits stopped the Proposal: out_of_scope (the ad or Ad set is outside the Meta selection), ad_not_active (the ad doesn't deliver), duplicate (the Run already proposes the same pause), last_active_ad (pausing it would leave its Ad set without an active ad), too_many_variants (more new Ads for one Ad set than a Run may propose), too_many_active_ads (the Ad set would have more active Ads than allowed), ad_set_all_good (every active Ad of the Ad set performs well), invalid_edit (the edit doesn't apply to the published version or leaves it invalid), already_edited (the Run already proposes an edit to the same page), outcome_running (the last executed edit's Outcome is still being measured), one_edit_per_run (a Landing page or Funnel Run proposes one edit) or experiment_open (the Funnel has an open A/B-Test)."},"detail":{"type":"string","description":"What exactly is wrong, for an invalid_edit."}},"required":["proposal","reason"]},"description":"The Proposals osiro's hard limits stopped, with why."},"snapshot":{"nullable":true,"description":"What osiro.autopilot was sent, as sent; null if the Run failed before."},"output":{"nullable":true,"description":"osiro.autopilot's answer before validation; null if there was none."}},"required":["id","campaign_id","landing_page_id","funnel_id","trigger","status","started_at","finished_at","summary","error","proposals","dropped_proposals"],"description":"The Campaign's latest Run; null before its first."}},"required":["run"]},"AutopilotSubjectState":{"type":"object","properties":{"run":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The Run's id."},"campaign_id":{"type":"string","nullable":true,"format":"uuid","description":"The reviewed Campaign; null when the Run reviews another subject."},"landing_page_id":{"type":"string","nullable":true,"format":"uuid","description":"The reviewed Landing page; null when the Run reviews another subject."},"funnel_id":{"type":"string","nullable":true,"format":"uuid","description":"The reviewed Funnel; null when the Run reviews another subject."},"trigger":{"type":"string","enum":["schedule","manual"],"description":"What started the Run: schedule (the daily review) or manual (Run now)."},"status":{"type":"string","enum":["running","succeeded","failed"],"description":"Where the Run stands: running, succeeded or failed."},"started_at":{"type":"string","description":"When the Run started, as ISO 8601."},"finished_at":{"type":"string","nullable":true,"description":"When the Run ended, as ISO 8601; null while it runs."},"summary":{"type":"string","nullable":true,"description":"What osiro.autopilot saw and decided; null until it has answered."},"error":{"type":"string","nullable":true,"description":"Why a failed Run failed; null otherwise."},"proposals":{"type":"integer","minimum":0,"description":"How many Proposals the Run stored."},"dropped_proposals":{"type":"array","items":{"type":"object","properties":{"proposal":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["pause_ad"],"description":"Pauses a Meta ad."},"ad_id":{"type":"string","pattern":"^\\d+$","description":"The Meta ad to pause."},"reason":{"type":"string","minLength":1,"maxLength":1000,"description":"Why, in one or two sentences the user can judge quickly."},"rejected_alternative":{"type":"object","properties":{"layer":{"type":"string","enum":["ad","landing_page","funnel"],"description":"The layer autopilot considered changing instead."},"why":{"type":"string","minLength":1,"maxLength":1000,"description":"Why changing that layer is not the better move, briefly."}},"required":["layer","why"],"description":"The other layer osiro.autopilot considered changing instead, and why it didn't."}},"required":["kind","ad_id","reason","rejected_alternative"]},{"type":"object","properties":{"kind":{"type":"string","enum":["add_variant"],"description":"Adds a new Ad to an Ad set."},"ad_set_id":{"type":"string","pattern":"^\\d+$","description":"The Meta ad set to add the new ad to."},"creative_brief":{"type":"object","properties":{"angle":{"type":"string","minLength":1,"maxLength":500,"description":"The ad's selling angle."},"hook":{"type":"string","minLength":1,"maxLength":500,"description":"The opening line idea that stops the scroll."},"image_prompt":{"type":"string","minLength":1,"maxLength":2000,"description":"A prompt for the ad's image."}},"required":["angle","hook","image_prompt"],"description":"What the new Ad should say and show; osiro turns it into copy and an image."},"reason":{"type":"string","minLength":1,"maxLength":1000,"description":"Why, in one or two sentences the user can judge quickly."},"rejected_alternative":{"type":"object","properties":{"layer":{"type":"string","enum":["ad","landing_page","funnel"],"description":"The layer autopilot considered changing instead."},"why":{"type":"string","minLength":1,"maxLength":1000,"description":"Why changing that layer is not the better move, briefly."}},"required":["layer","why"],"description":"The other layer osiro.autopilot considered changing instead, and why it didn't."}},"required":["kind","ad_set_id","creative_brief","reason","rejected_alternative"]},{"type":"object","properties":{"kind":{"type":"string","enum":["edit_landing_page"],"description":"Edits a Landing page."},"landing_page_id":{"type":"string","description":"The snapshot's `landing_page.id`."},"base_version_id":{"type":"string","description":"The snapshot's `landing_page.published_version_id`."},"operations":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"op":{"type":"string","enum":["add_block"],"description":"Adds a block."},"block":{"type":"object","properties":{"type":{"type":"string","minLength":1,"description":"A block type from `block_types`."},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"The fields that differ from the block's defaults."}},"required":["type"],"description":"The new block."},"index":{"type":"integer","minimum":0,"description":"0-based position among the blocks; appends if omitted."}},"required":["op","block"]},{"type":"object","properties":{"op":{"type":"string","enum":["edit_block"],"description":"Changes a block's config."},"blockId":{"type":"string","minLength":1,"description":"The block's id in the landing page's `page_data`."},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"The config fields to change, merged over the current ones."}},"required":["op","blockId","config"]},{"type":"object","properties":{"op":{"type":"string","enum":["remove_block"],"description":"Removes a block."},"blockId":{"type":"string","minLength":1,"description":"The block's id in the landing page's `page_data`."}},"required":["op","blockId"]},{"type":"object","properties":{"op":{"type":"string","enum":["move_block"],"description":"Moves a block."},"blockId":{"type":"string","minLength":1,"description":"The block's id in the landing page's `page_data`."},"index":{"type":"integer","minimum":0,"description":"0-based target position after removal; the end if omitted."}},"required":["op","blockId"]},{"type":"object","properties":{"op":{"type":"string","enum":["set_variables"],"description":"Replaces the page's URL variables."},"variables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^\\w+$","description":"Token written as {{name}} in text: letters, digits and underscores."},"searchParam":{"type":"string","description":"The URL search param to read, e.g. `city` for ?city=berlin."},"defaultValue":{"type":"string","description":"The text when the param is missing or unmapped."},"values":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"A raw param value, matched ignoring case."},"value":{"type":"string","description":"The text shown for it."}},"required":["name","value"]},"description":"Raw param values mapped to the text shown; [] for none."}},"required":["name","searchParam","defaultValue","values"]},"description":"The page's complete variable list; [] removes all."}},"required":["op","variables"]}]},"minItems":1,"maxItems":30,"description":"Applied in order to the published page."},"image_briefs":{"type":"array","items":{"type":"object","properties":{"operation_index":{"type":"integer","minimum":0,"description":"0-based index into `operations` of the add_block or edit_block whose config gets the image."},"field":{"type":"string","minLength":1,"description":"The config field that holds the image's asset id, e.g. `assetId`; dotted for nested fields, with list positions as numbers, e.g. `items.0.assetId`."},"prompt":{"type":"string","minLength":1,"maxLength":2000,"description":"A prompt for the image."},"aspect":{"type":"string","enum":["square","landscape","portrait"],"description":"The image's shape."}},"required":["operation_index","field","prompt","aspect"]},"maxItems":3,"description":"New images to generate for the edit; leave the fields they fill out of the operations' configs."},"reason":{"type":"string","minLength":1,"maxLength":1000,"description":"Why, in one or two sentences the user can judge quickly."},"rejected_alternative":{"type":"object","properties":{"layer":{"type":"string","enum":["ad","landing_page","funnel"],"description":"The layer autopilot considered changing instead."},"why":{"type":"string","minLength":1,"maxLength":1000,"description":"Why changing that layer is not the better move, briefly."}},"required":["layer","why"],"description":"The other layer osiro.autopilot considered changing instead, and why it didn't."}},"required":["kind","landing_page_id","base_version_id","operations","reason","rejected_alternative"]},{"type":"object","properties":{"kind":{"type":"string","enum":["edit_funnel"],"description":"Edits a Funnel."},"funnel_id":{"type":"string","description":"The `id` of one of the snapshot's `funnels`."},"base_version_id":{"type":"string","description":"That funnel's `published_version_id`."},"operations":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"op":{"type":"string","enum":["add_block"],"description":"Adds a block to a step."},"stepId":{"type":"string","minLength":1,"description":"The step's id in the funnel's `funnel_data`."},"block":{"type":"object","properties":{"type":{"type":"string","minLength":1,"description":"A funnel block type."},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"The fields that differ from the block's defaults."},"children":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"description":"A funnel block type."},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"The fields that differ from the block's defaults."}},"required":["type"]},"description":"Only for a `container`: its blocks, top to bottom."}},"required":["type"],"description":"The new block."},"parentId":{"type":"string","minLength":1,"description":"A container on the step to add the block to."},"index":{"type":"integer","minimum":0,"description":"0-based position; appends if omitted."}},"required":["op","stepId","block"]},{"type":"object","properties":{"op":{"type":"string","enum":["edit_block"],"description":"Changes a block's config."},"blockId":{"type":"string","minLength":1,"description":"The block's id in the funnel's `funnel_data`."},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"The config fields to change, merged over the current ones."}},"required":["op","blockId","config"]},{"type":"object","properties":{"op":{"type":"string","enum":["remove_block"],"description":"Removes a block."},"blockId":{"type":"string","minLength":1,"description":"The block's id in the funnel's `funnel_data`."}},"required":["op","blockId"]},{"type":"object","properties":{"op":{"type":"string","enum":["move_block"],"description":"Moves a block."},"blockId":{"type":"string","minLength":1,"description":"The block's id in the funnel's `funnel_data`."},"toStepId":{"type":"string","minLength":1,"description":"The step to move it to; omit to reorder within its step."},"index":{"type":"integer","minimum":0,"description":"0-based target position after removal; the end if omitted."}},"required":["op","blockId"]},{"type":"object","properties":{"op":{"type":"string","enum":["add_step"],"description":"Adds a step."},"name":{"type":"string","description":"The step's internal name."},"blocks":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"description":"A funnel block type."},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"The fields that differ from the block's defaults."},"children":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"description":"A funnel block type."},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"The fields that differ from the block's defaults."}},"required":["type"]},"description":"Only for a `container`: its blocks, top to bottom."}},"required":["type"]},"description":"The step's blocks, top to bottom."},"index":{"type":"integer","minimum":0,"description":"0-based position among the steps; appends if omitted."}},"required":["op"]},{"type":"object","properties":{"op":{"type":"string","enum":["remove_step"],"description":"Removes a step."},"stepId":{"type":"string","minLength":1,"description":"The step's id in the funnel's `funnel_data`."}},"required":["op","stepId"]},{"type":"object","properties":{"op":{"type":"string","enum":["move_step"],"description":"Moves a step."},"stepId":{"type":"string","minLength":1,"description":"The step's id in the funnel's `funnel_data`."},"index":{"type":"integer","minimum":0,"description":"The step's new 0-based position."}},"required":["op","stepId","index"]},{"type":"object","properties":{"op":{"type":"string","enum":["rename_step"],"description":"Renames a step."},"stepId":{"type":"string","minLength":1,"description":"The step's id in the funnel's `funnel_data`."},"name":{"type":"string","description":"The step's new internal name."}},"required":["op","stepId","name"]},{"type":"object","properties":{"op":{"type":"string","enum":["set_step_rules"],"description":"Replaces a step's rules."},"stepId":{"type":"string","minLength":1,"description":"The step's id in the funnel's `funnel_data`."},"rules":{"type":"array","items":{"type":"object","properties":{"triggeredBy":{"type":"string","minLength":1,"description":"A block on the same step whose click or answer fires the rule."},"field":{"type":"string","minLength":1,"description":"The block whose answer the rule checks."},"condition":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["eq","neq","gt","lt","gte","lte","contains","in","is_set","before","after","is_past","is_future"],"description":"How the field's answer is compared with value."},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"nullable":true}],"description":"What the field is compared with; for a choice field an option id, or a list of them for `in`."}},"required":["operator","value"]},{"type":"object","properties":{"connector":{"type":"string","enum":["and","or"],"description":"How the conditions combine: and (all) or or (any)."},"conditions":{"type":"array","items":{"type":"object","properties":{"connector":{"type":"string","enum":["and","or"],"description":"Ignored by the renderer; the group's connector combines all conditions."},"field":{"type":"string","minLength":1,"description":"The block whose answer this condition checks."},"operator":{"type":"string","enum":["eq","neq","gt","lt","gte","lte","contains","in","is_set","before","after","is_past","is_future"],"description":"How the field's answer is compared with value."},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"nullable":true}],"description":"What the field is compared with; for a choice field an option id, or a list of them for `in`."}},"required":["field","operator","value"]},"description":"The conditions, in order."}},"required":["connector","conditions"]},{"nullable":true}],"description":"Null to fire always."},"action":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["next_step"],"description":"Goes to the next step."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["submit_form"],"description":"Submits the form."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["go_to_step"],"description":"Goes to stepId."},"stepId":{"type":"string","minLength":1,"description":"The step's id in the funnel's `funnel_data`."}},"required":["type","stepId"]},{"type":"object","properties":{"type":{"type":"string","enum":["redirect"],"description":"Sends the visitor to url."},"url":{"type":"string","description":"An http(s) or relative URL."}},"required":["type","url"]},{"type":"object","properties":{"type":{"type":"string","enum":["reset_form"],"description":"Clears every answer."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["previous_step"],"description":"Goes back to the previous step."}},"required":["type"]}]},"description":"What the rule does when it fires, in order."},"behavior":{"type":"string","enum":["auto","on_click"],"description":"When the rule fires: auto (as soon as the answer matches) or on_click (when triggeredBy is clicked)."}},"required":["field","condition","action","behavior"]},"description":"The step's complete rule list; [] removes all."}},"required":["op","stepId","rules"]}]},"minItems":1,"maxItems":30,"description":"Applied in order to the published funnel."},"image_briefs":{"type":"array","items":{"type":"object","properties":{"operation_index":{"type":"integer","minimum":0,"description":"0-based index into `operations` of the add_block or edit_block whose config gets the image."},"field":{"type":"string","minLength":1,"description":"The config field that holds the image's asset id, e.g. `assetId`; dotted for nested fields, with list positions as numbers, e.g. `items.0.assetId`."},"prompt":{"type":"string","minLength":1,"maxLength":2000,"description":"A prompt for the image."},"aspect":{"type":"string","enum":["square","landscape","portrait"],"description":"The image's shape."}},"required":["operation_index","field","prompt","aspect"]},"maxItems":3,"description":"New images to generate for the edit; leave the fields they fill out of the operations' configs."},"reason":{"type":"string","minLength":1,"maxLength":1000,"description":"Why, in one or two sentences the user can judge quickly."},"rejected_alternative":{"type":"object","properties":{"layer":{"type":"string","enum":["ad","landing_page","funnel"],"description":"The layer autopilot considered changing instead."},"why":{"type":"string","minLength":1,"maxLength":1000,"description":"Why changing that layer is not the better move, briefly."}},"required":["layer","why"],"description":"The other layer osiro.autopilot considered changing instead, and why it didn't."}},"required":["kind","funnel_id","base_version_id","operations","reason","rejected_alternative"]}],"description":"The Proposal as osiro.autopilot made it."},"reason":{"type":"string","enum":["out_of_scope","ad_not_active","duplicate","last_active_ad","too_many_variants","too_many_active_ads","ad_set_all_good","invalid_edit","already_edited","outcome_running","one_edit_per_run","experiment_open"],"description":"Why osiro's hard limits stopped the Proposal: out_of_scope (the ad or Ad set is outside the Meta selection), ad_not_active (the ad doesn't deliver), duplicate (the Run already proposes the same pause), last_active_ad (pausing it would leave its Ad set without an active ad), too_many_variants (more new Ads for one Ad set than a Run may propose), too_many_active_ads (the Ad set would have more active Ads than allowed), ad_set_all_good (every active Ad of the Ad set performs well), invalid_edit (the edit doesn't apply to the published version or leaves it invalid), already_edited (the Run already proposes an edit to the same page), outcome_running (the last executed edit's Outcome is still being measured), one_edit_per_run (a Landing page or Funnel Run proposes one edit) or experiment_open (the Funnel has an open A/B-Test)."},"detail":{"type":"string","description":"What exactly is wrong, for an invalid_edit."}},"required":["proposal","reason"]},"description":"The Proposals osiro's hard limits stopped, with why."},"snapshot":{"nullable":true,"description":"What osiro.autopilot was sent, as sent; null if the Run failed before."},"output":{"nullable":true,"description":"osiro.autopilot's answer before validation; null if there was none."}},"required":["id","campaign_id","landing_page_id","funnel_id","trigger","status","started_at","finished_at","summary","error","proposals","dropped_proposals"],"description":"Its latest Run; null before its first."},"blocked":{"oneOf":[{"type":"object","properties":{"reason":{"type":"string","enum":["not_published"],"description":"The Landing page or Funnel is not published."}},"required":["reason"]},{"type":"object","properties":{"reason":{"type":"string","enum":["too_little_traffic"],"description":"It had too few visits or Funnel starts in the Run's window."},"count":{"type":"integer","minimum":0,"description":"Its visits or Funnel starts in the Run's window."},"minimum":{"type":"integer","minimum":0,"description":"How many a Run needs."},"unit":{"type":"string","enum":["visits","starts"],"description":"What count and minimum count: visits or starts."},"since":{"type":"string","format":"date-time","description":"When its last A/B-Test ended, if within the last 30 days: the window starts there instead."}},"required":["reason","count","minimum","unit"]},{"type":"object","properties":{"reason":{"type":"string","enum":["owned_by_campaign"],"description":"A Campaign with osiro.autopilot on reviews the page."},"campaign":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Campaign's id."},"name":{"type":"string","description":"The Campaign's name."}},"required":["id","name"],"description":"The Campaign that reviews the page."}},"required":["reason","campaign"]},{"type":"object","properties":{"reason":{"type":"string","enum":["run_in_progress"],"description":"A Run is already running."}},"required":["reason"]},{"type":"object","properties":{"reason":{"type":"string","enum":["already_run_today"],"description":"It already had its Run today, in Berlin."}},"required":["reason"]},{"type":"object","properties":{"reason":{"type":"string","enum":["org_daily_limit"],"description":"The Organization had every Landing page and Funnel Run it may have today, in Berlin."},"limit":{"type":"integer","minimum":0,"description":"How many Landing page and Funnel Runs it may have a day."}},"required":["reason","limit"]},{"type":"object","properties":{"reason":{"type":"string","enum":["experiment_running"],"description":"An A/B-Test runs on it, or is paused."},"owner":{"type":"string","enum":["autopilot","member"],"description":"Who started the A/B-Test: autopilot (an approved edit) or a member."},"status":{"type":"string","enum":["running","paused"],"description":"Whether the A/B-Test is running or paused."},"counted_days":{"type":"integer","minimum":0,"description":"Whole days it has run so far; paused days don't count."},"next_checkpoint_day":{"anyOf":[{"type":"number","enum":[14]},{"type":"number","enum":[28]}],"description":"The Checkpoint ahead, in counted days; 28 once it is due."},"checkpoint_due":{"type":"boolean","description":"Whether osiro.autopilot's test has reached a Checkpoint no Run has evaluated yet with no \"Test beenden\" waiting: a Run may start, and evaluates it without the agent."},"last_checkpoint":{"type":"object","nullable":true,"properties":{"day":{"anyOf":[{"type":"number","enum":[14]},{"type":"number","enum":[28]}],"description":"The Checkpoint, in counted days."},"proposed":{"type":"boolean","description":"Whether the Run proposed ending the test."}},"required":["day","proposed"],"description":"The latest Checkpoint a Run evaluated; null before the first."}},"required":["reason","owner","status","counted_days","next_checkpoint_day","checkpoint_due","last_checkpoint"]},{"nullable":true}],"description":"Why a new Run can't start now; null when one can."}},"required":["run","blocked"]},"CampaignGenerationStarted":{"type":"object","properties":{"campaign_id":{"type":"string","format":"uuid","description":"The draft Campaign's id."},"generation_id":{"type":"string","format":"uuid","description":"The Campaign generation's id."}},"required":["campaign_id","generation_id"]},"CampaignGenerationCreate":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000,"description":"The Briefing: the Member's free text about what the Campaign is for, its offer, audience and angle."}},"required":["prompt"]},"CampaignGenerationLookup":{"type":"object","properties":{"generation":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The Campaign generation's id."},"campaign_id":{"type":"string","format":"uuid","description":"The draft Campaign's id."},"status":{"type":"string","enum":["queued","running","completed","incomplete"],"description":"Where the Campaign generation stands: queued, running, completed, or incomplete (it ended without building every part; reason says why)."},"prompt":{"type":"string","description":"The Briefing the generation builds from."},"reason":{"type":"string","nullable":true,"description":"Why an incomplete generation is incomplete; null otherwise."},"eve_session_id":{"type":"string","nullable":true,"description":"osiro.autopilot's session of the current attempt (wrun_…), for the session viewer in development; null until it starts."},"checklist":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string","enum":["brief","images","funnel","landing_page","ads"],"description":"A part the Campaign generation builds: brief, images, funnel, landing_page or ads."},"done":{"type":"boolean","description":"Whether the part exists."},"progress":{"type":"object","properties":{"done":{"type":"integer","description":"How many of the part's pieces exist."},"total":{"type":"integer","description":"How many pieces the part has."}},"required":["done","total"],"description":"How far a part with several pieces is, such as images 1 of 2; omitted for a part with one."}},"required":["item","done"]},"description":"Every part the generation builds, in checklist order."},"images":{"type":"array","items":{"type":"object","properties":{"asset_id":{"type":"string","format":"uuid","description":"The image's asset id."},"image_url":{"type":"string","description":"The image's URL."},"width":{"type":"integer","description":"The image's width in pixels."},"height":{"type":"integer","description":"The image's height in pixels."},"creative_layout":{"type":"string","nullable":true,"description":"The layout of a composed ad creative, such as photo or text; null for a generated photo."}},"required":["asset_id","image_url","width","height","creative_layout"]},"description":"The images the generation created."},"funnel_id":{"type":"string","nullable":true,"format":"uuid","description":"The id of the Funnel the generation created; null before."},"landing_page_id":{"type":"string","nullable":true,"format":"uuid","description":"The id of the draft Landing page the generation created; null before."},"ads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Ad's id."},"campaign_id":{"type":"string","format":"uuid","description":"The id of the Campaign the Ad belongs to."},"status":{"type":"string","enum":["draft"],"description":"Where the Ad is: draft (stored in osiro only, not yet pushed to an ad platform)."},"headline":{"type":"string","description":"The Ad's headline."},"primary_text":{"type":"string","description":"The Ad's main text."},"description":{"type":"string","nullable":true,"description":"A short line shown under the headline. Null without one."},"call_to_action":{"type":"string","enum":["learn_more","apply_now","sign_up","contact_us","get_quote","book_now","subscribe","download","shop_now","order_now","get_offer","get_started","request_time","call_now","send_message","whatsapp_message"],"description":"The Ad's Call to action, each with the Meta call_to_action type it becomes: learn_more (LEARN_MORE), apply_now (APPLY_NOW), sign_up (SIGN_UP), contact_us (CONTACT_US), get_quote (GET_QUOTE), book_now (BOOK_NOW), subscribe (SUBSCRIBE), download (DOWNLOAD), shop_now (SHOP_NOW), order_now (ORDER_NOW), get_offer (GET_OFFER), get_started (GET_STARTED), request_time (REQUEST_TIME), call_now (CALL_NOW), send_message (MESSAGE_PAGE), whatsapp_message (WHATSAPP_MESSAGE)."},"image_asset_id":{"type":"string","nullable":true,"format":"uuid","description":"The id of the Ad's image Asset. Null without an image."},"image_url":{"type":"string","nullable":true,"description":"The image's public URL. Null without an image."},"landing_page_id":{"type":"string","nullable":true,"format":"uuid","description":"The Landing page the Ad links to. Null links to the Campaign's Landing page."},"created_at":{"type":"string","description":"When the Ad was created."},"updated_at":{"type":"string","description":"When the Ad last changed."}},"required":["id","campaign_id","status","headline","primary_text","description","call_to_action","image_asset_id","image_url","landing_page_id","created_at","updated_at"]},"description":"The draft Ads the generation created, oldest first."},"created_at":{"type":"string","description":"When the generation was queued, as ISO 8601."},"started_at":{"type":"string","nullable":true,"description":"When the current attempt started, as ISO 8601; null before."},"finished_at":{"type":"string","nullable":true,"description":"When the generation ended, as ISO 8601; null before."}},"required":["id","campaign_id","status","prompt","reason","eve_session_id","checklist","images","funnel_id","landing_page_id","ads","created_at","started_at","finished_at"],"description":"The Campaign's generation; null for a Campaign made without one."}},"required":["generation"]},"AdList":{"type":"object","properties":{"ads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Ad's id."},"campaign_id":{"type":"string","format":"uuid","description":"The id of the Campaign the Ad belongs to."},"status":{"type":"string","enum":["draft"],"description":"Where the Ad is: draft (stored in osiro only, not yet pushed to an ad platform)."},"headline":{"type":"string","description":"The Ad's headline."},"primary_text":{"type":"string","description":"The Ad's main text."},"description":{"type":"string","nullable":true,"description":"A short line shown under the headline. Null without one."},"call_to_action":{"type":"string","enum":["learn_more","apply_now","sign_up","contact_us","get_quote","book_now","subscribe","download","shop_now","order_now","get_offer","get_started","request_time","call_now","send_message","whatsapp_message"],"description":"The Ad's Call to action, each with the Meta call_to_action type it becomes: learn_more (LEARN_MORE), apply_now (APPLY_NOW), sign_up (SIGN_UP), contact_us (CONTACT_US), get_quote (GET_QUOTE), book_now (BOOK_NOW), subscribe (SUBSCRIBE), download (DOWNLOAD), shop_now (SHOP_NOW), order_now (ORDER_NOW), get_offer (GET_OFFER), get_started (GET_STARTED), request_time (REQUEST_TIME), call_now (CALL_NOW), send_message (MESSAGE_PAGE), whatsapp_message (WHATSAPP_MESSAGE)."},"image_asset_id":{"type":"string","nullable":true,"format":"uuid","description":"The id of the Ad's image Asset. Null without an image."},"image_url":{"type":"string","nullable":true,"description":"The image's public URL. Null without an image."},"landing_page_id":{"type":"string","nullable":true,"format":"uuid","description":"The Landing page the Ad links to. Null links to the Campaign's Landing page."},"created_at":{"type":"string","description":"When the Ad was created."},"updated_at":{"type":"string","description":"When the Ad last changed."}},"required":["id","campaign_id","status","headline","primary_text","description","call_to_action","image_asset_id","image_url","landing_page_id","created_at","updated_at"]},"description":"The Campaign's Ads, oldest first."}},"required":["ads"]},"Ad":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Ad's id."},"campaign_id":{"type":"string","format":"uuid","description":"The id of the Campaign the Ad belongs to."},"status":{"type":"string","enum":["draft"],"description":"Where the Ad is: draft (stored in osiro only, not yet pushed to an ad platform)."},"headline":{"type":"string","description":"The Ad's headline."},"primary_text":{"type":"string","description":"The Ad's main text."},"description":{"type":"string","nullable":true,"description":"A short line shown under the headline. Null without one."},"call_to_action":{"type":"string","enum":["learn_more","apply_now","sign_up","contact_us","get_quote","book_now","subscribe","download","shop_now","order_now","get_offer","get_started","request_time","call_now","send_message","whatsapp_message"],"description":"The Ad's Call to action, each with the Meta call_to_action type it becomes: learn_more (LEARN_MORE), apply_now (APPLY_NOW), sign_up (SIGN_UP), contact_us (CONTACT_US), get_quote (GET_QUOTE), book_now (BOOK_NOW), subscribe (SUBSCRIBE), download (DOWNLOAD), shop_now (SHOP_NOW), order_now (ORDER_NOW), get_offer (GET_OFFER), get_started (GET_STARTED), request_time (REQUEST_TIME), call_now (CALL_NOW), send_message (MESSAGE_PAGE), whatsapp_message (WHATSAPP_MESSAGE)."},"image_asset_id":{"type":"string","nullable":true,"format":"uuid","description":"The id of the Ad's image Asset. Null without an image."},"image_url":{"type":"string","nullable":true,"description":"The image's public URL. Null without an image."},"landing_page_id":{"type":"string","nullable":true,"format":"uuid","description":"The Landing page the Ad links to. Null links to the Campaign's Landing page."},"created_at":{"type":"string","description":"When the Ad was created."},"updated_at":{"type":"string","description":"When the Ad last changed."}},"required":["id","campaign_id","status","headline","primary_text","description","call_to_action","image_asset_id","image_url","landing_page_id","created_at","updated_at"]},"AdUpdate":{"type":"object","properties":{"headline":{"type":"string","minLength":1,"maxLength":255,"description":"The Ad's headline."},"primary_text":{"type":"string","minLength":1,"maxLength":3000,"description":"The Ad's main text."},"description":{"type":"string","nullable":true,"maxLength":255,"description":"A short line shown under the headline. Empty or null removes it."},"call_to_action":{"type":"string","enum":["learn_more","apply_now","sign_up","contact_us","get_quote","book_now","subscribe","download","shop_now","order_now","get_offer","get_started","request_time","call_now","send_message","whatsapp_message"],"description":"The Ad's Call to action, each with the Meta call_to_action type it becomes: learn_more (LEARN_MORE), apply_now (APPLY_NOW), sign_up (SIGN_UP), contact_us (CONTACT_US), get_quote (GET_QUOTE), book_now (BOOK_NOW), subscribe (SUBSCRIBE), download (DOWNLOAD), shop_now (SHOP_NOW), order_now (ORDER_NOW), get_offer (GET_OFFER), get_started (GET_STARTED), request_time (REQUEST_TIME), call_now (CALL_NOW), send_message (MESSAGE_PAGE), whatsapp_message (WHATSAPP_MESSAGE)."},"image_asset_id":{"type":"string","nullable":true,"format":"uuid","description":"The id of the Ad's image Asset. Null removes the image."}}}},"parameters":{}},"paths":{"/api/v2/me":{"get":{"tags":["Me"],"responses":{"200":{"description":"The caller's profile","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The User's id."},"email":{"type":"string","description":"The User's email address, which they sign in with."},"firstName":{"type":"string","description":"The User's first name."},"lastName":{"type":"string","description":"The User's last name."}},"required":["id","email","firstName","lastName"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/me/organizations":{"get":{"tags":["Me"],"parameters":[{"schema":{"type":"string","default":"","description":"Only the Organizations whose name matches every whitespace-separated term. Empty lists every one."},"required":false,"description":"Only the Organizations whose name matches every whitespace-separated term. Empty lists every one.","name":"q","in":"query"}],"responses":{"200":{"description":"The organizations the caller belongs to, by name, narrowed to those matching every whitespace-separated term in `q` when one is given","content":{"application/json":{"schema":{"type":"object","properties":{"organizations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Organization's id."},"name":{"type":"string","description":"The Organization's name."}},"required":["id","name"]},"description":"The Organizations the caller is a Member of, by name."}},"required":["organizations"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/members":{"get":{"tags":["Members"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"responses":{"200":{"description":"The organization's members: everyone with a membership row","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/public/assets/{orgId}/upload":{"put":{"tags":["Assets"],"description":"Send the token from create_image_upload_link as `Authorization: Bearer <token>`.","parameters":[{"schema":{"type":"string","format":"uuid","description":"The id of the Organization the image is uploaded to."},"required":true,"description":"The id of the Organization the image is uploaded to.","name":"orgId","in":"path"}],"requestBody":{"description":"The image's bytes, or multipart/form-data with `file` and an optional `altText`.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"The image, stored as an asset of the organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadedAsset"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/domains":{"get":{"tags":["Domains"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"responses":{"200":{"description":"Every domain the org owns or has shared into it","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid","description":"The Domain's asset id."},"hostname":{"type":"string","description":"The Domain's hostname."},"verified":{"type":"boolean","description":"Whether the Domain is verified for Landing pages."},"emailVerified":{"type":"boolean","description":"Whether the Domain is verified for sending email."},"isOwner":{"type":"boolean","description":"Whether the Organization owns the Domain; false when another Organization shares it in."},"ownerOrgName":{"type":"string","description":"The name of the Organization that owns a shared-in Domain."},"isDefaultSender":{"type":"boolean","description":"Whether this is osiro's shared sending domain, on which every Organization gets a sender."},"emailSender":{"type":"object","nullable":true,"properties":{"senderId":{"type":"integer","description":"The sender's id."},"senderEmail":{"type":"string","description":"The email address osiro sends from on this Domain."},"replyTo":{"type":"array","nullable":true,"items":{"type":"string"},"description":"The sender's reply-to addresses; null when none are set."},"workflowNames":{"type":"array","items":{"type":"string"},"description":"The names of the Flows whose steps send from this sender."}},"required":["senderId","senderEmail","replyTo","workflowNames"],"description":"The Organization's sender on the Domain; null when it has none."},"landingPage":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The Landing page's id."},"name":{"type":"string","description":"The Landing page's name."}},"required":["id","name"],"description":"The Landing page served at the Domain's root; null when none is."},"website":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid","description":"The Website's id."},"name":{"type":"string","description":"The Website's name."}},"required":["id","name"],"description":"The Website served on the Domain, which owns its root."}},"required":["assetId","hostname","verified","emailVerified","isOwner","isDefaultSender","emailSender","landingPage"]}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Domains"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"hostname":{"type":"string","minLength":1,"description":"The hostname to connect as a Domain, e.g. 'promo.example.com' or 'example.com'."}},"required":["hostname"]}}}},"responses":{"201":{"description":"The created bare domain asset","content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid","description":"The new Domain's asset id."}},"required":["assetId"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/domains/{assetId}":{"delete":{"tags":["Domains"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Domain's asset id."},"required":true,"description":"The Domain's asset id.","name":"assetId","in":"path"}],"responses":{"200":{"description":"The domain (and its Vercel/SendGrid registrations) was deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"Always true: the change was made."}},"required":["success"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/domains/{assetId}/landing-page/start-verification":{"post":{"tags":["Domains"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Domain's asset id."},"required":true,"description":"The Domain's asset id.","name":"assetId","in":"path"}],"responses":{"200":{"description":"Registers the domain with Vercel if needed and reports the DNS record it requires","content":{"application/json":{"schema":{"type":"object","properties":{"dns":{"anyOf":[{"type":"object","properties":{"valid":{"type":"boolean","enum":[true],"description":"The Domain's DNS already points where it must."},"required":{"nullable":true,"description":"No DNS record is missing."}},"required":["valid","required"]},{"type":"object","properties":{"valid":{"type":"boolean","enum":[false],"description":"The Domain's DNS does not point where it must yet."},"required":{"type":"object","properties":{"type":{"type":"string","enum":["A","CNAME"],"description":"The record type: A for a root domain, CNAME for a subdomain."},"value":{"type":"string","description":"The value the record must have."}},"required":["type","value"],"description":"The DNS record to create at the domain registrar."}},"required":["valid","required"]}],"description":"Whether the Domain's DNS is set up for Landing pages, and the record to create if not."}},"required":["dns"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/domains/{assetId}/landing-page/verify":{"post":{"tags":["Domains"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Domain's asset id."},"required":true,"description":"The Domain's asset id.","name":"assetId","in":"path"}],"responses":{"200":{"description":"Verifies the domain with Vercel for landing-page use","content":{"application/json":{"schema":{"type":"object","properties":{"verified":{"type":"boolean","description":"Whether the Domain is now verified for Landing pages."}},"required":["verified"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/domains/{assetId}/landing-page":{"post":{"tags":["Domains"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Domain's asset id."},"required":true,"description":"The Domain's asset id.","name":"assetId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"landingPageId":{"type":"string","format":"uuid","description":"The Landing page's id."}},"required":["landingPageId"]}}}},"responses":{"200":{"description":"Domain assigned to the landing page (transfer)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"Always true: the change was made."}},"required":["success"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["Domains"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Domain's asset id."},"required":true,"description":"The Domain's asset id.","name":"assetId","in":"path"}],"responses":{"200":{"description":"Domain removed from the landing page","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"Always true: the change was made."}},"required":["success"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/webhooks":{"get":{"tags":["Webhooks"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"responses":{"200":{"description":"Every Webhook of the Organization, oldest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Webhooks"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookInput"}}}},"responses":{"201":{"description":"The Webhook is Enabled, with its Signing secret","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedWebhook"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/webhooks/{webhookId}":{"get":{"tags":["Webhooks"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Webhook's id."},"required":true,"description":"The Webhook's id.","name":"webhookId","in":"path"}],"responses":{"200":{"description":"The Webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["Webhooks"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Webhook's id."},"required":true,"description":"The Webhook's id.","name":"webhookId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookInput"}}}},"responses":{"204":{"description":"Saved; later sends, retries of older deliveries included, use the new URL"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["Webhooks"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Webhook's id."},"required":true,"description":"The Webhook's id.","name":"webhookId","in":"path"}],"responses":{"204":{"description":"Deleted, with its deliveries and Signing secret"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/webhooks/{webhookId}/enabled":{"put":{"tags":["Webhooks"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Webhook's id."},"required":true,"description":"The Webhook's id.","name":"webhookId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEnabledInput"}}}},"responses":{"204":{"description":"Enabled, with the reason and failing_since cleared, or Disabled by the caller"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/webhooks/{webhookId}/secret":{"get":{"tags":["Webhooks"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Webhook's id."},"required":true,"description":"The Webhook's id.","name":"webhookId","in":"path"}],"responses":{"200":{"description":"The current Signing secret, in plain text. Never cached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSecret"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/webhooks/{webhookId}/secret/roll":{"post":{"tags":["Webhooks"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Webhook's id."},"required":true,"description":"The Webhook's id.","name":"webhookId","in":"path"}],"responses":{"204":{"description":"A new Signing secret. The old one keeps signing deliveries for 24 hours"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/webhooks/{webhookId}/secret/expire-previous":{"post":{"tags":["Webhooks"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Webhook's id."},"required":true,"description":"The Webhook's id.","name":"webhookId","in":"path"}],"responses":{"204":{"description":"The old Signing secret stops signing deliveries now, not 24 hours after the roll"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/webhooks/{webhookId}/deliveries":{"get":{"tags":["Webhooks"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Webhook's id."},"required":true,"description":"The Webhook's id.","name":"webhookId","in":"path"},{"schema":{"type":"string","enum":["queued","sent","failed"],"description":"Only Webhook deliveries with this status."},"required":false,"description":"Only Webhook deliveries with this status.","name":"status","in":"query"},{"schema":{"type":"string","enum":["lead.created","lead.called","lead.not_reached","lead.callback_set","lead.presetting","lead.converted","lead.duration_ended","lead.state_changed","note.added"],"description":"A Webhook event type: lead.created (A new Lead came in.); lead.called (A Lead was called in osiro.hunter.); lead.not_reached (A call didn't reach the Lead.); lead.callback_set (A callback was scheduled for the Lead.); lead.presetting (The Lead was marked for presetting.); lead.converted (The Lead was converted.); lead.duration_ended (The Lead's calling duration ended.); lead.state_changed (The Lead's state changed.); note.added (A note was added to the Lead.)."},"required":false,"description":"A Webhook event type: lead.created (A new Lead came in.); lead.called (A Lead was called in osiro.hunter.); lead.not_reached (A call didn't reach the Lead.); lead.callback_set (A callback was scheduled for the Lead.); lead.presetting (The Lead was marked for presetting.); lead.converted (The Lead was converted.); lead.duration_ended (The Lead's calling duration ended.); lead.state_changed (The Lead's state changed.); note.added (A note was added to the Lead.).","name":"type","in":"query"},{"schema":{"type":"string","maxLength":200,"description":"A Webhook delivery id, a Lead id, or words of the Lead's name."},"required":false,"description":"A Webhook delivery id, a Lead id, or words of the Lead's name.","name":"search","in":"query"},{"schema":{"type":"integer","minimum":1,"default":1,"description":"1-based page."},"required":false,"description":"1-based page.","name":"page","in":"query"}],"responses":{"200":{"description":"One page of the Webhook's deliveries, newest first, filtered by status, event type and search","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/webhooks/{webhookId}/deliveries/{deliveryId}":{"get":{"tags":["Webhooks"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Webhook's id."},"required":true,"description":"The Webhook's id.","name":"webhookId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Webhook delivery's id."},"required":true,"description":"The Webhook delivery's id.","name":"deliveryId","in":"path"}],"responses":{"200":{"description":"The delivery's attempts, newest first, and its payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryDetail"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/webhooks/{webhookId}/deliveries/{deliveryId}/retry":{"post":{"tags":["Webhooks"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Webhook's id."},"required":true,"description":"The Webhook's id.","name":"webhookId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Webhook delivery's id."},"required":true,"description":"The Webhook delivery's id.","name":"deliveryId","in":"path"}],"responses":{"202":{"description":"Queued for one manual send, right away, as the same delivery"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/style-guides/extract":{"post":{"tags":["Style guides"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StyleGuideExtractCreate"}}}},"responses":{"200":{"description":"The colours, fonts and corner style read off the website. Nothing is saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StyleGuideExtract"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/legal-documents":{"get":{"tags":["Legal documents"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","default":"","description":"Only the Legal texts whose name matches every whitespace-separated term."},"required":false,"description":"Only the Legal texts whose name matches every whitespace-separated term.","name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"default":1,"description":"The 1-based page."},"required":false,"description":"The 1-based page.","name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Legal texts per page."},"required":false,"description":"Legal texts per page.","name":"pageSize","in":"query"},{"schema":{"type":"string","enum":["name.asc","name.desc","kind.asc","kind.desc","updated_at.asc","updated_at.desc"],"default":"updated_at.desc","description":"The order, as <key>.<asc|desc>: name, kind or updated_at."},"required":false,"description":"The order, as <key>.<asc|desc>: name, kind or updated_at.","name":"sort","in":"query"},{"schema":{"type":"string","enum":["all","IMPRINT","PRIVACY"],"default":"all","description":"Only the Legal texts of this kind; all shows both."},"required":false,"description":"Only the Legal texts of this kind; all shows both.","name":"kind","in":"query"}],"responses":{"200":{"description":"One page of the organization's legal texts, with how many Landing pages show each","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegalDocumentList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/references":{"get":{"tags":["References"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","default":"","description":"Only the Referenzen where every whitespace-separated term matches the title, city, postal code or a service."},"required":false,"description":"Only the Referenzen where every whitespace-separated term matches the title, city, postal code or a service.","name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"default":1,"description":"The 1-based page."},"required":false,"description":"The 1-based page.","name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Referenzen per page."},"required":false,"description":"Referenzen per page.","name":"pageSize","in":"query"},{"schema":{"type":"string","enum":["title.asc","title.desc","city.asc","city.desc","completed_on.asc","completed_on.desc"],"default":"completed_on.desc","description":"The order, as <key>.<asc|desc>: title, city or completed_on."},"required":false,"description":"The order, as <key>.<asc|desc>: title, city or completed_on.","name":"sort","in":"query"},{"schema":{"type":"string","enum":["active","draft","published","archived","all"],"default":"active","description":"Only the Referenzen with this Referenz status; active is draft and published together, all every one."},"required":false,"description":"Only the Referenzen with this Referenz status; active is draft and published together, all every one.","name":"status","in":"query"}],"responses":{"200":{"description":"One page of the organization's Referenzen, with each one's cover, photo count and what publishing still needs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["References"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceCreate"}}}},"responses":{"201":{"description":"The new draft","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reference"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/references/{referenceId}":{"get":{"tags":["References"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Referenz's id."},"required":true,"description":"The Referenz's id.","name":"referenceId","in":"path"}],"responses":{"200":{"description":"The Referenz with its photos in order, the cover first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reference"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["References"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Referenz's id."},"required":true,"description":"The Referenz's id.","name":"referenceId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferencePatch"}}}},"responses":{"200":{"description":"The Referenz after saving the content fields in the request. A Member may change drafts only. A lead to link must be an unsold lead of the organization that the caller sees, else 404 lead_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reference"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["References"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Referenz's id."},"required":true,"description":"The Referenz's id.","name":"referenceId","in":"path"}],"responses":{"204":{"description":"The Referenz and its photo rows are gone; the photos stay in Medien. Owner only"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/references/{referenceId}/publish":{"post":{"tags":["References"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Referenz's id."},"required":true,"description":"The Referenz's id.","name":"referenceId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferencePublish"}}}},"responses":{"200":{"description":"The published Referenz, with who confirmed the customer's consent and when. Owner only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reference"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"What the Referenz still needs: a title, a city, a photo, the consent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferencePublishProblem"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/references/{referenceId}/archive":{"post":{"tags":["References"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Referenz's id."},"required":true,"description":"The Referenz's id.","name":"referenceId","in":"path"}],"responses":{"200":{"description":"The archived Referenz, no longer shown anywhere. Owner only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reference"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/references/{referenceId}/unpublish":{"post":{"tags":["References"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Referenz's id."},"required":true,"description":"The Referenz's id.","name":"referenceId","in":"path"}],"responses":{"200":{"description":"The Referenz back as a draft, from published or archived. Owner only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reference"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/references/{referenceId}/revoke-consent":{"post":{"tags":["References"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Referenz's id."},"required":true,"description":"The Referenz's id.","name":"referenceId","in":"path"}],"responses":{"200":{"description":"The Referenz with the customer's consent revoked; a published one is archived at once. Every Member may revoke","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reference"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/references/{referenceId}/photos":{"post":{"tags":["References"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Referenz's id."},"required":true,"description":"The Referenz's id.","name":"referenceId","in":"path"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"The photo to add to the Referenz."}},"required":["file"]}}}},"responses":{"201":{"description":"The photo, appended to the Referenz without its metadata, and the PLZ, Ort and completion month it suggests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferencePhotoUploadResult"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/references/{referenceId}/photos/order":{"put":{"tags":["References"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Referenz's id."},"required":true,"description":"The Referenz's id.","name":"referenceId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferencePhotoOrder"}}}},"responses":{"200":{"description":"The Referenz with its photos in the new order; the first is the cover","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reference"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/references/{referenceId}/photos/{assetId}":{"patch":{"tags":["References"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Referenz's id."},"required":true,"description":"The Referenz's id.","name":"referenceId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The photo's asset id."},"required":true,"description":"The photo's asset id.","name":"assetId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferencePhotoPatch"}}}},"responses":{"200":{"description":"The Referenz with the photo saying what it shows: before, during or after the job, or a detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reference"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["References"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Referenz's id."},"required":true,"description":"The Referenz's id.","name":"referenceId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The photo's asset id."},"required":true,"description":"The photo's asset id.","name":"assetId","in":"path"}],"responses":{"200":{"description":"The Referenz without the photo; the next photo moves up. The image stays in Medien","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reference"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/billing/checkout":{"post":{"tags":["Billing"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionCheckoutInput"}}}},"responses":{"200":{"description":"A Stripe Checkout session for the chosen plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCheckoutUrl"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The organization already has an active subscription","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why no checkout opened: the Organization already has an active Subscription."}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/billing/credits-checkout":{"post":{"tags":["Billing"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermanentCreditsCheckoutInput"}}}},"responses":{"200":{"description":"A Stripe Checkout session for permanent Twilio credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCheckoutUrl"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/billing/plan":{"post":{"tags":["Billing"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanChangeInput"}}}},"responses":{"200":{"description":"The subscription was moved onto the chosen plan","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Confirms the Subscription moved onto the Plan."}},"required":["message"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Billing details must be completed before changing plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingDetailsRequired"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/billing/trial":{"post":{"tags":["Billing"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartTrialInput"}}}},"responses":{"200":{"description":"The trial subscription, newly created or already present","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartTrialResult"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/billing/portal":{"post":{"tags":["Billing"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"responses":{"200":{"description":"A Stripe billing-portal session for the org's customer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPortalSession"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/billing/addons/{addonName}/pricing":{"get":{"tags":["Billing"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","minLength":1,"description":"The add-on's name."},"required":true,"description":"The add-on's name.","name":"addonName","in":"path"}],"responses":{"200":{"description":"Live unit prices for the addon, in major currency units","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantityAddonPricing"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/billing/cancellation":{"post":{"tags":["Billing"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"responses":{"200":{"description":"The subscription will end when the paid period does","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"The Subscription will end when the paid period does."}},"required":["success"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/billing/subscription":{"get":{"tags":["Billing"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"responses":{"200":{"description":"The organization's current plan, expanded from Stripe","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDetail"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/entitlements":{"get":{"tags":["Billing"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"responses":{"200":{"description":"What the organization's plan unlocks, and its trial end while it trials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Entitlements"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/training/cases":{"get":{"tags":["Training"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","default":false,"description":"Whether to include archived training cases."},"required":false,"description":"Whether to include archived training cases.","name":"includeArchived","in":"query"}],"responses":{"200":{"description":"The available training cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingCases"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Training"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingCaseInput"}}}},"responses":{"201":{"description":"The created training case","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingCase"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/training/cases/{id}":{"get":{"tags":["Training"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","minLength":1,"description":"The training case's id: a slug for a built-in case, a uuid for an authored one."},"required":true,"description":"The training case's id: a slug for a built-in case, a uuid for an authored one.","name":"id","in":"path"}],"responses":{"200":{"description":"A single training case, global or org-authored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingCase"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["Training"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The authored training case's id."},"required":true,"description":"The authored training case's id.","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingCaseUpdate"}}}},"responses":{"200":{"description":"The updated training case","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingCase"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/training/personas":{"get":{"tags":["Training"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"responses":{"200":{"description":"The available training personas","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingPersonas"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/training/session":{"post":{"tags":["Training"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingSessionBody"}}}},"responses":{"200":{"description":"A short-lived ElevenLabs conversation token plus the agent prompt built from the selected case/persona","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingSession"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/training/calls":{"get":{"tags":["Training"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"How many training calls to return."},"required":false,"description":"How many training calls to return.","name":"limit","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"default":0,"description":"How many training calls to skip."},"required":false,"description":"How many training calls to skip.","name":"offset","in":"query"},{"schema":{"type":"string","enum":["pending","processing","ready","failed","abandoned"],"description":"Only training calls with this status."},"required":false,"description":"Only training calls with this status.","name":"status","in":"query"},{"schema":{"type":"string","description":"Text to match against the training case and persona names."},"required":false,"description":"Text to match against the training case and persona names.","name":"q","in":"query"}],"responses":{"200":{"description":"The caller's training calls in the organization, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingCallList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/training/calls/{id}":{"get":{"tags":["Training"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The training call's id."},"required":true,"description":"The training call's id.","name":"id","in":"path"}],"responses":{"200":{"description":"A single training call, including transcript and analysis","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingCall"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/training/calls/{id}/recording":{"get":{"tags":["Training"],"parameters":[{"schema":{"type":"string","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The training call's id."},"required":true,"description":"The training call's id.","name":"id","in":"path"}],"responses":{"200":{"description":"The training call's recording (mp3)","content":{"audio/mpeg":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"502":{"description":"Bad gateway","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/public/templates":{"get":{"tags":["Templates"],"responses":{"200":{"description":"Global new-landing-page templates available for the public showcase","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ShowcaseTemplate"}}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/public/funnel/{id}":{"get":{"tags":["Funnel"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The id of the Funnel."},"required":true,"description":"The id of the Funnel.","name":"id","in":"path"},{"schema":{"type":"string","enum":["true","false"],"description":"`true` serves the Draft instead of the Published version."},"required":false,"description":"`true` serves the Draft instead of the Published version.","name":"preview","in":"query"},{"schema":{"type":"string","description":"The preview token a preview needs."},"required":false,"description":"The preview token a preview needs.","name":"token","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"`true` serves the Funnel without assigning a Test variant."},"required":false,"description":"`true` serves the Funnel without assigning a Test variant.","name":"embed","in":"query"}],"responses":{"200":{"description":"Funnel found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicFunnel"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/public/funnel/{id}/submit":{"post":{"tags":["Funnel"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The id of the Funnel."},"required":true,"description":"The id of the Funnel.","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelSubmitBody"}}}},"responses":{"200":{"description":"Lead updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelSubmitResponse"}}}},"201":{"description":"Lead created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelSubmitResponse"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelSubmitErrorWithData"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Funnel or schema missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelSubmitErrorWithData"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelSubmitErrorWithData"}}}}}}},"/api/v2/public/funnel/{id}/upload":{"post":{"tags":["Funnel"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The id of the Funnel."},"required":true,"description":"The id of the Funnel.","name":"id","in":"path"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","description":"The file. The server checks its type against its content, and its size.","format":"binary"},"blockId":{"type":"string","minLength":1,"description":"The id of the file Block the file belongs to."}},"required":["file","blockId"]}}}},"responses":{"201":{"description":"File uploaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelUploadResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/public/funnel/{id}/analytics":{"post":{"tags":["Funnel"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The id of the Funnel."},"required":true,"description":"The id of the Funnel.","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelAnalyticsBatch"}}}},"responses":{"200":{"description":"Events received. `0` for bots and for a funnel without an organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelAnalyticsResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/public/funnel/{id}/ai-stream":{"post":{"tags":["Funnel"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The id of the Funnel."},"required":true,"description":"The id of the Funnel.","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelAiStreamBody"}}}},"responses":{"200":{"description":"Streamed plain-text completion from the model","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/public/funnel/{id}/verification/channels":{"post":{"tags":["Funnel"],"deprecated":false,"parameters":[{"schema":{"type":"string","format":"uuid","description":"The id of the Funnel."},"required":true,"description":"The id of the Funnel.","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"lead_id":{"type":"string","description":"The Lead's id, as the submission answered it."},"update_token":{"type":"string","minLength":1,"description":"The update token the submission answered with, which proves the caller submitted the Lead."}},"required":["lead_id","update_token"]}}}},"responses":{"200":{"description":"Verification channels available to the lead","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadVerificationChannelsResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/public/funnel/{id}/verification/send":{"post":{"tags":["Funnel"],"deprecated":false,"parameters":[{"schema":{"type":"string","format":"uuid","description":"The id of the Funnel."},"required":true,"description":"The id of the Funnel.","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"lead_id":{"type":"string","description":"The Lead's id, as the submission answered it."},"update_token":{"type":"string","minLength":1,"description":"The update token the submission answered with, which proves the caller submitted the Lead."},"channel":{"type":"string","enum":["email","sms"],"description":"A Lead verification channel: email sends the code to the Lead's email address, sms to their phone number."}},"required":["lead_id","update_token","channel"]}}}},"responses":{"200":{"description":"Verification code sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadVerificationSendResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/public/funnel/{id}/verification/check":{"post":{"tags":["Funnel"],"deprecated":false,"parameters":[{"schema":{"type":"string","format":"uuid","description":"The id of the Funnel."},"required":true,"description":"The id of the Funnel.","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"lead_id":{"type":"string","description":"The Lead's id, as the submission answered it."},"update_token":{"type":"string","minLength":1,"description":"The update token the submission answered with, which proves the caller submitted the Lead."},"channel":{"type":"string","enum":["email","sms"],"description":"A Lead verification channel: email sends the code to the Lead's email address, sms to their phone number."},"code":{"type":"string","minLength":1,"maxLength":16,"description":"The code the Lead entered, as they received it."}},"required":["lead_id","update_token","channel","code"]}}}},"responses":{"200":{"description":"Contact field verified","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadVerificationCheckResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/public/funnel/{id}/mfa/channels":{"post":{"tags":["Funnel"],"deprecated":true,"parameters":[{"schema":{"type":"string","format":"uuid","description":"The id of the Funnel."},"required":true,"description":"The id of the Funnel.","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"lead_id":{"type":"string","description":"The Lead's id, as the submission answered it."},"update_token":{"type":"string","minLength":1,"description":"The update token the submission answered with, which proves the caller submitted the Lead."}},"required":["lead_id","update_token"]}}}},"responses":{"200":{"description":"Verification channels available to the lead","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadVerificationChannelsResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/public/funnel/{id}/mfa/send":{"post":{"tags":["Funnel"],"deprecated":true,"parameters":[{"schema":{"type":"string","format":"uuid","description":"The id of the Funnel."},"required":true,"description":"The id of the Funnel.","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"lead_id":{"type":"string","description":"The Lead's id, as the submission answered it."},"update_token":{"type":"string","minLength":1,"description":"The update token the submission answered with, which proves the caller submitted the Lead."},"channel":{"type":"string","enum":["email","sms"],"description":"A Lead verification channel: email sends the code to the Lead's email address, sms to their phone number."}},"required":["lead_id","update_token","channel"]}}}},"responses":{"200":{"description":"Verification code sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadVerificationSendResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/public/funnel/{id}/mfa/check":{"post":{"tags":["Funnel"],"deprecated":true,"parameters":[{"schema":{"type":"string","format":"uuid","description":"The id of the Funnel."},"required":true,"description":"The id of the Funnel.","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"lead_id":{"type":"string","description":"The Lead's id, as the submission answered it."},"update_token":{"type":"string","minLength":1,"description":"The update token the submission answered with, which proves the caller submitted the Lead."},"channel":{"type":"string","enum":["email","sms"],"description":"A Lead verification channel: email sends the code to the Lead's email address, sms to their phone number."},"code":{"type":"string","minLength":1,"maxLength":16,"description":"The code the Lead entered, as they received it."}},"required":["lead_id","update_token","channel","code"]}}}},"responses":{"200":{"description":"Contact field verified","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadVerificationCheckResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/public/funnel/{id}/booking/slots":{"get":{"tags":["Funnel"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The id of the Funnel."},"required":true,"description":"The id of the Funnel.","name":"id","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The event type's id."},"required":true,"description":"The event type's id.","name":"event_type_id","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Where the window starts, included: an ISO instant in UTC."},"required":true,"description":"Where the window starts, included: an ISO instant in UTC.","name":"from","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Where the window ends, excluded: an ISO instant in UTC."},"required":true,"description":"Where the window ends, excluded: an ISO instant in UTC.","name":"to","in":"query"},{"schema":{"type":"integer","minimum":5,"maximum":720,"description":"The duration option the slots are for, in minutes, one of the event type's. Left out, the first."},"required":false,"description":"The duration option the slots are for, in minutes, one of the event type's. Left out, the first.","name":"duration_minutes","in":"query"}],"responses":{"200":{"description":"Bookable start times in the window","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingSlots"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/public/funnel/{id}/booking":{"post":{"tags":["Funnel"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The id of the Funnel."},"required":true,"description":"The id of the Funnel.","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"lead_id":{"type":"string","format":"uuid","description":"The lead's id, from their submission."},"update_token":{"type":"string","minLength":1,"description":"The lead's update token, from their submission."},"event_type_id":{"type":"string","format":"uuid","description":"The event type's id."},"start_at":{"type":"string","format":"date-time","description":"The slot's start: one of the starts the slots route answered."},"duration_minutes":{"type":"integer","minimum":5,"maximum":720,"description":"The duration option the lead picked, in minutes, one of the event type's. Left out, the first."},"lead_timezone":{"type":"string","description":"The lead's IANA time zone, which their emails use."}},"required":["lead_id","update_token","event_type_id","start_at","lead_timezone"]}}}},"responses":{"200":{"description":"The lead already booked this exact slot; that booking is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}}},"201":{"description":"Booking created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/public/landing-page/{id}/analytics":{"post":{"tags":["Landing Page"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The id of the Landing page."},"required":true,"description":"The id of the Landing page.","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandingPageAnalyticsBatch"}}}},"responses":{"200":{"description":"Events received. `0` for bots, for missing or unpublished pages, and for a Website's Pages.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandingPageAnalyticsResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/public/attribution/handoff":{"post":{"tags":["Attribution"],"responses":{"200":{"description":"Signed handoff token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributionHandoffResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/public/booking/manage":{"get":{"tags":["Booking"],"parameters":[{"schema":{"type":"string","minLength":1,"description":"The signed token from the lead's manage link."},"required":true,"description":"The signed token from the lead's manage link.","name":"token","in":"query"}],"responses":{"200":{"description":"The booking the manage link names","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedBooking"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/public/booking/manage/slots":{"get":{"tags":["Booking"],"parameters":[{"schema":{"type":"string","minLength":1,"description":"The signed token from the lead's manage link."},"required":true,"description":"The signed token from the lead's manage link.","name":"token","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Where the window starts, included: an ISO instant in UTC."},"required":true,"description":"Where the window starts, included: an ISO instant in UTC.","name":"from","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Where the window ends, excluded: an ISO instant in UTC."},"required":true,"description":"Where the window ends, excluded: an ISO instant in UTC.","name":"to","in":"query"}],"responses":{"200":{"description":"Start times the booking can move to, its own time included","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedBookingSlots"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/public/booking/manage/cancel":{"post":{"tags":["Booking"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":1,"description":"The signed token from the lead's manage link."},"reason":{"type":"string","nullable":true,"maxLength":500,"description":"Why the lead cancels. The host reads it in their email. Left out or null gives none."}},"required":["token"]}}}},"responses":{"200":{"description":"The booking, now cancelled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedBooking"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/public/booking/manage/reschedule":{"post":{"tags":["Booking"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":1,"description":"The signed token from the lead's manage link."},"start_at":{"type":"string","format":"date-time","description":"The new start: one of the starts the manage slots route answered."},"lead_timezone":{"type":"string","description":"The lead's IANA time zone, which their emails use."}},"required":["token","start_at","lead_timezone"]}}}},"responses":{"200":{"description":"The booking already starts at this time; it is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedBooking"}}}},"201":{"description":"The new booking that replaces the old one","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedBooking"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/assets/alt-text":{"post":{"tags":["Assets"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string","format":"uuid","description":"The image in the organization's asset library to describe."},"language":{"type":"string","enum":["de","en"],"default":"de","description":"The language to write the alt text in."}},"required":["assetId"],"additionalProperties":false}},"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"The image to write alt text for."},"language":{"type":"string","enum":["de","en"],"default":"de","description":"The language to write the alt text in."}},"required":["file"]}}}},"responses":{"200":{"description":"The generated alt text, ready to drop into the input","content":{"application/json":{"schema":{"type":"object","properties":{"altText":{"type":"string","description":"The generated alt text."}},"required":["altText"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/asset-generations":{"post":{"tags":["Asset generations"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000,"description":"What the image should show. Sent to the model as-is."},"type":{"type":"string","enum":["image"],"description":"The kind of Asset to generate."},"size":{"type":"object","properties":{"width":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":3840,"description":"The image's width in pixels."},"height":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":3840,"description":"The image's height in pixels."}},"required":["width","height"],"description":"The pixel size of the image to generate."}},"required":["prompt","type","size"]}}}},"responses":{"202":{"description":"The queued asset generation; poll it until it is done or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetGenerationCreated"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"get":{"tags":["Asset generations"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"responses":{"200":{"description":"The organization's recent asset generations, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetGenerationList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/asset-generations/{id}":{"get":{"tags":["Asset generations"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Asset generation's id."},"required":true,"description":"The Asset generation's id.","name":"id","in":"path"}],"responses":{"200":{"description":"The asset generation, with the new asset once it is done","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetGenerationJob"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/code/format":{"post":{"tags":["Code"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The code to format."},"language":{"type":"string","enum":["html","css","liquid"],"description":"The code's language; liquid is HTML with Liquid tags, as the Custom HTML Block stores it."}},"required":["code","language"],"additionalProperties":false}}}},"responses":{"200":{"description":"The code, formatted with Prettier","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The formatted code."}},"required":["code"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/funnels/{funnelId}/analytics/overview":{"get":{"tags":["Funnel analytics"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Funnel's id."},"required":true,"description":"The Funnel's id.","name":"funnelId","in":"path"},{"schema":{"type":"string","enum":["today","yesterday","7d","30d","90d","all","custom"],"default":"30d","description":"Time window: today, yesterday, last 7/30/90 days, all time, or custom with from and to, in the organization's timezone."},"required":false,"description":"Time window: today, yesterday, last 7/30/90 days, all time, or custom with from and to, in the organization's timezone.","name":"range","in":"query"},{"schema":{"type":"string","format":"date","description":"Start of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive. Must be paired with to."},"required":false,"description":"Start of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive. Must be paired with to.","name":"from","in":"query"},{"schema":{"type":"string","format":"date","description":"End of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive. Must be paired with from."},"required":false,"description":"End of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive. Must be paired with from.","name":"to","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_source."},"required":false,"description":"Filter to this utm_source.","name":"utmSource","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_medium."},"required":false,"description":"Filter to this utm_medium.","name":"utmMedium","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_campaign."},"required":false,"description":"Filter to this utm_campaign.","name":"utmCampaign","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_term."},"required":false,"description":"Filter to this utm_term.","name":"utmTerm","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_content."},"required":false,"description":"Filter to this utm_content.","name":"utmContent","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this referrer host, as shown in the referrers breakdown (e.g. 'google.com' or '(direct)')."},"required":false,"description":"Filter to this referrer host, as shown in the referrers breakdown (e.g. 'google.com' or '(direct)').","name":"referrer","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop"],"description":"Filter to this device type."},"required":false,"description":"Filter to this device type.","name":"deviceType","in":"query"},{"schema":{"type":"string","enum":["chrome","firefox","safari","edge","opera","samsung","other"],"description":"Filter to this browser."},"required":false,"description":"Filter to this browser.","name":"browser","in":"query"},{"schema":{"type":"string","enum":["ios","android","macos","windows","linux","other"],"description":"Filter to this OS."},"required":false,"description":"Filter to this OS.","name":"os","in":"query"}],"responses":{"200":{"description":"Headline totals (starts, completions, conversion rate) and the device split","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelAnalyticsOverview"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/funnels/{funnelId}/analytics/steps":{"get":{"tags":["Funnel analytics"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Funnel's id."},"required":true,"description":"The Funnel's id.","name":"funnelId","in":"path"},{"schema":{"type":"string","enum":["today","yesterday","7d","30d","90d","all","custom"],"default":"30d","description":"Time window: today, yesterday, last 7/30/90 days, all time, or custom with from and to, in the organization's timezone."},"required":false,"description":"Time window: today, yesterday, last 7/30/90 days, all time, or custom with from and to, in the organization's timezone.","name":"range","in":"query"},{"schema":{"type":"string","format":"date","description":"Start of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive. Must be paired with to."},"required":false,"description":"Start of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive. Must be paired with to.","name":"from","in":"query"},{"schema":{"type":"string","format":"date","description":"End of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive. Must be paired with from."},"required":false,"description":"End of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive. Must be paired with from.","name":"to","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_source."},"required":false,"description":"Filter to this utm_source.","name":"utmSource","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_medium."},"required":false,"description":"Filter to this utm_medium.","name":"utmMedium","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_campaign."},"required":false,"description":"Filter to this utm_campaign.","name":"utmCampaign","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_term."},"required":false,"description":"Filter to this utm_term.","name":"utmTerm","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_content."},"required":false,"description":"Filter to this utm_content.","name":"utmContent","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this referrer host, as shown in the referrers breakdown (e.g. 'google.com' or '(direct)')."},"required":false,"description":"Filter to this referrer host, as shown in the referrers breakdown (e.g. 'google.com' or '(direct)').","name":"referrer","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop"],"description":"Filter to this device type."},"required":false,"description":"Filter to this device type.","name":"deviceType","in":"query"},{"schema":{"type":"string","enum":["chrome","firefox","safari","edge","opera","samsung","other"],"description":"Filter to this browser."},"required":false,"description":"Filter to this browser.","name":"browser","in":"query"},{"schema":{"type":"string","enum":["ios","android","macos","windows","linux","other"],"description":"Filter to this OS."},"required":false,"description":"Filter to this OS.","name":"os","in":"query"}],"responses":{"200":{"description":"Per-step drop-off and outbound branching routes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelAnalyticsSteps"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/funnels/{funnelId}/analytics/acquisition":{"get":{"tags":["Funnel analytics"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Funnel's id."},"required":true,"description":"The Funnel's id.","name":"funnelId","in":"path"},{"schema":{"type":"string","enum":["today","yesterday","7d","30d","90d","all","custom"],"default":"30d","description":"Time window: today, yesterday, last 7/30/90 days, all time, or custom with from and to, in the organization's timezone."},"required":false,"description":"Time window: today, yesterday, last 7/30/90 days, all time, or custom with from and to, in the organization's timezone.","name":"range","in":"query"},{"schema":{"type":"string","format":"date","description":"Start of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive. Must be paired with to."},"required":false,"description":"Start of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive. Must be paired with to.","name":"from","in":"query"},{"schema":{"type":"string","format":"date","description":"End of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive. Must be paired with from."},"required":false,"description":"End of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive. Must be paired with from.","name":"to","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_source."},"required":false,"description":"Filter to this utm_source.","name":"utmSource","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_medium."},"required":false,"description":"Filter to this utm_medium.","name":"utmMedium","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_campaign."},"required":false,"description":"Filter to this utm_campaign.","name":"utmCampaign","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_term."},"required":false,"description":"Filter to this utm_term.","name":"utmTerm","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_content."},"required":false,"description":"Filter to this utm_content.","name":"utmContent","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this referrer host, as shown in the referrers breakdown (e.g. 'google.com' or '(direct)')."},"required":false,"description":"Filter to this referrer host, as shown in the referrers breakdown (e.g. 'google.com' or '(direct)').","name":"referrer","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop"],"description":"Filter to this device type."},"required":false,"description":"Filter to this device type.","name":"deviceType","in":"query"},{"schema":{"type":"string","enum":["chrome","firefox","safari","edge","opera","samsung","other"],"description":"Filter to this browser."},"required":false,"description":"Filter to this browser.","name":"browser","in":"query"},{"schema":{"type":"string","enum":["ios","android","macos","windows","linux","other"],"description":"Filter to this OS."},"required":false,"description":"Filter to this OS.","name":"os","in":"query"}],"responses":{"200":{"description":"When sessions arrive and where they come from: activity hours, browser / OS breakdowns, top referrers, and UTM dimensions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelAnalyticsAcquisition"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/funnels/{funnelId}/analytics/answers":{"get":{"tags":["Funnel analytics"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Funnel's id."},"required":true,"description":"The Funnel's id.","name":"funnelId","in":"path"},{"schema":{"type":"string","enum":["today","yesterday","7d","30d","90d","all","custom"],"default":"30d","description":"Time window: today, yesterday, last 7/30/90 days, all time, or custom with from and to, in the organization's timezone."},"required":false,"description":"Time window: today, yesterday, last 7/30/90 days, all time, or custom with from and to, in the organization's timezone.","name":"range","in":"query"},{"schema":{"type":"string","format":"date","description":"Start of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive. Must be paired with to."},"required":false,"description":"Start of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive. Must be paired with to.","name":"from","in":"query"},{"schema":{"type":"string","format":"date","description":"End of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive. Must be paired with from."},"required":false,"description":"End of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive. Must be paired with from.","name":"to","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_source."},"required":false,"description":"Filter to this utm_source.","name":"utmSource","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_medium."},"required":false,"description":"Filter to this utm_medium.","name":"utmMedium","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_campaign."},"required":false,"description":"Filter to this utm_campaign.","name":"utmCampaign","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_term."},"required":false,"description":"Filter to this utm_term.","name":"utmTerm","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_content."},"required":false,"description":"Filter to this utm_content.","name":"utmContent","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this referrer host, as shown in the referrers breakdown (e.g. 'google.com' or '(direct)')."},"required":false,"description":"Filter to this referrer host, as shown in the referrers breakdown (e.g. 'google.com' or '(direct)').","name":"referrer","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop"],"description":"Filter to this device type."},"required":false,"description":"Filter to this device type.","name":"deviceType","in":"query"},{"schema":{"type":"string","enum":["chrome","firefox","safari","edge","opera","samsung","other"],"description":"Filter to this browser."},"required":false,"description":"Filter to this browser.","name":"browser","in":"query"},{"schema":{"type":"string","enum":["ios","android","macos","windows","linux","other"],"description":"Filter to this OS."},"required":false,"description":"Filter to this OS.","name":"os","in":"query"}],"responses":{"200":{"description":"Distribution of submitted answers per form field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelAnalyticsAnswers"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/funnels/{funnelId}/analytics/timeseries":{"get":{"tags":["Funnel analytics"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Funnel's id."},"required":true,"description":"The Funnel's id.","name":"funnelId","in":"path"},{"schema":{"type":"string","enum":["today","yesterday","7d","30d","90d","all","custom"],"default":"30d","description":"Time window: today, yesterday, last 7/30/90 days, all time, or custom with from and to, in the organization's timezone."},"required":false,"description":"Time window: today, yesterday, last 7/30/90 days, all time, or custom with from and to, in the organization's timezone.","name":"range","in":"query"},{"schema":{"type":"string","format":"date","description":"Start of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive. Must be paired with to."},"required":false,"description":"Start of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive. Must be paired with to.","name":"from","in":"query"},{"schema":{"type":"string","format":"date","description":"End of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive. Must be paired with from."},"required":false,"description":"End of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive. Must be paired with from.","name":"to","in":"query"},{"schema":{"type":"string","enum":["hour","day","week"],"default":"day","description":"Bucket size for the series."},"required":false,"description":"Bucket size for the series.","name":"granularity","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Window start as an ISO datetime. Pair with until to zoom a span; it replaces the preset window."},"required":false,"description":"Window start as an ISO datetime. Pair with until to zoom a span; it replaces the preset window.","name":"since","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Window end as an ISO datetime, after since. Pair with since to zoom a span."},"required":false,"description":"Window end as an ISO datetime, after since. Pair with since to zoom a span.","name":"until","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_source."},"required":false,"description":"Filter to this utm_source.","name":"utmSource","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_medium."},"required":false,"description":"Filter to this utm_medium.","name":"utmMedium","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_campaign."},"required":false,"description":"Filter to this utm_campaign.","name":"utmCampaign","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_term."},"required":false,"description":"Filter to this utm_term.","name":"utmTerm","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_content."},"required":false,"description":"Filter to this utm_content.","name":"utmContent","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this referrer host, as shown in the referrers breakdown (e.g. 'google.com' or '(direct)')."},"required":false,"description":"Filter to this referrer host, as shown in the referrers breakdown (e.g. 'google.com' or '(direct)').","name":"referrer","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop"],"description":"Filter to this device type."},"required":false,"description":"Filter to this device type.","name":"deviceType","in":"query"},{"schema":{"type":"string","enum":["chrome","firefox","safari","edge","opera","samsung","other"],"description":"Filter to this browser."},"required":false,"description":"Filter to this browser.","name":"browser","in":"query"},{"schema":{"type":"string","enum":["ios","android","macos","windows","linux","other"],"description":"Filter to this OS."},"required":false,"description":"Filter to this OS.","name":"os","in":"query"}],"responses":{"200":{"description":"Starts and completions bucketed over time (hour / day / week)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelAnalyticsTimeseries"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/landing-pages/{pageId}/analytics/overview":{"get":{"tags":["Landing page analytics"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Landing page's id."},"required":true,"description":"The Landing page's id.","name":"pageId","in":"path"},{"schema":{"type":"string","enum":["today","yesterday","7d","30d","90d","all","custom"],"default":"30d","description":"Time window: today, yesterday, last 7/30/90 days, all time, or custom with from and to, in the organization's timezone."},"required":false,"description":"Time window: today, yesterday, last 7/30/90 days, all time, or custom with from and to, in the organization's timezone.","name":"range","in":"query"},{"schema":{"type":"string","format":"date","description":"Start of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive. Must be paired with to."},"required":false,"description":"Start of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive. Must be paired with to.","name":"from","in":"query"},{"schema":{"type":"string","format":"date","description":"End of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive: the whole day is counted. Must be paired with from."},"required":false,"description":"End of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive: the whole day is counted. Must be paired with from.","name":"to","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_source."},"required":false,"description":"Filter to this utm_source.","name":"utmSource","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_medium."},"required":false,"description":"Filter to this utm_medium.","name":"utmMedium","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_campaign."},"required":false,"description":"Filter to this utm_campaign.","name":"utmCampaign","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_term."},"required":false,"description":"Filter to this utm_term.","name":"utmTerm","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_content."},"required":false,"description":"Filter to this utm_content.","name":"utmContent","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this referrer host, as shown in the referrers breakdown (e.g. 'google.com' or '(direct)')."},"required":false,"description":"Filter to this referrer host, as shown in the referrers breakdown (e.g. 'google.com' or '(direct)').","name":"referrer","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop"],"description":"Filter to this device type."},"required":false,"description":"Filter to this device type.","name":"deviceType","in":"query"},{"schema":{"type":"string","enum":["chrome","firefox","safari","edge","opera","samsung","other"],"description":"Filter to this browser."},"required":false,"description":"Filter to this browser.","name":"browser","in":"query"},{"schema":{"type":"string","enum":["ios","android","macos","windows","linux","other"],"description":"Filter to this OS."},"required":false,"description":"Filter to this OS.","name":"os","in":"query"},{"schema":{"anyOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"string","enum":["(unbekannt)"]}],"description":"Filter to this country, as an upper-case ISO 3166-1 alpha-2 code (e.g. 'DE'), or '(unbekannt)' for visits without one."},"required":false,"description":"Filter to this country, as an upper-case ISO 3166-1 alpha-2 code (e.g. 'DE'), or '(unbekannt)' for visits without one.","name":"country","in":"query"}],"responses":{"200":{"description":"Visitors, visits, pageviews, bounce rate, duration and conversions, with the same metrics for the previous period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandingPageAnalyticsOverview"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/landing-pages/{pageId}/analytics/acquisition":{"get":{"tags":["Landing page analytics"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Landing page's id."},"required":true,"description":"The Landing page's id.","name":"pageId","in":"path"},{"schema":{"type":"string","enum":["today","yesterday","7d","30d","90d","all","custom"],"default":"30d","description":"Time window: today, yesterday, last 7/30/90 days, all time, or custom with from and to, in the organization's timezone."},"required":false,"description":"Time window: today, yesterday, last 7/30/90 days, all time, or custom with from and to, in the organization's timezone.","name":"range","in":"query"},{"schema":{"type":"string","format":"date","description":"Start of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive. Must be paired with to."},"required":false,"description":"Start of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive. Must be paired with to.","name":"from","in":"query"},{"schema":{"type":"string","format":"date","description":"End of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive: the whole day is counted. Must be paired with from."},"required":false,"description":"End of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive: the whole day is counted. Must be paired with from.","name":"to","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_source."},"required":false,"description":"Filter to this utm_source.","name":"utmSource","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_medium."},"required":false,"description":"Filter to this utm_medium.","name":"utmMedium","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_campaign."},"required":false,"description":"Filter to this utm_campaign.","name":"utmCampaign","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_term."},"required":false,"description":"Filter to this utm_term.","name":"utmTerm","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_content."},"required":false,"description":"Filter to this utm_content.","name":"utmContent","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this referrer host, as shown in the referrers breakdown (e.g. 'google.com' or '(direct)')."},"required":false,"description":"Filter to this referrer host, as shown in the referrers breakdown (e.g. 'google.com' or '(direct)').","name":"referrer","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop"],"description":"Filter to this device type."},"required":false,"description":"Filter to this device type.","name":"deviceType","in":"query"},{"schema":{"type":"string","enum":["chrome","firefox","safari","edge","opera","samsung","other"],"description":"Filter to this browser."},"required":false,"description":"Filter to this browser.","name":"browser","in":"query"},{"schema":{"type":"string","enum":["ios","android","macos","windows","linux","other"],"description":"Filter to this OS."},"required":false,"description":"Filter to this OS.","name":"os","in":"query"},{"schema":{"anyOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"string","enum":["(unbekannt)"]}],"description":"Filter to this country, as an upper-case ISO 3166-1 alpha-2 code (e.g. 'DE'), or '(unbekannt)' for visits without one."},"required":false,"description":"Filter to this country, as an upper-case ISO 3166-1 alpha-2 code (e.g. 'DE'), or '(unbekannt)' for visits without one.","name":"country","in":"query"}],"responses":{"200":{"description":"Where visits come from: referrers, UTM dimensions, countries, devices, browsers, operating systems and activity hours","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandingPageAnalyticsAcquisition"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/landing-pages/{pageId}/analytics/behaviour":{"get":{"tags":["Landing page analytics"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Landing page's id."},"required":true,"description":"The Landing page's id.","name":"pageId","in":"path"},{"schema":{"type":"string","enum":["today","yesterday","7d","30d","90d","all","custom"],"default":"30d","description":"Time window: today, yesterday, last 7/30/90 days, all time, or custom with from and to, in the organization's timezone."},"required":false,"description":"Time window: today, yesterday, last 7/30/90 days, all time, or custom with from and to, in the organization's timezone.","name":"range","in":"query"},{"schema":{"type":"string","format":"date","description":"Start of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive. Must be paired with to."},"required":false,"description":"Start of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive. Must be paired with to.","name":"from","in":"query"},{"schema":{"type":"string","format":"date","description":"End of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive: the whole day is counted. Must be paired with from."},"required":false,"description":"End of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive: the whole day is counted. Must be paired with from.","name":"to","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_source."},"required":false,"description":"Filter to this utm_source.","name":"utmSource","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_medium."},"required":false,"description":"Filter to this utm_medium.","name":"utmMedium","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_campaign."},"required":false,"description":"Filter to this utm_campaign.","name":"utmCampaign","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_term."},"required":false,"description":"Filter to this utm_term.","name":"utmTerm","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_content."},"required":false,"description":"Filter to this utm_content.","name":"utmContent","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this referrer host, as shown in the referrers breakdown (e.g. 'google.com' or '(direct)')."},"required":false,"description":"Filter to this referrer host, as shown in the referrers breakdown (e.g. 'google.com' or '(direct)').","name":"referrer","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop"],"description":"Filter to this device type."},"required":false,"description":"Filter to this device type.","name":"deviceType","in":"query"},{"schema":{"type":"string","enum":["chrome","firefox","safari","edge","opera","samsung","other"],"description":"Filter to this browser."},"required":false,"description":"Filter to this browser.","name":"browser","in":"query"},{"schema":{"type":"string","enum":["ios","android","macos","windows","linux","other"],"description":"Filter to this OS."},"required":false,"description":"Filter to this OS.","name":"os","in":"query"},{"schema":{"anyOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"string","enum":["(unbekannt)"]}],"description":"Filter to this country, as an upper-case ISO 3166-1 alpha-2 code (e.g. 'DE'), or '(unbekannt)' for visits without one."},"required":false,"description":"Filter to this country, as an upper-case ISO 3166-1 alpha-2 code (e.g. 'DE'), or '(unbekannt)' for visits without one.","name":"country","in":"query"}],"responses":{"200":{"description":"Block reach in page order, CTA and outbound clicks, and conversions per embedded funnel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandingPageAnalyticsBehaviour"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/landing-pages/{pageId}/analytics/timeseries":{"get":{"tags":["Landing page analytics"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Landing page's id."},"required":true,"description":"The Landing page's id.","name":"pageId","in":"path"},{"schema":{"type":"string","enum":["today","yesterday","7d","30d","90d","all","custom"],"default":"30d","description":"Time window: today, yesterday, last 7/30/90 days, all time, or custom with from and to, in the organization's timezone."},"required":false,"description":"Time window: today, yesterday, last 7/30/90 days, all time, or custom with from and to, in the organization's timezone.","name":"range","in":"query"},{"schema":{"type":"string","format":"date","description":"Start of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive. Must be paired with to."},"required":false,"description":"Start of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive. Must be paired with to.","name":"from","in":"query"},{"schema":{"type":"string","format":"date","description":"End of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive: the whole day is counted. Must be paired with from."},"required":false,"description":"End of a custom window as a calendar day in the organization's timezone (YYYY-MM-DD), inclusive: the whole day is counted. Must be paired with from.","name":"to","in":"query"},{"schema":{"type":"string","enum":["hour","day","week"],"default":"day","description":"Bucket size for the series."},"required":false,"description":"Bucket size for the series.","name":"granularity","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Window start as a UTC ISO datetime (e.g. '2026-06-02T22:00:00Z'). Pair with until to zoom a span; it replaces the preset window."},"required":false,"description":"Window start as a UTC ISO datetime (e.g. '2026-06-02T22:00:00Z'). Pair with until to zoom a span; it replaces the preset window.","name":"since","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Window end as a UTC ISO datetime, after since. Pair with since to zoom a span."},"required":false,"description":"Window end as a UTC ISO datetime, after since. Pair with since to zoom a span.","name":"until","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_source."},"required":false,"description":"Filter to this utm_source.","name":"utmSource","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_medium."},"required":false,"description":"Filter to this utm_medium.","name":"utmMedium","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_campaign."},"required":false,"description":"Filter to this utm_campaign.","name":"utmCampaign","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_term."},"required":false,"description":"Filter to this utm_term.","name":"utmTerm","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this utm_content."},"required":false,"description":"Filter to this utm_content.","name":"utmContent","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to this referrer host, as shown in the referrers breakdown (e.g. 'google.com' or '(direct)')."},"required":false,"description":"Filter to this referrer host, as shown in the referrers breakdown (e.g. 'google.com' or '(direct)').","name":"referrer","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop"],"description":"Filter to this device type."},"required":false,"description":"Filter to this device type.","name":"deviceType","in":"query"},{"schema":{"type":"string","enum":["chrome","firefox","safari","edge","opera","samsung","other"],"description":"Filter to this browser."},"required":false,"description":"Filter to this browser.","name":"browser","in":"query"},{"schema":{"type":"string","enum":["ios","android","macos","windows","linux","other"],"description":"Filter to this OS."},"required":false,"description":"Filter to this OS.","name":"os","in":"query"},{"schema":{"anyOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"string","enum":["(unbekannt)"]}],"description":"Filter to this country, as an upper-case ISO 3166-1 alpha-2 code (e.g. 'DE'), or '(unbekannt)' for visits without one."},"required":false,"description":"Filter to this country, as an upper-case ISO 3166-1 alpha-2 code (e.g. 'DE'), or '(unbekannt)' for visits without one.","name":"country","in":"query"}],"responses":{"200":{"description":"The overview's metrics bucketed by visit start (hour / day / week) in the organization's timezone, and the page's publishes in the window","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandingPageAnalyticsTimeseries"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/messages/{messageId}/analytics/overview":{"get":{"tags":["Message analytics"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Message's id."},"required":true,"description":"The Message's id.","name":"messageId","in":"path"},{"schema":{"type":"string","enum":["today","yesterday","7d","30d","90d","all","custom"],"default":"30d","description":"Time window of the Deliveries' send date: today, yesterday, last 7/30/90 days, all time, or custom with from and to, in the Organization's timezone."},"required":false,"description":"Time window of the Deliveries' send date: today, yesterday, last 7/30/90 days, all time, or custom with from and to, in the Organization's timezone.","name":"range","in":"query"},{"schema":{"type":"string","format":"date","description":"Start of a custom window as a calendar day in the Organization's timezone (YYYY-MM-DD), inclusive. Must be paired with to."},"required":false,"description":"Start of a custom window as a calendar day in the Organization's timezone (YYYY-MM-DD), inclusive. Must be paired with to.","name":"from","in":"query"},{"schema":{"type":"string","format":"date","description":"End of a custom window as a calendar day in the Organization's timezone (YYYY-MM-DD), inclusive: the whole day is counted. Must be paired with from."},"required":false,"description":"End of a custom window as a calendar day in the Organization's timezone (YYYY-MM-DD), inclusive: the whole day is counted. Must be paired with from.","name":"to","in":"query"}],"responses":{"200":{"description":"Deliveries sent in the window and how many of them were delivered, opened, clicked, bounced and unsubscribed, with rates and secondary counts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageAnalyticsOverview"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/messages/{messageId}/analytics/timeseries":{"get":{"tags":["Message analytics"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Message's id."},"required":true,"description":"The Message's id.","name":"messageId","in":"path"},{"schema":{"type":"string","enum":["today","yesterday","7d","30d","90d","all","custom"],"default":"30d","description":"Time window of the Deliveries' send date: today, yesterday, last 7/30/90 days, all time, or custom with from and to, in the Organization's timezone."},"required":false,"description":"Time window of the Deliveries' send date: today, yesterday, last 7/30/90 days, all time, or custom with from and to, in the Organization's timezone.","name":"range","in":"query"},{"schema":{"type":"string","format":"date","description":"Start of a custom window as a calendar day in the Organization's timezone (YYYY-MM-DD), inclusive. Must be paired with to."},"required":false,"description":"Start of a custom window as a calendar day in the Organization's timezone (YYYY-MM-DD), inclusive. Must be paired with to.","name":"from","in":"query"},{"schema":{"type":"string","format":"date","description":"End of a custom window as a calendar day in the Organization's timezone (YYYY-MM-DD), inclusive: the whole day is counted. Must be paired with from."},"required":false,"description":"End of a custom window as a calendar day in the Organization's timezone (YYYY-MM-DD), inclusive: the whole day is counted. Must be paired with from.","name":"to","in":"query"}],"responses":{"200":{"description":"Sent, delivered, opened and clicked Deliveries per bucket of their send date, every bucket of the window included","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageAnalyticsTimeseries"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/messages/{messageId}/analytics/flows":{"get":{"tags":["Message analytics"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Message's id."},"required":true,"description":"The Message's id.","name":"messageId","in":"path"},{"schema":{"type":"string","enum":["today","yesterday","7d","30d","90d","all","custom"],"default":"30d","description":"Time window of the Deliveries' send date: today, yesterday, last 7/30/90 days, all time, or custom with from and to, in the Organization's timezone."},"required":false,"description":"Time window of the Deliveries' send date: today, yesterday, last 7/30/90 days, all time, or custom with from and to, in the Organization's timezone.","name":"range","in":"query"},{"schema":{"type":"string","format":"date","description":"Start of a custom window as a calendar day in the Organization's timezone (YYYY-MM-DD), inclusive. Must be paired with to."},"required":false,"description":"Start of a custom window as a calendar day in the Organization's timezone (YYYY-MM-DD), inclusive. Must be paired with to.","name":"from","in":"query"},{"schema":{"type":"string","format":"date","description":"End of a custom window as a calendar day in the Organization's timezone (YYYY-MM-DD), inclusive: the whole day is counted. Must be paired with from."},"required":false,"description":"End of a custom window as a calendar day in the Organization's timezone (YYYY-MM-DD), inclusive: the whole day is counted. Must be paired with from.","name":"to","in":"query"}],"responses":{"200":{"description":"The stat-card figures per flow step that sent the Message in the window, with flow names; a deleted flow or step has no name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageAnalyticsFlows"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/messages/{messageId}/analytics/links":{"get":{"tags":["Message analytics"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Message's id."},"required":true,"description":"The Message's id.","name":"messageId","in":"path"},{"schema":{"type":"string","enum":["today","yesterday","7d","30d","90d","all","custom"],"default":"30d","description":"Time window of the Deliveries' send date: today, yesterday, last 7/30/90 days, all time, or custom with from and to, in the Organization's timezone."},"required":false,"description":"Time window of the Deliveries' send date: today, yesterday, last 7/30/90 days, all time, or custom with from and to, in the Organization's timezone.","name":"range","in":"query"},{"schema":{"type":"string","format":"date","description":"Start of a custom window as a calendar day in the Organization's timezone (YYYY-MM-DD), inclusive. Must be paired with to."},"required":false,"description":"Start of a custom window as a calendar day in the Organization's timezone (YYYY-MM-DD), inclusive. Must be paired with to.","name":"from","in":"query"},{"schema":{"type":"string","format":"date","description":"End of a custom window as a calendar day in the Organization's timezone (YYYY-MM-DD), inclusive: the whole day is counted. Must be paired with from."},"required":false,"description":"End of a custom window as a calendar day in the Organization's timezone (YYYY-MM-DD), inclusive: the whole day is counted. Must be paired with from.","name":"to","in":"query"}],"responses":{"200":{"description":"Links clicked by Deliveries sent in the window, most-clicked first and capped, each without query string and fragment plus one full clicked URL, with the Deliveries that clicked it and their rate over Delivered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageAnalyticsLinks"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/funnels/{funnelId}/copy":{"post":{"tags":["Copy"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Funnel's id."},"required":true,"description":"The Funnel's id.","name":"funnelId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"targetOrganizationId":{"type":"string","format":"uuid","description":"The Organization to copy into, other than the source's."},"copyAssets":{"type":"boolean","description":"Whether to copy the Assets the copy uses into the target Organization too."}},"required":["targetOrganizationId","copyAssets"]}}}},"responses":{"201":{"description":"The new funnel created in the target organization","content":{"application/json":{"schema":{"type":"object","properties":{"funnelId":{"type":"string","format":"uuid","description":"The copied Funnel's id."}},"required":["funnelId"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/landing-pages/{pageId}/copy":{"post":{"tags":["Copy"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Landing page's id."},"required":true,"description":"The Landing page's id.","name":"pageId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"targetOrganizationId":{"type":"string","format":"uuid","description":"The Organization to copy into, other than the source's."},"copyAssets":{"type":"boolean","description":"Whether to copy the Assets the copy uses into the target Organization too."}},"required":["targetOrganizationId","copyAssets"]}}}},"responses":{"201":{"description":"The new landing page created in the target organization","content":{"application/json":{"schema":{"type":"object","properties":{"landingPageId":{"type":"string","format":"uuid","description":"The copied Landing page's id."}},"required":["landingPageId"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/landing-pages":{"get":{"tags":["Landing Pages"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","default":"","description":"Only the items whose name matches the search. Empty lists every one."},"required":false,"description":"Only the items whose name matches the search. Empty lists every one.","name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"default":1,"description":"The page of results, from 1."},"required":false,"description":"The page of results, from 1.","name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Items per page."},"required":false,"description":"Items per page.","name":"pageSize","in":"query"},{"schema":{"type":"string","enum":["name.asc","name.desc","created_at.asc","created_at.desc","updated_at.asc","updated_at.desc","status.asc","status.desc"],"default":"updated_at.desc","description":"The sort, as `<key>.<asc|desc>`."},"required":false,"description":"The sort, as `<key>.<asc|desc>`.","name":"sort","in":"query"}],"responses":{"200":{"description":"One page of the organization's landing pages, in the requested order (default: most recently updated first), with the total matching count","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandingPageList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/landing-pages/{pageId}/versions":{"get":{"tags":["Landing Pages"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Landing page's id."},"required":true,"description":"The Landing page's id.","name":"pageId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Versions per page, newest first."},"required":false,"description":"Versions per page, newest first.","name":"limit","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"default":0,"description":"Number of newest Versions to skip."},"required":false,"description":"Number of newest Versions to skip.","name":"offset","in":"query"}],"responses":{"200":{"description":"The landing page's published versions, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandingPageVersionList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/websites":{"get":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","maxLength":200,"description":"Part of the name: every whitespace-separated term must appear in it."},"required":false,"description":"Part of the name: every whitespace-separated term must appear in it.","name":"q","in":"query"}],"responses":{"200":{"description":"The organization's Websites, most recently updated first, filtered by name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsiteList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebsiteInput"}}}},"responses":{"201":{"description":"The new Website, its Startseite at /, its adopted Pages and its address, written at once","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedWebsite"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"A Landing page or the Domain is not in the organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsiteCreationError"}}}},"409":{"description":"A Landing page is on a Website already, a path or Subdomain is taken, or a Landing page holds the domain root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsiteCreationError"}}}},"422":{"description":"A path or Subdomain is invalid, the Domain is not verified, or the Style guide is unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsiteCreationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/websites/{websiteId}":{"get":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"}],"responses":{"200":{"description":"The Website with its Pages, ordered by path","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Website"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteWebsiteInput"}}}},"responses":{"204":{"description":"The Website is deleted with its Datasets, Rows, redirects and domain links. Its Pages are detached into unpublished Landing pages without an address, or deleted with `pages: delete`"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/websites/{websiteId}/pages/{pageId}/publish":{"post":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Page's id."},"required":true,"description":"The Page's id.","name":"pageId","in":"path"}],"responses":{"200":{"description":"The Page's draft is now its published version, live on the Website. On a Website that was never published, the Website draft went live with it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishedWebsitePage"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/websites/{websiteId}/pages/{pageId}/unpublish":{"post":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Page's id."},"required":true,"description":"The Page's id.","name":"pageId","in":"path"}],"responses":{"204":{"description":"The Page is offline: its address answers 404 and Menus leave it out. Its draft stays; no redirect is written."},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/websites/{websiteId}/publish":{"post":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"}],"responses":{"200":{"description":"Publish all: every Page with unpublished changes and the Website draft went live in one transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishedWebsite"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/websites/{websiteId}/layout":{"get":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"}],"responses":{"200":{"description":"The Website's draft and published Layout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsiteLayoutState"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveWebsiteLayoutInput"}}}},"responses":{"200":{"description":"The draft Layout is saved; it goes live when the Website is published","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsiteLayoutState"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/websites/{websiteId}/pages/adopt":{"post":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdoptLandingPageInput"}}}},"responses":{"201":{"description":"The Landing page as a Page of the Website, unchanged otherwise","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsitePage"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/websites/plan":{"post":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebsiteInput"}}}},"responses":{"200":{"description":"What creating the Website would do, without writing anything: the wizard's summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsiteCreationPlan"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"A Landing page or the Domain is not in the organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsiteCreationError"}}}},"409":{"description":"A Landing page is on a Website already, a path or Subdomain is taken, or a Landing page holds the domain root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsiteCreationError"}}}},"422":{"description":"A path or Subdomain is invalid, the Domain is not verified, or the Style guide is unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsiteCreationError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/websites/{websiteId}/datasets":{"get":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"}],"responses":{"200":{"description":"The Website's Datasets, ordered by name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDatasetInput"}}}},"responses":{"201":{"description":"The new Dataset. A Referenzen Dataset (`source: references`) comes with its fixed fields and a Row per published Referenz","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dataset"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/websites/{websiteId}/datasets/{datasetId}":{"patch":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The dataset's id."},"required":true,"description":"The dataset's id.","name":"datasetId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDatasetInput"}}}},"responses":{"200":{"description":"The Dataset with its new name or fields; its key stays","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dataset"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The dataset's id."},"required":true,"description":"The dataset's id.","name":"datasetId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteDatasetInput"}}}},"responses":{"204":{"description":"The Dataset is deleted with its Rows and their redirects. Its Dataset Pages are deleted with `pages: delete`; while it has any, `keep` is 409 dataset_has_pages, naming them"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/websites/{websiteId}/datasets/{datasetId}/rows":{"get":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The dataset's id."},"required":true,"description":"The dataset's id.","name":"datasetId","in":"path"}],"responses":{"200":{"description":"The Dataset's Rows, ordered by Name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetRowList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The dataset's id."},"required":true,"description":"The dataset's id.","name":"datasetId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDatasetRowInput"}}}},"responses":{"201":{"description":"The new Row, with a Slug from its Name unless one was given","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetRow"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/websites/{websiteId}/datasets/{datasetId}/rows/{rowId}":{"patch":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The dataset's id."},"required":true,"description":"The dataset's id.","name":"datasetId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The dataset row's id."},"required":true,"description":"The dataset row's id.","name":"rowId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDatasetRowInput"}}}},"responses":{"200":{"description":"The saved Row; a Live Row's change is live at once. A new Slug leaves a redirect from the Row's old address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetRow"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The dataset's id."},"required":true,"description":"The dataset's id.","name":"datasetId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The dataset row's id."},"required":true,"description":"The dataset row's id.","name":"rowId","in":"path"}],"responses":{"204":{"description":"The Row is deleted"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/websites/{websiteId}/datasets/{datasetId}/rows/delete":{"post":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The dataset's id."},"required":true,"description":"The dataset's id.","name":"datasetId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteDatasetRowsInput"}}}},"responses":{"200":{"description":"The Rows deleted, with their redirects. Ids of other Datasets' Rows are ignored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedDatasetRows"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/websites/{websiteId}/datasets/{datasetId}/rows/export":{"get":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The dataset's id."},"required":true,"description":"The dataset's id.","name":"datasetId","in":"path"}],"responses":{"200":{"description":"All Rows as a CSV file (UTF-8 with BOM, `;`-separated), named after the Dataset's key","content":{"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/websites/{websiteId}/datasets/{datasetId}/rows/import":{"post":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The dataset's id."},"required":true,"description":"The dataset's id.","name":"datasetId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportDatasetRowsInput"}}}},"responses":{"200":{"description":"What the import wrote: Rows upserted by Slug, lines skipped and why","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetRowImportReport"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/websites/{websiteId}/domain":{"get":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"}],"responses":{"200":{"description":"Where the Website is served, and the organization's domains it can link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsiteDomainSettings"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkWebsiteDomainInput"}}}},"responses":{"200":{"description":"The Website is served on the domain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsiteAddress"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The domain serves another Website, a Landing page holds its root, or Landing pages hold Page paths","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsiteDomainError"}}}},"422":{"description":"The domain is not verified, or the path for the root Landing page is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsiteDomainError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"}],"responses":{"204":{"description":"The Website is served on the renderer's host only"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/websites/{websiteId}/subdomain":{"put":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimWebsiteSubdomainInput"}}}},"responses":{"200":{"description":"The Website is served on the subdomain","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"object","nullable":true,"properties":{"asset_id":{"type":"string","format":"uuid","description":"The Domain's asset id."},"hostname":{"type":"string","description":"The Domain's hostname."},"verified":{"type":"boolean","description":"Whether the Domain is verified."}},"required":["asset_id","hostname","verified"],"description":"The linked Domain; null when the Website has none."},"subdomain":{"type":"string","nullable":true,"description":"The claimed Subdomain label; null when the Website has none."}},"required":["domain","subdomain"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/websites/{websiteId}/pages":{"post":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebsitePageInput"}}}},"responses":{"201":{"description":"The new, empty Page, a draft","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsitePage"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/websites/{websiteId}/pages/order":{"put":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderWebsitePagesInput"}}}},"responses":{"204":{"description":"The Pages are in the new order"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/websites/{websiteId}/pages/{pageId}":{"patch":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Page's id."},"required":true,"description":"The Page's id.","name":"pageId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebsitePageInput"}}}},"responses":{"200":{"description":"The saved Page. A changed path applies now, with a redirect from every path left","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsitePage"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/websites/{websiteId}/redirects":{"get":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"}],"responses":{"200":{"description":"Every redirect of the Website, by old path","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsiteRedirectList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebsiteRedirectInput"}}}},"responses":{"204":{"description":"The redirect applies now; older redirects to its old path lead where it does"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/websites/{websiteId}/redirects/{redirectId}":{"delete":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The redirect's id."},"required":true,"description":"The redirect's id.","name":"redirectId","in":"path"}],"responses":{"204":{"description":"The old path no longer redirects"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/websites/{websiteId}/seo":{"get":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"}],"responses":{"200":{"description":"The Website's search settings and its Pages', ordered by path","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsiteSeo"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebsiteSeoInput"}}}},"responses":{"200":{"description":"The Website's search settings after the change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsiteSeo"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/websites/{websiteId}/pages/{pageId}/seo":{"patch":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Page's id."},"required":true,"description":"The Page's id.","name":"pageId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebsitePageSeoInput"}}}},"responses":{"200":{"description":"The Page's search settings after the change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsitePageSeo"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/landing-pages/{pageId}/website":{"get":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Landing page's id."},"required":true,"description":"The Landing page's id.","name":"pageId","in":"path"}],"responses":{"200":{"description":"The Website the Landing page is a Page of; null for a standalone one","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandingPageWebsite"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/websites/{websiteId}/settings":{"get":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"}],"responses":{"200":{"description":"The Website's site-wide settings, with the legal texts the organization can pick from","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsiteSettings"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["Websites"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Website's id."},"required":true,"description":"The Website's id.","name":"websiteId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebsiteSettingsInput"}}}},"responses":{"200":{"description":"The saved settings. Every published Page renders with them right away","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsiteSettings"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/landing-pages/{pageId}/change-reports":{"post":{"tags":["Landing Pages"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Landing page's id."},"required":true,"description":"The Landing page's id.","name":"pageId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","format":"date","description":"The Reporting Range's first day, a calendar date in Berlin."},"to":{"type":"string","format":"date","description":"The Reporting Range's last day, a calendar date in Berlin, inclusive through the end of the day."},"type":{"type":"string","enum":["visual","text"],"default":"visual","description":"How the Change report shows its Change sets: visual (before and after screenshots with a shortened change list) or text (every change in full, without screenshots)."},"force":{"type":"boolean","default":false,"description":"true makes a new Change report even when one for the same Landing page, range, content and type exists (\"Erneut versuchen\"); otherwise that one is returned."}},"required":["from","to"]}}}},"responses":{"200":{"description":"A report for this range and content already exists and is returned instead of a new one","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeReport"}}}},"201":{"description":"The queued report; a worker generates it shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeReport"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"get":{"tags":["Landing Pages"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Landing page's id."},"required":true,"description":"The Landing page's id.","name":"pageId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"How many Change reports to return."},"required":false,"description":"How many Change reports to return.","name":"limit","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"default":0,"description":"How many of the newest Change reports to skip."},"required":false,"description":"How many of the newest Change reports to skip.","name":"offset","in":"query"}],"responses":{"200":{"description":"The page's change reports, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeReportList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/landing-pages/{pageId}/change-reports/{reportId}":{"get":{"tags":["Landing Pages"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Landing page's id."},"required":true,"description":"The Landing page's id.","name":"pageId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Change report's id."},"required":true,"description":"The Change report's id.","name":"reportId","in":"path"}],"responses":{"200":{"description":"The report, with signed download links while it is done","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeReport"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["Landing Pages"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Landing page's id."},"required":true,"description":"The Landing page's id.","name":"pageId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Change report's id."},"required":true,"description":"The Change report's id.","name":"reportId","in":"path"}],"responses":{"204":{"description":"The report row and its stored artifacts are gone"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/experiments":{"get":{"tags":["Experiments"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Funnel under test. Pass this or landingPageId."},"required":false,"description":"The Funnel under test. Pass this or landingPageId.","name":"funnelId","in":"query"},{"schema":{"type":"string","format":"uuid","description":"The Landing page under test. Pass this or funnelId."},"required":false,"description":"The Landing page under test. Pass this or funnelId.","name":"landingPageId","in":"query"}],"responses":{"200":{"description":"The organization's Experiments, or one subject's, oldest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Experiments"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"funnelId":{"type":"string","format":"uuid","description":"The Funnel under test. Pass this or landingPageId."},"landingPageId":{"type":"string","format":"uuid","description":"The Landing page under test. Pass this or funnelId."},"primaryGoal":{"type":"string","enum":["conversion","completion_rate"],"description":"conversion or completion_rate (Funnels only). Defaults to conversion on a Landing page, completion_rate on a Funnel."}}}}}},"responses":{"200":{"description":"The Experiment with its Test variants and markers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentDetail"}}}},"201":{"description":"The draft Experiment: A, the original, and B, a copy of it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentDetail"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Start checks or weights that failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentProblems"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/experiments/{experimentId}":{"get":{"tags":["Experiments"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Experiment's id."},"required":true,"description":"The Experiment's id.","name":"experimentId","in":"path"}],"responses":{"200":{"description":"The Experiment with its Test variants and markers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentDetail"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Start checks or weights that failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentProblems"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/experiments/{experimentId}/test-variants":{"post":{"tags":["Experiments"],"summary":"Add the next Test variant, a copy of A","parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Experiment's id."},"required":true,"description":"The Experiment's id.","name":"experimentId","in":"path"}],"responses":{"200":{"description":"The Experiment with its Test variants and markers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentDetail"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Start checks or weights that failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentProblems"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/experiments/{experimentId}/test-variants/{testVariantId}":{"delete":{"tags":["Experiments"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Experiment's id."},"required":true,"description":"The Experiment's id.","name":"experimentId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Test variant's id."},"required":true,"description":"The Test variant's id.","name":"testVariantId","in":"path"}],"responses":{"200":{"description":"The Experiment with its Test variants and markers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentDetail"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Start checks or weights that failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentProblems"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/experiments/{experimentId}/weights":{"put":{"tags":["Experiments"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Experiment's id."},"required":true,"description":"The Experiment's id.","name":"experimentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"weights":{"type":"array","items":{"type":"object","properties":{"letter":{"type":"string","enum":["A","B","C"],"description":"A Test variant's letter: A is the original, B and C its copies."},"weight":{"type":"integer","minimum":0,"maximum":100,"description":"The share of visitors it gets, in whole percent."}},"required":["letter","weight"]},"minItems":1,"maxItems":3,"description":"One entry per active Test variant."}},"required":["weights"]}}}},"responses":{"200":{"description":"The Experiment with its Test variants and markers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentDetail"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Start checks or weights that failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentProblems"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/experiments/{experimentId}/start":{"post":{"tags":["Experiments"],"summary":"Start the Experiment","parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Experiment's id."},"required":true,"description":"The Experiment's id.","name":"experimentId","in":"path"}],"responses":{"200":{"description":"The Experiment with its Test variants and markers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentDetail"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Start checks or weights that failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentProblems"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/experiments/{experimentId}/pause":{"post":{"tags":["Experiments"],"summary":"Pause the Experiment","parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Experiment's id."},"required":true,"description":"The Experiment's id.","name":"experimentId","in":"path"}],"responses":{"200":{"description":"The Experiment with its Test variants and markers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentDetail"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Start checks or weights that failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentProblems"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/experiments/{experimentId}/resume":{"post":{"tags":["Experiments"],"summary":"Resume the Experiment","parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Experiment's id."},"required":true,"description":"The Experiment's id.","name":"experimentId","in":"path"}],"responses":{"200":{"description":"The Experiment with its Test variants and markers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentDetail"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Start checks or weights that failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentProblems"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/experiments/{experimentId}/end":{"post":{"tags":["Experiments"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Experiment's id."},"required":true,"description":"The Experiment's id.","name":"experimentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"winnerTestVariantId":{"type":"string","format":"uuid","description":"The Winner's Test variant; omit to end without a Winner."}}}}}},"responses":{"200":{"description":"The Experiment with its Test variants and markers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentDetail"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Start checks or weights that failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentProblems"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/experiments/{experimentId}/test-variants/{testVariantId}/publish":{"post":{"tags":["Experiments"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Experiment's id."},"required":true,"description":"The Experiment's id.","name":"experimentId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Test variant's id."},"required":true,"description":"The Test variant's id.","name":"testVariantId","in":"path"}],"responses":{"200":{"description":"The Test variant's Draft is published; its new fields are in the original's lead schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishedTestVariant"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/experiments/{experimentId}/results":{"get":{"tags":["Experiments"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Experiment's id."},"required":true,"description":"The Experiment's id.","name":"experimentId","in":"path"},{"schema":{"type":"string","enum":["true","false"],"description":"Add the daily series per Test variant."},"required":false,"description":"Add the daily series per Test variant.","name":"daily","in":"query"}],"responses":{"200":{"description":"Per Test variant and Experiment goal: Visitor-days, successes, rate and probability to be best, the Primary goal's verdict and a German summary. `daily=true` adds the daily series.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentResults"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/experiments/{experimentId}/readiness":{"get":{"tags":["Experiments"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Experiment's id."},"required":true,"description":"The Experiment's id.","name":"experimentId","in":"path"}],"responses":{"200":{"description":"Each Test variant's publish state, and the start checks that fail now (only for a draft)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentReadiness"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/experiments/{experimentId}/test-variants/{testVariantId}/versions":{"get":{"tags":["Experiments"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Experiment's id."},"required":true,"description":"The Experiment's id.","name":"experimentId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Test variant's id."},"required":true,"description":"The Test variant's id.","name":"testVariantId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Versions per page, newest first."},"required":false,"description":"Versions per page, newest first.","name":"limit","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"default":0,"description":"Number of newest Versions to skip."},"required":false,"description":"Number of newest Versions to skip.","name":"offset","in":"query"}],"responses":{"200":{"description":"The Test variant's published Versions, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestVariantVersionList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/exports":{"post":{"tags":["Exports"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","minLength":1,"description":"What to export, e.g. leads; it picks the payload's shape."},"payload":{"nullable":true,"description":"The Export's filters, in the shape its type takes."}},"required":["type"]}}}},"responses":{"200":{"description":"The caller already has this export queued or running; that job is returned instead of a new one","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJob"}}}},"201":{"description":"The queued export; a worker generates it shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJob"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"get":{"tags":["Exports"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Only Exports of this type, e.g. leads."},"required":true,"description":"Only Exports of this type, e.g. leads.","name":"type","in":"query"}],"responses":{"200":{"description":"The caller's exports of this type from the last 7 days, newest first, at most 50","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/exports/{exportId}":{"get":{"tags":["Exports"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Export's id."},"required":true,"description":"The Export's id.","name":"exportId","in":"path"}],"responses":{"200":{"description":"The export, with a signed download URL while it is done","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJob"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/funnels":{"get":{"tags":["Funnels"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","default":"","description":"Only the items whose name matches the search. Empty lists every one."},"required":false,"description":"Only the items whose name matches the search. Empty lists every one.","name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"default":1,"description":"The page of results, from 1."},"required":false,"description":"The page of results, from 1.","name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Items per page."},"required":false,"description":"Items per page.","name":"pageSize","in":"query"},{"schema":{"type":"string","enum":["name.asc","name.desc","created_at.asc","created_at.desc","updated_at.asc","updated_at.desc","status.asc","status.desc"],"default":"updated_at.desc","description":"The sort, as `<key>.<asc|desc>`."},"required":false,"description":"The sort, as `<key>.<asc|desc>`.","name":"sort","in":"query"}],"responses":{"200":{"description":"One page of the organization's funnels, in the requested order (default: most recently updated first), with the total matching count","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/flows":{"get":{"tags":["Flows"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","default":"","description":"Only the items whose name matches the search. Empty lists every one."},"required":false,"description":"Only the items whose name matches the search. Empty lists every one.","name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"default":1,"description":"The page of results, from 1."},"required":false,"description":"The page of results, from 1.","name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Items per page."},"required":false,"description":"Items per page.","name":"pageSize","in":"query"},{"schema":{"type":"string","enum":["name.asc","name.desc","created_at.asc","created_at.desc","updated_at.asc","updated_at.desc","status.asc","status.desc"],"default":"updated_at.desc","description":"The sort, as `<key>.<asc|desc>`."},"required":false,"description":"The sort, as `<key>.<asc|desc>`.","name":"sort","in":"query"}],"responses":{"200":{"description":"One page of the organization's flows, in the requested order (default: most recently updated first), with the total matching count","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/messages":{"get":{"tags":["Messages"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","default":"","description":"Only the items whose name matches the search. Empty lists every one."},"required":false,"description":"Only the items whose name matches the search. Empty lists every one.","name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"default":1,"description":"The page of results, from 1."},"required":false,"description":"The page of results, from 1.","name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Items per page."},"required":false,"description":"Items per page.","name":"pageSize","in":"query"},{"schema":{"type":"string","enum":["name.asc","name.desc","created_at.asc","created_at.desc","updated_at.asc","updated_at.desc"],"default":"updated_at.desc","description":"The sort, as `<key>.<asc|desc>`."},"required":false,"description":"The sort, as `<key>.<asc|desc>`.","name":"sort","in":"query"}],"responses":{"200":{"description":"One page of the organization's messages, in the requested order (default: most recently updated first), with the total matching count","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/contacts":{"get":{"tags":["Contacts"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","default":"","description":"Search by name or email."},"required":false,"description":"Search by name or email.","name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"default":1,"description":"The 1-based page."},"required":false,"description":"The 1-based page.","name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"Lead buyers per page."},"required":false,"description":"Lead buyers per page.","name":"pageSize","in":"query"},{"schema":{"type":"string","enum":["created_at.asc","created_at.desc","name.asc","name.desc","email.asc","email.desc","state.asc","state.desc","max_single_leads_per_month.asc","max_single_leads_per_month.desc"],"default":"created_at.desc","description":"The column and direction to sort by, as `<column>.<asc|desc>`; name sorts by last name, then first name."},"required":false,"description":"The column and direction to sort by, as `<column>.<asc|desc>`; name sorts by last name, then first name.","name":"sort","in":"query"}],"responses":{"200":{"description":"One page of the organization's contacts, newest first unless sorted, with per-contact sales rollups and the total matching count","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/contacts/{contactId}/lead-filter":{"put":{"tags":["Contacts"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The id of the Lead buyer's contact."},"required":true,"description":"The id of the Lead buyer's contact.","name":"contactId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filter":{"type":"object","nullable":true,"properties":{"version":{"type":"number","enum":[1],"description":"The lead filter's format version."},"missing":{"type":"string","enum":["dont_sell","sell"],"default":"dont_sell","description":"When a condition applies but the Lead has no answer: dont_sell skips this Lead buyer, sell lets the Lead through if every answered condition passes."},"conditions":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["number"],"description":"A condition on a number, currency or computed field."},"key":{"type":"string","minLength":1,"maxLength":200,"description":"The key of the field the condition checks."},"op":{"type":"string","enum":["gte","lte","eq","neq"],"description":"How the answer compares with value: at least, at most, equal or not equal; bounds are inclusive."},"value":{"type":"number","description":"The number the answer is compared with; currency in euros."}},"required":["kind","key","op","value"]},{"type":"object","properties":{"kind":{"type":"string","enum":["choice"],"description":"A condition on a single-choice or yes/no field."},"key":{"type":"string","minLength":1,"maxLength":200,"description":"The key of the field the condition checks."},"op":{"type":"string","enum":["eq","neq","in","not_in"],"description":"How the answer compares with values: eq and neq take one choice id, in and not_in one or more."},"values":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":200,"description":"The choice ids the answer is compared with."}},"required":["kind","key","op","values"]},{"type":"object","properties":{"kind":{"type":"string","enum":["multi"],"description":"A condition on a multi-select field."},"key":{"type":"string","minLength":1,"maxLength":200,"description":"The key of the field the condition checks."},"op":{"type":"string","enum":["any_of","none_of"],"description":"any_of passes if at least one selection is in values, none_of if none is."},"values":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":200,"description":"The choice ids the answer is compared with."}},"required":["kind","key","op","values"]},{"type":"object","properties":{"kind":{"type":"string","enum":["funnel"],"description":"A condition on the funnel the Lead came from."},"op":{"type":"string","enum":["in","not_in"],"description":"in passes if the Lead came from one of the funnels, not_in if it came from none of them."},"funnelIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":200,"description":"The ids of the funnels the Lead's funnel is compared with."}},"required":["kind","op","funnelIds"]}]},"maxItems":20,"description":"The conditions, all of which a Lead must pass (AND)."}},"required":["version","conditions"],"description":"The Lead buyer's whole lead filter; null or no conditions remove it."}},"required":["filter"]}}}},"responses":{"200":{"description":"The buyer's lead filter is replaced and the change recorded in the contact history; `updated` is false when nothing changed","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"type":"boolean","description":"False when the lead filter was already the one sent."}},"required":["updated"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/postcodes":{"get":{"tags":["Postcodes"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"anyOf":[{"type":"string","pattern":"^\\d{2,5}$"},{"type":"array","items":{"type":"string","pattern":"^\\d{2,5}$"}}],"description":"Postcode entries: a full 5-digit PLZ or a 2- to 4-digit prefix. Repeat the parameter for several, and send more in batches.","example":["80331","76"]},"required":true,"description":"Postcode entries: a full 5-digit PLZ or a 2- to 4-digit prefix. Repeat the parameter for several, and send more in batches.","name":"entries","in":"query"}],"responses":{"200":{"description":"Each requested entry the postcode table knows, with its cities and, for a full PLZ, its point. Unknown entries are left out.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostcodeLookup"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/lead-filters/fields":{"get":{"tags":["Lead filters"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"responses":{"200":{"description":"The fields a buyer lead filter can use: number, currency, computed, choice, multi-select and yes/no fields from the current version of every lead schema, plus the Funnel pseudo-field, each with the funnels it applies to","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadFilterFieldCatalogue"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/lead-filters/preview":{"post":{"tags":["Lead filters"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filter":{"type":"object","nullable":true,"properties":{"version":{"type":"number","enum":[1],"description":"The lead filter's format version."},"missing":{"type":"string","enum":["dont_sell","sell"],"default":"dont_sell","description":"When a condition applies but the Lead has no answer: dont_sell skips this Lead buyer, sell lets the Lead through if every answered condition passes."},"conditions":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["number"],"description":"A condition on a number, currency or computed field."},"key":{"type":"string","minLength":1,"maxLength":200,"description":"The key of the field the condition checks."},"op":{"type":"string","enum":["gte","lte","eq","neq"],"description":"How the answer compares with value: at least, at most, equal or not equal; bounds are inclusive."},"value":{"type":"number","description":"The number the answer is compared with; currency in euros."}},"required":["kind","key","op","value"]},{"type":"object","properties":{"kind":{"type":"string","enum":["choice"],"description":"A condition on a single-choice or yes/no field."},"key":{"type":"string","minLength":1,"maxLength":200,"description":"The key of the field the condition checks."},"op":{"type":"string","enum":["eq","neq","in","not_in"],"description":"How the answer compares with values: eq and neq take one choice id, in and not_in one or more."},"values":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":200,"description":"The choice ids the answer is compared with."}},"required":["kind","key","op","values"]},{"type":"object","properties":{"kind":{"type":"string","enum":["multi"],"description":"A condition on a multi-select field."},"key":{"type":"string","minLength":1,"maxLength":200,"description":"The key of the field the condition checks."},"op":{"type":"string","enum":["any_of","none_of"],"description":"any_of passes if at least one selection is in values, none_of if none is."},"values":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":200,"description":"The choice ids the answer is compared with."}},"required":["kind","key","op","values"]},{"type":"object","properties":{"kind":{"type":"string","enum":["funnel"],"description":"A condition on the funnel the Lead came from."},"op":{"type":"string","enum":["in","not_in"],"description":"in passes if the Lead came from one of the funnels, not_in if it came from none of them."},"funnelIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":200,"description":"The ids of the funnels the Lead's funnel is compared with."}},"required":["kind","op","funnelIds"]}]},"maxItems":20,"description":"The conditions, all of which a Lead must pass (AND)."}},"required":["version","conditions"],"description":"The draft lead filter to preview; null for none."},"area":{"type":"object","properties":{"area_mode":{"type":"string","enum":["nationwide","regional"],"description":"Whether the Lead buyer takes Leads from anywhere or only from the regional area in area_radii and area_postcodes."},"area_radii":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","pattern":"^\\d{5}$","description":"The postcode at the circle's centre."},"km":{"type":"integer","minimum":1,"maximum":300,"description":"The circle's radius in kilometres."}},"required":["code","km"]},"maxItems":20,"description":"Circles around a postcode that make up the regional area."},"area_postcodes":{"type":"array","items":{"type":"string"},"maxItems":2000,"description":"Postcode prefixes that make up the regional area; each covers every postcode starting with it."}},"required":["area_mode","area_radii","area_postcodes"],"description":"The draft service area to preview."}},"required":["filter","area"]}}}},"responses":{"200":{"description":"How many of the org's leads from the last 30 days a buyer with this draft filter and area would have got, why the others didn't fit, and the draft's stale conditions. Cap and pause are left out.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadFilterPreview"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/lead-filters/leads/{leadId}":{"get":{"tags":["Lead filters"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Lead's id."},"required":true,"description":"The Lead's id.","name":"leadId","in":"path"}],"responses":{"200":{"description":"How each buyer with a lead filter treats the lead: passes, rejected with the conditions that keep it from them, or broken (unreadable, or a chosen option was deleted)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuyerFilterChecks"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/templates/{templateId}/apply":{"post":{"tags":["Templates"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The Organization's id."},"required":true,"description":"The Organization's id.","name":"orgId","in":"path"},{"schema":{"type":"integer","nullable":true,"description":"The Template's id."},"required":false,"description":"The Template's id.","name":"templateId","in":"path"}],"responses":{"200":{"description":"The template's page content, with any embedded funnels cloned into this organization","content":{"application/json":{"schema":{"type":"object","properties":{"elements":{"type":"array","items":{"nullable":true},"description":"The Template's Blocks, top to bottom, with every embedded Funnel pointing at its copy in the Organization."},"styleGuideSnapshot":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The Template's Style guide config; null when it has none."},"layout":{"nullable":true,"description":"The Template's page layout; null when it has none."}},"required":["elements","styleGuideSnapshot"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/campaigns":{"get":{"tags":["Campaigns"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","default":"","description":"Only the items whose name matches the search. Empty lists every one."},"required":false,"description":"Only the items whose name matches the search. Empty lists every one.","name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"default":1,"description":"The page of results, from 1."},"required":false,"description":"The page of results, from 1.","name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"Items per page."},"required":false,"description":"Items per page.","name":"pageSize","in":"query"},{"schema":{"type":"string","enum":["active","archived","draft"],"description":"Only the Campaigns with this status. Omitted, every status."},"required":false,"description":"Only the Campaigns with this status. Omitted, every status.","name":"status","in":"query"},{"schema":{"type":"string","enum":["name.asc","name.desc","created_at.asc","created_at.desc","updated_at.asc","updated_at.desc","status.asc","status.desc"],"default":"updated_at.desc","description":"The sort, as `<key>.<asc|desc>`."},"required":false,"description":"The sort, as `<key>.<asc|desc>`.","name":"sort","in":"query"}],"responses":{"200":{"description":"One page of the organization's campaigns in the requested order (newest-edited first by default), with the total matching count. All statuses unless `status` narrows it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Campaigns"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCreate"}}}},"responses":{"201":{"description":"The created campaign, active and owned by the caller","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignDetail"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/campaigns/{campaignId}":{"get":{"tags":["Campaigns"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Campaign's id."},"required":true,"description":"The Campaign's id.","name":"campaignId","in":"path"}],"responses":{"200":{"description":"One campaign, with its creator's display name and avatar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignDetail"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["Campaigns"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Campaign's id."},"required":true,"description":"The Campaign's id.","name":"campaignId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignUpdate"}}}},"responses":{"200":{"description":"The campaign after the change, with only the sent fields updated. An archived campaign takes only a status change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignDetail"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/leads":{"get":{"tags":["Leads"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","default":"","description":"Search the leads by first name, last name, email or phone number; every word must match."},"required":false,"description":"Search the leads by first name, last name, email or phone number; every word must match.","name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"default":1,"description":"The 1-based page."},"required":false,"description":"The 1-based page.","name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"Leads per page."},"required":false,"description":"Leads per page.","name":"pageSize","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"By when the Lead came in: asc oldest first, desc newest first."},"required":false,"description":"By when the Lead came in: asc oldest first, desc newest first.","name":"sort","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["AUTO_SCHEDULED","RESCHEDULED","INVISIBLE","EXPORTED","NOT_REACHABLE"],"description":"The Lead state: AUTO_SCHEDULED (Not reached, back by the Call cadence), RESCHEDULED (callback set), INVISIBLE (out of the Call queue), EXPORTED (Converted) or NOT_REACHABLE."},{"type":"string","enum":["NULL"]},{"type":"array","items":{"anyOf":[{"type":"string","enum":["AUTO_SCHEDULED","RESCHEDULED","INVISIBLE","EXPORTED","NOT_REACHABLE"],"description":"The Lead state: AUTO_SCHEDULED (Not reached, back by the Call cadence), RESCHEDULED (callback set), INVISIBLE (out of the Call queue), EXPORTED (Converted) or NOT_REACHABLE."},{"type":"string","enum":["NULL"]}],"description":"A Lead state, or NULL for leads without one."}}],"description":"Leads in any of these Lead states. Repeat the parameter for several."},"required":false,"description":"Leads in any of these Lead states. Repeat the parameter for several.","name":"states","in":"query"},{"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"array","items":{"type":"string","format":"uuid"}}],"description":"Leads with any of these Tags. Repeat the parameter for several."},"required":false,"description":"Leads with any of these Tags. Repeat the parameter for several.","name":"tag","in":"query"},{"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","enum":["unassigned"]}],"description":"An Assignee's user id, or unassigned for leads without an Assignee."},"required":false,"description":"An Assignee's user id, or unassigned for leads without an Assignee.","name":"owner","in":"query"}],"responses":{"200":{"description":"One page of the organization's unsold leads the caller can see, for hunter's control panel, with who is in each lead, its tag, owner and latest status event","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ControlPanelLeadList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/leads/unlocked":{"get":{"tags":["Leads"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","default":"","description":"Search the leads by first name, last name, email or phone number; every word must match."},"required":false,"description":"Search the leads by first name, last name, email or phone number; every word must match.","name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"default":1,"description":"The 1-based page."},"required":false,"description":"The 1-based page.","name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"Leads per page."},"required":false,"description":"Leads per page.","name":"pageSize","in":"query"},{"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"array","items":{"type":"string","format":"uuid"}}],"description":"Leads with any of these Tags. Repeat the parameter for several."},"required":false,"description":"Leads with any of these Tags. Repeat the parameter for several.","name":"tag","in":"query"},{"schema":{"type":"string","enum":["true","false"],"default":"false","description":"true includes leads with a Tag the Organization's osiro.hunter settings hide."},"required":false,"description":"true includes leads with a Tag the Organization's osiro.hunter settings hide.","name":"tagOverride","in":"query"}],"responses":{"200":{"description":"One page of the unsold leads the caller can see that wait for their first call, newest first, with who is in each lead, its tag and the exact total","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnlockedLeadList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/leads/rescheduled":{"get":{"tags":["Leads"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"array","items":{"type":"string","format":"uuid"}}],"description":"Leads with any of these Tags. Repeat the parameter for several."},"required":false,"description":"Leads with any of these Tags. Repeat the parameter for several.","name":"tag","in":"query"},{"schema":{"type":"string","enum":["true","false"],"default":"false","description":"true includes leads with a Tag the Organization's osiro.hunter settings hide."},"required":false,"description":"true includes leads with a Tag the Organization's osiro.hunter settings hide.","name":"tagOverride","in":"query"}],"responses":{"200":{"description":"Up to 15 unsold leads the caller can see that are due for their call-back now or within the next 10 minutes, latest first, with who is in each lead and its tag","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RescheduledLeadList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/leads/count":{"get":{"tags":["Leads"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","enum":["UNSOLD","SINGLE_SOLD","MULTI_SOLD"],"description":"Whether the Lead is sold: UNSOLD, SINGLE_SOLD (an Exclusive sale) or MULTI_SOLD (Shared sales)."},"required":true,"description":"Whether the Lead is sold: UNSOLD, SINGLE_SOLD (an Exclusive sale) or MULTI_SOLD (Shared sales).","name":"saleState","in":"query"}],"responses":{"200":{"description":"How many of the organization's leads the caller can see are in the given sale state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadCount"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/leads/sold":{"get":{"tags":["Leads"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","default":"","description":"Search the leads by first name, last name, email or phone number; every word must match."},"required":false,"description":"Search the leads by first name, last name, email or phone number; every word must match.","name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"default":1,"description":"The 1-based page."},"required":false,"description":"The 1-based page.","name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"Leads per page."},"required":false,"description":"Leads per page.","name":"pageSize","in":"query"},{"schema":{"type":"string","enum":["all","paid","unpaid","refunded","duplicates"],"default":"all","description":"Which Lead sales: all, paid, unpaid, refunded, or duplicates (Duplicate leads given free)."},"required":false,"description":"Which Lead sales: all, paid, unpaid, refunded, or duplicates (Duplicate leads given free).","name":"filter","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Only the Lead sales to this Lead buyer."},"required":false,"description":"Only the Lead sales to this Lead buyer.","name":"contactId","in":"query"},{"schema":{"type":"string","enum":["sold_at.asc","sold_at.desc","price.asc","price.desc","name.asc","name.desc"],"default":"sold_at.desc","description":"The column and direction to sort by, as `<column>.<asc|desc>`: sold_at, price or name."},"required":false,"description":"The column and direction to sort by, as `<column>.<asc|desc>`: sold_at, price or name.","name":"sort","in":"query"}],"responses":{"200":{"description":"One page of the leads the organization sold that the caller can see, in the given order (newest sale first by default), with the total matching count","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SoldLeadList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/leads/refund-requests":{"get":{"tags":["Leads"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","default":"","description":"Search the leads by first name, last name, email or phone number; every word must match."},"required":false,"description":"Search the leads by first name, last name, email or phone number; every word must match.","name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"default":1,"description":"The 1-based page."},"required":false,"description":"The 1-based page.","name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"Leads per page."},"required":false,"description":"Leads per page.","name":"pageSize","in":"query"},{"schema":{"type":"string","enum":["all","pending"],"default":"all","description":"all Complaints, or only the pending ones."},"required":false,"description":"all Complaints, or only the pending ones.","name":"status","in":"query"},{"schema":{"type":"string","enum":["sold_at.asc","sold_at.desc","price.asc","price.desc","status.asc","status.desc"],"default":"sold_at.desc","description":"The column and direction to sort by, as `<column>.<asc|desc>`: sold_at (the Lead sale's date), price or status."},"required":false,"description":"The column and direction to sort by, as `<column>.<asc|desc>`: sold_at (the Lead sale's date), price or status.","name":"sort","in":"query"}],"responses":{"200":{"description":"One page of the refund requests on the organization's leads that the caller can see, in the requested order (newest sale first by default), with the total matching count","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundRequestList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/leads/refund-requests/stats":{"get":{"tags":["Leads"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"responses":{"200":{"description":"Pending refund requests, plus this month's resolved requests and refunded amount, over the sales the caller can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundRequestStats"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/leads/dashboard":{"get":{"tags":["Leads"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"The month as yyyy-MM, not in the future; defaults to the current month (UTC)."},"required":false,"description":"The month as yyyy-MM, not in the future; defaults to the current month (UTC).","name":"month","in":"query"}],"responses":{"200":{"description":"The osiro.direct dashboard for one month: buyer fill, refund rate and lead runway, over every sale the organization made","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadDashboard"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/leads/{leadId}/tag":{"put":{"tags":["Leads"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Lead's id."},"required":true,"description":"The Lead's id.","name":"leadId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadTagInput"}}}},"responses":{"200":{"description":"The lead has the tag, or none for `null`. A tag with a scheduler has scheduled the lead in the same transaction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadTagResult"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/leads/{leadId}/owner":{"put":{"tags":["Leads"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Lead's id."},"required":true,"description":"The Lead's id.","name":"leadId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadOwnerUpdate"}}}},"responses":{"204":{"description":"The lead has the new owner, and an OWNER_CHANGED event records the change"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/leads/{leadId}/lock":{"put":{"tags":["Lead lock"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Lead's id."},"required":true,"description":"The Lead's id.","name":"leadId","in":"path"}],"responses":{"204":{"description":"The caller holds the lock, pinged now; also the lead page's 30-second heartbeat"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["Lead lock"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Lead's id."},"required":true,"description":"The Lead's id.","name":"leadId","in":"path"}],"responses":{"204":{"description":"The caller no longer holds the lock; a colleague's lock, or one on another organization's lead, is left alone"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/tags":{"get":{"tags":["Tags"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","enum":["scheduler"],"description":"scheduler adds each Tag's Call cadences."},"required":false,"description":"scheduler adds each Tag's Call cadences.","name":"include","in":"query"}],"responses":{"200":{"description":"Every tag of the organization, newest first; with `include=scheduler`, each with its schedulers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Tags"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTagInput"}}}},"responses":{"201":{"description":"The new tag","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/tags/{tagId}":{"patch":{"tags":["Tags"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Tag's id."},"required":true,"description":"The Tag's id.","name":"tagId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTagInput"}}}},"responses":{"200":{"description":"The tag with the changes applied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["Tags"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Tag's id."},"required":true,"description":"The Tag's id.","name":"tagId","in":"path"}],"responses":{"204":{"description":"The tag is gone"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/leads/analytics/statistics":{"get":{"tags":["Lead statistics"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","enum":["DAY","WEEK","MONTH","QUARTER","YEAR"],"description":"A preset window ending now; MONTH when neither it nor startDate and endDate are given."},"required":false,"description":"A preset window ending now; MONTH when neither it nor startDate and endDate are given.","name":"period","in":"query"},{"schema":{"type":"string","description":"The window's first day, in timezone; goes with endDate."},"required":false,"description":"The window's first day, in timezone; goes with endDate.","name":"startDate","in":"query"},{"schema":{"type":"string","description":"The window's last day, in timezone; goes with startDate."},"required":false,"description":"The window's last day, in timezone; goes with startDate.","name":"endDate","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Only this Member's leads."},"required":false,"description":"Only this Member's leads.","name":"userId","in":"query"},{"schema":{"type":"string","default":"Europe/Berlin","description":"The IANA time zone the days and hours are counted in."},"required":false,"description":"The IANA time zone the days and hours are counted in.","name":"timezone","in":"query"}],"responses":{"200":{"description":"Call outcomes of the leads the caller may see, per hour for a single day and per day otherwise","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadChart"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/leads/analytics/refunds":{"get":{"tags":["Lead statistics"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","enum":["DAY","WEEK","MONTH","QUARTER","YEAR"],"description":"A preset window ending now; MONTH when neither it nor startDate and endDate are given."},"required":false,"description":"A preset window ending now; MONTH when neither it nor startDate and endDate are given.","name":"period","in":"query"},{"schema":{"type":"string","description":"The window's first day, in timezone; goes with endDate."},"required":false,"description":"The window's first day, in timezone; goes with endDate.","name":"startDate","in":"query"},{"schema":{"type":"string","description":"The window's last day, in timezone; goes with startDate."},"required":false,"description":"The window's last day, in timezone; goes with startDate.","name":"endDate","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Only this Member's leads."},"required":false,"description":"Only this Member's leads.","name":"userId","in":"query"},{"schema":{"type":"string","default":"Europe/Berlin","description":"The IANA time zone the days and hours are counted in."},"required":false,"description":"The IANA time zone the days and hours are counted in.","name":"timezone","in":"query"}],"responses":{"200":{"description":"Refund requests and their outcomes on the leads the caller may see, per hour for a single day and per day otherwise","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundChart"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/leads/analytics/quick-stats":{"get":{"tags":["Lead statistics"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","enum":["last_day","last_week","last_month","last_quarter","last_half_year","last_year","all"],"description":"The window the quick stats cover, ending now; all covers every lead the Organization ever had."},"required":true,"description":"The window the quick stats cover, ending now; all covers every lead the Organization ever had.","name":"timeFrame","in":"query"}],"responses":{"200":{"description":"osiro.hunter's dashboard quick stats: unsold leads the caller may see created in the time frame, with their call and conversion events, each beside its change against the previous window of the same length","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuickStats"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/ad-guidelines":{"get":{"tags":["Ad copy"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"responses":{"200":{"description":"The organization's ad guidelines, or the built-in default while it has none","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdGuidelines"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"tags":["Ad copy"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"adGuidelines":{"type":"string","nullable":true,"maxLength":20000,"description":"The full new Ad guidelines, or null to reset to the default."}},"required":["adGuidelines"],"additionalProperties":false}}}},"responses":{"200":{"description":"The guidelines as saved; `null` in the request resets to the default","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdGuidelines"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/company-profile":{"get":{"tags":["Company profile"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"responses":{"200":{"description":"The organization's company profile; every field is present, empty ones as null or []","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyProfile"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["Company profile"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyProfilePatch"}}}},"responses":{"200":{"description":"The whole company profile after saving the fields in the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyProfile"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/company-profile/prefill":{"post":{"tags":["Company profile"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyProfilePrefillCreate"}}}},"responses":{"200":{"description":"The prefill already in flight; an organization runs one at a time","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyProfilePrefillJob"}}}},"202":{"description":"The queued prefill; poll it until it is done, failed or cancelled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyProfilePrefillJob"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/company-profile/prefill/active":{"get":{"tags":["Company profile"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"responses":{"200":{"description":"The prefill in flight, or null","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyProfilePrefillActive"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/company-profile/prefill/{jobId}":{"get":{"tags":["Company profile"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The company profile prefill job's id."},"required":true,"description":"The company profile prefill job's id.","name":"jobId","in":"path"}],"responses":{"200":{"description":"The prefill","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyProfilePrefillJob"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/company-profile/prefill/{jobId}/cancel":{"post":{"tags":["Company profile"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The company profile prefill job's id."},"required":true,"description":"The company profile prefill job's id.","name":"jobId","in":"path"}],"responses":{"200":{"description":"The cancelled prefill, or the prefill as it ended when it already had","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyProfilePrefillJob"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/ad-copy":{"post":{"tags":["Ad copy"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"brief":{"type":"string","minLength":1,"maxLength":4000,"description":"What the ad is for: offer, audience, facts to use."},"variants":{"type":"integer","minimum":1,"maximum":5,"default":1,"description":"How many ads to write. They differ only slightly."}},"required":["brief"],"additionalProperties":false}}}},"responses":{"200":{"description":"Ready-to-paste Meta ads for the brief, written in the organization's ad guidelines","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedAdCopy"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/meta-ads/ad-accounts":{"get":{"tags":["Meta Ads"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"responses":{"200":{"description":"The ad accounts the organization's token can read; empty and not connected before a token is saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaAdAccountList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/meta-ads/ad-accounts/{adAccountId}/tree":{"get":{"tags":["Meta Ads"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","pattern":"^\\d+$","description":"A Meta object's numeric id; an ad account's without its act_ prefix."},"required":true,"description":"A Meta object's numeric id; an ad account's without its act_ prefix.","name":"adAccountId","in":"path"}],"responses":{"200":{"description":"The account's campaigns, their ad sets and their ads","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaAdTree"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/campaigns/{campaignId}/meta-ads/insights":{"get":{"tags":["Meta Ads"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Campaign's id."},"required":true,"description":"The Campaign's id.","name":"campaignId","in":"path"},{"schema":{"type":"string","format":"date","description":"The first day, inclusive, in the ad account's timezone."},"required":true,"description":"The first day, inclusive, in the ad account's timezone.","name":"since","in":"query"},{"schema":{"type":"string","format":"date","description":"The last day, inclusive, in the ad account's timezone."},"required":true,"description":"The last day, inclusive, in the ad account's timezone.","name":"until","in":"query"}],"responses":{"200":{"description":"Daily and period metrics of the Meta objects the campaign has enabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaInsights"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/campaigns/{campaignId}/meta-ads/report":{"get":{"tags":["Meta Ads"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Campaign's id."},"required":true,"description":"The Campaign's id.","name":"campaignId","in":"path"},{"schema":{"type":"string","format":"date","description":"The first day, inclusive, in the ad account's timezone."},"required":true,"description":"The first day, inclusive, in the ad account's timezone.","name":"since","in":"query"},{"schema":{"type":"string","format":"date","description":"The last day, inclusive, in the ad account's timezone."},"required":true,"description":"The last day, inclusive, in the ad account's timezone.","name":"until","in":"query"}],"responses":{"200":{"description":"Each enabled ad with its creative and one row per day, paused and archived ads included","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaAdsReport"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/schedule/host-settings":{"get":{"tags":["Schedule"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The user id of the Member whose settings to read. Left out, the caller's own."},"required":false,"description":"The user id of the Member whose settings to read. Left out, the caller's own.","name":"member","in":"query"}],"responses":{"200":{"description":"The caller's host settings, or `member`'s when the caller owns the organization","content":{"application/json":{"schema":{"type":"object","properties":{"viewerId":{"type":"string","description":"The caller's user id."},"isOwner":{"type":"boolean","description":"Whether the caller owns the Organization."},"targetUserId":{"type":"string","description":"The user id of the Member whose settings these are: the caller, or the member asked for."},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The Member's user id."},"firstName":{"type":"string","description":"The Member's first name."},"lastName":{"type":"string","description":"The Member's last name."},"email":{"type":"string","description":"The Member's email address."}},"required":["id","firstName","lastName","email"]},"description":"The Organization's Members, to pick whose settings to read."},"host":{"type":"object","nullable":true,"properties":{"id":{"type":"string","description":"The host's id."},"organization_id":{"type":"string","description":"The Organization's id."},"user_id":{"type":"string","description":"The host's user id."},"timezone":{"type":"string","description":"The host's IANA time zone; their availability is wall-clock time in it."},"removed_at":{"type":"string","nullable":true,"description":"When the host left the Organization; null while they are a member."},"created_at":{"type":"string","description":"When the Member became a host."}},"required":["id","organization_id","user_id","timezone","removed_at","created_at"],"description":"The Member as a host; null until they are one."},"schedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The schedule's id."},"organization_id":{"type":"string","description":"The Organization's id."},"host_id":{"type":"string","description":"The host who owns it."},"name":{"type":"string","description":"The schedule's name."},"is_default":{"type":"boolean","description":"Whether it is the host's default schedule, used by every event type without its own."},"created_at":{"type":"string","description":"When the schedule was added."},"availability_rule":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The weekly rule's id."},"schedule_id":{"type":"string","description":"The schedule it belongs to."},"weekday":{"type":"number","description":"The ISO weekday: 1 is Monday, 7 is Sunday."},"start_time":{"type":"string","description":"When the range starts, wall-clock in the host's time zone."},"end_time":{"type":"string","description":"When the range ends, wall-clock in the host's time zone."}},"required":["id","schedule_id","weekday","start_time","end_time"]},"description":"Its weekly hours, one row per range."},"availability_override":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The override's id."},"schedule_id":{"type":"string","description":"The schedule it belongs to."},"date":{"type":"string","description":"The date it replaces, YYYY-MM-DD."},"start_time":{"type":"string","nullable":true,"description":"When the range starts, wall-clock in the host's time zone; null when the day is off."},"end_time":{"type":"string","nullable":true,"description":"When the range ends, wall-clock in the host's time zone; null when the day is off."}},"required":["id","schedule_id","date","start_time","end_time"]},"description":"Its date overrides, which replace that date's weekly hours; one row per range, or one without times for a day off."}},"required":["id","organization_id","host_id","name","is_default","created_at","availability_rule","availability_override"]},"description":"The host's schedules with their hours."},"eventTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The event type's id."},"organization_id":{"type":"string","description":"The Organization's id."},"host_id":{"type":"string","description":"The host who owns it."},"schedule_id":{"type":"string","nullable":true,"description":"One of the host's schedules, whose hours apply; null uses the host's default schedule."},"title":{"type":"string","description":"The event type's title, shown to leads when they book."},"description":{"type":"string","nullable":true,"description":"Optional text shown on the booking step."},"duration_minutes":{"type":"number","description":"The first duration option, in minutes."},"duration_options":{"type":"array","items":{"type":"number","description":"One duration option, in minutes."},"description":"The duration options a lead picks from, in minutes, the first preselected."},"buffer_before_minutes":{"type":"number","description":"Minutes kept free before each meeting. They block slots and are not shown to leads."},"buffer_after_minutes":{"type":"number","description":"Minutes kept free after each meeting."},"minimum_notice_minutes":{"type":"number","description":"How far ahead a lead must book at the earliest, in minutes. It is also the cut-off before the start."},"max_days_ahead":{"type":"number","description":"How many days ahead a lead can book."},"location_kind":{"type":"string","enum":["phone","in_person","link","generated"],"description":"Where the meeting happens: phone, in_person, link or generated."},"location_value":{"type":"string","nullable":true,"description":"The address for in_person, or the URL for link."},"meeting_provider":{"type":"string","nullable":true,"enum":["fake","microsoft_teams","google_meet",null],"description":"Who makes the generated meeting, for location_kind generated."},"archived_at":{"type":"string","nullable":true,"description":"When it was archived; null while leads can book it."},"created_at":{"type":"string","description":"When the event type was added."},"capacity":{"type":"number","description":"The capacity: seats per group slot, or for a drop_in event type the seats at the same time; 1 for one_to_one."},"kind":{"type":"string","enum":["one_to_one","group","drop_in"],"description":"What leads book: one_to_one, group or drop_in."},"upcoming_bookings":{"type":"number","description":"Confirmed bookings of this event type that haven't ended, of every lead."},"timing_locked":{"type":"boolean","description":"Whether its duration and buffers can't change: a group event type with upcoming bookings."}},"required":["id","organization_id","host_id","schedule_id","title","description","duration_minutes","duration_options","buffer_before_minutes","buffer_after_minutes","minimum_notice_minutes","max_days_ahead","location_kind","location_value","meeting_provider","archived_at","created_at","capacity","kind","upcoming_bookings","timing_locked"]},"description":"The host's event types."},"meetingProviders":{"type":"array","items":{"type":"string","enum":["fake","microsoft_teams","google_meet"]},"description":"The providers a generated meeting can use for this host."}},"required":["viewerId","isOwner","targetUserId","members","host","schedules","eventTypes","meetingProviders"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/schedule/hosts":{"post":{"tags":["Schedule"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","format":"uuid","description":"The user id of the Member who becomes a host."},"timezone":{"type":"string","description":"The host's IANA time zone, e.g. Europe/Berlin. Their availability is wall-clock time in it."}},"required":["userId","timezone"]}}}},"responses":{"200":{"description":"The member is a host, whether or not they were before","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"Always true: the change was made."}},"required":["success"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/schedule/hosts/{hostId}":{"patch":{"tags":["Schedule"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Host's id."},"required":true,"description":"The Host's id.","name":"hostId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"timezone":{"type":"string","description":"The host's new IANA time zone, e.g. Europe/Berlin. Their availability keeps its wall-clock times."}},"required":["timezone"]}}}},"responses":{"200":{"description":"Time zone saved","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"Always true: the change was made."}},"required":["success"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/schedule/hosts/{hostId}/schedules":{"post":{"tags":["Schedule"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Host's id."},"required":true,"description":"The Host's id.","name":"hostId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"The schedule's name, e.g. Summer hours."}},"required":["name"]}}}},"responses":{"201":{"description":"The new schedule, with weekday hours from 9 to 5","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The new row's id."}},"required":["id"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/schedule/schedules/{scheduleId}":{"patch":{"tags":["Schedule"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Schedule's id."},"required":true,"description":"The Schedule's id.","name":"scheduleId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"The schedule's name, e.g. Summer hours."}},"required":["name"]}}}},"responses":{"200":{"description":"Schedule renamed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"Always true: the change was made."}},"required":["success"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["Schedule"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Schedule's id."},"required":true,"description":"The Schedule's id.","name":"scheduleId","in":"path"}],"responses":{"200":{"description":"Schedule deleted; the host's default schedule is never deleted and is not found here","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"Always true: the change was made."}},"required":["success"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/schedule/schedules/{scheduleId}/default":{"post":{"tags":["Schedule"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Schedule's id."},"required":true,"description":"The Schedule's id.","name":"scheduleId","in":"path"}],"responses":{"200":{"description":"The schedule is now its host's default","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"Always true: the change was made."}},"required":["success"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/schedule/schedules/{scheduleId}/weekly-rules":{"put":{"tags":["Schedule"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Schedule's id."},"required":true,"description":"The Schedule's id.","name":"scheduleId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"days":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"integer","minimum":1,"maximum":7,"description":"The ISO weekday: 1 is Monday, 7 is Sunday."},"ranges":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","pattern":"^\\d{2}:\\d{2}(:\\d{2})?$","description":"When the range starts: 24-hour HH:MM, wall-clock in the host's time zone."},"end":{"type":"string","pattern":"^\\d{2}:\\d{2}(:\\d{2})?$","description":"When the range ends: 24-hour HH:MM, wall-clock in the host's time zone. After start."}},"required":["start","end"],"description":"One stretch of availability within a day."},"description":"A day's time ranges, wall-clock in the host's time zone. Ranges must not overlap."}},"required":["weekday","ranges"]},"description":"The whole week: one { weekday, ranges } per working day. A weekday left out, or with no ranges, has no hours."}},"required":["days"]}}}},"responses":{"200":{"description":"The schedule's weekly hours, replaced","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"Always true: the change was made."}},"required":["success"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/schedule/schedules/{scheduleId}/overrides/{date}":{"put":{"tags":["Schedule"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Schedule's id."},"required":true,"description":"The Schedule's id.","name":"scheduleId","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A calendar date in the host's time zone, YYYY-MM-DD, e.g. 2026-12-24."},"required":true,"description":"A calendar date in the host's time zone, YYYY-MM-DD, e.g. 2026-12-24.","name":"date","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ranges":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","pattern":"^\\d{2}:\\d{2}(:\\d{2})?$","description":"When the range starts: 24-hour HH:MM, wall-clock in the host's time zone."},"end":{"type":"string","pattern":"^\\d{2}:\\d{2}(:\\d{2})?$","description":"When the range ends: 24-hour HH:MM, wall-clock in the host's time zone. After start."}},"required":["start","end"],"description":"One stretch of availability within a day."},"description":"The date's only hours, in place of its weekly hours, wall-clock in the host's time zone. Empty blocks the whole day."}},"required":["ranges"]}}}},"responses":{"200":{"description":"The date's hours, replaced; no ranges means the day is off","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"Always true: the change was made."}},"required":["success"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["Schedule"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Schedule's id."},"required":true,"description":"The Schedule's id.","name":"scheduleId","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A calendar date in the host's time zone, YYYY-MM-DD, e.g. 2026-12-24."},"required":true,"description":"A calendar date in the host's time zone, YYYY-MM-DD, e.g. 2026-12-24.","name":"date","in":"path"}],"responses":{"200":{"description":"The date follows the weekly hours again","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"Always true: the change was made."}},"required":["success"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/schedule/event-types":{"get":{"tags":["Schedule"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","default":"","description":"Only the items whose name matches the search. Empty lists every one."},"required":false,"description":"Only the items whose name matches the search. Empty lists every one.","name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"default":1,"description":"The page of results, from 1."},"required":false,"description":"The page of results, from 1.","name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Items per page."},"required":false,"description":"Items per page.","name":"pageSize","in":"query"},{"schema":{"type":"string","enum":["title.asc","title.desc","duration_minutes.asc","duration_minutes.desc","created_at.asc","created_at.desc"],"default":"created_at.asc","description":"The column and direction to sort by, as column.asc or .desc."},"required":false,"description":"The column and direction to sort by, as column.asc or .desc.","name":"sort","in":"query"},{"schema":{"type":"string","format":"uuid","description":"The user id of the Member whose event types to list. Left out, the caller's own."},"required":false,"description":"The user id of the Member whose event types to list. Left out, the caller's own.","name":"member","in":"query"},{"schema":{"type":"string","enum":["active","archived"],"default":"active","description":"active (bookable) or archived (kept for their bookings) event types."},"required":false,"description":"active (bookable) or archived (kept for their bookings) event types.","name":"status","in":"query"}],"responses":{"200":{"description":"One page of the caller's active or archived event types, or another member's with `member`, in the requested order (default: oldest first), with the total matching count","content":{"application/json":{"schema":{"type":"object","properties":{"eventTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The event type's id."},"title":{"type":"string","description":"The event type's title, shown to leads when they book."},"duration_minutes":{"type":"number","description":"The first duration option, in minutes."},"duration_options":{"type":"array","items":{"type":"number","description":"One duration option, in minutes."},"description":"The duration options a lead picks from, in minutes, the first preselected."},"location_kind":{"type":"string","enum":["phone","in_person","link","generated"],"description":"Where the meeting happens: phone, in_person, link or generated."},"created_at":{"type":"string","description":"When the event type was added."},"schedule_name":{"type":"string","nullable":true,"description":"The name of its own schedule; null when it follows the host's default schedule."}},"required":["id","title","duration_minutes","duration_options","location_kind","created_at","schedule_name"]},"description":"This page's event types."},"total":{"type":"number","description":"Every event type that matches, across pages."}},"required":["eventTypes","total"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/schedule/hosts/{hostId}/event-types":{"post":{"tags":["Schedule"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Host's id."},"required":true,"description":"The Host's id.","name":"hostId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"description":"The event type's title, shown to leads when they book."},"description":{"type":"string","nullable":true,"description":"Optional text shown on the booking step."},"durationMinutes":{"type":"integer","minimum":5,"maximum":720,"description":"The meeting's length in minutes: the first of durationOptions. Ignored when durationOptions is sent."},"durationOptions":{"type":"array","items":{"type":"integer","minimum":5,"maximum":720,"description":"One duration option, in minutes."},"minItems":1,"maxItems":12,"description":"The duration options a lead picks from when booking, in minutes, the first preselected, e.g. [30, 60]. Left out, durationMinutes is the only one. A group event type has exactly one. Removing a duration leaves existing bookings alone."},"bufferBeforeMinutes":{"type":"integer","minimum":0,"maximum":720,"description":"Minutes kept free before each meeting. They block slots and are not shown to leads."},"bufferAfterMinutes":{"type":"integer","minimum":0,"maximum":720,"description":"Minutes kept free after each meeting."},"minimumNoticeMinutes":{"type":"integer","minimum":0,"description":"How far ahead a lead must book at the earliest, in minutes. It is also the cut-off before the start."},"maxDaysAhead":{"type":"integer","minimum":1,"maximum":365,"description":"How many days ahead a lead can book."},"locationKind":{"type":"string","enum":["phone","in_person","link","generated"],"description":"Where the meeting happens: phone (the host calls the lead), in_person (locationValue is the address), link (locationValue is a fixed meeting URL) or generated (a generated meeting per booking, by meetingProvider)."},"locationValue":{"type":"string","nullable":true,"description":"The address for in_person, or the URL for link; ignored otherwise."},"meetingProvider":{"type":"string","nullable":true,"enum":["fake","microsoft_teams","google_meet",null],"description":"Who makes the generated meeting; required for locationKind generated, e.g. google_meet, which needs the host's active Google calendar connection. Ignored otherwise."},"scheduleId":{"type":"string","nullable":true,"format":"uuid","description":"One of the host's schedules, whose hours apply; null uses the host's default schedule."},"capacity":{"type":"integer","minimum":1,"maximum":500,"description":"The capacity. For a group event type, the seats of one group slot: how many leads can book the same start time. For a drop_in event type, how many leads' bookings may overlap at any moment. A one_to_one event type has 1. Without kind, 1 means one_to_one and above 1 group. Left out, an update keeps the stored capacity and a create gets 1. Lowering it cancels no one."},"kind":{"type":"string","enum":["one_to_one","group","drop_in"],"description":"What leads book: one_to_one (Einzeltermin, one lead per slot, one or more duration options), group (Gruppentermin: leads book seats in a group slot that starts and ends together, such as a course; exactly one duration option, capacity above 1) or drop_in (Platzbuchung: each lead books a seat for their own time and duration, such as an open workshop; capacity is the seats at the same time). Send capacity with it. Give a course its own schedule with the course times, or every free time in the host's hours can be booked. Left out, a stored drop_in event type stays one and the others follow capacity. Can't change while the event type has upcoming bookings; a group event type with upcoming bookings also keeps its duration and buffers."}},"required":["title","description","durationMinutes","bufferBeforeMinutes","bufferAfterMinutes","minimumNoticeMinutes","maxDaysAhead","locationKind","locationValue","meetingProvider","scheduleId"]}}}},"responses":{"201":{"description":"The new event type","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The new row's id."}},"required":["id"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/schedule/event-types/bookable":{"get":{"tags":["Schedule"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"responses":{"200":{"description":"Event types a funnel booking block can offer: not archived, host not removed","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The event type's id."},"title":{"type":"string","description":"The event type's title."},"hostName":{"type":"string","description":"The name of the host who owns it."}},"required":["id","title","hostName"]}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/schedule/event-types/{eventTypeId}":{"put":{"tags":["Schedule"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Event type's id."},"required":true,"description":"The Event type's id.","name":"eventTypeId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"description":"The event type's title, shown to leads when they book."},"description":{"type":"string","nullable":true,"description":"Optional text shown on the booking step."},"durationMinutes":{"type":"integer","minimum":5,"maximum":720,"description":"The meeting's length in minutes: the first of durationOptions. Ignored when durationOptions is sent."},"durationOptions":{"type":"array","items":{"type":"integer","minimum":5,"maximum":720,"description":"One duration option, in minutes."},"minItems":1,"maxItems":12,"description":"The duration options a lead picks from when booking, in minutes, the first preselected, e.g. [30, 60]. Left out, durationMinutes is the only one. A group event type has exactly one. Removing a duration leaves existing bookings alone."},"bufferBeforeMinutes":{"type":"integer","minimum":0,"maximum":720,"description":"Minutes kept free before each meeting. They block slots and are not shown to leads."},"bufferAfterMinutes":{"type":"integer","minimum":0,"maximum":720,"description":"Minutes kept free after each meeting."},"minimumNoticeMinutes":{"type":"integer","minimum":0,"description":"How far ahead a lead must book at the earliest, in minutes. It is also the cut-off before the start."},"maxDaysAhead":{"type":"integer","minimum":1,"maximum":365,"description":"How many days ahead a lead can book."},"locationKind":{"type":"string","enum":["phone","in_person","link","generated"],"description":"Where the meeting happens: phone (the host calls the lead), in_person (locationValue is the address), link (locationValue is a fixed meeting URL) or generated (a generated meeting per booking, by meetingProvider)."},"locationValue":{"type":"string","nullable":true,"description":"The address for in_person, or the URL for link; ignored otherwise."},"meetingProvider":{"type":"string","nullable":true,"enum":["fake","microsoft_teams","google_meet",null],"description":"Who makes the generated meeting; required for locationKind generated, e.g. google_meet, which needs the host's active Google calendar connection. Ignored otherwise."},"scheduleId":{"type":"string","nullable":true,"format":"uuid","description":"One of the host's schedules, whose hours apply; null uses the host's default schedule."},"capacity":{"type":"integer","minimum":1,"maximum":500,"description":"The capacity. For a group event type, the seats of one group slot: how many leads can book the same start time. For a drop_in event type, how many leads' bookings may overlap at any moment. A one_to_one event type has 1. Without kind, 1 means one_to_one and above 1 group. Left out, an update keeps the stored capacity and a create gets 1. Lowering it cancels no one."},"kind":{"type":"string","enum":["one_to_one","group","drop_in"],"description":"What leads book: one_to_one (Einzeltermin, one lead per slot, one or more duration options), group (Gruppentermin: leads book seats in a group slot that starts and ends together, such as a course; exactly one duration option, capacity above 1) or drop_in (Platzbuchung: each lead books a seat for their own time and duration, such as an open workshop; capacity is the seats at the same time). Send capacity with it. Give a course its own schedule with the course times, or every free time in the host's hours can be booked. Left out, a stored drop_in event type stays one and the others follow capacity. Can't change while the event type has upcoming bookings; a group event type with upcoming bookings also keeps its duration and buffers."}},"required":["title","description","durationMinutes","bufferBeforeMinutes","bufferAfterMinutes","minimumNoticeMinutes","maxDaysAhead","locationKind","locationValue","meetingProvider","scheduleId"]}}}},"responses":{"200":{"description":"Event type saved","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The new row's id."}},"required":["id"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/schedule/event-types/{eventTypeId}/archived":{"put":{"tags":["Schedule"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Event type's id."},"required":true,"description":"The Event type's id.","name":"eventTypeId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"archived":{"type":"boolean","description":"true archives the event type, so leads can no longer book it; false restores it. Its bookings stay either way."}},"required":["archived"]}}}},"responses":{"200":{"description":"Event type archived or restored","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"Always true: the change was made."}},"required":["success"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/schedule/handover":{"get":{"tags":["Schedule"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The user id of the Member about to leave, whose event types and upcoming bookings are counted."},"required":true,"description":"The user id of the Member about to leave, whose event types and upcoming bookings are counted.","name":"userId","in":"query"}],"responses":{"200":{"description":"What the member hosts that another member takes over when they are removed","content":{"application/json":{"schema":{"type":"object","properties":{"eventTypes":{"type":"integer","description":"How many event types the leaving Member hosts."},"upcomingBookings":{"type":"integer","description":"How many upcoming bookings they host."}},"required":["eventTypes","upcomingBookings"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/schedule/bookings/list":{"get":{"tags":["Schedule"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","default":"","description":"Only the items whose name matches the search. Empty lists every one."},"required":false,"description":"Only the items whose name matches the search. Empty lists every one.","name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"default":1,"description":"The page of results, from 1."},"required":false,"description":"The page of results, from 1.","name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Items per page."},"required":false,"description":"Items per page.","name":"pageSize","in":"query"},{"schema":{"type":"string","enum":["start_at.asc","start_at.desc","created_at.asc","created_at.desc","status.asc","status.desc"],"description":"The column and direction to sort by, as column.asc or .desc. Left out, upcoming is soonest first and past newest first."},"required":false,"description":"The column and direction to sort by, as column.asc or .desc. Left out, upcoming is soonest first and past newest first.","name":"sort","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Only this host's bookings. Left out, every host's."},"required":false,"description":"Only this host's bookings. Left out, every host's.","name":"host","in":"query"},{"schema":{"type":"string","enum":["upcoming","past"],"default":"upcoming","description":"upcoming (confirmed, not over yet) or past (over, or cancelled) bookings."},"required":false,"description":"upcoming (confirmed, not over yet) or past (over, or cancelled) bookings.","name":"status","in":"query"}],"responses":{"200":{"description":"One page of the upcoming or the past and cancelled bookings, in the requested order (default: upcoming soonest first, past newest first), with the total matching count","content":{"application/json":{"schema":{"type":"object","properties":{"bookings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The booking's id."},"startAt":{"type":"string","description":"When the meeting starts, ISO 8601 in UTC."},"endAt":{"type":"string","description":"When the meeting ends, ISO 8601 in UTC."},"status":{"type":"string","enum":["confirmed","cancelled"],"description":"confirmed or cancelled."},"cancelledAt":{"type":"string","nullable":true,"description":"When it was cancelled; null while confirmed."},"cancelReason":{"type":"string","nullable":true,"description":"Why it was cancelled, if a reason was given."},"leadTimezone":{"type":"string","description":"The IANA time zone the lead's emails use."},"rescheduledFrom":{"type":"string","nullable":true,"description":"The booking this one replaced by a reschedule, if any."},"meetingJoinUrl":{"type":"string","nullable":true,"description":"The generated meeting's join URL, if it has one."},"leadId":{"type":"string","description":"The lead's id."},"leadName":{"type":"string","nullable":true,"description":"The lead's name; null when the lead is hidden from the caller."},"leadEmail":{"type":"string","nullable":true,"description":"The lead's email address; null when they have none or are hidden from the caller."},"leadPhone":{"type":"string","nullable":true,"description":"The lead's phone number; null when they have none or are hidden from the caller."},"host":{"type":"object","properties":{"userId":{"type":"string","description":"The host's user id."},"name":{"type":"string","description":"The host's name."},"timezone":{"type":"string","description":"The host's IANA time zone."}},"required":["userId","name","timezone"],"description":"The host the lead booked."},"eventType":{"type":"object","properties":{"id":{"type":"string","description":"The event type's id."},"title":{"type":"string","description":"The event type's title."},"locationKind":{"type":"string","enum":["phone","in_person","link","generated"],"description":"Where the meeting happens: phone, in_person, link or generated."},"locationValue":{"type":"string","nullable":true,"description":"The address for in_person, or the URL for link."}},"required":["id","title","locationKind","locationValue"],"description":"The event type the lead booked."},"canCancel":{"type":"boolean","description":"Whether the caller can cancel it now."},"groupSlot":{"type":"object","nullable":true,"properties":{"key":{"type":"string","description":"Names the group slot among the bookings."},"capacity":{"type":"number","description":"The event type's capacity now."},"seatsTaken":{"type":"number","description":"Confirmed seats in the group slot, of every lead, hidden ones included."}},"required":["key","capacity","seatsTaken"],"description":"The group slot of a group booking; null for any other booking."},"dropIn":{"type":"object","nullable":true,"properties":{"capacity":{"type":"number","description":"The event type's capacity now."},"seatsTaken":{"type":"number","description":"Confirmed bookings of every lead at the busiest moment of this booking's time."}},"required":["capacity","seatsTaken"],"description":"The seats of a drop-in booking; null for any other booking."}},"required":["id","startAt","endAt","status","cancelledAt","cancelReason","leadTimezone","rescheduledFrom","meetingJoinUrl","leadId","leadName","leadEmail","leadPhone","host","eventType","canCancel","groupSlot"]},"description":"This page's bookings."},"total":{"type":"number","description":"Every booking that matches, across pages."}},"required":["bookings","total"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/schedule/bookings/{bookingId}/cancel":{"post":{"tags":["Schedule"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Booking's id."},"required":true,"description":"The Booking's id.","name":"bookingId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","nullable":true,"maxLength":1000,"description":"Why the booking is cancelled. The host's email shows it. Null gives none."}},"required":["reason"]}}}},"responses":{"200":{"description":"Booking cancelled; the lead is emailed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"Always true: the change was made."}},"required":["success"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/schedule/group-slots/cancel":{"post":{"tags":["Schedule"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"eventTypeId":{"type":"string","format":"uuid","description":"The group event type's id."},"startAt":{"type":"string","format":"date-time","description":"The group slot's start, ISO 8601 with Z or an offset."},"reason":{"type":"string","nullable":true,"maxLength":1000,"description":"Why the group slot is cancelled. Every lead's cancellation and the host's email show it. Null gives none."}},"required":["eventTypeId","startAt","reason"]}}}},"responses":{"200":{"description":"Every seat of the group slot cancelled; each lead is emailed, the host gets one summary","content":{"application/json":{"schema":{"type":"object","properties":{"cancelled":{"type":"integer","description":"How many seats this call cancelled."}},"required":["cancelled"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/schedule/calendar-connections":{"get":{"tags":["Schedule"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"responses":{"200":{"description":"The caller's connected calendar accounts","content":{"application/json":{"schema":{"type":"object","properties":{"googleAvailable":{"type":"boolean","description":"Whether this environment can connect Google Calendar; false while it is not set up."},"microsoftAvailable":{"type":"boolean","description":"Whether this environment can connect a Microsoft calendar; false while it is not set up."},"connections":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["google","microsoft"],"description":"google or microsoft."},"accountEmail":{"type":"string","description":"The calendar account's email address."},"status":{"type":"string","enum":["active","revoked"],"description":"Whether osiro can use it; revoked means the user reconnects in the web app."},"connectedAt":{"type":"string","description":"When it was connected."},"grantedScopes":{"type":"array","items":{"type":"string","description":"One granted scope."},"description":"The access the user granted osiro."}},"required":["provider","accountEmail","status","connectedAt"]},"description":"The caller's own calendar connections in the Organization; at most one."}},"required":["googleAvailable","microsoftAvailable","connections"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/schedule/calendar-connections/google":{"delete":{"tags":["Schedule"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"responses":{"200":{"description":"The caller's Google connection is gone and its grant revoked where Google allowed","content":{"application/json":{"schema":{"type":"object","properties":{"disconnected":{"type":"boolean","description":"Whether a calendar connection was removed."}},"required":["disconnected"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/schedule/calendar-connections/microsoft":{"delete":{"tags":["Schedule"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"responses":{"200":{"description":"The caller's Microsoft connection and its tokens are gone. Microsoft has no way to revoke the grant","content":{"application/json":{"schema":{"type":"object","properties":{"disconnected":{"type":"boolean","description":"Whether a calendar connection was removed."}},"required":["disconnected"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/schedule/calendar-connections/google/busy-calendars":{"get":{"tags":["Schedule"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"responses":{"200":{"description":"The caller's Google calendars and which count as busy; null without an active connection","content":{"application/json":{"schema":{"type":"object","nullable":true,"properties":{"accountEmail":{"type":"string","description":"The account the picks belong to; a save names it back."},"canPick":{"type":"boolean","description":"False when the host didn't grant osiro the calendar list."},"countTentative":{"type":"boolean","nullable":true,"description":"Outlook: whether tentative events block slots. Null for Google, which can't tell them apart."},"calendars":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The calendar's id."},"name":{"type":"string","description":"The calendar's name."},"primary":{"type":"boolean","description":"Whether it is the account's main calendar."},"selected":{"type":"boolean","description":"Whether its busy times block slots."},"reachable":{"type":"boolean","description":"False when the provider answered an error for it, or it is gone from the list."}},"required":["id","name","primary","selected","reachable"]},"description":"The account's calendars."}},"required":["accountEmail","canPick","countTentative","calendars"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"tags":["Schedule"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"accountEmail":{"type":"string","minLength":1,"description":"The account the picker loaded. A save for another account is refused."},"calendarIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1024,"description":"A calendar's id."},"maxItems":50,"description":"The calendars whose busy times block slots."},"countTentative":{"type":"boolean","description":"Outlook only: whether tentative events block slots. Ignored for Google."}},"required":["accountEmail","calendarIds"]}}}},"responses":{"200":{"description":"`saved` is false when the connection moved to another account since the picker loaded","content":{"application/json":{"schema":{"type":"object","properties":{"saved":{"type":"boolean","description":"False when the calendar connection moved to another account since the picker loaded."}},"required":["saved"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/schedule/calendar-connections/microsoft/busy-calendars":{"get":{"tags":["Schedule"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"responses":{"200":{"description":"The caller's Outlook calendars and which count as busy; null without an active connection","content":{"application/json":{"schema":{"type":"object","nullable":true,"properties":{"accountEmail":{"type":"string","description":"The account the picks belong to; a save names it back."},"canPick":{"type":"boolean","description":"False when the host didn't grant osiro the calendar list."},"countTentative":{"type":"boolean","nullable":true,"description":"Outlook: whether tentative events block slots. Null for Google, which can't tell them apart."},"calendars":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The calendar's id."},"name":{"type":"string","description":"The calendar's name."},"primary":{"type":"boolean","description":"Whether it is the account's main calendar."},"selected":{"type":"boolean","description":"Whether its busy times block slots."},"reachable":{"type":"boolean","description":"False when the provider answered an error for it, or it is gone from the list."}},"required":["id","name","primary","selected","reachable"]},"description":"The account's calendars."}},"required":["accountEmail","canPick","countTentative","calendars"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"tags":["Schedule"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"accountEmail":{"type":"string","minLength":1,"description":"The account the picker loaded. A save for another account is refused."},"calendarIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1024,"description":"A calendar's id."},"maxItems":50,"description":"The calendars whose busy times block slots."},"countTentative":{"type":"boolean","description":"Outlook only: whether tentative events block slots. Ignored for Google."}},"required":["accountEmail","calendarIds"]}}}},"responses":{"200":{"description":"`saved` is false when the connection moved to another account since the picker loaded","content":{"application/json":{"schema":{"type":"object","properties":{"saved":{"type":"boolean","description":"False when the calendar connection moved to another account since the picker loaded."}},"required":["saved"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/campaigns/{campaignId}/autopilot/proposals":{"get":{"tags":["Autopilot"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Campaign's id."},"required":true,"description":"The Campaign's id.","name":"campaignId","in":"path"}],"responses":{"200":{"description":"The campaign's proposals waiting for a decision, being carried out, or failed on Meta","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutopilotProposalList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/autopilot/proposals/{proposalId}/approve":{"post":{"tags":["Autopilot"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Proposal's id."},"required":true,"description":"The Proposal's id.","name":"proposalId","in":"path"}],"responses":{"200":{"description":"The proposal after it was carried out (on Meta, or by publishing the landing page): `executed`, or `failed` with the reason","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutopilotProposal"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/autopilot/proposals/{proposalId}/reject":{"post":{"tags":["Autopilot"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Proposal's id."},"required":true,"description":"The Proposal's id.","name":"proposalId","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutopilotReject"}}}},"responses":{"200":{"description":"The rejected proposal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutopilotProposal"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/autopilot/proposals/{proposalId}/retry":{"post":{"tags":["Autopilot"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Proposal's id."},"required":true,"description":"The Proposal's id.","name":"proposalId","in":"path"}],"responses":{"200":{"description":"The failed proposal after it was carried out again","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutopilotProposal"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/campaigns/{campaignId}/autopilot/runs":{"post":{"tags":["Autopilot"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Campaign's id."},"required":true,"description":"The Campaign's id.","name":"campaignId","in":"path"}],"responses":{"202":{"description":"The run started; it carries on in the background. Follow it through the latest run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutopilotRun"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/campaigns/{campaignId}/autopilot/runs/latest":{"get":{"tags":["Autopilot"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Campaign's id."},"required":true,"description":"The Campaign's id.","name":"campaignId","in":"path"}],"responses":{"200":{"description":"The campaign's latest run with its snapshot and raw output; null before its first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutopilotLastRun"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/landing-pages/{pageId}/autopilot/runs":{"post":{"tags":["Autopilot"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Landing page's id."},"required":true,"description":"The Landing page's id.","name":"pageId","in":"path"}],"responses":{"202":{"description":"The Landing page Run started; it carries on in the background. Follow it through the latest run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutopilotRun"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/landing-pages/{pageId}/autopilot/runs/latest":{"get":{"tags":["Autopilot"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Landing page's id."},"required":true,"description":"The Landing page's id.","name":"pageId","in":"path"}],"responses":{"200":{"description":"The Landing page's latest Run, null before its first, and why a new one can't start now","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutopilotSubjectState"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/landing-pages/{pageId}/autopilot/proposals":{"get":{"tags":["Autopilot"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Landing page's id."},"required":true,"description":"The Landing page's id.","name":"pageId","in":"path"}],"responses":{"200":{"description":"The Proposals of the Landing page's Runs waiting for a decision, being carried out or failed, and its executed ones with their Outcomes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutopilotProposalList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/funnels/{funnelId}/autopilot/runs":{"post":{"tags":["Autopilot"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Funnel's id."},"required":true,"description":"The Funnel's id.","name":"funnelId","in":"path"}],"responses":{"202":{"description":"The Funnel Run started; it carries on in the background. Follow it through the latest run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutopilotRun"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/funnels/{funnelId}/autopilot/runs/latest":{"get":{"tags":["Autopilot"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Funnel's id."},"required":true,"description":"The Funnel's id.","name":"funnelId","in":"path"}],"responses":{"200":{"description":"The Funnel's latest Run, null before its first, and why a new one can't start now","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutopilotSubjectState"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/funnels/{funnelId}/autopilot/proposals":{"get":{"tags":["Autopilot"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Funnel's id."},"required":true,"description":"The Funnel's id.","name":"funnelId","in":"path"}],"responses":{"200":{"description":"The Proposals of the Funnel's Runs waiting for a decision, being carried out or failed, and its executed ones with their Outcomes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutopilotProposalList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/autopilot/campaign-generations":{"post":{"tags":["Autopilot"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignGenerationCreate"}}}},"responses":{"201":{"description":"The draft campaign exists and its generation is queued. Follow it on the campaign's generation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignGenerationStarted"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/campaigns/{campaignId}/autopilot/generation":{"get":{"tags":["Autopilot"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Campaign's id."},"required":true,"description":"The Campaign's id.","name":"campaignId","in":"path"}],"responses":{"200":{"description":"The campaign's generation, its status and a checklist read from what the campaign holds; null for a campaign made without one","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignGenerationLookup"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/campaigns/{campaignId}/autopilot/generation/retry":{"post":{"tags":["Autopilot"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Campaign's id."},"required":true,"description":"The Campaign's id.","name":"campaignId","in":"path"}],"responses":{"202":{"description":"The incomplete generation is queued again. Its new run keeps what exists and builds only what is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignGenerationStarted"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/campaigns/{campaignId}/ads":{"get":{"tags":["Ads"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Campaign's id."},"required":true,"description":"The Campaign's id.","name":"campaignId","in":"path"}],"responses":{"200":{"description":"The campaign's ads, oldest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2/organizations/{orgId}/ads/{adId}":{"patch":{"tags":["Ads"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The organization's id."},"required":true,"description":"The organization's id.","name":"orgId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The Ad's id."},"required":true,"description":"The Ad's id.","name":"adId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdUpdate"}}}},"responses":{"200":{"description":"The ad as saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ad"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}