Supported Countries: The Compliance API currently supports India only. Support for additional countries will be added in future releases.
The Requirements Object
The Requirements object describes what documents and fields are needed for compliance in a specific country.Attributes
ISO 3166-1 alpha-2 country code.
Type of number. Values:
local, mobile, tollfree.Type of end user. Currently only
business is supported.List of required document types with accepted formats and descriptions.
List of required fields for the end user (e.g.,
business_name, address.city).Estimated number of business days for compliance review.
Example Object
Get Requirements
Query compliance requirements before creating a compliance record. Returns available number types and their requirements for a country.Query Parameters
ISO 3166-1 alpha-2 country code. Currently only
IN (India) is supported.Filter by number type. Values:
local, mobile, tollfree.Filter by end user type. Currently only
business is supported.Example
Response
Returns available number types and requirements for the country.The Compliance Object
A Compliance record combines end user information and documents for regulatory compliance review.Attributes
Unique identifier (UUID format).
A friendly name to identify this compliance record.
Current status. Values:
pending_review, approved, rejected, more_info_required.ISO 3166-1 alpha-2 country code.
Type of number. Values:
local, mobile, tollfree.End user information including type, name, email, address, and registration details.
Unique identifier for the end user (UUID format).
End user type. Values:
individual, business.Full name (individual) or business name.
Contact email address.
Address with
line1, line2, city, state, postal_code, country.Business registration number (for business users).
List of attached documents with
id, type, file_url, and status.ISO 8601 timestamp of creation.
ISO 8601 timestamp of last update.
ISO 8601 timestamp of the most recent submission for review.
Example Object
Compliance Records
Compliance records combine end user information and documents into a single unit for regulatory review.Create Compliance
Create and submit a compliance record with end user details and documents in a single request. The record is automatically submitted for review upon creation.Arguments
ISO 3166-1 alpha-2 country code.
Type of number. Values:
local, mobile, tollfree.A friendly name to identify this compliance record.
End user information object.
End user type. Values:
individual, business.Full name (individual) or business name.
Contact email address.
Address information (required for most countries).
Business registration number (required for business users).
Array of document objects with
type and file. Each document file must be PNG or PDF, with a maximum size of 5 MB.URL to receive status update webhooks when compliance is approved, rejected, or requires more information.
HTTP method for the callback. Values:
GET, POST. Default: POST.Example
Response
Get Compliance
Retrieve details of a specific compliance record.Query Parameters
Comma-separated list of objects to expand. Values:
documents, end_user, linked_numbers.Example
List Compliance
List all compliance records for an account.Query Parameters
Filter by status. Values:
pending_review, approved, rejected, more_info_required.Filter by country code.
Filter by number type.
Number of results per page (max 100, default 20).
Pagination offset.
Example
Update Compliance
Update an existing compliance record. Compliance records can be updated when inrejected or more_info_required status. Updating automatically resubmits the record for review.
Arguments
Updated friendly name for this compliance record.
Updated end user information.
Updated documents array. Provide only documents to add or replace.
Example
Unlike the previous API, rejected compliance records can be updated directly instead of creating a new application. The record is automatically resubmitted for review after an update.
Delete Compliance
Delete a compliance record. Only records that are notapproved or linked to phone numbers can be deleted.
Example
Link Compliance to Numbers
Once a compliance record is approved, link it to phone numbers using the Update Account Phone Number endpoint. Pass thecompliance_id parameter with your approved compliance ID.
The compliance record must match the number’s country and type. One approved compliance record can be linked to multiple numbers in the same country/type.
Status Flow
| Status | Description | Actions Available |
|---|---|---|
pending_review | Submitted, awaiting review | View, Delete |
approved | Compliance verified | Link to numbers |
rejected | Documents not accepted | Update (auto-resubmits), Delete |
more_info_required | Additional info needed | Update (auto-resubmits), Delete |
Webhooks
Configure webhooks to receive real-time notifications about compliance events.Webhook Events
| Event | Description |
|---|---|
compliance.approved | Compliance has been approved |
compliance.rejected | Compliance was rejected with reasons |
compliance.more_info_required | Additional documents or information needed |
Webhook Payload
Rejection Webhook Example
Error Handling
Error Response Format
Error Codes
| Code | Type | Description |
|---|---|---|
missing_required_document | validation_error | A required document type is missing |
missing_required_field | validation_error | A required field is not provided |
invalid_file | validation_error | File format not supported or exceeds 5 MB size limit |
compliance_not_editable | state_error | Compliance cannot be modified in current status |
compliance_not_approved | state_error | Only approved compliance records can be linked to numbers |
country_mismatch | validation_error | Number country doesn’t match compliance country |
number_type_mismatch | validation_error | Number type doesn’t match compliance type |
HTTP Status Codes
| Code | Description |
|---|---|
200 | Success |
201 | Created |
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Invalid credentials |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Resource doesn’t exist |
409 | Conflict - Resource state conflict |
422 | Unprocessable Entity - Validation failed |
429 | Too Many Requests - Rate limited |
500 | Internal Server Error |
Rate Limits
| Endpoint | Rate Limit |
|---|---|
| Requirements Discovery | 100 requests/minute |
| Compliance Operations | 60 requests/minute |
Related
- Regulatory Compliance - Overview and Console guide
- Phone Numbers - Search and buy numbers
- Account Phone Numbers - Manage your numbers