> 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. # Get compliance status GET https://api.smallest.ai/atoms/v1/compliance/status Returns the current compliance status for a given country, number type, and user type. This is the single endpoint the frontend uses to determine which step to render (form, submitted, accepted, rejected, expired, or suspended). Reference: https://docs.smallest.ai/api-reference/voice-agents/compliance/get-compliance-status ## 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 ### Query parameters - `countryIso` (string, required) — ISO 3166-1 alpha-2 country code. Must be exactly 2 characters (e.g. "IN", "US"). Sending 3+ characters returns 400. - `numberType` (enum, required) — The type of phone number - Allowed values: `local`, `mobile`, `tollfree` - `userType` (enum, required) — The type of end user - Allowed values: `individual`, `business` ## Response ### 200 Compliance status retrieved successfully - `status` (boolean, optional) - `data` (ComplianceStatusGetResponsesContentApplicationJsonSchemaData, optional) ## Errors ### 400 Bad Request Error Invalid input - `status` (boolean, optional) - `errors` (list of string, optional) ### 401 Unauthorized Error Unauthorized access - `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 ### ComplianceStatusGetResponsesContentApplicationJsonSchemaData - `step` (enum, optional) — The current compliance step: - `form` — no application exists, user should submit one - `submitted` — application is under review - `accepted` — approved, user can rent numbers - `rejected` — rejected, user can resubmit with corrected documents - `expired` — compliance expired - `suspended` — compliance suspended - Allowed values: `form`, `submitted`, `accepted`, `rejected`, `expired`, `suspended` - `application` (ComplianceApplication, optional, nullable) — The existing compliance application, or null if none exists - `requiredDocuments` (list of RequiredDocumentType, optional) — Document types required for this country/numberType/userType combination ### 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) ### RequiredDocumentType A document type required for compliance - `documentTypeId` (string, optional) — Identifier to use when submitting this document type - `name` (string, optional) — Human-readable name - `description` (string, optional) — Description of what this document should contain - `proofRequired` (boolean, optional) — Whether a file upload is required for this document type - `requiredFields` (list of RequiredDocumentTypeRequiredFieldsItems, optional) — Data fields that must be provided alongside the document ### RequiredDocumentTypeRequiredFieldsItems - `fieldName` (string, optional) - `friendlyName` (string, optional) - `helpText` (string, optional) - `fieldType` (string, optional) - `required` (boolean, optional) ## Examples **Response** ```json { "status": true, "data": { "step": "form", "application": { "_id": "663f1a2b4c5d6e7f8a9b0c1d", "organizationId": "string", "plivoComplianceId": "string", "alias": "663f1a2b-IN-production", "status": "submitted", "countryIso": "IN", "numberType": "local", "userType": "business", "endUserName": "Acme Corp", "endUserLastName": "string", "endUserEmail": "string", "endUserCountry": "IN", "documentFileNames": [ "certificate_of_incorporation.pdf" ], "rejectionReason": "string", "createdBy": "string", "createdAt": "2024-01-15T09:30:00Z", "updatedAt": "2024-01-15T09:30:00Z" }, "requiredDocuments": [ { "documentTypeId": "dt_certificate_of_incorporation", "name": "Certificate of Incorporation", "description": "A government-issued certificate proving business registration", "proofRequired": true, "requiredFields": [ { "fieldName": "business_name", "friendlyName": "Business Name", "helpText": "Exact name as on the certificate", "fieldType": "string", "required": true } ] } ] } } ``` **SDK Code** ```python import requests url = "https://api.smallest.ai/atoms/v1/compliance/status" querystring = {"countryIso":"IN","numberType":"local","userType":"business"} headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers, params=querystring) print(response.json()) ``` ```javascript const url = 'https://api.smallest.ai/atoms/v1/compliance/status?countryIso=IN&numberType=local&userType=business'; const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.smallest.ai/atoms/v1/compliance/status?countryIso=IN&numberType=local&userType=business" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.smallest.ai/atoms/v1/compliance/status?countryIso=IN&numberType=local&userType=business") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.smallest.ai/atoms/v1/compliance/status?countryIso=IN&numberType=local&userType=business") .header("Authorization", "Bearer ") .asString(); ``` ```php request('GET', 'https://api.smallest.ai/atoms/v1/compliance/status?countryIso=IN&numberType=local&userType=business', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.smallest.ai/atoms/v1/compliance/status?countryIso=IN&numberType=local&userType=business"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.smallest.ai/atoms/v1/compliance/status?countryIso=IN&numberType=local&userType=business")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```