{"openapi":"3.1.0","info":{"title":"SparkOps API","version":"1","description":"Start campaigns for your contacts, stop texting people who unsubscribed elsewhere, end campaigns your team closed, and receive webhooks about what happened next. Every request sends an API key from Setup › API. 120 requests a minute per business."},"servers":[{"url":"https://app.sparkops.com"}],"security":[{"apiKey":[]}],"paths":{"/api/v1/conversations":{"post":{"operationId":"startACampaign","summary":"Start a campaign","description":"Starts a published, live campaign for someone: their contact is found by phone or made, and the campaign's opening goes out.\n\nAn inquiry (the default: they just asked you to get in touch) gets its opening at once, at any hour, as a reply. Outreach waits for the texting hours of where they live, which SparkOps works out from their address, or else their area code, and for your business's hours if you've set them. Send `entry: \"outreach\"` for anyone who didn't just ask (someone from a list, an old form, a CRM you're working through): otherwise they're texted at once, even at night.\n\nWhat happens to the contact: they are found by their number within your business, or made. A field left out, null, empty or only spaces changes nothing: nothing a request says clears a value. A value replaces what's stored when it differs. An address replaces the stored one whole. Metadata merges field by field. A value that can't be used (an email that isn't one) is skipped and named under `contact.ignored`, and the rest is saved; so is a field SparkOps doesn't know. The contact is updated even when the conversation is refused (they opted out, or are already in one), but not when the request itself can't be read. Every change is recorded with the key that made it.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Up to 200 visible characters. The same key within 24 hours returns what the first request made. Without one, the body is the key, and it returns what it made only while that conversation hasn't ended, except one SparkOps closed as a landline, which it returns for the 24 hours.","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string","description":"A US mobile number, in any form: (619) 555-0142, 619-555-0142, +16195550142."},"campaign_id":{"type":"string","format":"uuid","description":"The campaign to start. Setup › API lists each live campaign's id."},"entry":{"type":"string","enum":["inquiry","outreach"],"default":"inquiry","description":"inquiry (the default) if they just asked you to get in touch: the opening goes at once, at any hour. outreach if you're reaching out: the opening waits for their texting hours, and your business's hours if you've set them."},"source":{"type":"string","maxLength":100,"description":"Where they came from, in your words: \"Google\", \"Website\", \"Referral\". Up to 100 characters. It comes back in answers and webhooks, and Insights counts conversations by it."},"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string","format":"email"},"crm_id":{"type":"string","maxLength":100,"description":"Your CRM's id for this person, up to 100 characters. Unique within your business: an id another of your contacts has is skipped and named (`crm_id_in_use`). It comes back in answers and webhooks, and can end a campaign or opt someone out instead of a phone. The phone still identifies the person."},"address":{"type":"object","properties":{"street":{"type":"string"},"city":{"type":"string"},"state":{"type":"string","description":"Two letters or the state's name."},"postal_code":{"type":"string"}},"description":"street, city, state (two letters or the name) and postal_code. Its state sets their texting hours."},"metadata":{"type":"object","maxProperties":25,"propertyNames":{"pattern":"^[A-Za-z0-9_]{1,40}$"},"additionalProperties":{"type":["string","number","boolean"],"maxLength":500},"description":"Your own fields, such as a unit's age: up to 25, each named with letters, digits and _, each value text (up to 500 characters), a number, or true or false. Each key becomes a merge field in the campaign editor once it has come in with a contact."}},"required":["phone","campaign_id"]},"example":{"phone":"(512) 555-0199","first_name":"Jordan","last_name":"Reyes","email":"jordan@example.com","crm_id":"HS-1042","address":{"street":"1100 Congress Ave","city":"Austin","state":"TX","postal_code":"78701"},"metadata":{"unit_age":"12 years"},"campaign_id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000c001","source":"Google"}},"application/x-www-form-urlencoded":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}},"responses":{"200":{"description":"The same request again within 24 hours: the same conversation, `replayed: true`. Without an `Idempotency-Key`, only while that conversation hasn't ended (after that, the same body starts a new one), except one SparkOps closed as a landline, which it returns for the 24 hours.","content":{"application/json":{"schema":{"type":"object"},"example":{"conversation":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000a001","contact_id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000b001","campaign_id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000c001","entry":"inquiry","created_via":"api","source":"Google","qualification":null,"outcome":null,"disqualification_reason":null,"opening":{"status":"sent"}},"replayed":true,"contact":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000b001","crm_id":"HS-1042","changes":[],"ignored":[]}}}}},"201":{"description":"A new conversation. `opening.status` is the opening's state: `held` (with `held_until` and `reason`) while it waits for their texting hours, then `sent`, `delivered`, `undelivered`, `failed` or `cancelled`; or `not_sent`, with its `reason`, for a conversation recorded and closed without a text: `landline`: Twilio says their number is a landline, which can't receive texts, and they have never texted you: the conversation is recorded already ended, Disqualified with the reason Landline (so `conversation.disqualified` is sent), and nothing is sent to them. `qualification`, `outcome` and `disqualification_reason` say how the conversation stands, as the webhooks do: all `null` while it's going.","content":{"application/json":{"schema":{"type":"object"},"example":{"conversation":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000a001","contact_id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000b001","campaign_id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000c001","entry":"inquiry","created_via":"api","source":"Google","qualification":null,"outcome":null,"disqualification_reason":null,"opening":{"status":"sent"}},"replayed":false,"contact":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000b001","crm_id":"HS-1042","changes":[{"field":"first_name","from":null,"to":"Jordan"},{"field":"last_name","from":null,"to":"Reyes"},{"field":"email","from":null,"to":"jordan@example.com"},{"field":"crm_id","from":null,"to":"HS-1042"},{"field":"address_street","from":null,"to":"1100 Congress Ave"},{"field":"address_city","from":null,"to":"Austin"},{"field":"address_state","from":null,"to":"TX"},{"field":"address_postal_code","from":null,"to":"78701"},{"field":"metadata.unit_age","from":null,"to":"12 years"}],"ignored":[]}}}}},"400":{"description":"`invalid_body`: The body isn't a JSON object or a form, or is over 32 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: The key is missing, malformed, unknown or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"unauthorized","message":"Send your SparkOps API key as: Authorization: Bearer <key>. Keys are made in Setup › API."}}}}},"409":{"description":"`another_active`: The person is already in an active conversation. `active_conversation` says which, and who holds it. `held_by` is `ai`, `person` (with `person`, their name) or `unassigned` (with your team, nobody on it yet).\n\n`opted_out`: The person opted out of texts. Nothing was started or sent; their details were still saved.\n\n`campaign_unavailable`: No published, live campaign has that `campaign_id`.\n\n`campaign_archived`: That campaign is archived, so nobody new joins it. Nothing was started or sent; the person's details were still saved. Reactivate it in SparkOps, or send another `campaign_id`.\n\n`opening_unusable`: The campaign's first text can't be filled in, so it can't be sent.\n\n`no_number`: The business has no number in use to text from.\n\n`a2p_not_approved`: The business's A2P campaign isn't approved, so it can't start conversations yet. Nothing was started or sent; the person's details were still saved.\n\n`sends_stopped`: SparkOps has stopped this business's automated texting for now, so it can't start conversations. Nothing was started or sent; the person's details were still saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"another_active","message":"This person is already in an active conversation. Nothing was started or sent."},"active_conversation":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000a001","campaign":"New website inquiries","held_by":"ai"},"contact":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000b001","crm_id":"HS-1042","changes":[],"ignored":[]}}}}},"422":{"description":"`invalid_request`: A field is missing or can't be used. `field` names it.\n\n`invalid_phone`: The phone isn't a US mobile number SparkOps can text.\n\n`idempotency_key_reused`: This `Idempotency-Key` was used for a different request in the last 24 hours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"invalid_request","message":"campaign_id is required: copy it from Setup › API.","field":"campaign_id"}}}}},"429":{"description":"`rate_limited`: The business sent 120 requests this minute. `Retry-After` says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"`not_set_up`: Texting isn't set up correctly for this business. Nothing was started or sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/conversations/end":{"post":{"operationId":"endACampaign","summary":"End a campaign","description":"Ends a conversation's campaign now, as \"Closed, no result\", for someone your team already handled some other way.\n\nThe AI stops starting texts, anything waiting to be sent is cancelled, and follow-ups stop. A conversation someone on your team has open stays open with them; one the AI holds is released, so a new campaign can start for the person. If they text again, the AI still answers, as after any outcome. It sends no webhook: your system ended it, so it already knows.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"conversation_id":{"type":"string","format":"uuid","description":"The id a Start a campaign request answered with."},"contact_id":{"type":"string","format":"uuid","description":"A contact's id, from a Start a campaign answer or a webhook: ends their active conversation."},"phone":{"type":"string","description":"Their number: ends their active conversation."},"crm_id":{"type":"string","maxLength":100,"description":"Your CRM's id for them: ends their active conversation."}},"oneOf":[{"required":["conversation_id"]},{"required":["contact_id"]},{"required":["phone"]},{"required":["crm_id"]}]},"example":{"phone":"(512) 555-0199"}},"application/x-www-form-urlencoded":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}},"responses":{"200":{"description":"Ended. `already_ended: true` for one that had already ended; nothing changes.","content":{"application/json":{"schema":{"type":"object"},"example":{"conversation_id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000a001","ended":true,"already_ended":false}}}},"400":{"description":"`invalid_body`: The body isn't a JSON object or a form, or is over 32 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: The key is missing, malformed, unknown or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"unauthorized","message":"Send your SparkOps API key as: Authorization: Bearer <key>. Keys are made in Setup › API."}}}}},"404":{"description":"`not_found`: No conversation or contact has that id in this business.\n\n`no_active_conversation`: Nobody with that number, CRM id or contact id is in an active conversation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`invalid_request`: A field is missing or can't be used. `field` names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: The business sent 120 requests this minute. `Retry-After` says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/opt-outs":{"post":{"operationId":"optSomeoneOut","summary":"Opt someone out","description":"Stops every text from your business to a person, for someone who unsubscribed somewhere else.\n\nEverything waiting to be sent to them is cancelled, their follow-ups stop, and every conversation of theirs ends as Opted out. Nobody is texted to confirm it: they didn't ask by text. A number SparkOps doesn't know yet becomes a contact who has opted out, so a later request can't start a campaign for them.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string","description":"A US number in any form, or E.164 (+ and the country code)."},"contact_id":{"type":"string","format":"uuid","description":"A contact's id, from a Start a campaign answer."},"crm_id":{"type":"string","maxLength":100,"description":"Your CRM's id for them. Someone SparkOps doesn't know by it is not found: without a phone it can't make a contact."},"note":{"type":"string","maxLength":500,"description":"Kept with the opt-out, up to 500 characters: \"Unsubscribed in HubSpot\"."}},"oneOf":[{"required":["phone"]},{"required":["contact_id"]},{"required":["crm_id"]}]},"example":{"phone":"(512) 555-0199","note":"Unsubscribed in HubSpot"}},"application/x-www-form-urlencoded":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}},"responses":{"200":{"description":"Opted out. `already_opted_out: true` if they already were; nothing changes.","content":{"application/json":{"schema":{"type":"object"},"example":{"contact_id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000b001","opted_out":true,"already_opted_out":false}}}},"400":{"description":"`invalid_body`: The body isn't a JSON object or a form, or is over 32 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: The key is missing, malformed, unknown or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"unauthorized","message":"Send your SparkOps API key as: Authorization: Bearer <key>. Keys are made in Setup › API."}}}}},"404":{"description":"`not_found`: No conversation or contact has that id in this business.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`invalid_request`: A field is missing or can't be used. `field` names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: The business sent 120 requests this minute. `Retry-After` says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/me":{"get":{"operationId":"whoAmI","summary":"Who am I","description":"Says which business a key belongs to, and the key's own name: a quick check that a key works.\n\nIt reads nothing else.","responses":{"200":{"description":"The business and the key's name.","content":{"application/json":{"schema":{"type":"object"},"example":{"business":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000f001","name":"Coastal Comfort Heating & Air"},"key":{"name":"Website form"}}}}},"401":{"description":"`unauthorized`: The key is missing, malformed, unknown or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"unauthorized","message":"Send your SparkOps API key as: Authorization: Bearer <key>. Keys are made in Setup › API."}}}}},"429":{"description":"`rate_limited`: The business sent 120 requests this minute. `Retry-After` says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/campaigns":{"get":{"operationId":"listCampaigns","summary":"List campaigns","description":"Lists the campaigns a request can start, by name, with the `campaign_id` Start a campaign takes.\n\nOnly live campaigns: published, and not paused or archived. Setup › API lists the same ones.","responses":{"200":{"description":"Each live campaign's `id` and `name`, by name.","content":{"application/json":{"schema":{"type":"object"},"example":{"campaigns":[{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000c001","name":"New website inquiries"},{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000c002","name":"Spring tune-ups"}]}}}},"401":{"description":"`unauthorized`: The key is missing, malformed, unknown or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"unauthorized","message":"Send your SparkOps API key as: Authorization: Bearer <key>. Keys are made in Setup › API."}}}}},"429":{"description":"`rate_limited`: The business sent 120 requests this minute. `Retry-After` says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{"conversation.started":{"post":{"summary":"New conversation","description":"A new conversation starts, however it starts: from the API, in the app (an enrollment, an upload, a person's first text), someone new texting your number, or someone calling or texting a Receptionist number. `conversation.created_via` says how it came in: `api`, `app`, `inbound_text` or `inbound_call`. A one-time text campaign's conversation starts already ended: its one text is sent (or waits for their texting hours) and its `outcome` is `one_time_text_sent`, which is never a result and never sends `conversation.qualified`.\n\nSigned as Standard Webhooks signs (`webhook-id`, `webhook-timestamp`, `webhook-signature`). Answer 2xx within 10 seconds; anything else is tried again, 8 attempts in all. 410 turns the endpoint off.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"},"example":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000e001","type":"conversation.started","created_at":"2026-09-29T16:58:03.120Z","business":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000f001","name":"Coastal Comfort Heating & Air"},"data":{"contact":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000b001","phone":"+15125550199","first_name":null,"last_name":null,"email":null,"crm_id":null,"metadata":{"unit_age":"12 years"},"opted_out":false},"conversation":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000a001","campaign":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000c001","name":"New website inquiries"},"created_via":"inbound_call","source":null,"entry":"inquiry","held_by":"ai","person":null,"open":false,"state":"engaging","qualification":null,"outcome":null,"disqualification_reason":null,"appointment":null,"answers":{},"additional_info":{},"summary":"","started_at":"2026-09-29T16:58:03.120Z","ended_at":null}}}}}},"responses":{"200":{"description":"Received."}}}},"conversation.activity":{"post":{"summary":"Activity","description":"A text arrives from the contact, or one goes to them (the carrier took it).\n\nSigned as Standard Webhooks signs (`webhook-id`, `webhook-timestamp`, `webhook-signature`). Answer 2xx within 10 seconds; anything else is tried again, 8 attempts in all. 410 turns the endpoint off.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"},"example":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000e001","type":"conversation.activity","created_at":"2026-09-29T17:03:40.020Z","business":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000f001","name":"Coastal Comfort Heating & Air"},"data":{"contact":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000b001","phone":"+15125550199","first_name":"Jordan","last_name":"Reyes","email":"jordan@example.com","crm_id":"HS-1042","metadata":{"unit_age":"12 years"},"opted_out":false},"conversation":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000a001","campaign":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000c001","name":"New website inquiries"},"created_via":"api","source":"Google","entry":"inquiry","held_by":"ai","person":null,"open":false,"state":"engaging","qualification":null,"outcome":null,"disqualification_reason":null,"appointment":null,"answers":{"system_issue":"The upstairs unit blows warm air in the afternoons"},"additional_info":{},"summary":"What's going on with your system?\nThe upstairs unit blows warm air in the afternoons","started_at":"2026-09-29T16:58:03.120Z","ended_at":null},"message":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000d001","direction":"inbound","body":"Thursday at 3 works","author":"contact","person":null,"status":"delivered","at":"2026-09-29T17:03:39.870Z"}}}}}},"responses":{"200":{"description":"Received."}}}},"conversation.call":{"post":{"summary":"Call","description":"A call with the contact ended: one the AI answered, one that rang your team (answered or not), one your team placed, one SparkOps placed for the AI because the contact asked to be called back (answered or not), or one nobody could take. Sent once a call, when its record is complete: within seconds of its end, or about half a minute after a call the AI took, so `conversation.answers` holds what the call learned. A SparkTransfer call sends its own two events instead.\n\n`data.call`:\n- `id`: The call's id in SparkOps.\n- `direction`: `inbound` when the contact called you, `outbound` for a call placed to them.\n- `answered_by`: `ai` (the AI answered it, or SparkOps placed it for the AI and the contact answered), `person` (someone on your team answered it, or placed it and the contact answered) or `nobody` (the two sides never spoke). A call the AI picked up that failed before anything was said is `nobody` too: the caller heard only that the line had trouble.\n- `person`: The teammate's name when one answered or placed the call, else `null`. A call a teammate placed names them even when the contact didn't answer.\n- `status`: `completed` when the two sides spoke, else `missed`: it rang and nobody answered, nobody could take it, only a recorded line answered, the AI's line had trouble before anything was said, or the contact didn't answer a call placed to them. A call SparkOps placed for the AI that their voicemail picked up is `missed` too, answered by `nobody`.\n- `duration_seconds`: How long the call lasted, in seconds; for a call a teammate answered, the time they talked. `0` for a missed call.\n- `started_at`: When the call started.\n- `ended_at`: When it ended.\n- `transcript`: What was said on a call the AI took, as one plain text: a line for each thing said, `Contact: ...` or `Assistant: ...`. At most 10,000 characters: a longer one stops at a line's end, then `[cut short]` on a line of its own. Empty (`\"\"`) for a call with a teammate and for a missed call. The recording is never sent, nor a link to one.\n\nSigned as Standard Webhooks signs (`webhook-id`, `webhook-timestamp`, `webhook-signature`). Answer 2xx within 10 seconds; anything else is tried again, 8 attempts in all. 410 turns the endpoint off.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"},"example":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000e001","type":"conversation.call","created_at":"2026-09-29T17:03:27.400Z","business":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000f001","name":"Coastal Comfort Heating & Air"},"data":{"contact":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000b001","phone":"+15125550199","first_name":"Jordan","last_name":"Reyes","email":"jordan@example.com","crm_id":"HS-1042","metadata":{"unit_age":"12 years"},"opted_out":false},"conversation":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000a001","campaign":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000c001","name":"New website inquiries"},"created_via":"api","source":"Google","entry":"inquiry","held_by":"ai","person":null,"open":false,"state":"engaging","qualification":null,"outcome":null,"disqualification_reason":null,"appointment":null,"answers":{"system_issue":"The upstairs unit blows warm air in the afternoons","unit_age":"About 12 years"},"additional_info":{"Home age":"Built 1994"},"summary":"What's going on with your system?\nThe upstairs unit blows warm air in the afternoons\n\nHow old is the system?\nAbout 12 years\n\nAlso mentioned\nHome age: Built 1994","started_at":"2026-09-29T16:58:03.120Z","ended_at":null},"call":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000a601","direction":"inbound","answered_by":"ai","person":null,"status":"completed","duration_seconds":255,"started_at":"2026-09-29T16:58:40.000Z","ended_at":"2026-09-29T17:02:55.000Z","transcript":"Assistant: Hi, this is Coastal Comfort Heating & Air. What's going on with your system?\nContact: The upstairs unit blows warm air in the afternoons.\nAssistant: Sorry about that. How old is the system?\nContact: About 12 years.\nAssistant: Thanks, Jordan. We'll text you to set up a visit."}}}}}},"responses":{"200":{"description":"Received."}}}},"conversation.needs_attention":{"post":{"summary":"Needs a person","description":"A conversation goes to your team with nobody on it: the AI handed it over, a takeover rule fired, or someone new texted in. It can also come for a conversation a teammate already holds, which stays theirs (`held_by` is `person`), when a booking the AI started finishes after they took it: a takeover rule fires on the result (`takeover_rule`), or the booking couldn't be confirmed (`cant_book`); or a cancel or a move of the contact's appointment the AI started couldn't be finished (`cant_change`).\n\n`data.reason`: `new_inquiry` (Someone new texted your number.), `asked_for_person` (They asked for a person.), `takeover_rule` (One of the campaign's takeover rules fired.), `guardrail` (A guardrail says a person handles this.), `rules_conflict` (Two of your rules disagreed, so the AI handed it to a person.), `condition` (An answer met a question's hand-over condition.), `reply_blocked` (The AI's reply broke a guardrail twice, so nothing was sent.), `no_usable_answer` (The AI couldn't write a usable answer.), `cant_book` (The AI couldn't book the appointment: no open times, the contact didn't give what the booking needs or turned down the times offered, or the calendar couldn't be asked or didn't confirm it.), `cant_change` (The AI couldn't change the appointment: the contact asked to cancel or move it, and the calendar couldn't do it, didn't confirm it, or, after a move, couldn't cancel the old time. The appointment stands as the calendar holds it.).\n\nSigned as Standard Webhooks signs (`webhook-id`, `webhook-timestamp`, `webhook-signature`). Answer 2xx within 10 seconds; anything else is tried again, 8 attempts in all. 410 turns the endpoint off.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"},"example":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000e001","type":"conversation.needs_attention","created_at":"2026-09-29T17:05:02.118Z","business":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000f001","name":"Coastal Comfort Heating & Air"},"data":{"contact":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000b001","phone":"+15125550199","first_name":"Jordan","last_name":"Reyes","email":"jordan@example.com","crm_id":"HS-1042","metadata":{"unit_age":"12 years"},"opted_out":false},"conversation":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000a001","campaign":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000c001","name":"New website inquiries"},"created_via":"api","source":"Google","entry":"inquiry","held_by":"unassigned","person":null,"open":true,"state":"engaging","qualification":null,"outcome":null,"disqualification_reason":null,"appointment":null,"answers":{"system_issue":"The upstairs unit blows warm air in the afternoons","unit_age":"About 12 years"},"additional_info":{"Home age":"Built 1994"},"summary":"What's going on with your system?\nThe upstairs unit blows warm air in the afternoons\n\nHow old is the system?\nAbout 12 years\n\nAlso mentioned\nHome age: Built 1994","started_at":"2026-09-29T16:58:03.120Z","ended_at":null},"reason":"asked_for_person"}}}}},"responses":{"200":{"description":"Received."}}}},"conversation.qualified":{"post":{"summary":"Qualified","description":"The contact reached a result, and so is Qualified, by the AI or a person: a booking, a time to call, the details you wanted, or a transfer; or by SparkOps from a SparkTransfer call (its `result` `spark_transfer`). Sent each time a result is recorded, including a different one or a new time for a soft appointment. An appointment the AI booked in your calendar is `appointment_booked`, sent once the calendar confirms it, with the booking in `conversation.appointment`. Other endings aren't results and never send it: a contact closed as not a fit sends `conversation.disqualified`, and one who opts out sends `contact.opted_out`. \"Closed, no result\" with no verdict (`qualification: null`, set by a person or by End a campaign), and an older conversation ended because a newer campaign started for them (`superseded`), send no webhook.\n\n`data.conversation.appointment`, or `null` when the conversation has none:\n- `kind`: `soft` for a time the contact picked that isn't booked in a calendar (a time to call them, say); `hard` for an appointment the AI booked in your calendar.\n- `status`: For a `hard` appointment, what the calendar says of it: `booked`, `pending` when the calendar took the request and it isn't final yet, or `cancelled` when the contact cancelled it by text or it was cancelled in the calendar (the outcome stays `appointment_booked`). A moved appointment is its new time, `booked`. `null` for a `soft` one.\n- `words`: The time as your team reads it in SparkOps: for a `soft` appointment the time the contact gave, in words (\"Thursday, October 1, 3pm\"), for a `hard` one the booked time (\"Thu Oct 1, 3:00pm CT\").\n- `day`: The day, in `time_zone`. `null` when a `soft` appointment names no day.\n- `time`: The time of day, in `time_zone`, on a 24-hour clock (`15:00`). `null` when a `soft` appointment names no time.\n- `part_of_day`: `morning`, `afternoon` or `evening`, when a `soft` appointment names one in place of a time. Otherwise `null`, and always `null` for a `hard` one.\n- `starts_at`: The moment it starts, when both the day and the time are known. Always set for a `hard` appointment.\n- `ends_at`: The moment a `hard` appointment ends, when the calendar says. `null` for a `soft` one.\n- `time_zone`: The time zone `day`, `time` and `words` are in, by its IANA name (`America/Chicago`).\n- `meeting_type`: The name of the meeting type a `hard` appointment was booked as, the one the campaign books on (\"Estimate visit\"). `null` for a `soft` one.\n- `provider`: The calendar a `hard` appointment was booked in, by name (\"Calendly\"). `null` for a `soft` one. Where SparkOps is no longer set up for that calendar, its id, in lower case (\"calendly\").\n\nSigned as Standard Webhooks signs (`webhook-id`, `webhook-timestamp`, `webhook-signature`). Answer 2xx within 10 seconds; anything else is tried again, 8 attempts in all. 410 turns the endpoint off.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"},"example":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000e001","type":"conversation.qualified","created_at":"2026-09-29T17:04:12.345Z","business":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000f001","name":"Coastal Comfort Heating & Air"},"data":{"contact":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000b001","phone":"+15125550199","first_name":"Jordan","last_name":"Reyes","email":"jordan@example.com","crm_id":"HS-1042","metadata":{"unit_age":"12 years"},"opted_out":false},"conversation":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000a001","campaign":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000c001","name":"New website inquiries"},"created_via":"api","source":"Google","entry":"inquiry","held_by":"ai","person":null,"open":false,"state":"ended","qualification":"qualified","outcome":"appointment_soft","disqualification_reason":null,"appointment":{"kind":"soft","status":null,"words":"Thursday, October 1, 3pm","day":"2026-10-01","time":"15:00","part_of_day":null,"starts_at":"2026-10-01T20:00:00.000Z","ends_at":null,"time_zone":"America/Chicago","meeting_type":null,"provider":null},"answers":{"system_issue":"The upstairs unit blows warm air in the afternoons","unit_age":"About 12 years"},"additional_info":{"Home age":"Built 1994"},"summary":"Qualified · Soft appointment\nAppointment: Thursday, October 1, 3pm\n\nWhat's going on with your system?\nThe upstairs unit blows warm air in the afternoons\n\nHow old is the system?\nAbout 12 years\n\nAlso mentioned\nHome age: Built 1994","started_at":"2026-09-29T16:58:03.120Z","ended_at":"2026-09-29T17:04:12.345Z"}}}}}},"responses":{"200":{"description":"Received."}}}},"conversation.disqualified":{"post":{"summary":"Not a fit","description":"The contact was closed as not a fit: `qualification` is `disqualified`, `outcome` is always `closed_no_result`, and `disqualification_reason` says why. Sent whoever decided it: the AI, by one of the campaign's reasons or your reasons for every campaign (Not interested, Not ready yet and Bad contact info among them); a person on your team; or SparkOps itself, with one of its own reasons: Unresponsive (they didn't reply to any of the follow-ups), Landline (Twilio says their number is a landline that has never texted you) or Closed for Message Delivery Error (texts to their number can't be delivered). Also sent when a contact who reached a result, or was closed with no result, is later found not a fit, and again when a person changes the reason.\n\nSigned as Standard Webhooks signs (`webhook-id`, `webhook-timestamp`, `webhook-signature`). Answer 2xx within 10 seconds; anything else is tried again, 8 attempts in all. 410 turns the endpoint off.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"},"example":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000e001","type":"conversation.disqualified","created_at":"2026-09-29T17:06:30.500Z","business":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000f001","name":"Coastal Comfort Heating & Air"},"data":{"contact":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000b001","phone":"+15125550199","first_name":"Jordan","last_name":"Reyes","email":"jordan@example.com","crm_id":"HS-1042","metadata":{"unit_age":"12 years"},"opted_out":false},"conversation":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000a001","campaign":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000c001","name":"New website inquiries"},"created_via":"api","source":"Google","entry":"inquiry","held_by":"ai","person":null,"open":false,"state":"ended","qualification":"disqualified","outcome":"closed_no_result","disqualification_reason":"Outside our service area","appointment":null,"answers":{"system_issue":"The upstairs unit blows warm air in the afternoons","unit_age":"About 12 years"},"additional_info":{"Home age":"Built 1994"},"summary":"Disqualified · Outside our service area\n\nWhat's going on with your system?\nThe upstairs unit blows warm air in the afternoons\n\nHow old is the system?\nAbout 12 years\n\nAlso mentioned\nHome age: Built 1994","started_at":"2026-09-29T16:58:03.120Z","ended_at":"2026-09-29T17:04:12.345Z"}}}}}},"responses":{"200":{"description":"Received."}}}},"contact.opted_out":{"post":{"summary":"Opted out","description":"The person opted out, however they said it, once until they opt back in.\n\nSigned as Standard Webhooks signs (`webhook-id`, `webhook-timestamp`, `webhook-signature`). Answer 2xx within 10 seconds; anything else is tried again, 8 attempts in all. 410 turns the endpoint off.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"},"example":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000e001","type":"contact.opted_out","created_at":"2026-09-29T17:07:12.771Z","business":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000f001","name":"Coastal Comfort Heating & Air"},"data":{"contact":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000b001","phone":"+15125550199","first_name":"Jordan","last_name":"Reyes","email":"jordan@example.com","crm_id":"HS-1042","metadata":{"unit_age":"12 years"},"opted_out":true},"conversation":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000a001","campaign":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000c001","name":"New website inquiries"},"created_via":"api","source":"Google","entry":"inquiry","held_by":"ai","person":null,"open":false,"state":"ended","qualification":null,"outcome":"opted_out","disqualification_reason":null,"appointment":null,"answers":{"system_issue":"The upstairs unit blows warm air in the afternoons","unit_age":"About 12 years"},"additional_info":{"Home age":"Built 1994"},"summary":"Opted out\n\nWhat's going on with your system?\nThe upstairs unit blows warm air in the afternoons\n\nHow old is the system?\nAbout 12 years\n\nAlso mentioned\nHome age: Built 1994","started_at":"2026-09-29T16:58:03.120Z","ended_at":"2026-09-29T17:04:12.345Z"},"opt_out":{"how":"keyword","at":"2026-09-29T17:07:12.771Z"}}}}}},"responses":{"200":{"description":"Received."}}}},"spark_transfer.ringing":{"post":{"summary":"SparkTransfer ringing","description":"SparkOps is putting a contact through to your call center, and its line starts to ring: they asked for a call by text, SparkOps called them, and they pressed 1 or said yes. Sent once a call, as it rings, so your CRM can show who's calling, with what they told us in `conversation`. A test call from a campaign's SparkTransfer tab sends nothing. Only for a business SparkOps has turned SparkTransfer on for.\n\nSigned as Standard Webhooks signs (`webhook-id`, `webhook-timestamp`, `webhook-signature`). Answer 2xx within 10 seconds; anything else is tried again, 8 attempts in all. 410 turns the endpoint off.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"},"example":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000e001","type":"spark_transfer.ringing","created_at":"2026-09-29T17:04:31.200Z","business":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000f001","name":"Coastal Comfort Heating & Air"},"data":{"contact":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000b001","phone":"+15125550199","first_name":"Jordan","last_name":"Reyes","email":"jordan@example.com","crm_id":"HS-1042","metadata":{"unit_age":"12 years"},"opted_out":false},"conversation":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000a001","campaign":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000c001","name":"New website inquiries"},"created_via":"api","source":"Google","entry":"inquiry","held_by":"ai","person":null,"open":false,"state":"engaging","qualification":null,"outcome":null,"disqualification_reason":null,"appointment":null,"answers":{"system_issue":"The upstairs unit blows warm air in the afternoons","unit_age":"About 12 years"},"additional_info":{"Home age":"Built 1994"},"summary":"What's going on with your system?\nThe upstairs unit blows warm air in the afternoons\n\nHow old is the system?\nAbout 12 years\n\nAlso mentioned\nHome age: Built 1994","started_at":"2026-09-29T16:58:03.120Z","ended_at":null},"spark_transfer":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000a501","campaign":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000c001","name":"New website inquiries"},"called_number":"+15125550199","transfer_number":"+18585550199","shown_number":"+18585550100","response":"pressed_1","result":null,"ended_at":null,"legs":[{"leg":1,"status":"in-progress","rang_at":"2026-09-29T17:04:12.000Z","answered_at":"2026-09-29T17:04:15.000Z","ended_at":null,"seconds":null,"ended_by":null},{"leg":2,"status":"ringing","rang_at":"2026-09-29T17:04:31.000Z","answered_at":null,"ended_at":null,"seconds":null,"ended_by":null}]}}}}}},"responses":{"200":{"description":"Received."}}}},"spark_transfer.ended":{"post":{"summary":"SparkTransfer ended","description":"A SparkTransfer call ended. `spark_transfer.result` says how: `spark_transfer` (your call center's line answered), `under_minimum` (connected for less than the campaign's minimum), `center_no_answer`, `hung_up_waiting` (they hung up before your center answered), `no_press` (they didn't press 1 or say yes), `declined` (they said no), `machine`, `no_answer` or `failed`. Each leg gives its moments, its connected `seconds` and who hung up (`contact`, `center`, `sparkops` or `unknown`). Sent once a call; a test call sends nothing. A `spark_transfer` result also sends `conversation.qualified`.\n\nSigned as Standard Webhooks signs (`webhook-id`, `webhook-timestamp`, `webhook-signature`). Answer 2xx within 10 seconds; anything else is tried again, 8 attempts in all. 410 turns the endpoint off.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"},"example":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000e001","type":"spark_transfer.ended","created_at":"2026-09-29T17:09:02.000Z","business":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000f001","name":"Coastal Comfort Heating & Air"},"data":{"contact":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000b001","phone":"+15125550199","first_name":"Jordan","last_name":"Reyes","email":"jordan@example.com","crm_id":"HS-1042","metadata":{"unit_age":"12 years"},"opted_out":false},"conversation":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000a001","campaign":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000c001","name":"New website inquiries"},"created_via":"api","source":"Google","entry":"inquiry","held_by":"ai","person":null,"open":false,"state":"ended","qualification":"qualified","outcome":"spark_transfer","disqualification_reason":null,"appointment":null,"answers":{"system_issue":"The upstairs unit blows warm air in the afternoons","unit_age":"About 12 years"},"additional_info":{"Home age":"Built 1994"},"summary":"Qualified · SparkTransfer\n\nWhat's going on with your system?\nThe upstairs unit blows warm air in the afternoons\n\nHow old is the system?\nAbout 12 years\n\nAlso mentioned\nHome age: Built 1994","started_at":"2026-09-29T16:58:03.120Z","ended_at":"2026-09-29T17:09:02.000Z"},"spark_transfer":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000a501","campaign":{"id":"3b6f1d2e-8c4a-4f7e-9a1b-00000000c001","name":"New website inquiries"},"called_number":"+15125550199","transfer_number":"+18585550199","shown_number":"+18585550100","response":"pressed_1","result":"spark_transfer","ended_at":"2026-09-29T17:09:02.000Z","legs":[{"leg":1,"status":"completed","rang_at":"2026-09-29T17:04:12.000Z","answered_at":"2026-09-29T17:04:15.000Z","ended_at":"2026-09-29T17:09:02.000Z","seconds":287,"ended_by":"contact"},{"leg":2,"status":"completed","rang_at":"2026-09-29T17:04:31.000Z","answered_at":"2026-09-29T17:04:37.000Z","ended_at":"2026-09-29T17:09:02.000Z","seconds":265,"ended_by":"contact"}]}}}}}},"responses":{"200":{"description":"Received."}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An API key from Setup › API: spk_ and 43 characters."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_body","unauthorized","not_found","no_active_conversation","opted_out","another_active","campaign_unavailable","campaign_archived","opening_unusable","no_number","a2p_not_approved","sends_stopped","invalid_request","invalid_phone","idempotency_key_reused","rate_limited","not_set_up"]},"message":{"type":"string"},"field":{"type":"string"}}}}}}}}