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

# Correct Resource Request

> Return requested changes to the same provider Resource Request.

Submits a complete correction to the existing provider Resource Request. Correction is allowed only when the stored provider status is:

* `UPDATE_REQUESTED`; or
* <code>UPDATE\_REQUESTED\_BY\_INTERNAL\_REVIEWER</code>.

The NumberRequest must still have its original provider request id.

<Warning>
  Correction PATCHes the same provider request with the full requirement array. It never resets the NumberRequest, cancels the provider request, clears its id, or creates a replacement.
</Warning>

<Note>
  Send an `Idempotency-Key` when retrying a correction. The key is bound to this concrete request path and payload; an exact retry replays the first successful response. See [Idempotency](/api-reference/v2/idempotency).
</Note>

## Path parameters

<ParamField path="request_id" type="string" required>
  Number request id.
</ParamField>

## Optional body

When saved requirement and document data is already complete, omit the request body or send `{}`. To save changes and submit them in the same operation, send any of the three fields accepted by [Update International Requirements](/api-reference/v2/number-requests/update-requirements):

* `internationalAcquisitionFormData`;
* `internationalAcquisitionDocuments`;
* `internationalAcquisitionDocumentRemovedKeys`.

When present, the local request-owned values are saved first and then used to build the complete provider update.

Any present body must be a JSON object with `Content-Type: application/json`. JSON `null`, malformed JSON, and a body sent with another content type return `400 validation_failed`.

## Behavior

Before calling the provider, Trackly:

1. loads the live requirement schema;
2. preserves user-entered and provider-returned values;
3. prefills only exact known keys from the NumberRequest;
4. verifies every required field and document;
5. rebuilds the full `{key, value}` requirement array;
6. updates the same provider request id.

No carrier identifier value is returned or included in safe error text.

## Example

<RequestExample>
  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.tracklysms.com/api/v2/number-requests/665f0a1b2c3d4e5f60718293/correction",
      headers={
          "X-Api-Key": "trk_your_api_key_here",
          "Idempotency-Key": "number-request-correction-665f0a1b",
      },
      json={},
  )
  ```
</RequestExample>

<ResponseExample>
  ```json 200 — Returned to review theme={null}
  {
    "result": "awaiting_carrier_review",
    "request": {
      "id": "665f0a1b2c3d4e5f60718293",
      "targetCountries": ["CA"],
      "internationalAcquisitionStatus": "PENDING_REVIEW",
      "internationalAcquisitionFeedback": {},
      "status": "approved",
      "provisioningStatus": "in_progress"
    }
  }
  ```
</ResponseExample>

## Error codes

| HTTP | Code                                   | Meaning                                                                                                                                                                                      |
| ---- | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 400  | `validation_failed`                    | A present body is JSON `null`, malformed JSON, has the wrong content type, or is not a JSON object. An omitted body remains valid.                                                           |
| 400  | Acquisition payload errors             | Optional form or document fields are invalid.                                                                                                                                                |
| 400  | `carrier_identifier_not_editable`      | A carrier-identifier requirement was supplied directly. Update request-owned `taxId` and `identifierType` through [Update Number Request](/api-reference/v2/number-requests/update-request). |
| 403  | `acquisition_update_unavailable`       | Provider account cannot update this Resource Request. The existing id is preserved.                                                                                                          |
| 403  | `business_verification_required`       | The account no longer has an active verified business. Complete verification before submitting the correction.                                                                               |
| 403  | `sandbox_read_only`                    | A sandbox key attempted a correction.                                                                                                                                                        |
| 404  | `not_found`                            | Request does not belong to the API-key account.                                                                                                                                              |
| 409  | `acquisition_correction_not_allowed`   | Provider status is not correctable or the request has no provider id.                                                                                                                        |
| 409  | `acquisition_not_available`            | Request has no dynamic acquisition path.                                                                                                                                                     |
| 422  | `acquisition_requirements_incomplete`  | Required form values or documents are missing.                                                                                                                                               |
| 422  | `tax_id_invalid`                       | Request-owned carrier identifier is invalid.                                                                                                                                                 |
| 422  | `identifier_type_required`             | Multi-option address country needs a type.                                                                                                                                                   |
| 422  | `identifier_type_invalid`              | Type does not belong to the address country.                                                                                                                                                 |
| 502  | `provider_request_failed`              | Another provider failure was surfaced without replacement or reset.                                                                                                                          |
| 503  | `acquisition_requirements_unavailable` | Provider requirements are temporarily unavailable. Retry later.                                                                                                                              |

Provider update permission cannot be proven by read-only lookup. A 403 is returned as the safe `acquisition_update_unavailable` capability error.

## Next steps

<CardGroup cols={2}>
  <Card title="Get Requirements" icon="list-check" href="/api-reference/v2/number-requests/get-requirements">
    Poll status and feedback
  </Card>

  <Card title="Get Number Request" icon="magnifying-glass" href="/api-reference/v2/number-requests/get-request">
    Track provisioning
  </Card>
</CardGroup>
