{"openapi":"3.1.0","info":{"title":"DemoSix API","version":"1","summary":"Read who watched, how far, and the leads your signature links bring in.","description":"Every call carries an API key made on Settings, Developers: `Authorization: Bearer dsx_...`. A key reaches the Networks chosen when it was made, with read-only scopes: `leads:read`, `watched:read`, `demos:read`, `webhooks:manage`. Answers are JSON, dates are ISO 8601, lists use `cursor` and `limit` (up to 100). Reads are limited to 120 a minute per key; Who watched and totals to 10 a minute. Webhooks post signed JSON to an https address: see the Developers page for the signature check.","termsOfService":"https://demosix.com/terms","contact":{"name":"DemoSix support","email":"support@demosix.com","url":"https://demosix.com/developers"}},"servers":[{"url":"https://demosix.com/api/v1"}],"security":[{"apiKey":[]}],"tags":[{"name":"Workspace","description":"What the key is and reaches."},{"name":"Leads","description":"What the Leads page shows."},{"name":"Watching","description":"Who watched and per-demo totals."},{"name":"Webhooks","description":"Addresses DemoSix posts events to."}],"paths":{"/me":{"get":{"tags":["Workspace"],"operationId":"getMe","summary":"Who this key is","responses":{"200":{"description":"The key's workspace, scopes and Networks.","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["api_key","oauth_user"]},"workspace":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"scopes":{"type":"array","items":{"type":"string","enum":["leads:read","watched:read","demos:read","webhooks:manage"]}},"networks":{"type":"array","items":{"$ref":"#/components/schemas/Network"}}},"required":["kind","workspace","scopes","networks"]}}}},"401":{"description":"No key, or a revoked, expired or unknown one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the person lacks the role.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or outside what the key reaches.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls; Retry-After says when.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/networks":{"get":{"tags":["Workspace"],"operationId":"listNetworks","summary":"The Networks the key reaches","responses":{"200":{"description":"Networks.","content":{"application/json":{"schema":{"type":"object","properties":{"networks":{"type":"array","items":{"$ref":"#/components/schemas/Network"}}},"required":["networks"]}}}},"401":{"description":"No key, or a revoked, expired or unknown one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the person lacks the role.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or outside what the key reaches.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls; Retry-After says when.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/networks/{networkId}/leads":{"get":{"tags":["Leads"],"operationId":"listLeads","summary":"The Leads list","description":"The same filters and order as the Leads page. `search` matches name, email and answers.","parameters":[{"name":"networkId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"A Network the key reaches. GET /networks lists them."},{"name":"search","in":"query","schema":{"type":"string","maxLength":200}},{"name":"engagement","in":"query","schema":{"type":"string","enum":["all","NOT_STARTED","STARTED","ENGAGED"]}},{"name":"link","in":"query","schema":{"type":"string","format":"uuid"},"description":"Leads a given link first brought in."},{"name":"from","in":"query","schema":{"type":"string"},"description":"Leads a given teammate's address brought in (their user id)."},{"name":"marketing","in":"query","schema":{"type":"string","enum":["GRANTED","WITHDRAWN"]}},{"name":"sort","in":"query","schema":{"type":"string","enum":["recent","least_recent","name","name_desc","watched","watched_least","oldest","engagement"]}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"The previous page's `next_cursor`."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}],"responses":{"200":{"description":"A page of leads, newest activity first unless sorted otherwise.","content":{"application/json":{"schema":{"type":"object","properties":{"network":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"leads":{"type":"array","items":{"$ref":"#/components/schemas/Lead"}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","description":"Every lead the caller may see."},"filtered":{"type":"integer","description":"Those matching the filters."},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"removed":{"type":"boolean"}}}},"people":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"handle":{"type":["string","null"]}}}}},"required":["network","leads","next_cursor","total","filtered","links","people"]}}}},"401":{"description":"No key, or a revoked, expired or unknown one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the person lacks the role.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or outside what the key reaches.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls; Retry-After says when.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/networks/{networkId}/leads/find":{"get":{"tags":["Leads"],"operationId":"findLeadByEmail","summary":"One lead by email","parameters":[{"name":"networkId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"A Network the key reaches. GET /networks lists them."},{"name":"email","in":"query","required":true,"schema":{"type":"string","format":"email"}}],"responses":{"200":{"description":"The lead, with detail.","content":{"application/json":{"schema":{"type":"object","properties":{"lead":{"$ref":"#/components/schemas/LeadDetail"}},"required":["lead"]}}}},"401":{"description":"No key, or a revoked, expired or unknown one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the person lacks the role.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or outside what the key reaches.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls; Retry-After says when.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/networks/{networkId}/leads/{leadId}":{"get":{"tags":["Leads"],"operationId":"getLead","summary":"One lead","parameters":[{"name":"networkId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"A Network the key reaches. GET /networks lists them."},{"name":"leadId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The lead with answers, per-demo watching and consent history.","content":{"application/json":{"schema":{"type":"object","properties":{"lead":{"$ref":"#/components/schemas/LeadDetail"}},"required":["lead"]}}}},"401":{"description":"No key, or a revoked, expired or unknown one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the person lacks the role.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or outside what the key reaches.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls; Retry-After says when.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/networks/{networkId}/links":{"get":{"tags":["Leads"],"operationId":"listLinks","summary":"The Network's signature links","description":"Ids, names and settings. Never a token: the API reads, it does not hand out addresses.","parameters":[{"name":"networkId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"A Network the key reaches. GET /networks lists them."}],"responses":{"200":{"description":"Links.","content":{"application/json":{"schema":{"type":"object","properties":{"network":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"captures_leads":{"type":"boolean"},"active":{"type":"boolean"},"channel_ids":{"type":["array","null"],"items":{"type":"string","format":"uuid"},"description":"Null means every Channel."},"people":{"oneOf":[{"type":"string","enum":["everyone"]},{"type":"array","items":{"type":"string"}}],"description":"Who puts it in their signature: everyone on the team, or the listed user ids."},"business_emails_only":{"type":"boolean"},"email_verification":{"type":"boolean"},"blocked_domains":{"type":"integer"},"lead_count":{"type":"integer"},"capturing_since":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"}}}}},"required":["network","links"]}}}},"401":{"description":"No key, or a revoked, expired or unknown one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the person lacks the role.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or outside what the key reaches.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls; Retry-After says when.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/networks/{networkId}/demo-requests":{"get":{"tags":["Leads"],"operationId":"listDemoRequests","summary":"Demo requests","description":"What the Requests tab shows: people and leads asking the Network for a demo.","parameters":[{"name":"networkId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"A Network the key reaches. GET /networks lists them."},{"name":"status","in":"query","schema":{"type":"string","enum":["open","done"],"default":"open"}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Requests.","content":{"application/json":{"schema":{"type":"object","properties":{"network":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"requests":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"text":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"done_at":{"type":["string","null"],"format":"date-time"},"done_by":{"type":["string","null"]},"from":{"type":"object","properties":{"kind":{"type":"string","enum":["FOLLOWER","VIEWER","LEAD"]},"name":{"type":"string"},"handle":{"type":["string","null"]},"email":{"type":["string","null"],"description":"A lead's email; null for a member."},"lead_id":{"type":["string","null"]},"link_name":{"type":["string","null"]}}}}}},"counts":{"type":"object","properties":{"open":{"type":"integer"},"done":{"type":"integer"}}},"next_cursor":{"type":["string","null"]}},"required":["network","requests","counts","next_cursor"]}}}},"401":{"description":"No key, or a revoked, expired or unknown one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the person lacks the role.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or outside what the key reaches.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls; Retry-After says when.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/networks/{networkId}/watched":{"get":{"tags":["Watching"],"operationId":"getWhoWatched","summary":"Who watched, for one Channel","description":"Private Networks on Business only. Every demo of the Channel against every person who can see it: WATCHED, PART_WAY or NOT_WATCHED, with a percentage.","parameters":[{"name":"networkId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"A Network the key reaches. GET /networks lists them."},{"name":"channel","in":"query","schema":{"type":"string","format":"uuid"},"description":"A Channel id; the first Channel when left out."}],"responses":{"200":{"description":"Who watched.","content":{"application/json":{"schema":{"type":"object","properties":{"network":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}}},"channel":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"people":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"handle":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"}}}},"demos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"duration_ms":{"type":["integer","null"]},"watched":{"type":"integer"},"part_way":{"type":"integer"},"not_started":{"type":"integer"},"people":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"state":{"type":"string","enum":["WATCHED","PART_WAY","NOT_WATCHED"]},"percent":{"type":["number","null"]}}}}}}}},"required":["network","channels","channel","people","demos"]}}}},"401":{"description":"No key, or a revoked, expired or unknown one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The Network's workspace is not on Business.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the person lacks the role.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or outside what the key reaches.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls; Retry-After says when.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/networks/{networkId}/demos":{"get":{"tags":["Watching"],"operationId":"listDemoTotals","summary":"Every demo with its totals","parameters":[{"name":"networkId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"A Network the key reaches. GET /networks lists them."}],"responses":{"200":{"description":"Demos.","content":{"application/json":{"schema":{"type":"object","properties":{"network":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"demos":{"type":"array","items":{"$ref":"#/components/schemas/DemoTotals"}}},"required":["network","demos"]}}}},"401":{"description":"No key, or a revoked, expired or unknown one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the person lacks the role.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or outside what the key reaches.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls; Retry-After says when.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/demos/{demoId}/stats":{"get":{"tags":["Watching"],"operationId":"getDemoTotals","summary":"One demo's totals","parameters":[{"name":"demoId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The demo's totals.","content":{"application/json":{"schema":{"type":"object","properties":{"network":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"demo":{"$ref":"#/components/schemas/DemoTotals"}},"required":["network","demo"]}}}},"401":{"description":"No key, or a revoked, expired or unknown one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the person lacks the role.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or outside what the key reaches.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls; Retry-After says when.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks":{"get":{"tags":["Webhooks"],"operationId":"listWebhooks","summary":"The workspace's webhook addresses","responses":{"200":{"description":"Webhooks.","content":{"application/json":{"schema":{"type":"object","properties":{"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}}},"required":["webhooks"]}}}},"401":{"description":"No key, or a revoked, expired or unknown one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the person lacks the role.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or outside what the key reaches.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls; Retry-After says when.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Webhooks"],"operationId":"createWebhook","summary":"Add a webhook address","description":"Needs `webhooks:manage`. The signing secret is in the answer, once. This is also the REST Hook subscribe call Zapier makes.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"https only; never a private address."},"description":{"type":"string","maxLength":120},"eventTypes":{"type":"array","items":{"type":"string","enum":["lead.created","lead.engaged","lead.demo_requested","lead.marketing_withdrawn","lead.deleted"]},"minItems":1},"networkIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1}},"required":["url","eventTypes","networkIds"]}}}},"responses":{"201":{"description":"Made. Keep the secret: it is not shown again.","content":{"application/json":{"schema":{"type":"object","properties":{"webhook":{"$ref":"#/components/schemas/Webhook"},"secret":{"type":"string","description":"whsec_…; verifies X-Demosix-Signature."}},"required":["webhook","secret"]}}}},"401":{"description":"No key, or a revoked, expired or unknown one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the person lacks the role.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or outside what the key reaches.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The workspace already holds ten webhooks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A bad address, no event or no Network.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls; Retry-After says when.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{endpointId}":{"get":{"tags":["Webhooks"],"operationId":"getWebhook","summary":"One webhook","parameters":[{"name":"endpointId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The webhook.","content":{"application/json":{"schema":{"type":"object","properties":{"webhook":{"$ref":"#/components/schemas/Webhook"}},"required":["webhook"]}}}},"401":{"description":"No key, or a revoked, expired or unknown one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the person lacks the role.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or outside what the key reaches.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls; Retry-After says when.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Webhooks"],"operationId":"deleteWebhook","summary":"Remove a webhook","description":"Also the REST Hook unsubscribe call Zapier makes.","parameters":[{"name":"endpointId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Removed.","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"}}}}}},"401":{"description":"No key, or a revoked, expired or unknown one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the person lacks the role.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or outside what the key reaches.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls; Retry-After says when.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{endpointId}/test":{"post":{"tags":["Webhooks"],"operationId":"testWebhook","summary":"Send a sample event now","parameters":[{"name":"endpointId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"What happened.","content":{"application/json":{"schema":{"type":"object","properties":{"delivered":{"type":"boolean"},"response_status":{"type":["integer","null"]},"response_ms":{"type":"integer"},"error_code":{"type":["string","null"]},"delivery_id":{"type":"string"}}}}}},"401":{"description":"No key, or a revoked, expired or unknown one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, or the person lacks the role.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or outside what the key reaches.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls; Retry-After says when.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An API key from Settings, Developers: `Authorization: Bearer dsx_...`."}},"schemas":{"Network":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":"string","enum":["PUBLIC","PRIVATE"]},"web_name":{"type":["string","null"],"description":"The company address's first part: <web_name>.demosix.com."},"created_at":{"type":"string","format":"date-time"}},"required":["id","name","type","web_name","created_at"]},"Lead":{"type":"object","description":"A prospect who came through a signature link. The details are what they typed on the company's form; watching is measured from playback that actually ran.","properties":{"id":{"type":"string","format":"uuid"},"network_id":{"type":"string","format":"uuid"},"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string","format":"email"},"email_verified":{"type":"boolean","description":"True when they entered the code emailed to them. When a link requires verification, a lead exists only once they did."},"email_verified_at":{"type":["string","null"],"format":"date-time"},"engagement_state":{"type":"string","enum":["NOT_STARTED","STARTED","ENGAGED"],"description":"NOT_STARTED: submitted the form, nothing played. STARTED: something played. ENGAGED: at least half of one demo played."},"engaged_at":{"type":["string","null"],"format":"date-time"},"best_ratio":{"type":["number","null"],"minimum":0,"maximum":1,"description":"The most of any one demo they have watched, 0 to 1."},"demos_started":{"type":"integer"},"first_submitted_at":{"type":"string","format":"date-time"},"last_activity_at":{"type":"string","format":"date-time"},"submission_count":{"type":"integer"},"visit_count":{"type":"integer"},"marketing_status":{"type":"string","enum":["GRANTED","WITHDRAWN"]},"calls_texts_agreed_at":{"type":["string","null"],"format":"date-time"},"link":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"removed":{"type":"boolean"}},"required":["id","name","removed"]},"link_owner":{"type":["object","null"],"description":"The teammate whose signature link first brought them in.","properties":{"user_id":{"type":"string"},"name":{"type":"string"},"handle":{"type":["string","null"]}},"required":["user_id","name","handle"]},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"question":{"type":"string","description":"The question as it was worded when they were asked."},"type":{"type":"string","enum":["SHORT_TEXT","LONG_TEXT","SELECT","PHONE"]},"answer":{"type":"string"}},"required":["id","question","type","answer"]},"description":"Present on one lead's detail and in webhook bodies; the list leaves it out."},"url":{"type":"string","format":"uri","description":"The lead in the DemoSix app."}},"required":["id","network_id","first_name","last_name","email","email_verified","engagement_state","best_ratio","demos_started","first_submitted_at","last_activity_at","submission_count","visit_count","marketing_status","link","link_owner","url"]},"LeadDetail":{"allOf":[{"$ref":"#/components/schemas/Lead"},{"type":"object","properties":{"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"question":{"type":"string","description":"The question as it was worded when they were asked."},"type":{"type":"string","enum":["SHORT_TEXT","LONG_TEXT","SELECT","PHONE"]},"answer":{"type":"string"}},"required":["id","question","type","answer"]}},"last_submitted_at":{"type":"string","format":"date-time"},"marketing_status_at":{"type":"string","format":"date-time"},"consent_recipient_name":{"type":"string"},"notice_version":{"type":"string"},"has_active_session":{"type":"boolean"},"not_asked":{"type":"array","items":{"type":"string"}},"progress":{"type":"array","items":{"type":"object","properties":{"demo_id":{"type":"string"},"demo_title":{"type":"string"},"content_version":{"type":"string"},"covered_ms":{"type":"integer"},"duration_ms":{"type":["integer","null"]},"ratio":{"type":["number","null"]},"engaged":{"type":"boolean"},"started_at":{"type":"string","format":"date-time"},"last_played_at":{"type":"string","format":"date-time"}},"required":["demo_id","demo_title","covered_ms","duration_ms","ratio","engaged","started_at","last_played_at"]}},"consent":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["ACCEPTED","WITHDRAWN","RECONFIRMED"]},"sharing_accepted":{"type":"boolean"},"marketing_accepted":{"type":"boolean"},"recipient_name":{"type":"string"},"notice_version":{"type":"string"},"wording":{"type":"string","description":"The exact sentence they agreed to."},"calls_texts_accepted":{"type":"boolean"},"calls_texts_wording":{"type":["string","null"]},"calls_texts_number":{"type":["string","null"]},"occurred_at":{"type":"string","format":"date-time"}},"required":["kind","sharing_accepted","marketing_accepted","wording","occurred_at"]}}},"required":["answers","progress","consent"]}]},"DemoTotals":{"type":"object","description":"Counts for one demo. Never names a person: the leads and watched endpoints do that under their own rules.","properties":{"id":{"type":"string"},"title":{"type":"string"},"channel":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"duration_ms":{"type":["integer","null"]},"view_count":{"type":"integer","description":"The public view count."},"created_at":{"type":"string","format":"date-time"},"leads":{"type":"object","properties":{"started":{"type":"integer"},"engaged":{"type":"integer","description":"Leads who reached half of this demo."},"average_ratio":{"type":["number","null"]}},"required":["started","engaged","average_ratio"]},"members":{"type":["object","null"],"description":"Private Networks on Business only; null elsewhere.","properties":{"audience":{"type":"integer"},"watched":{"type":"integer"},"part_way":{"type":"integer"},"not_started":{"type":"integer"},"average_ratio":{"type":["number","null"]}},"required":["audience","watched","part_way","not_started","average_ratio"]}},"required":["id","title","channel","duration_ms","view_count","created_at","leads","members"]},"Webhook":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"description":{"type":"string"},"event_types":{"type":"array","items":{"type":"string","enum":["lead.created","lead.engaged","lead.demo_requested","lead.marketing_withdrawn","lead.deleted"]}},"network_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"status":{"type":"string","enum":["ACTIVE","PAUSED_FAILING","DISABLED"]},"source":{"type":"string","enum":["OWNER","ZAPIER"]},"last_delivery_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"}},"required":["id","url","event_types","network_ids","status","source","created_at"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object"},"requestId":{"type":"string"}},"required":["code","message"]}}},"WebhookEvent":{"type":"object","description":"What DemoSix posts to a webhook address. Signed: X-Demosix-Signature is `v1=` + hex HMAC-SHA256 of `<X-Demosix-Timestamp>.<raw body>` under the endpoint's secret.","properties":{"id":{"type":"string","description":"The delivery id, stable across retries of this event to this address."},"event_id":{"type":"string","description":"The event's id, the same for every address it goes to; drop a duplicate by it."},"type":{"type":"string","enum":["lead.created","lead.engaged","lead.demo_requested","lead.marketing_withdrawn","lead.deleted","test"]},"occurred_at":{"type":"string","format":"date-time"},"network":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"web_name":{"type":["string","null"]}}},"lead":{"oneOf":[{"$ref":"#/components/schemas/LeadDetail"},{"type":"object","description":"For lead.deleted: what is left to find the record by.","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"}}}]},"demo":{"type":"object","description":"On lead.engaged.","properties":{"id":{"type":"string"},"title":{"type":"string"},"ratio":{"type":"number"}}},"request":{"type":"object","description":"On lead.demo_requested.","properties":{"id":{"type":"string","format":"uuid"},"text":{"type":"string"}}},"reason":{"type":"string","enum":["request","retention"],"description":"On lead.deleted."},"actor":{"type":"object","description":"On lead.marketing_withdrawn.","properties":{"role":{"type":"string","enum":["OWNER","ADMIN"]}}}},"required":["id","event_id","type","occurred_at","network","lead"]}}}}