{"name":"Analytical Insider Agent API","version":"2026-11-15","status":"preview","openapi":"https://analyticalinsider.ai/api/public/agent/v1/openapi","page":"https://analyticalinsider.ai/agents","auth":{"scheme":"bearer","header":"Authorization","format":"Bearer ai_<key>","obtain":"POST https://analyticalinsider.ai/api/public/agent/v1/claim after the principal pays at the checkout URL returned by signup."},"terms":{"version":"agent-v2","url":"https://analyticalinsider.ai/terms/agents","mustAccept":true},"pricing":{"plans":[{"plan":"phone","packageKey":"agent_phone","displayName":"Agent Phone","monthlyCents":999,"setupCents":0,"includes":["phone"],"monthlyCaps":{"phoneNumbers":1,"textSegmentsPerMonth":100,"outboundCallsPerMonth":30,"outboundCallsPerDay":25,"inboundVoicemailsPerMonth":30}},{"plan":"email","packageKey":"agent_email","displayName":"Agent Email","monthlyCents":1699,"setupCents":2000,"includes":["email"],"monthlyCaps":{"sendingDomains":1,"mailboxes":1,"emailSendsPerMonth":1200,"recipientVerificationsPerMonth":100}},{"plan":"bundle","packageKey":"agent_starter","displayName":"Agent Bundle","monthlyCents":1999,"setupCents":2000,"includes":["phone","email"],"monthlyCaps":{"phoneNumbers":1,"textSegmentsPerMonth":100,"outboundCallsPerMonth":30,"outboundCallsPerDay":25,"inboundVoicemailsPerMonth":30,"sendingDomains":1,"mailboxes":1,"emailSendsPerMonth":1200,"recipientVerificationsPerMonth":100}}],"recommended":"bundle","setup":{"label":"Domain registration and security setup","charged":"once","note":"Charged one time: with the first month, or, when a phone plan moves to the bundle, with that move. Not charged again. Domain renewal is included while the subscription is active."},"upgrade":"POST https://analyticalinsider.ai/api/agent/v1/subscription/plan","currency":"usd","checkout":"hosted","leadPull":{"unitCents":300,"currency":"usd","status":"not_yet_available","packSizes":[5,10]},"cancellation":{"noticeDays":30}},"preview":{"note":"Preview. The plan fee is charged from signup. The channels and lead pulls listed under notYetAvailable are not delivered yet.","availableNow":["Signup and hosted checkout","One API key per organization","Ideal customer profile storage","Plan, allowance and subscription status","Cancellation by API with 30 days notice","A phone number, with inbound calls to voicemail and inbound texts readable by API","Outbound texting to contacts with recorded consent","Outbound calls that speak a message, to numbers with recorded written call consent"],"notYetAvailable":["A custom email domain for sending email","WhatsApp","LinkedIn","Lead pulls, priced per lead","Connecting a call to the agent's own live voice system"]},"errors":{"shape":"{ \"error\": string, \"code\": string }","statuses":{"403":"The feature is not open yet or is not in the plan. A retry will not help.","409":"The outcome is unknown or conflicts. Read the matching GET route before trying again.","500":"With a Retry-After header: nothing happened and it is safe to try again after that many seconds, with a new idempotencyKey on a write. Without it, no promise is made.","notJson":"A response that is not JSON, such as an HTML error page, comes from the network in front of the API, not from the API. Treat it as temporary, and for a write read the matching GET route before trying again."}},"flow":["Discover: GET this document.","Choose a plan: phone, email or bundle (both channels; the default). pricing.plans lists what each includes and costs.","Sign up: POST the signup body shown on the signup route (verified principal, agent identity, plan, termsVersion agent-v2, acceptTerms true). The response carries a hosted checkout URL and a checkoutSessionId.","The principal pays at the hosted checkout URL, either a human or the principal's own payment step. The agent never sends card details to this API.","Claim once: POST { \"checkoutSessionId\" } to the claim route after payment. The response carries the API key exactly once, so store it.","Call the authenticated routes with the header Authorization: Bearer ai_<key>.","While the account is active, replace the key with POST to the key rotation route, authenticated with the current key. If the key is lost, the principal asks us to reissue it; after we verify the request, claim again with the original checkoutSessionId.","Cancel at any time with POST to the cancel route. Cancellation takes effect 30 days after the request."],"routes":[{"method":"GET","url":"https://analyticalinsider.ai/api/public/agent/v1","auth":"none","description":"This discovery document."},{"method":"GET","url":"https://analyticalinsider.ai/api/public/agent/v1/openapi","auth":"none","description":"The OpenAPI 3.1 description of every route in this document, generated from it."},{"method":"POST","url":"https://analyticalinsider.ai/api/public/agent/v1/signup","auth":"none","description":"Start a signup for a verified principal; returns a hosted checkout URL and states the plan, the monthly amount and the one-time setup amount the checkout was created for. The setup is charged once, with the first month.","request":{"contentType":"application/json","fields":[{"name":"principal.legalName","type":"string","required":true,"description":"Legal name of the person or company the agent acts for (max 200)."},{"name":"principal.email","type":"string","required":true,"description":"The principal's real email address."},{"name":"principal.website","type":"string","required":false,"description":"The principal's website, an https URL."},{"name":"principal.postalAddress.line1","type":"string","required":true,"description":"Street address line 1."},{"name":"principal.postalAddress.line2","type":"string","required":false,"description":"Street address line 2."},{"name":"principal.postalAddress.city","type":"string","required":true,"description":"City."},{"name":"principal.postalAddress.region","type":"string","required":true,"description":"State, province or region."},{"name":"principal.postalAddress.postalCode","type":"string","required":true,"description":"Postal code."},{"name":"principal.postalAddress.country","type":"string","required":true,"description":"Two-letter ISO 3166-1 country code, e.g. US."},{"name":"agent.name","type":"string","required":true,"description":"A name for the agent (max 120)."},{"name":"agent.operator","type":"string","required":true,"description":"Who operates the agent (max 200)."},{"name":"plan","type":"string","required":false,"description":"The plan to buy, one of: phone, email, bundle. phone covers calls and texts from a dedicated number, email covers a sending domain with one mailbox, bundle covers both. Defaults to bundle. What each includes and costs is in pricing.plans of the discovery document."},{"name":"termsVersion","type":"string","required":true,"description":"Must be exactly \"agent-v2\"."},{"name":"acceptTerms","type":"boolean","required":true,"description":"Must be exactly true: the principal accepts the agent terms."},{"name":"successUrl","type":"string","required":false,"description":"Where checkout sends the payer after payment, an https URL."},{"name":"cancelUrl","type":"string","required":false,"description":"Where checkout sends the payer on cancel, an https URL."}],"example":{"principal":{"legalName":"Example Widgets LLC","email":"owner@example.com","website":"https://www.example.com","postalAddress":{"line1":"100 Example Street","line2":"Suite 200","city":"Springfield","region":"IL","postalCode":"62701","country":"US"}},"agent":{"name":"example-sales-agent","operator":"Example Widgets LLC"},"plan":"bundle","termsVersion":"agent-v2","acceptTerms":true}}},{"method":"POST","url":"https://analyticalinsider.ai/api/public/agent/v1/claim","auth":"none","description":"Exchange a paid checkout session id (JSON body { \"checkoutSessionId\" }) for the API key, once.","request":{"contentType":"application/json","fields":[{"name":"checkoutSessionId","type":"string","required":true,"description":"The checkoutSessionId the signup response returned, used after the principal has paid."}],"example":{"checkoutSessionId":"cs_live_a1B2c3D4e5F6g7H8i9J0"}}},{"method":"GET","url":"https://analyticalinsider.ai/api/agent/v1/me","auth":"bearer","description":"The organization this key acts for. plan is the package key; planValue is the plan as this API names it (phone, email or bundle) and includes lists its channels (phone, email)."},{"method":"GET","url":"https://analyticalinsider.ai/api/agent/v1/status","auth":"bearer","description":"Plan (the package key, with planValue and includes), restriction state, allowances, the prepaid lead balance (leadBalance: available and reserved), lead counts and the preview block (what is available now and what is not)."},{"method":"GET","url":"https://analyticalinsider.ai/api/agent/v1/subscription","auth":"bearer","description":"Subscription status, current period end and the date a scheduled cancellation takes effect (null when none)."},{"method":"POST","url":"https://analyticalinsider.ai/api/agent/v1/subscription/cancel","auth":"bearer","description":"Schedule cancellation 30 days from now. No body needed. A repeat request changes nothing and returns the same date."},{"method":"POST","url":"https://analyticalinsider.ai/api/agent/v1/subscription/plan","auth":"bearer","description":"Upgrade a phone or email plan to the bundle. The difference for the rest of the current period is charged at once, and moving from phone adds the one-time domain registration and security setup to that charge (an email plan paid it at signup). 200 { plan, packageKey, includes, changed }: changed is false when the plan was already the bundle. 402 PAYMENT_FAILED with updatePaymentUrl when the charge does not go through or there is no card on file, and then nothing changes: not the plan, not the allowances, not the subscription. updatePaymentUrl opens a page that only adds a card. 422 UPGRADE_REFUSED when the payment processor refuses the change itself (a retry will not help). 409 CANCELLATION_SCHEDULED, 404 NOT_FOUND. Every answer is stored against the idempotencyKey and a replay returns it; send a new key to try again. 500 SUBSCRIPTION_UNAVAILABLE with a Retry-After header is temporary and not stored: retry the same key after that many seconds. There is no downgrade by API: cancel and sign up again.","request":{"contentType":"application/json","fields":[{"name":"plan","type":"string","required":true,"description":"Must be \"bundle\"."},{"name":"idempotencyKey","type":"string","required":true,"description":"A key you choose for this request, 8 to 128 characters: letters, digits, dot, underscore or hyphen."}],"example":{"plan":"bundle","idempotencyKey":"upgrade-to-bundle-0001"}}},{"method":"POST","url":"https://analyticalinsider.ai/api/agent/v1/key/rotate","auth":"bearer","description":"Replace the API key while the account is active, authenticated with the current key (a restricted account is refused with 403). 201 with the new key, shown once; the key you sent stops working at once. If the response is lost, send the same request again within one hour, with the same old key and the same idempotencyKey: you get a working key, and the one you never received is retired. 409 ROTATION_IN_PROGRESS means another request replaced this key at the same moment; if you did not receive its new key, send the same request again. 409 ROTATION_ALREADY_DELIVERED means the key from that rotation was already used. 500 INTERNAL means that request changed nothing; send the same request again.","request":{"contentType":"application/json","fields":[{"name":"idempotencyKey","type":"string","required":true,"description":"At least 32 random characters that you generate for this rotation (up to 128: letters, digits, dot, underscore or hyphen). It is the secret that lets you recover a lost response, so never reuse one and never send the example value, which is refused. Keep it until you have stored the new key; a retry must send the same one."}],"example":{"idempotencyKey":"rotate-example-generate-your-own-32-plus-random-chars"}}},{"method":"GET","url":"https://analyticalinsider.ai/api/agent/v1/icp","auth":"bearer","description":"Read the ideal customer profile."},{"method":"PUT","url":"https://analyticalinsider.ai/api/agent/v1/icp","auth":"bearer","description":"Replace the ideal customer profile.","request":{"contentType":"application/json","fields":[{"name":"targetMarket","type":"string","required":true,"description":"Who the best customers are, in one short specific sentence (max 200 characters)."},{"name":"geos","type":"string[]","required":true,"description":"Regions to target: 1 to 8 sub-country regions such as US states. A whole country or \"Global\" is refused."},{"name":"titles","type":"string[]","required":true,"description":"Job titles to reach: 1 to 6."},{"name":"industries","type":"string[]","required":true,"description":"Specific industries: 1 to 8. Generic values such as \"General\" or \"B2B\" are refused."},{"name":"secondaryMarket","type":"string","required":false,"description":"A secondary market."},{"name":"companySizeOrLocationsMin","type":"integer","required":false,"description":"Minimum employee or location count."},{"name":"companySizeMax","type":"integer","required":false,"description":"Maximum employee or location count."},{"name":"qualifiers","type":"string[]","required":false,"description":"Positive signals that mark a good fit: up to 5."},{"name":"triggerSignals","type":"string[]","required":false,"description":"Events that make a company worth contacting now: up to 5."},{"name":"revenueMin","type":"integer","required":false,"description":"Minimum annual revenue in USD millions."},{"name":"revenueMax","type":"integer","required":false,"description":"Maximum annual revenue in USD millions."},{"name":"ownershipType","type":"string","required":false,"description":"One of \"any\", \"private_only\", \"public_only\"."}],"example":{"targetMarket":"Regional commercial HVAC contractors that service multi-site property managers","geos":["Illinois","Indiana","Wisconsin"],"titles":["Owner","Operations Manager","General Manager"],"industries":["HVAC Contracting","Commercial Building Services"],"companySizeOrLocationsMin":10,"companySizeMax":200,"qualifiers":["Serves commercial properties","Runs a service fleet"],"triggerSignals":["Hiring service technicians","Opened a new branch"],"revenueMin":2,"revenueMax":50,"ownershipType":"private_only"}}},{"method":"GET","url":"https://analyticalinsider.ai/api/agent/v1/leads","auth":"bearer","description":"List leads (?stage=&cursor=&limit=) or fetch one (?id=<leadId>). Lead pulls are not yet available, so the list is empty and carries note lead_pulls_not_yet_available.","request":{"fields":[{"name":"id","type":"string","required":false,"description":"Fetch one lead by id."},{"name":"stage","type":"string","required":false,"description":"Filter by stage, one of: pending_qualification, qualified, active_in_cadence, engaged, meeting_booked, handed_to_ae, disqualified, nurture, stale, contact_bad."},{"name":"cursor","type":"string","required":false,"description":"The nextCursor from the previous page."},{"name":"limit","type":"integer","required":false,"description":"Page size, 1 to 100 (default 25)."}]}},{"method":"GET","url":"https://analyticalinsider.ai/api/agent/v1/number","auth":"bearer","description":"The organization's dedicated number as { number: { e164, status, assignedAt } }, or { number: null } before one is bought. Callers who ring it reach a voicemail, and texts sent to it are readable on the messages route."},{"method":"POST","url":"https://analyticalinsider.ai/api/agent/v1/number","auth":"bearer","description":"Buy the dedicated number the plan includes, once. 201 with the number; if the organization already has one, 200 with that same number. 409 CAP_EXCEEDED when the plan's one number is already used, 409 NUMBER_UNAVAILABLE when that area code has no number to give (choose another area code; a retry with the same one cannot work), 500 INTERNAL with a Retry-After header when the purchase fails for another reason (nothing is kept, retry with a new idempotencyKey). A replayed idempotencyKey returns the first outcome, so use a new key to try another area code.","request":{"contentType":"application/json","fields":[{"name":"areaCode","type":"string","required":true,"description":"A US area code for one of the 50 states or DC, such as 312. Toll-free, Canadian, Caribbean, territory and unassigned codes are refused."},{"name":"idempotencyKey","type":"string","required":true,"description":"A key you choose for this purchase, 8 to 128 characters: letters, digits, dot, underscore or hyphen."}],"example":{"areaCode":"312","idempotencyKey":"buy-number-0001"}}},{"method":"GET","url":"https://analyticalinsider.ai/api/agent/v1/calls","auth":"bearer","description":"The organization's calls and voicemails as { calls, nextCursor }, oldest first: id, direction, from, to, startedAt, durationSeconds, voicemail and transcript (null until the voicemail is transcribed). Keep the last id you saw and pass it as cursor to read only what is new. A call is listed as soon as it exists, before its transcript does, and a cursor never returns a row it has already passed: to read a voicemail's transcript, fetch the call by id (?id=<callId>, answers { call }, or 404 NOT_FOUND) once it has been transcribed. id cannot be combined with cursor or limit.","request":{"fields":[{"name":"id","type":"string","required":false,"description":"Fetch one call by id, including its transcript once it exists. Cannot be combined with cursor or limit."},{"name":"cursor","type":"string","required":false,"description":"Return rows after this id: the nextCursor from the previous page, or the last id you saw."},{"name":"limit","type":"integer","required":false,"description":"Page size, 1 to 100 (default 25)."}]}},{"method":"GET","url":"https://analyticalinsider.ai/api/agent/v1/messages","auth":"bearer","description":"The organization's text messages as { messages, nextCursor }, oldest first: id, direction, from, to, body, status and createdAt. Keep the last id you saw and pass it as cursor to read only what is new.","request":{"fields":[{"name":"cursor","type":"string","required":false,"description":"Return rows after this id: the nextCursor from the previous page, or the last id you saw."},{"name":"limit","type":"integer","required":false,"description":"Page size, 1 to 100 (default 25)."}]}},{"method":"POST","url":"https://analyticalinsider.ai/api/agent/v1/contacts","auth":"bearer","description":"Add one of your own contacts. United States numbers only: any other country, toll-free and premium-rate numbers are 422 PHONE_NOT_US. Answers 201 { contact } in the same shape as GET leads, or 200 with the existing contact when the number is already on file. A number that is not real and dialable is 422 PHONE_NOT_DIALABLE.","request":{"contentType":"application/json","fields":[{"name":"name","type":"string","required":true,"description":"The contact's name (max 200)."},{"name":"phone","type":"string","required":true,"description":"The contact's direct line: a United States number, E.164 or 10 digits. Fictional shapes such as the 555 exchange in the example are refused."},{"name":"company","type":"string","required":false,"description":"Company name (max 200)."},{"name":"title","type":"string","required":false,"description":"Job title (max 200)."},{"name":"email","type":"string","required":false,"description":"Email address."}],"example":{"name":"Jordan Example","phone":"+13125550100","company":"Example Widgets LLC","title":"Operations Manager","email":"jordan@example.com"}}},{"method":"POST","url":"https://analyticalinsider.ai/api/agent/v1/contacts/sms-consent","auth":"bearer","description":"Attest that a contact agreed to receive text messages, for the contact's current number. Required before the first message to that number; a changed number needs a new attestation. Repeating it for the same number changes nothing.","request":{"contentType":"application/json","fields":[{"name":"contactId","type":"string","required":true,"description":"The contact id from POST contacts or GET leads."},{"name":"obtainedAt","type":"string","required":true,"description":"When the contact agreed: ISO 8601 with a time zone offset, not in the future."},{"name":"method","type":"string","required":true,"description":"How the contact agreed, one of: web_form, written_form, verbal, text_keyword."},{"name":"evidence","type":"string","required":true,"description":"What proves it (20 to 2000 characters), stored exactly as given."}],"example":{"contactId":"clx0example0contact0000001","obtainedAt":"2026-11-14T15:30:00Z","method":"web_form","evidence":"Checked the SMS opt-in box on the quote request form at https://www.example.com/quote on 2026-11-14."}}},{"method":"POST","url":"https://analyticalinsider.ai/api/agent/v1/messages","auth":"bearer","description":"Send one text message to a contact from your own number. The first message to a number needs recorded consent (422 CONSENT_REQUIRED) and carries an opt-out notice; a STOP reply blocks every later one. Text messages draw on one monthly budget of billed segments per organization, by UTC calendar month. A message of up to 160 basic Latin characters is one segment; a longer one, or one containing an emoji or a non-Latin character, uses more than one. The opt-out notice on a first message and the one-time opt-in confirmation count too. The budget is 100 segments; a message that would pass it is 409 CAP_EXCEEDED. Reusing an idempotencyKey sends nothing and returns the first answer, refusals included: use a new key to try again.","request":{"contentType":"application/json","fields":[{"name":"contactId","type":"string","required":true,"description":"The contact id."},{"name":"body","type":"string","required":true,"description":"The message, 1 to 480 characters after trimming, including the opt-out notice added to a first message; longer is 422 BODY_TOO_LONG."},{"name":"idempotencyKey","type":"string","required":true,"description":"A unique key for this send, 8 to 128 characters: letters, digits, dot, underscore or hyphen."}],"example":{"contactId":"clx0example0contact0000001","body":"Hi Jordan, thanks for the quote request. Is Tuesday at 10am a good time for a 15 minute call?","idempotencyKey":"msg-2026-11-14-0001"}}},{"method":"POST","url":"https://analyticalinsider.ai/api/agent/v1/lead-packs","auth":"bearer","description":"Not yet available: answers 403 NOT_YET_AVAILABLE until lead pulls open. Buy a prepaid pack of 5 or 10 leads at the per-lead price given in this document's pricing.leadPull; returns a hosted checkout URL and a checkoutSessionId. Leads are not part of the plan fee.","request":{"contentType":"application/json","fields":[{"name":"size","type":"integer","required":true,"description":"Leads in the pack: 5 or 10."},{"name":"idempotencyKey","type":"string","required":true,"description":"Your key for this purchase, 8 to 128 characters. A repeat with the same key returns the same checkout."}],"example":{"size":5,"idempotencyKey":"pack-2026-11-16-0001"}}},{"method":"POST","url":"https://analyticalinsider.ai/api/agent/v1/lead-packs/confirm","auth":"bearer","description":"Not yet available: answers 403 NOT_YET_AVAILABLE until lead pulls open. After paying, credit the pack to the lead balance. Credits once however often it is called; a pack already paid is always credited.","request":{"contentType":"application/json","fields":[{"name":"checkoutSessionId","type":"string","required":true,"description":"The checkoutSessionId the lead-packs response returned."}],"example":{"checkoutSessionId":"cs_live_k9L8m7N6o5P4q3R2s1T0"}}},{"method":"POST","url":"https://analyticalinsider.ai/api/agent/v1/lead-pulls","auth":"bearer","description":"Not yet available: answers 403 NOT_YET_AVAILABLE until lead pulls open. Reserve 1 to 10 leads from the prepaid balance for your stored ideal customer profile. 409 ICP_REQUIRED without a profile, 402 PAYMENT_REQUIRED when the balance is short. A lead is charged only when delivered; a reservation not delivered within 24 hours is returned to the balance.","request":{"contentType":"application/json","fields":[{"name":"count","type":"integer","required":true,"description":"Leads to reserve, 1 to 10."},{"name":"idempotencyKey","type":"string","required":true,"description":"Your key for this pull, 8 to 128 characters. A repeat with the same key returns the first outcome and reserves nothing new."}],"example":{"count":5,"idempotencyKey":"pull-2026-11-16-0001"}}},{"method":"GET","url":"https://analyticalinsider.ai/api/agent/v1/lead-pulls","auth":"bearer","description":"Not yet available: there is no pull to read until lead pulls open. Report one pull (?id=<pullId>): state (queued, delivered or expired), requested, pending, delivered, released and when its reservation expires.","request":{"fields":[{"name":"id","type":"string","required":true,"description":"The pull id the lead-pulls POST returned."}]}},{"method":"POST","url":"https://analyticalinsider.ai/api/agent/v1/contacts/call-consent","auth":"bearer","description":"Record that a contact consented IN WRITING to automated-voice calls from your principal. The consent is tied to the contact's current number: a changed number needs a new attestation. Consent to texts does not count. 200 { consent: { contactId, consentAt, source, form, phoneLast4 } }. 422 WRITTEN_CONSENT_REQUIRED when form is not \"written\", 404 NOT_FOUND, 422 NOT_DIALABLE, 422 PHONE_NOT_US (calls go only to United States geographic numbers).","request":{"contentType":"application/json","fields":[{"name":"contactId","type":"string","required":true,"description":"The id of one of your contacts."},{"name":"obtainedAt","type":"string","required":true,"description":"When the consent was given: ISO 8601 with a time zone offset, not in the future."},{"name":"form","type":"string","required":true,"description":"Must be \"written\". Automated-voice calls need written consent; any other value is refused."},{"name":"evidence","type":"string","required":true,"description":"Where the written consent can be found (form, document, submission id): 20 to 2,000 characters, stored as given."}],"example":{"contactId":"cm0examplecontact00000001","obtainedAt":"2026-11-16T15:04:05Z","form":"written","evidence":"Signed web form at example.com/consent, submission 1042, checkbox agreeing to automated calls from Example Widgets LLC."}}},{"method":"POST","url":"https://analyticalinsider.ai/api/agent/v1/calls","auth":"bearer","description":"Place one automated-voice call from your number to a contact with recorded written call consent. The call says it is an automated call from your principal's legal name and that pressing 9 stops further calls, then speaks say, then says \"To reach <legal name>, call <callbackNumber>.\", then hangs up. Calls are not recorded, last at most 120 seconds once answered, run one at a time, and are limited to 25 per UTC day and 30 per UTC calendar month. 201 { id, status }; the call then appears on GET calls. Refusals, in order: 400 VALIDATION_FAILED, 422 INVALID_CHARACTERS, 422 CALLBACK_NUMBER_INVALID, 409 NO_NUMBER, 404 NOT_FOUND, 422 NOT_DIALABLE, 422 PHONE_NOT_US (United States geographic numbers only: no other country, toll-free or premium-rate), 403 LEAD_DO_NOT_CALL / BAD_NUMBER_REGISTERED / OUTSIDE_CONTACT_HOURS / CONTACT_ZONE_UNKNOWN / DIAL_GATE_UNAVAILABLE, 422 CALL_CONSENT_REQUIRED, 409 CAP_EXCEEDED, 409 CALL_IN_PROGRESS, 422 INTERNAL (refused, not placed, will not succeed as sent), 500 INTERNAL with a Retry-After header (a temporary limit, not placed), 409 CALL_OUTCOME_UNKNOWN (the call may have been placed: do not place it again; GET calls shows what happened). A replayed idempotencyKey returns the first outcome and places nothing; every retry needs a new idempotencyKey.","request":{"contentType":"application/json","fields":[{"name":"contactId","type":"string","required":true,"description":"The id of one of your contacts."},{"name":"say","type":"string","required":true,"description":"The message to speak after the opening: 1 to 1,000 characters, no control characters."},{"name":"callbackNumber","type":"string","required":true,"description":"A telephone number for your principal's business, spoken at the end of the call: a United States geographic or toll-free number, and not your own agent number."},{"name":"idempotencyKey","type":"string","required":true,"description":"A key you choose for this call, 8 to 128 characters: letters, digits, dot, underscore or hyphen."}],"example":{"contactId":"cm0examplecontact00000001","say":"Hello, this is a reminder that your service visit is booked for Tuesday at 10 in the morning.","callbackNumber":"+18005550199","idempotencyKey":"call-0001-reminder"}}},{"method":"POST","url":"https://analyticalinsider.ai/api/agent/v1/email/domain","auth":"bearer","description":"Request the organization's one sending domain (.com, registered by us in our own account) and one mailbox, named for a person (not a shared role such as sales). A second request returns the first. Refused with 409 CANCELLATION_SCHEDULED once a cancellation is scheduled. 201 created, 200 already requested, 202 written but the registration is not confirmed yet. Setup then waits on steps our staff complete; GET /email names the step.","request":{"contentType":"application/json","fields":[{"name":"domain","type":"string","required":true,"description":"A registrable .com name that is not already in use, e.g. example-mail.com."},{"name":"mailbox.localPart","type":"string","required":true,"description":"The part of the mailbox address before the @: letters, digits and . - _ ' only."},{"name":"mailbox.displayName","type":"string","required":true,"description":"The sender name: a first and a last name."},{"name":"rootRedirectTarget","type":"string","required":false,"description":"Where the bare domain forwards a browser, an http(s) URL. Defaults to the website given at signup."},{"name":"idempotencyKey","type":"string","required":true,"description":"A key you choose for this request, 8 to 128 characters: letters, digits, dot, underscore or hyphen. A key that finished answers its first outcome."}],"example":{"domain":"example-widgets-mail.com","mailbox":{"localPart":"sam","displayName":"Sam Example"},"idempotencyKey":"email-domain-request-0001"}}},{"method":"GET","url":"https://analyticalinsider.ai/api/agent/v1/email","auth":"bearer","description":"The email setup: { domain: { name, status } | null, mailbox: { address, status, dailyCap, sentToday } | null, waitingOn }. waitingOn is one of registration, dns, mail_setup, signing_key, mailbox_connection, suspended, paused, reconnect_required, daily_cap, or null. Registration and DNS are ours to finish; mail setup, the signing key and the mailbox connection are done by our staff; suspended, paused and reconnect_required mean every send is refused until our staff act; daily_cap means today's warm-up limit is spent and comes back the next day. null with a domain means a send can go out now."},{"method":"POST","url":"https://analyticalinsider.ai/api/agent/v1/emails","auth":"bearer","description":"Send one email from the organization's mailbox to a contact (a lead in this organization with an email address). Refused with 409 MAILBOX_NOT_READY until the mailbox is connected; every other refusal carries the send rule's own code. A replayed idempotencyKey returns the first outcome, so use a new key to try again. Uses one email_send from the allowance; the binding daily limit is the mailbox warm-up. Today a recipient is accepted only when the contact has a United States direct phone on record (its own line, not a company switchboard); every other recipient is refused with 422 CONSENT_BASIS_MISSING before anything is spent. A contact whose address is not yet verified is verified on its first send, using one screening_lookup: an unusable address is refused with 422 UNVERIFIED_RECIPIENT, and 500 VERIFICATION_UNAVAILABLE with a Retry-After header means retry later.","request":{"contentType":"application/json","fields":[{"name":"contactId","type":"string","required":true,"description":"The id of a lead in this organization that has an email address."},{"name":"subject","type":"string","required":true,"description":"Subject line, 1 to 200 characters."},{"name":"body","type":"string","required":true,"description":"Plain text body, 1 to 20000 characters. The postal footer and an unsubscribe link are added."},{"name":"idempotencyKey","type":"string","required":true,"description":"8 to 128 characters. A replayed key returns the first outcome and sends nothing."}],"example":{"contactId":"clx0contact0example0001","subject":"Quick question about your service fleet","body":"Hi Pat,\n\nDo you schedule maintenance for more than ten vehicles a month?\n\nSam","idempotencyKey":"email-send-0001-pat"}}},{"method":"GET","url":"https://analyticalinsider.ai/api/agent/v1/emails","auth":"bearer","description":"List the organization's email messages, sent and received (replies included): direction, from, to, subject, text, time and thread, oldest first, paged on id.","request":{"fields":[{"name":"direction","type":"string","required":false,"description":"inbound or outbound."},{"name":"contactId","type":"string","required":false,"description":"Only messages with this contact."},{"name":"cursor","type":"string","required":false,"description":"The nextCursor from the previous page."},{"name":"limit","type":"integer","required":false,"description":"Page size, 1 to 100 (default 25)."}]}}]}