> For the complete documentation index, see [llms.txt](https://docs.paveapi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.paveapi.com/integrations/developer-docs/api-details/post-resend-sms.md).

# POST Resend SMS

### Endpoint

```
POST https://openapi.paveapi.com/v2/capture/sessions/{{session_key}}/resend
```

Replace `session_key` with the unique key for the existing session to trigger an SMS resend.

### Path Parameters

| Name         | Type   | Description                                 |
| ------------ | ------ | ------------------------------------------- |
| session\_key | string | Unique session key (e.g., `TOA-XYCBCSR6DD`) |

### Header

| Name             | Type   | Description        |
| ---------------- | ------ | ------------------ |
| API-Access-Token | string | Your API key       |
| Content-Type     | string | `application/json` |

### Request Body (Optional)

```json
{
  "phone": "+84989137086"
}
```

| Field | Type   | Description                                                                |
| ----- | ------ | -------------------------------------------------------------------------- |
| phone | string | Override destination number. If omitted, PAVE uses the original recipient. |

**Business Rules**

* Session must exist and belong to your API key.
* Session cannot resend if status is QC\_PASSED, CONFIRM, COMPLETE, or EXPIRED ( Valid statuses for resend: PEDING, IN\_PROGRESS, SUBMITTED )
* Session age ≤ **7 days**
* Original SMS must have been logged as **delivered** (legacy sessions allowed during grace period).
* **One** resend per session.
* Subject to rate limiting.
* All attempts are audit-logged.

**Sample Request**

```bash
curl --location --request POST 'https://openapi.paveapi.com/v2/capture/sessions/TOA-XYCBCSR6DD/resend' \
  --header 'API-Access-Token: <your-token>' \
  --header 'Content-Type: application/json'
```

**Sample Request (with custom phone)**

```bash
curl --location --request POST 'https://openapi.paveapi.com/v2/capture/sessions/TOA-XYCBCSR6DD/resend' \
  --header 'API-Access-Token: <your-token>' \
  --header 'Content-Type: application/json' \
  --data-raw '{ "phone": "+84989137086" }'
```

**Sample Response (200: Ok)**

```json
{
  "status": "success",
  "message": "SMS resend has been processed",
  "session_key": "TOA-XYCBCSR6DD",
  "phone": "+18005550123",
  "session_age_days": 2,
  "days_remaining": 5
}
```

**Sample Response (404: Not Found)**

```json
{
  "status": "error",
  "message": "Session not found",
  "session_key": "TOA-INVALID"
}
```

**Sample Response (400: Finalized)**

```json
{
  "status": "error",
  "message": "Session is already finalized and cannot be resent",
  "session_key": "TOA-XYCBCSR6DD",
  "session_status": "QC_PASSED"
}
```

**Sample Response (400: Expired)**

```json
{
  "status": "error",
  "message": "Session has expired (older than 7 days)",
  "session_key": "TOA-XYCBCSR6DD",
  "age_days": 9,
  "max_days": 7
}
```

**Sample Response (400: Already Resent)**

```json
{
  "status": "error",
  "message": "SMS resend already attempted for this session",
  "session_key": "TOA-XYCBCSR6DD",
  "previous_resend_at": "2025-09-08T10:00:00Z",
  "total_attempts": 2
}
```

**Notes**

* “delivered” indicates the SMS was accepted by the provider (not handset confirmation).
* For sessions created before SMS logging, resend may pass during a limited grace period.
