> ## Documentation Index
> Fetch the complete documentation index at: https://plivo.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Compliance

> Manage phone number compliance with requirements discovery and document submission

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.

<Note>
  **Supported Countries:** The Compliance API currently supports India only. Support for additional countries will be added in future releases.
</Note>

**API Endpoint**

```bash theme={null}
https://api.plivo.com/v1/Account/{auth_id}/PhoneNumber/Compliance/
```

**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

<ParamField body="requirement_id" type="string">
  UUID of the compliance requirement.
</ParamField>

<ParamField body="country_iso" type="string">
  ISO 3166-1 alpha-2 country code.
</ParamField>

<ParamField body="number_type" type="string">
  Type of number. Values: `local`, `mobile`, `tollfree`.
</ParamField>

<ParamField body="user_type" type="string">
  Type of end user. Values: `individual`, `business`.
</ParamField>

<ParamField body="document_types" type="array">
  List of required document types. Each object includes `document_type_id`, `name`, `description`, `proof_required`, and `required_fields`.
</ParamField>

### Document Type Object

Each entry in `document_types`:

<ParamField body="document_type_id" type="string">
  UUID of the document type. Use this when creating a compliance application.
</ParamField>

<ParamField body="name" type="string">
  Document type name (e.g., "Registration Certificate").
</ParamField>

<ParamField body="description" type="string">
  Description of the document type.
</ParamField>

<ParamField body="proof_required" type="boolean">
  `true` = file upload required, `false` = only data fields needed.
</ParamField>

<ParamField body="required_fields" type="array">
  Data fields required for this document type.
</ParamField>

### Required Field Object

Each entry in `required_fields`:

<ParamField body="field_name" type="string">
  Key to use in `documents[].data_fields`.
</ParamField>

<ParamField body="friendly_name" type="string">
  Human-readable display name.
</ParamField>

<ParamField body="help_text" type="string">
  Guidance on what to enter.
</ParamField>

<ParamField body="field_type" type="string">
  Values: `string`, `date`, `enum`.
</ParamField>

<ParamField body="required" type="boolean">
  Whether this field is mandatory.
</ParamField>

<ParamField body="format" type="string">
  Expected format (e.g., `yyyy-mm-dd`). Empty if none.
</ParamField>

<ParamField body="enums" type="string">
  Comma-separated allowed values for enum fields. Empty for other types.
</ParamField>

<ParamField body="min_length" type="integer">
  Minimum character length.
</ParamField>

<ParamField body="max_length" type="integer">
  Maximum character length.
</ParamField>

<h3 id="get-requirements">
  Get Requirements
</h3>

Query compliance requirements before creating a compliance record.

```bash theme={null}
GET https://api.plivo.com/v1/Account/{auth_id}/PhoneNumber/Compliance/Requirements
```

#### Query Parameters

<ParamField query="country_iso" type="string" required>
  Two-letter country code (e.g., `IN`).
</ParamField>

<ParamField query="number_type" type="string" required>
  Values: `local`, `mobile`, `tollfree`.
</ParamField>

<ParamField query="user_type" type="string" required>
  Values: `individual`, `business`.
</ParamField>

