> 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 requirements GET https://api.smallest.ai/atoms/v1/compliance/requirements Discover what documents are required for a given country, number type, and user type. Results are cached for 1 hour. Returns an empty `documentTypes` array if no compliance is needed for the given combination. Reference: https://docs.smallest.ai/api-reference/voice-agents/compliance/get-compliance-requirements ## 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 Requirements retrieved successfully - `status` (boolean, optional) - `data` (ComplianceRequirement, optional) — Compliance requirements for a country/numberType/userType combination ## 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 ### ComplianceRequirement Compliance requirements for a country/numberType/userType combination - `requirementId` (string, optional) — Plivo's requirement identifier - `countryIso` (string, optional) - `numberType` (string, optional) - `userType` (string, optional) - `documentTypes` (list of RequiredDocumentType, optional) — Required document types. Empty array means no compliance is needed. ### 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": { "requirementId": "string", "countryIso": "IN", "numberType": "local", "userType": "business", "documentTypes": [ { "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/requirements" 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/requirements?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/requirements?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/requirements?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/requirements?countryIso=IN&numberType=local&userType=business") .header("Authorization", "Bearer ") .asString(); ``` ```php request('GET', 'https://api.smallest.ai/atoms/v1/compliance/requirements?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/requirements?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/requirements?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() ```