# Activating a subscription

Activating a customer's subscription is crucial in ensuring they can access your services without interruption. This process involves sending a specific API request to transition the subscription from a passive state to an active state, making all the associated benefits available to the user. The guide below outlines executing this activation using a simple API call, including the necessary parameters such as the subscription ID, activation key, and the relevant dates. Follow these steps to smoothly activate subscriptions and enhance your customer's experience with your services.

Send a   [`POST /v1/subscriptions/{subscriptionId}/activate`](https://docs.digitalriver.com/commerce-api-references/admin-apis/subscription-mangement/manage-a-subscription#v1-subscriptions-subid-activate) request to activate a subscription. Replace `{subscriptionId}` with the actual ID of the subscription you're activating and include an authorization header with your API key. Replace `{YOUR_ACTIVATION_KEY}` with your actual activation key, and adjust the `activationDate` and `expirationDate` as needed. Ensure that the `expirationDate` is either the current date or a future date.

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

```javascript
curl --location --request POST 'https://api.digitalriver.com/v1/subscriptions/{subscriptionId}/activate' \
--header 'Authorization: Basic {Basic YOUR_API_KEY}' \
...
--data-raw '{
  "activationKey" : "{YOUR_ACTIVATION_KEY}",
  "activationDate": "2019-08-24T14:15:22Z",
  "expirationDate": "2019-08-24T14:15:22Z"
}'
```

{% endtab %}
{% endtabs %}

A successful request results in a `202 Accepted` response, and the subscription state changes from `PendingActivation` to `Subscribed`. 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/activating-a-subscription.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.