#### Example

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.plivo.com/v1/Account/{auth_id}/PhoneNumber/Compliance/Requirements?country_iso=IN&number_type=local&user_type=business" \
    -u '<auth_id>:<auth_token>'
  ```
</CodeGroup>

#### Response (200 OK)

```json theme={null}
{
  "api_id": "a83657dc-31a5-11f1-ab48-d2d6f5435dea",
  "requirement_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "country_iso": "IN",
  "number_type": "local",
  "user_type": "business",
  "document_types": [
    {
      "document_type_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
      "name": "Registration Certificate",
      "description": "Certificate of Incorporation or Udyam Registration",
      "proof_required": true,
      "required_fields": [
        {
          "field_name": "business_name",
          "friendly_name": "Business Name",
          "help_text": "Legal name as on the certificate",
          "field_type": "string",
          "required": true,
          "format": "",
          "enums": "",
          "min_length": 1,
          "max_length": 255
        }
      ]
    },
    {
      "document_type_id": "9a8b7c6d-5e4f-3a2b-1c0d-ef9876543210",
      "name": "GST Certificate",
      "description": "GST Registration Certificate (Form GST REG-06)",
      "proof_required": true,
      "required_fields": []
    }
  ]
}
```

***

## The Compliance Object

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

### Attributes

<ParamField body="compliance_id" type="string">
  UUID identifier.
</ParamField>

<ParamField body="alias" type="string">
  Friendly name for the compliance record.
</ParamField>

<ParamField body="status" type="string">
  Current status. Values: `draft`, `submitted`, `accepted`, `rejected`, `suspended`, `expired`.
</ParamField>

<ParamField body="country_iso" type="string">
  ISO 3166-1 alpha-2 country code.
</ParamField>

<ParamField body="number_type" type="string">
  Type of number.
</ParamField>

<ParamField body="user_type" type="string">
  Values: `individual`, `business`.
</ParamField>

<ParamField body="callback_url" type="string">
  Webhook URL for status change notifications. Present only if configured.
</ParamField>

<ParamField body="callback_method" type="string">
  HTTP method for the callback. Values: `GET`, `POST`. Present only if configured.
</ParamField>

<ParamField body="rejection_reason" type="string|null">
  Reason for rejection. Present only when `status` is `rejected`.
</ParamField>

<ParamField body="created_at" type="string">
  ISO 8601 timestamp.
</ParamField>

<ParamField body="updated_at" type="string">
  ISO 8601 timestamp.
</ParamField>

<ParamField body="end_user" type="object|null">
  End user details (only returned with `expand=end_user`).
</ParamField>

<ParamField body="documents" type="array|null">
  Attached documents (only returned with `expand=documents`).
</ParamField>

<ParamField body="linked_numbers" type="array|null">
  Linked phone numbers (only returned with `expand=linked_numbers`).
</ParamField>

### End User Object

Returned when using `expand=end_user`.

<ParamField body="end_user_id" type="string">
  UUID of the end user.
</ParamField>

<ParamField body="type" type="string">
  Values: `individual`, `business`.
</ParamField>

<ParamField body="name" type="string">
  Full name or company name.
</ParamField>

<ParamField body="last_name" type="string">
  Last name (empty for business).
</ParamField>

<ParamField body="email" type="string">
  Contact email.
</ParamField>

<ParamField body="address_line1" type="string">
  Street address line 1.
</ParamField>

<ParamField body="address_line2" type="string">
  Street address line 2.
</ParamField>

<ParamField body="city" type="string">
  City.
</ParamField>

<ParamField body="state" type="string">
  State or province.
</ParamField>

<ParamField body="postal_code" type="string">
  Postal or ZIP code.
</ParamField>

<ParamField body="country" type="string">
  Two-letter country code.
</ParamField>

<ParamField body="registration_number" type="string">
  Business registration number (e.g., CIN for India).
</ParamField>

<Note>
  Address fields are flat (e.g., `address_line1`, `city`), not nested under an `address` object.
</Note>

### Document Object

Returned when using `expand=documents`.

<ParamField body="document_id" type="string">
  UUID of the document.
</ParamField>

<ParamField body="document_type_id" type="string">
  UUID of the document type.
</ParamField>

<ParamField body="document_name" type="string">
  Document type name.
</ParamField>

<ParamField body="file_name" type="string">
  Original filename (empty if no file uploaded).
</ParamField>

<ParamField body="meta_information" type="object">
  Key-value pairs submitted with the document.
</ParamField>

<ParamField body="download_url" type="string">
  Presigned S3 URL (expires in 1 hour). Empty if no file.
</ParamField>

<ParamField body="created_at" type="string">
  ISO 8601 timestamp.
</ParamField>

### Linked Number Object

Returned when using `expand=linked_numbers`.

<ParamField body="number" type="string">
  Phone number in E.164 format.
</ParamField>

<ParamField body="number_type" type="string">
  Type of number.
</ParamField>

***

<h2 id="create">
  Create a Compliance Application
</h2>

Create end user, upload documents, and auto-submit the compliance application in a single call.

```bash theme={null}
POST https://api.plivo.com/v1/Account/{auth_id}/PhoneNumber/Compliance/
```

**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

<ParamField body="country_iso" type="string" required>
  Two-letter country code.
</ParamField>

<ParamField body="number_type" type="string" required>
  Values: `local`, `mobile`, `tollfree`.
</ParamField>

<ParamField body="alias" type="string" required>
  Friendly name (unique per end user, max 99 characters).
</ParamField>

<ParamField body="end_user" type="object" required>
  End user details.
</ParamField>

<ParamField body="documents" type="array" required>
  Array of document objects.
</ParamField>

<ParamField body="callback_url" type="string">
  HTTPS URL to receive status change notifications (accepted, rejected). Plivo sends a v3 signature in the request header for verification.
</ParamField>

<ParamField body="callback_method" type="string">
  HTTP method for the callback. Values: `GET`, `POST`. Default: `POST`. Requires `callback_url` to be set.
</ParamField>

**end\_user fields:**

<ParamField body="end_user.type" type="string" required>
  Values: `individual`, `business`.
</ParamField>

<ParamField body="end_user.name" type="string" required>
  Full name or company name.
</ParamField>

<ParamField body="end_user.last_name" type="string">
  Last name.
</ParamField>

<ParamField body="end_user.email" type="string">
  Contact email.
</ParamField>

<ParamField body="end_user.address_line1" type="string">
  Street address line 1.
</ParamField>

<ParamField body="end_user.address_line2" type="string">
  Street address line 2.
</ParamField>

<ParamField body="end_user.city" type="string">
  City.
</ParamField>

<ParamField body="end_user.state" type="string">
  State or province.
</ParamField>

<ParamField body="end_user.postal_code" type="string">
  Postal or ZIP code.
</ParamField>

<ParamField body="end_user.country" type="string">
  Two-letter country code.
</ParamField>

<ParamField body="end_user.registration_number" type="string">
  Business registration number.
</ParamField>

**documents\[] fields:**

<ParamField body="documents[].document_type_id" type="string" required>
  UUID from the Requirements response.
</ParamField>

<ParamField body="documents[].data_fields" type="object">
  Key-value pairs matching `required_fields[].field_name` from Requirements.
</ParamField>

### Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST \
    "https://api.plivo.com/v1/Account/{auth_id}/PhoneNumber/Compliance/" \
    -u '<auth_id>:<auth_token>' \
    -F 'data={
      "country_iso": "IN",
      "number_type": "local",
      "alias": "Acme India Compliance",
      "end_user": {
        "type": "business",
        "name": "ACME TECHNOLOGIES PRIVATE LIMITED",
        "email": "compliance@acme.in",
        "address_line1": "123 MG Road",
        "city": "Bangalore",
        "state": "Karnataka",
        "postal_code": "560001",
        "country": "IN",
        "registration_number": "U72200KA2020PTC123456"
      },
      "documents": [
        {
          "document_type_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
          "data_fields": {
            "business_name": "ACME TECHNOLOGIES PRIVATE LIMITED"
          }
        },
        {
          "document_type_id": "9a8b7c6d-5e4f-3a2b-1c0d-ef9876543210"
        }
      ],
      "callback_url": "https://example.com/compliance-webhook",
      "callback_method": "POST"
    }' \
    -F 'documents[0].file=@certificate_of_incorporation.pdf' \
    -F 'documents[1].file=@gst_certificate.pdf'
  ```
