Skip to main content
The Compliance API lets you manage phone number regulatory compliance in a single streamlined flow. Instead of creating end users, documents, and compliance applications separately, you can do it all in one API call.
Supported Countries: The Compliance API currently supports India only. Support for additional countries will be added in future releases.
API Endpoint
Authentication: HTTP Basic Auth with your Plivo Auth ID as username and Auth Token as password. Every response includes an api_id field for request tracing.

The Requirements Object

Describes what documents and fields are needed for compliance in a specific country, number type, and user type combination. Always call this first before creating a compliance application.

Attributes

string
UUID of the compliance requirement.
string
ISO 3166-1 alpha-2 country code.
string
Type of number. Values: local, mobile, tollfree.
string
Type of end user. Values: individual, business.
array
List of required document types. Each object includes document_type_id, name, description, proof_required, and required_fields.

Document Type Object

Each entry in document_types:
string
UUID of the document type. Use this when creating a compliance application.
string
Document type name (e.g., “Registration Certificate”).
string
Description of the document type.
boolean
true = file upload required, false = only data fields needed.
array
Data fields required for this document type.

Required Field Object

Each entry in required_fields:
string
Key to use in documents[].data_fields.
string
Human-readable display name.
string
Guidance on what to enter.
string
Values: string, date, enum.
boolean
Whether this field is mandatory.
string
Expected format (e.g., yyyy-mm-dd). Empty if none.
string
Comma-separated allowed values for enum fields. Empty for other types.
integer
Minimum character length.
integer
Maximum character length.

Get Requirements

Query compliance requirements before creating a compliance record.

Query Parameters

string
required
Two-letter country code (e.g., IN).
string
required
Values: local, mobile, tollfree.
string
required
Values: individual, business.

Example

Response (200 OK)


The Compliance Object

Represents a compliance application combining end user information and documents for regulatory review.

Attributes

string
UUID identifier.
string
Friendly name for the compliance record.
string
Current status. Values: draft, submitted, accepted, rejected, suspended, expired.
string
ISO 3166-1 alpha-2 country code.
string
Type of number.
string
Values: individual, business.
string
Webhook URL for status change notifications. Present only if configured.
string
HTTP method for the callback. Values: GET, POST. Present only if configured.
string|null
Reason for rejection. Present only when status is rejected.
string
ISO 8601 timestamp.
string
ISO 8601 timestamp.
object|null
End user details (only returned with expand=end_user).
array|null
Attached documents (only returned with expand=documents).
array|null
Linked phone numbers (only returned with expand=linked_numbers).

End User Object

Returned when using expand=end_user.
string
UUID of the end user.
string
Values: individual, business.
string
Full name or company name.
string
Last name (empty for business).
string
Contact email.
string
Street address line 1.
string
Street address line 2.
string
City.
string
State or province.
string
Postal or ZIP code.
string
Two-letter country code.
string
Business registration number (e.g., CIN for India).
Address fields are flat (e.g., address_line1, city), not nested under an address object.

Document Object

Returned when using expand=documents.
string
UUID of the document.
string
UUID of the document type.
string
Document type name.
string
Original filename (empty if no file uploaded).
object
Key-value pairs submitted with the document.
string
Presigned S3 URL (expires in 1 hour). Empty if no file.
string
ISO 8601 timestamp.

Linked Number Object

Returned when using expand=linked_numbers.
string
Phone number in E.164 format.
string
Type of number.

Create a Compliance Application

Create end user, upload documents, and auto-submit the compliance application in a single call.
Content-Type: multipart/form-data The request consists of:
  • A data field containing a JSON string with compliance details
  • File fields using the pattern documents[0].file, documents[1].file, etc.

File Upload Rules

  • Required when the document type has proof_required=true (from Requirements response)
  • Not needed when proof_required=false
  • Supported formats: PDF, JPEG, PNG (validated server-side by content type, not just extension)
  • Max file size: 5 MB per file
  • Max filename length: 99 characters

The data JSON Structure

string
required
Two-letter country code.
string
required
Values: local, mobile, tollfree.
string
required
Friendly name (unique per end user, max 99 characters).
object
required
End user details.
array
required
Array of document objects.
string
HTTPS URL to receive status change notifications (accepted, rejected). Plivo sends a v3 signature in the request header for verification.
string
HTTP method for the callback. Values: GET, POST. Default: POST. Requires callback_url to be set.
end_user fields:
string
required
Values: individual, business.
string
required
Full name or company name.
string
Last name.
string
Contact email.
string
Street address line 1.
string
Street address line 2.
string
City.
string
State or province.
string
Postal or ZIP code.
string
Two-letter country code.
string
Business registration number.
documents[] fields:
string
required
UUID from the Requirements response.
object
Key-value pairs matching required_fields[].field_name from Requirements.

