# Subscription Management

The subscription management endpoints allow you to:

* See all available webhook subscriptions and related information
* See detailed information about your webhook subscriptions
* Renew your subscriptions
* Delete subscriptions

See the endpoints and their functions below:

| Request type | Endpoint                                     | Function                                                                 |
| ------------ | -------------------------------------------- | ------------------------------------------------------------------------ |
| GET          | */v2/subscriptions*                          | See all your subscriptions, their status, creation, and expiration dates |
| GET          | */v2/subscriptions/{subsription\_id}*        | See the details of your active subscription                              |
| POST         | */v2/subscriptions/{subscription\_id}/renew* | Renew your subscriptions for up to 1 year                                |
| DELETE       | */v2/subscriptions/{subsription\_id}*        | Delete your subscriptions                                                |

## I want to see all my active subscriptions

Use the endpoint `/v2/subscriptions` to see all your available subscriptions, their statuses, creation and expiration dates:

1. Indicate if you want to see the details of active or expired subscriptions (`expired = false` OR `expired = true`)\
   You will automatically see only active subscriptions if you omit the `expired = true/false` parameter.
2. Indicate which page number you would like to see.\
   Each page contains approximately 1,000 subscriptions, so if you have more than 1,000 subscriptions, you may need to specify the page number.
3. Replace `{API Key}` with your API Key in the template below:

{% code title="Request template" %}

```json
curl -X 'GET' \
  'https://api.coresignal.com/cdapi/v2/subscriptions?expired={false/true}&page={integer}' \
  -H 'accept: application/json' \
  -H 'apikey: {API Key}'
```

{% endcode %}

4. Send the request.
5. Refer to the *Body* for information about your subscription status:

```json
[
  {
    "id": "c8e295c0-2f85-473d-8bef-350526e6b30a",
    "status": "active",
    "created_at": "2024-09-18",
    "expiring_at": "2024-12-18"
  },
  {
    "id": "a85b2528-6190-4c91-8489-364b27ccbf81",
    "status": "active",
    "created_at": "2024-09-18",
    "expiring_at": "2024-12-18"
  }
]
```

| Data field    | Description                                                                                                                          | Data type     |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ------------- |
| `id`          | <p>Subscription identification key.<br>Subscription ID is displayed in the response body after submitting a webhook subscription</p> | String        |
| `status`      | Subscription status (active or expired)                                                                                              | String        |
| `created_at`  | Subscription start date in `YYYY-MM-DD` format                                                                                       | String (date) |
| `expiring_at` | Subscription expiry date in `YYYY-MM-DD` format                                                                                      | String (date) |

***

## I want to see the details of my subscription

Use the endpoint `/v2/subscriptions/{subscription_id}` to see the details of your expired or active subscriptions:

1. Provide your `{subscription_id}`\*.\
   📌\*Subscription ID is displayed in the response body after successfully submitting a webhook subscription.
2. Replace `{API Key}` with your API Key in the template below:

{% code title="Request template" %}

```json
curl -X 'GET' \
  'https://api.coresignal.com/cdapi/v2/subscriptions/{subscription_id}' \
  -H 'accept: application/json' \
  -H 'apikey: {API Key}'
```

{% endcode %}

3. Send the request.
4. You will see the following information in the *Response body:*

```json
{
  "id": "c8e295c0-2f85-473d-8bef-350526e6b30a",
  "status": "active",
  "created_at": "2024-09-18",
  "expiring_at": "2024-12-18",
  "entity": "member_changes",
  "es_dsl_query": null, 
  "filters": null,
  "last_webhook_sent": "2024-09-30"
}
```

| Data field          | Description                                                                | Data type     |
| ------------------- | -------------------------------------------------------------------------- | ------------- |
| `id`                | Subscription identification key.                                           | String        |
| `status`            | Subscription status (active or expired)                                    | String        |
| `created_at`        | Subscription start date in `YYYY-MM-DD` format                             | String (date) |
| `expiring_at`       | Subscription expiry date in `YYYY-MM-DD` format                            | String (date) |
| `entity`            | Subscription entity                                                        | String        |
| `es_dsl_query`      | Elasticsearch DSL query used to subscribe to changes in a list of profiles | Object        |
| `filters`           | Search filters used to subscribe to changes in a list of profiles          | Object        |
| `last_webhook_sent` | Time of the last message sent to your webhook URL in `YYYY-MM-DD` format   | String (date) |

## I want to renew my subscription

Use the endpoint `/v2/subscriptions/{subscription_id}/renew` to renew your subscriptions. A webhook subscription is valid for 91 days from the date it is created. To maintain uninterrupted webhook delivery beyond this window, subscriptions must be renewed before they expire.

Renewals can be scheduled in advance, allowing coverage for up to approximately one year from the initial subscription start date.

{% hint style="info" %}
A subscription can be renewed for up to 1 year. If subscription renewal exceeds this period, the request will be cancelled.
{% endhint %}

1. Provide your `subscription_ID`.
2. Replace `{API Key}` with your API Key.

{% code title="Request template" %}

```json
curl -X 'POST' \
  'https://api.coresignal.com/cdapi/v2/subscriptions/{subscription_id}/renew' \
  -H 'accept: application/json' \
  -H 'apikey: {API Key}'
```

{% endcode %}

3. Send the request.
4. You will see the following information in the `Response` body:

{% code title="Response" %}

```json
{
    "id": "4e11dcae-9bfb-4edb-b4f6-a0991b20fb50",
    "status": "active",
    "created_at": "2025-04-24T12:00:00.000000",
    "expiring_at": "2025-10-24T12:00:00.000000",
}
```

{% endcode %}

| Data field    | Description                             | Data type     |
| ------------- | --------------------------------------- | ------------- |
| `id`          | Subscription identification key.        | String        |
| `status`      | Subscription status (active or expired) | String        |
| `created_at`  | Subscription start date                 | String (date) |
| `expiring_at` | Subscription expiry date                | String (date) |

## I want to delete my subscription

Use the endpoint *DELETE* `/v2/subscriptions/{subscription_id}` to make your subscriptions inactive.

Use your subscription ID as input to request updates to employee profiles or experience changes.\
Refer to the template below:

{% code title="Template" %}

```json
curl -X 'DELETE' \
  'https://api.coresignal.com/cdapi/v2/subscriptions/{subscription_id}' \
  -H 'accept: */*' \
  -H 'apikey: {API Key}'
```

{% endcode %}


---

# 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.coresignal.com/api-introduction/webhooks/subscription-management.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.