</CodeGroup>

### Response (201 Created)

```json theme={null}
{
  "api_id": "ad88a992-31aa-11f1-ab48-d2d6f5435dea",
  "compliance_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "message": "Compliance application created and submitted for review."
}
```

***

<h2 id="get">
  Get a Compliance Application
</h2>

Retrieve details of a specific compliance application.

```bash theme={null}
GET https://api.plivo.com/v1/Account/{auth_id}/PhoneNumber/Compliance/{compliance_id}
```

### Query Parameters

<ParamField query="expand" type="string">
  Comma-separated list of objects to include. Values: `end_user`, `documents`, `linked_numbers`.
</ParamField>

Without `expand`, only top-level fields are returned (faster response). With `expand`, the corresponding nested objects are included.

### Example

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.plivo.com/v1/Account/{auth_id}/PhoneNumber/Compliance/{compliance_id}?expand=end_user,documents,linked_numbers" \
    -u '<auth_id>:<auth_token>'
  ```
</CodeGroup>

### Response (200 OK)

**Without expand:**

```json theme={null}
{
  "api_id": "a93cf456-31aa-11f1-bf86-d2d6f5435dea",
  "compliance": {
    "compliance_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "alias": "Acme India Compliance",
    "status": "accepted",
    "country_iso": "IN",
    "number_type": "local",
    "user_type": "business",
    "callback_url": "https://example.com/compliance-webhook",
    "callback_method": "POST",
    "created_at": "2026-04-01T10:30:00Z",
    "updated_at": "2026-04-01T12:00:00Z"
  }
}
```

**With `expand=end_user,documents,linked_numbers`:**

```json theme={null}
{
  "api_id": "aa1e6a4e-31aa-11f1-ab48-d2d6f5435dea",
  "compliance": {
    "compliance_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "alias": "Acme India Compliance",
    "status": "accepted",
    "country_iso": "IN",
    "number_type": "local",
    "user_type": "business",
    "callback_url": "https://example.com/compliance-webhook",
    "callback_method": "POST",
    "created_at": "2026-04-01T10:30:00Z",
    "updated_at": "2026-04-01T12:00:00Z",
    "end_user": {
      "end_user_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "type": "business",
      "name": "ACME TECHNOLOGIES PRIVATE LIMITED",
      "last_name": "",
      "email": "compliance@acme.in",
      "address_line1": "123 MG Road",
      "address_line2": "",
      "city": "Bangalore",
      "state": "Karnataka",
      "postal_code": "560001",
      "country": "IN",
      "registration_number": "U72200KA2020PTC123456"
    },
    "documents": [
      {
        "document_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
        "document_type_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
        "document_name": "Registration Certificate",
        "file_name": "certificate_of_incorporation.pdf",
        "meta_information": {
          "business_name": "ACME TECHNOLOGIES PRIVATE LIMITED"
        },
        "download_url": "https://s3.amazonaws.com/...",
        "created_at": "2026-04-01T10:30:00Z"
      },
      {
        "document_id": "d4e5f6a7-b8c9-0123-defa-234567890123",
        "document_type_id": "9a8b7c6d-5e4f-3a2b-1c0d-ef9876543210",
        "document_name": "GST Certificate",
        "file_name": "gst_certificate.pdf",
        "meta_information": {},
        "download_url": "https://s3.amazonaws.com/...",
        "created_at": "2026-04-01T10:30:00Z"
      }
    ],
    "linked_numbers": [
      {
        "number": "+912212345678",
        "number_type": "local"
      }
    ]
  }
}
```

***

<h2 id="list">
  List Compliance Applications
</h2>

Returns a paginated list of compliance applications for the account.

```bash theme={null}
GET https://api.plivo.com/v1/Account/{auth_id}/PhoneNumber/Compliance/
```

### Query Parameters

<ParamField query="limit" type="integer">
  Max results per page (max 100). Default: 20.
</ParamField>

<ParamField query="offset" type="integer">
  Pagination offset. Default: 0.
</ParamField>

<ParamField query="status" type="string">
  Filter by status. Values: `draft`, `submitted`, `accepted`, `rejected`, `suspended`, `expired`.
</ParamField>

<ParamField query="country_iso" type="string">
  Filter by country code (e.g., `IN`).
</ParamField>

<ParamField query="number_type" type="string">
  Filter by number type. Values: `local`, `mobile`, `tollfree`.
</ParamField>

<ParamField query="user_type" type="string">
  Filter by user type. Values: `individual`, `business`.
</ParamField>

<ParamField query="alias" type="string">
  Filter by alias.
</ParamField>

<ParamField query="expand" type="string">
  Comma-separated: `end_user`, `documents`, `linked_numbers`.
</ParamField>

### Example

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.plivo.com/v1/Account/{auth_id}/PhoneNumber/Compliance/?status=accepted&country_iso=IN&limit=10" \
    -u '<auth_id>:<auth_token>'
  ```
