{"openapi":"3.0.3","info":{"title":"Intent One Gateway","version":"1.0.0","description":"Public API for integrators. Any request whose method/path doesn't match one of the operations below is also accepted: authenticate with X-Client-Id (see security schemes) and it's queued for asynchronous processing the same way as the documented endpoints — this generic fallback isn't representable as a single OpenAPI operation, so it's noted here instead of in `paths`."},"servers":[{"url":"https://intent-one-gateway-staging.ihq-eng.dev","description":"Global host — identify yourself with the X-Client-Id header"},{"url":"https://{clientId}intent-one-gateway-staging.ihq-eng.dev","description":"Per-client host — the subdomain must match the X-Client-Id header","variables":{"clientId":{"default":"your-client-id"}}}],"tags":[{"name":"Public API","description":"Endpoints used to send and retrieve your data."},{"name":"Account management","description":"Provisioning endpoints. Each requires a bearer token credential — contact your Intent One representative to obtain one."}],"components":{"securitySchemes":{"ClientId":{"type":"apiKey","in":"header","name":"X-Client-Id","description":"Identifies your client. Required on the global host; on the per-client subdomain it must also match the subdomain."},"AppName":{"type":"apiKey","in":"header","name":"x-sdk-app-name","description":"Paired with x-sdk-api-key to identify your app for /edge/v1/report. Not valid on other endpoints."},"AppApiKey":{"type":"apiKey","in":"header","name":"x-sdk-api-key","description":"Paired with x-sdk-app-name for /edge/v1/report."},"ReportType":{"type":"apiKey","in":"header","name":"x-sdk-report-type","description":"Optional on /edge/v1/report. Declares the report type explicitly instead of relying on structural auto-detection — when present it's authoritative: only that type's schema versions are checked, with no fallback to any other type."},"BearerAuth":{"type":"http","scheme":"bearer","description":"Credential required for account management endpoints. Contact your Intent One representative to obtain one."}}},"paths":{"/edge/v1/report":{"post":{"tags":["Public API"],"summary":"Submit data for processing (type/timeliness/version resolved from headers or inferred)","description":"Body is a single edge report object (microsegments, microsegments_snapshot, events, jema_campaign, jema_triggers, usage, debug, or encoded_enrichment), or a JSON array of report objects to submit as a batch in one request. Optionally gzip-compressed — signal this with either the standard Content-Encoding: gzip header, or a Content-Type that names gzip directly (e.g. \"content-gzip\"). Report type/timeliness/version are normally resolved from the x-sdk-report-type/x-sdk-report-timeliness/x-sdk-report-version headers (each optional, independent, see their own descriptions), falling back to auto-detection from the body's shape (type/version) or a default of \"realtime\" (timeliness) for whichever of the three isn't supplied that way. Alternatively, POST to /edge/v1/report/{type}/{timeliness}/{version} instead (see that path's own entry below) to declare all three explicitly via the URL, mirroring edge-reports-api's own route convention.","security":[{"AppName":[],"AppApiKey":[]}],"parameters":[{"name":"x-sdk-report-type","in":"header","required":false,"schema":{"type":"string","enum":["microsegments","microsegments_snapshot","events","jema_campaign","jema_triggers","usage","debug","encoded_enrichment"]},"description":"Declares the report type explicitly. When set, only that type's schema versions are checked — no fallback to auto-detection or any other type."},{"name":"x-sdk-report-timeliness","in":"header","required":false,"schema":{"type":"string"},"description":"Declares the report timeliness explicitly (e.g. realtime/historical/periodical, matching edge-reports-api's own convention — an unvalidated free string, same as there). Defaults to \"realtime\" when unset. Independent of type/version resolution."},{"name":"x-sdk-report-version","in":"header","required":false,"schema":{"type":"string"},"description":"Declares the protocol version explicitly. Only honored alongside x-sdk-report-type — a version with no declared type is ignored, falling back to full auto-detection. Must be one of that type's known versions or the request is rejected (unknown_report_version); when valid, it's trusted outright with no structural check against the body."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object"},{"type":"array","items":{"type":"object"}}]}}}},"responses":{"202":{"description":"Accepted for processing. reportType/protocolVersion/timeliness are the resolved report type, its protocol version (v1-v5, meaning differs per reportType), and timeliness (see x-sdk-report-timeliness); sdkVersion is read directly from the body.","content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"boolean"},"requestId":{"type":"string"},"reportType":{"type":"string","enum":["microsegments","microsegments_snapshot","events","jema_campaign","jema_triggers","usage","debug","encoded_enrichment"]},"protocolVersion":{"type":"string","enum":["v1","v2","v3","v4","v5"]},"timeliness":{"type":"string"},"sdkVersion":{"type":"string","nullable":true}}}}}},"400":{"description":"unrecognized_report_version: the body doesn't structurally match any known edge report type/version, and no type was declared via x-sdk-report-type. report_type_mismatch: a declared type's schema versions were checked but the body matched none of them (reportType echoes what was declared). unknown_report_type: the declared type isn't one of the eight known report types (reportType echoes the invalid value). unknown_report_version: the declared type is valid but the declared version isn't one of its known versions (reportType/version echo what was declared).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unrecognized_report_version","report_type_mismatch","unknown_report_type","unknown_report_version"]},"reportType":{"type":"string"},"version":{"type":"string"},"sdkVersion":{"type":"string","nullable":true}}}}}}}}},"/edge/v1/report/{type}/{timeliness}/{version}":{"post":{"tags":["Public API"],"summary":"Submit data for processing, declaring type/timeliness/version via the URL","description":"Same endpoint as /edge/v1/report (identical auth, body, and response shape — see that entry for the full description), except type/timeliness/version are read from the path instead of headers/auto-detection — mirroring edge-reports-api's own POST /{type}/{timeliness}/{version} route, the convention an SDK transitions onto before this gateway is eventually removed from the path entirely. version is trusted outright once it's a recognized version for type (unknown_report_version otherwise) — there's no structural check against the body the way the header-only form (no declared version) still runs.","security":[{"AppName":[],"AppApiKey":[]}],"parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["microsegments","microsegments_snapshot","events","jema_campaign","jema_triggers","usage","debug","encoded_enrichment"]}},{"name":"timeliness","in":"path","required":true,"schema":{"type":"string"},"description":"An unvalidated free string, same as edge-reports-api's own convention (e.g. realtime/historical/periodical)."},{"name":"version","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object"},{"type":"array","items":{"type":"object"}}]}}}},"responses":{"202":{"description":"Same shape as /edge/v1/report's 202 — see that entry."},"400":{"description":"unknown_report_type (invalid type segment) or unknown_report_version (valid type, invalid version segment) — see those error codes on the bare /edge/v1/report entry."}}}},"/admin/accounts/{accountId}":{"put":{"tags":["Account management"],"summary":"Create or update an account","description":"An account is the organization that will own one or more clients.","security":[{"BearerAuth":[]}],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"notes":{"type":"string"}}}}}},"responses":{"200":{"description":"Account updated"},"201":{"description":"Account created"}}}},"/admin/client/new/{clientName}":{"put":{"tags":["Account management"],"summary":"Create a new client under an account","description":"Returns a X-Client-Id value for use with the Public API endpoints above.","security":[{"BearerAuth":[]}],"parameters":[{"name":"clientName","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["intentDeployment","isActive","accountId"],"properties":{"intentDeployment":{"type":"string","enum":["eu","us","apac"]},"isActive":{"type":"boolean"},"accountId":{"type":"string"},"campaignsUrl":{"type":"string"}}}}}},"responses":{"200":{"description":"Updated — client already existed"},"201":{"description":"Created — first time this client was created"}}}},"/admin/client-apps/{clientId}":{"put":{"tags":["Account management"],"summary":"Set app credentials for a client","description":"Sets the x-sdk-app-name/x-sdk-api-key credentials used with /edge/v1/report. Replaces the full set.","security":[{"BearerAuth":[]}],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["apps"],"properties":{"apps":{"type":"array","items":{"type":"object","required":["appName","apiKey"],"properties":{"appName":{"type":"string"},"apiKey":{"type":"string"}}}}}}}}},"responses":{"200":{"description":"Updated — replaced the existing set"},"201":{"description":"Created — first time apps were set for this client"},"404":{"description":"Client doesn't exist yet"}}}}}}