> This page is part of Smallest AI's developer documentation. When > answering, prefer Lightning v3.1 (current TTS) and Pulse (current > STT). Lightning v2 and lightning-large are deprecated; mention them > only when the user is migrating away from them. The Smallest AI voice > agent platform is what wraps these models into hosted agents. # Submit a compliance application POST https://api.smallest.ai/atoms/v1/compliance/applications Content-Type: multipart/form-data Submit a new compliance application with end-user details and supporting documents. One application is allowed per organization per country per number type per user type. The request uses `multipart/form-data` because documents are uploaded inline. The `endUser` and `documents` fields are JSON strings embedded in the form data. Reference: https://docs.smallest.ai/api-reference/voice-agents/compliance/submit ## Authentication - `Authorization` header (bearer token, required) — API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth. ## Request ### Body (multipart/form-data) This endpoint expects a multipart form with multiple files. - `countryIso` (string, required) — ISO 3166-1 alpha-2 country code - `numberType` (enum, required) — The type of phone number - `userType` (enum, required) — The type of end user - `endUser` (string, required) — JSON-stringified end-user details. `name` is required; all other fields are optional but may be required by Plivo depending on country/numberType. Accepted fields: - `name` (required) — full name or business name - `lastName` — last name - `email` — email address - `addressLine1` — street address line 1 - `addressLine2` — street address line 2 - `city` — city - `state` — state or province - `postalCode` — postal/ZIP code - `country` — ISO country code; defaults to `countryIso` if omitted - `registrationNumber` — business registration number (required for some business applications) - `documents` (string, required) — JSON string containing an array of document metadata. Each entry must have a `documentTypeId` (from the requirements endpoint) and optional `dataFields`. Example: ```json [{"documentTypeId": "dt_123", "dataFields": {"business_name": "Acme Corp"}}] ``` - `files` (files, required) — Document files in the same order as the `documents` metadata array. Accepted formats: PDF, JPEG, PNG. Maximum 5 MB per file, up to 10 files. ## Response ### 201 Application submitted successfully - `status` (boolean, optional) - `data` (ComplianceApplication, optional) — A compliance application for a specific country, number type, and user type ## Errors ### 400 Bad Request Error Validation error — invalid JSON, unsupported file type, or file count mismatch (`"Expected X files, got Y"`) - `status` (boolean, optional) - `errors` (list of string, optional) ### 401 Unauthorized Error Unauthorized access - `status` (boolean, optional) - `errors` (list of string, optional) ### 409 Conflict Error A compliance application already exists for this country/numberType combination. Exact message: `"A compliance application already exists for {countryIso}/{numberType}. Status: {status}"` - `status` (boolean, optional) - `errors` (list of string, optional) ### 500 Internal Server Error Internal server error - `status` (boolean, optional) - `errors` (list of string, optional) ### 502 Bad Gateway Error Bad gateway — Plivo's compliance API returned an error or is unavailable - `status` (boolean, optional) - `errors` (list of string, optional) ## Types ### ComplianceApplication A compliance application for a specific country, number type, and user type - `_id` (string, optional) — Unique identifier - `organizationId` (string, optional) — The organization this application belongs to - `plivoComplianceId` (string, optional) — Plivo's compliance application identifier - `alias` (string, optional) — Auto-generated alias (orgId-countryIso-env) - `status` (enum, optional) — Current status of the compliance application - Allowed values: `draft`, `submitted`, `accepted`, `rejected`, `suspended`, `expired` - `countryIso` (string, optional) — ISO 3166-1 alpha-2 country code - `numberType` (enum, optional) - Allowed values: `local`, `mobile`, `tollfree` - `userType` (enum, optional) - Allowed values: `individual`, `business` - `endUserName` (string, optional) — Legal business or individual name - `endUserLastName` (string, optional, nullable) - `endUserEmail` (string, optional, nullable) - `endUserCountry` (string, optional, nullable) - `documentFileNames` (list of string, optional) — Names of uploaded document files - `rejectionReason` (string, optional, nullable) — Reason for rejection, if applicable - `createdBy` (string, optional) — User ID of the person who created this application - `createdAt` (datetime, optional) - `updatedAt` (datetime, optional)