</CodeGroup>

### Response (200 OK)

```json theme={null}
{
  "api_id": "acd86b7c-31aa-11f1-ab48-d2d6f5435dea",
  "meta": {
    "limit": 10,
    "offset": 0,
    "total_count": 3,
    "next": null,
    "previous": null
  },
  "compliances": [
    {
      "compliance_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "alias": "Acme India Compliance",
      "status": "accepted",
      "country_iso": "IN",
      "number_type": "local",
      "user_type": "business",
      "callback_url": "https://example.com/compliance-webhook",
      "callback_method": "POST",
      "created_at": "2026-04-01T10:30:00Z",
      "updated_at": "2026-04-01T12:00:00Z"
    }
  ]
}
```

***

<h2 id="update">
  Update a Compliance Application
</h2>

Update a **rejected** compliance application and automatically resubmit it for review.

```bash theme={null}
PATCH https://api.plivo.com/v1/Account/{auth_id}/PhoneNumber/Compliance/{compliance_id}
```

**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

<ParamField body="alias" type="string">
  Updated friendly name (max 99 characters).
</ParamField>

<ParamField body="end_user" type="object">
  Partial end user update (same fields as Create, minus `type`).
</ParamField>

<ParamField body="documents" type="array">
  Full replacement document set.
</ParamField>

