# Updating the subscription's expiration date

Updating a subscription's expiration date ensures that the shopper's subscriptions remain active and do not inadvertently lapse due to an outdated expiration setting. In our subscription management system, you have the flexibility to extend the active period of a subscription by modifying its expiration date through a simple API request. Whether you need to adjust for changes in service duration, extend a trial period, or cater to a customer's request, setting a new expiration date is straightforward.&#x20;

To update a subscription's expiration date, send a [`POST /v1/subscriptions/{subscriptionId}/expiration-date`](https://docs.digitalriver.com/commerce-api-references/admin-apis/subscription-mangement/manage-a-subscription#v1-subscriptions-subid-expiration-date) request. Replace `{subscriptionId}` with the actual subscription ID. Ensure you replace with `{YOUR_API_KEY}` with your authorization token. In the request body, specify the `expirationDate`. The date format should be `YYYY-MM-DDT00:00:00.000-0000`, representing the desired expiration date and time in UTC. For example, if you wanted to set the expiration date to October 19, 2020, your request body would look like this:

```
{
  "expirationDate":"2020-10-19T00:00:00.000-0000"
}
```

Here's how you can do it using `curl`:

{% tabs %}
{% tab title="cURL" %}

```javascript
curl --location --request POST 'https://api.digitalriver.com/v1/subscriptions/{subscriptionId}/expiration-date' \
--header 'Authorization: Basic {YOUR_API_KEY}' \
...
--data-raw '{
  "expirationDate":"2020-10-19T01:23:48.000-0500"
}'
```

{% endtab %}
{% endtabs %}

You should receive a `202 Accepted` response indicating that the request has been accepted and the expiration date will be updated accordingly. The new plan will go into effect immediately.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digitalriver.com/commerce-api/admin-apis/subscription-management/immediately-change-the-subscription/updating-the-subscriptions-expiration-date.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