Example

Response (201 Created)


Get a Compliance Application

Retrieve details of a specific compliance application.

Query Parameters

string
Comma-separated list of objects to include. Values: end_user, documents, linked_numbers.
Without expand, only top-level fields are returned (faster response). With expand, the corresponding nested objects are included.

Example

Response (200 OK)

Without expand:
With expand=end_user,documents,linked_numbers:

List Compliance Applications

Returns a paginated list of compliance applications for the account.

Query Parameters

integer
Max results per page (max 100). Default: 20.
integer
Pagination offset. Default: 0.
string
Filter by status. Values: draft, submitted, accepted, rejected, suspended, expired.
string
Filter by country code (e.g., IN).
string
Filter by number type. Values: local, mobile, tollfree.
string
Filter by user type. Values: individual, business.
string
Filter by alias.
string
Comma-separated: end_user, documents, linked_numbers.

Example

Response (200 OK)


Update a Compliance Application

Update a rejected compliance application and automatically resubmit it for review.
Content-Type: multipart/form-data (same format as Create)

Restrictions

  • Only applications with status=rejected can be updated. Any other status returns error code compliance_not_editable.
  • end_user.type cannot be changed.
  • Documents are fully replaced. All previously uploaded documents are removed and new ones are created. You must re-upload all documents, not just the ones that need correction.

Arguments

string
Updated friendly name (max 99 characters).
object
Partial end user update (same fields as Create, minus type).
array
Full replacement document set.
string
Updated webhook URL (HTTPS only).
string
Updated HTTP method. Values: GET, POST.

Example

Response (200 OK)

Returns the updated compliance object with status: "submitted" (auto-resubmitted for review).

Delete a Compliance Application

Soft-delete a compliance application.

Restrictions

  • Applications with status=expired cannot be deleted.
  • All other statuses (submitted, accepted, rejected, suspended) can be deleted.
Deleting an accepted application that has linked numbers will unlink those numbers. Ensure numbers are re-linked to a different compliance application if needed.

Example

Response (200 OK)


Link multiple phone numbers to their respective compliance applications in a single request.
Content-Type: application/json

Requirements

  • Compliance application must be in accepted status
  • Phone number country and type must match the compliance requirement
  • Application must use the latest requirement version

Arguments

array
required
Array of number-to-compliance mappings.
string
required
Phone number in E.164 format.
string
required
UUID of an accepted compliance application.

Example

Response (200 OK)


Status Flow

Status flow
  1. CreatePOST
  2. SubmittedUnder review
  3. Accepted
  4. Link Numbers
If an application is rejected, update it (PATCH) to fix the flagged details — this auto-resubmits it for review.

Error Handling

Error Response Format

All error responses use a flat two-field format with api_id for request tracing and error containing an actionable message. This is consistent with the standard Plivo API error pattern.
string
Unique request identifier for tracing.
string
Human-readable, actionable error message.

Common Error Messages

HTTP Status Codes


Callbacks

When you provide a callback_url during creation or update, Plivo sends a webhook notification when the compliance application status changes (for example, from submitted to accepted or rejected).
  • Method: Uses the callback_method you specified (GET or POST, default POST).
  • Signature: Plivo includes a v3 signature in the request header for verification. Use Plivo’s signature validation to verify the callback is authentic.
  • HTTPS required: The callback_url must use HTTPS.

Rate Limits

Rate limit headers are included in all responses:

India Requirements

For Indian local business numbers (country_iso=IN, number_type=local, user_type=business), the following documents are required:

1. Registration Certificate (file upload required)

Certificate of Incorporation issued by the Ministry of Corporate Affairs (MCA). Udyam Registration Certificates are also accepted for MSMEs. Required data field: business_name — legal business name exactly as it appears on the certificate.

2. GST Registration Certificate (file upload required)

Form GST REG-06 issued by the Goods and Services Tax Network (GSTN). No additional data fields required.

Validation Rules

  • The business name must match exactly across both documents and the end_user.name / business_name data field
  • Both documents must be valid and not expired
  • Documents must be clear, legible PDFs or images
  • Submitting the same file for both document slots will be rejected