> For the complete documentation index, see [llms.txt](https://docs.vida.id/identity-stack/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vida.id/identity-stack/sign/digital-signature/vsp-openapi/api-reference/check-envelope-status.md).

# Check Envelope Status

## Get Envelope Status

The Get Envelope Status API retrieves the current status of a specified envelope.

***

### API Endpoint

<mark style="color:blue;">`GET`</mark> `{environment-url}/core/external-api/rest/v1/envelope/{envelope_id}/status`

***

#### Path Parameters

| Name                                           | Type | Description                                       |
| ---------------------------------------------- | ---- | ------------------------------------------------- |
| envelope\_id<mark style="color:red;">\*</mark> | UUID | The envelope ID received from Create Envelope API |

### Headers

| Name                                            | Type   | Description                                                                                                                                                               |
| ----------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Content-Type<mark style="color:red;">\*</mark>  | String | \*/\*                                                                                                                                                                     |
| Authorization<mark style="color:red;">\*</mark> | String | <p>Bearer Access Token<br><br>Get the access token by calling the</p><p><a href="/pages/XOKnwALziwtzopCd8Bb1#api-description"><strong>Authentication</strong></a> API</p> |

***

#### E-Meterai Balance Refund Status Enum:

|               |                                              |
| ------------- | -------------------------------------------- |
| NONE          | No E-Meterai sign failed, no refund required |
| PENDING       | E-Meterai sign failed, waiting for refund    |
| COMPLETED     | E-Meterai sign failed, no refund given       |
| NOT\_REFUNDED | E-Meterai sign failed, refund completed      |

#### Envelope Status Enum:

|           |                                                                                                                                                |
| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| DRAFT     | When the Envelope is in the draft period, its status is DRAFT, during this period, any content of the Envelope can be modified                 |
| PENDING   | When the envelope owner is ready, they can generate their own Sign link Code for each recipient, and the envelope content will not be modified |
| COMPLETED | When all recipients of the envelope have completed the signing process, The envelope is done                                                   |
| DECLINED  | When a recipient rejects the signature, the entire envelope will be rejected                                                                   |
| RECALLED  | When a recipient completes the signature and wants to repent, he can execute the recall operation, and the entire envelope will be recalled    |
| DELETED   | When an Envelope is in the draft state, he can delete the envelope, and the state will be set to DELETED                                       |

#### Recipient Status Enum:

|          |                                                                                                                                             |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| PENDING  | The default state when signing has not been completed by default                                                                            |
| SIGNED   | When the recipient completes his signature, the recipient's status will change to signed.                                                   |
| DECLINED | When a recipient rejects the signature, the recipient will be declined.                                                                     |
| RECALLED | When the creator of envelope is a recipient, and he performs the recall operation, the status of the recipient will be changed to recalled. |

***

#### Response Body

#### Sign Link Codes Received Successfully

HTTP Status Code: `200`

Status : `SUCCESS`

JSON Response:

```json
{
    "success": true,
    "data": {
        "status": "PENDING",
        "recipients": [
            {
                "email": "example1@email.com",
                "name": "Example",
                "order": 1,
                "status": "PENDING",
                "is_signer": true
            },
            {
                "email": "example2@email.com",
                "name": "Example2",
                "order": 2,
                "status": "PENDING",
                "is_signer": true
            }
        ],
        "expiry_at": "2024-07-07T05:41:43.000Z", //Default: 90 days since the signature started
        "emeterai_balance_refund_status": "NONE",
        "removal_date": null //Default NULL if not specified in VSP Admin settings
    }
}
```

#### Bad Request - envelope not found

HTTP Status Code: `400`

Status : `ERROR`

**JSON Response**

```json
{
    "code":"ES.10501",
    "message":"Envelope not found."
}
```

#### Forbidden

Incase when Envelope authorization is forbidden.

HTTP Status Code: `403`

Status : `ERROR`

**JSON Response**

```json
{
    "message":"Envelope Authorization Forbidden",
    "code":"MG.10379"
}
```