<ParamField body="callback_url" type="string">
  Updated webhook URL (HTTPS only).
</ParamField>

<ParamField body="callback_method" type="string">
  Updated HTTP method. Values: `GET`, `POST`.
</ParamField>

### Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PATCH \
    "https://api.plivo.com/v1/Account/{auth_id}/PhoneNumber/Compliance/{compliance_id}" \
    -u '<auth_id>:<auth_token>' \
    -F 'data={
      "documents": [
        {
          "document_type_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
          "data_fields": {
            "business_name": "ACME TECHNOLOGIES PRIVATE LIMITED"
          }
        },
        {
          "document_type_id": "9a8b7c6d-5e4f-3a2b-1c0d-ef9876543210"
        }
      ]
    }' \
    -F 'documents[0].file=@corrected_certificate.pdf' \
    -F 'documents[1].file=@gst_certificate.pdf'
  ```
</CodeGroup>

### Response (200 OK)

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

```json theme={null}
{
  "api_id": "ef28ebe6-31a5-11f1-bf86-d2d6f5435dea",
  "message": "Compliance application updated and resubmitted for review.",
  "compliance": {
    "compliance_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "alias": "Acme India Compliance",
    "status": "submitted",
    "country_iso": "IN",
    "number_type": "local",
    "user_type": "business",
    "callback_url": "https://example.com/compliance-webhook",
    "callback_method": "POST",
    "created_at": "2026-04-01T10:30:00Z",
    "updated_at": "2026-04-03T14:00:00Z"
  }
}
```

***

<h2 id="delete">
  Delete a Compliance Application
</h2>

Soft-delete a compliance application.

```bash theme={null}
DELETE https://api.plivo.com/v1/Account/{auth_id}/PhoneNumber/Compliance/{compliance_id}
```

### Restrictions

* Applications with `status=expired` cannot be deleted.
* All other statuses (`submitted`, `accepted`, `rejected`, `suspended`) can be deleted.

<Warning>
  Deleting an `accepted` application that has linked numbers will unlink those numbers. Ensure numbers are re-linked to a different compliance application if needed.
</Warning>

### Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X DELETE \
    "https://api.plivo.com/v1/Account/{auth_id}/PhoneNumber/Compliance/{compliance_id}" \
    -u '<auth_id>:<auth_token>'
  ```
</CodeGroup>

### Response (200 OK)

```json theme={null}
{
  "api_id": "2195a48e-31a6-11f1-ab48-d2d6f5435dea",
  "compliance_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "message": "Compliance application deleted."
}
```

***

<h2 id="bulk-link">
  Bulk Link Numbers to Compliance
</h2>

Link multiple phone numbers to their respective compliance applications in a single request.

```bash theme={null}
POST https://api.plivo.com/v1/Account/{auth_id}/PhoneNumber/Compliance/Link/
```

**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

<ParamField body="numbers" type="array" required>
  Array of number-to-compliance mappings.
</ParamField>

<ParamField body="numbers[].number" type="string" required>
  Phone number in E.164 format.
</ParamField>

<ParamField body="numbers[].compliance_application_id" type="string" required>
  UUID of an `accepted` compliance application.
