AivaOSAPI Docs

AivaOS API

Generate clinic sites programmatically. Each clinic becomes a subdomain of aivaosbrand.com with an automatic compliant landing page, A2P opt-in URL, and SSL.

Base URL: https://aivaosbrand.com

Authentication

Send your API key in the x-api-key header on every request. Requests from the AivaOS dashboard itself (same origin) do not need it.

x-api-key: YOUR_API_KEY
POST/api/clinics

Generate & publish a clinic

Creates the clinic subdomain slug(businessName) + state, publishes its landing page (with /privacy, /terms, /sms), and returns the live URL. SSL is issued automatically on first visit.

Body (JSON)

FieldTypeNotes
businessNamestringRequired. Exactly as on the EIN.
address.statestringRequired. 2-letter US code (e.g. NY).
address.street / city / postalCodestringOptional.
einstringOptional. Federal EIN (##-#######).
phonestringOptional. The Twilio number.
descriptionstringOptional. A generic default is used if omitted.

Example

curl -X POST https://aivaosbrand.com/api/clinics \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "businessName": "Viva Cryo LLC",
    "ein": "84-4072931",
    "address": { "street": "166 Woodbine Dr", "city": "East Hampton", "state": "NY", "postalCode": "11937" },
    "phone": "+1 (631) 814-1401"
  }'

Response

{
  "ok": true,
  "subdomain": "vivacryony.aivaosbrand.com",
  "url": "https://vivacryony.aivaosbrand.com"
}

JavaScript

const res = await fetch("https://aivaosbrand.com/api/clinics", {
  method: "POST",
  headers: { "content-type": "application/json", "x-api-key": "YOUR_API_KEY" },
  body: JSON.stringify({
    businessName: "Viva Cryo LLC",
    address: { state: "NY" },
    phone: "+1 (631) 814-1401",
  }),
});
const { url } = await res.json();
POST/api/extract

Extract fields from a document

Reads a CP-575 / EIN letter / business tax document and returns the legal name, EIN and address transcribed verbatim (uppercase preserved). Send a multipart form with a file (PDF or image).

Example

curl -X POST https://aivaosbrand.com/api/extract \
  -H "x-api-key: YOUR_API_KEY" \
  -F "file=@cp575.pdf;type=application/pdf"

Response

{
  "configured": true,
  "found": true,
  "fields": {
    "businessName": "VIVA CRYO LLC",
    "ein": "84-4072931",
    "address": { "street": "166 WOODBINE DR", "city": "EAST HAMPTON", "state": "NY", "postalCode": "11937" }
  }
}

Typical flow

  1. POST /api/extract with the CP-575 to auto-fill name / EIN / address.
  2. POST /api/clinics with those fields to publish the site.
  3. The returned URL is live within seconds (SSL issued on first visit).