</ParamField>

### Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST \
    "https://api.plivo.com/v1/Account/{auth_id}/PhoneNumber/Compliance/Link/" \
    -u '<auth_id>:<auth_token>' \
    -H "Content-Type: application/json" \
    -d '{
      "numbers": [
        {
          "number": "+912212345678",
          "compliance_application_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
        },
        {
          "number": "+912212345679",
          "compliance_application_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
        }
      ]
    }'
  ```
</CodeGroup>

### Response (200 OK)

```json theme={null}
{
  "api_id": "afd51000-31aa-11f1-ab48-d2d6f5435dea",
  "total_count": 2,
  "updated_count": 1,
  "report": [
    {
      "number": "+912212345678",
      "status": "success",
      "remarks": "Number linked to compliance application."
    },
    {
      "number": "+912212345679",
      "status": "failed",
      "remarks": "Number not found on your account. Only rented numbers can be linked."
    }
  ]
}
```

***

## Status Flow

```text theme={null}
Create (POST) --> submitted --> accepted --> Link numbers
                            --> rejected --> Update (PATCH) --> submitted --> ...
```

| Status      | Description                                | Available Actions                          |
| ----------- | ------------------------------------------ | ------------------------------------------ |
| `draft`     | Saved but not yet submitted                | Get, List, Delete                          |
| `submitted` | Under review by the compliance team        | Get, List, Delete                          |
| `accepted`  | Approved — phone numbers can be linked     | Get, List, Delete, Bulk Link               |
| `rejected`  | Not accepted — check `rejection_reason`    | Get, List, Delete, Update (auto-resubmits) |
| `suspended` | Suspended by the compliance team           | Get, List, Delete                          |
| `expired`   | No longer valid — create a new application | Get, List                                  |

***

## 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.

```json theme={null}
{
  "api_id": "a407c522-31a7-11f1-ab48-d2d6f5435dea",
  "error": "country_iso is required. Use a two-letter ISO country code (e.g., IN, DE, US)."
}
```

<ParamField body="api_id" type="string">
  Unique request identifier for tracing.
</ParamField>

<ParamField body="error" type="string">
  Human-readable, actionable error message.
</ParamField>

### Common Error Messages

| Scenario                             | Error message                                                                                                                  |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| Missing required field               | `country_iso is required. Use a two-letter ISO country code (e.g., IN, DE, US).`                                               |
| Application not found                | `Compliance application 'xxx' not found.`                                                                                      |
| Wrong status for update              | `Compliance application must be in 'rejected' status. Current status: 'submitted'.`                                            |
| Expired application delete           | `Expired compliance applications cannot be deleted.`                                                                           |
| Invalid expand value                 | `Invalid expand value. Allowed values: end_user, documents, linked_numbers.`                                                   |
| Number not on account                | `Number not found on your account. Only rented numbers can be linked.`                                                         |
| Application not accepted for linking | `Compliance application must be in 'accepted' status. Current status: 'submitted'.`                                            |
| Server error                         | `Something went wrong while processing the request. Please try again later. If the issue persists, contact support@plivo.com.` |

### HTTP Status Codes

| Code  | Meaning                                        |
| ----- | ---------------------------------------------- |
| `200` | Success (Get, List, Update, Delete, Bulk Link) |
| `201` | Created (Create)                               |
| `400` | Validation or state error                      |
| `401` | Authentication failed                          |
| `403` | Forbidden                                      |
| `404` | Not found                                      |
| `500` | Internal server error                          |

***

## 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](/voice/concepts/signature-validation/) to verify the callback is authentic.
* **HTTPS required:** The `callback_url` must use HTTPS.

***

## Rate Limits

| Endpoint               | Rate Limit          |
| ---------------------- | ------------------- |
| Requirements Discovery | 100 requests/minute |
| Compliance Operations  | 60 requests/minute  |

Rate limit headers are included in all responses:

```text theme={null}
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1705326000
```

***

## 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

***

## Related

* [Regulatory Compliance](/numbers/regulatory-compliance) - Overview and Console guide
* [Phone Numbers](/numbers/phone-numbers) - Search and buy numbers
* [Account Phone Numbers](/numbers/account-phone-numbers) - Manage your numbers
