---
type: api
title: Get subscription state
description: Get the Cloud Connected subscription state for an organization.
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/cloud-connect/operation/operation-getsubscription
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/cloud-connect/operation/operation-getsubscription
products:
  - Elastic Cloud Hosted
---

# Get subscription state

- Server: `https://api.elastic-cloud.com`

## Paths

- `GET` `/api/v1/cloud-connected/organizations/{organization_id}/subscription`

#### Path parameters

- `organization_id` (string · pattern: ^[a-z0-9]{1,32}$) — required
  The ID of the organization
  Example: `198583657190`

## Description

Get the Cloud Connected subscription state for an organization.

## Authentication

- Api key: `Authorization: <value>`
  API keys are used to authenticate requests to the Elastic Cloud Connected REST API.
  Generate your secret API key in https://cloud.elastic.co/account/keys
  You must provide the API key for all API requests in the Authorization header as follows:
  ```
  "Authorization: ApiKey $API_KEY"
  ```
  For example, if you interact with the API using the curl command:
  ```
  curl -H "Authorization: ApiKey essu_..." https://api.elastic-cloud.com/api/v1/cloud-connected/clusters
  ```

## Responses

#### `200`

The subscription state for the organization

`application/json`

- `state` (enum)
  The state of the subscription.
  Values: `trial`, `active`, `inactive`
#### `400`

Bad request

`application/json`

- `errors` (object[])
  - `message` (string)
    A human-readable message of the error.
  - `code` (string)
    An identifier for this type of error.
#### `401`

Unauthorized

`application/json`

- `errors` (object[])
  - `message` (string)
    A human-readable message of the error.
  - `code` (string)
    An identifier for this type of error.
#### `403`

Forbidden

`application/json`

- `errors` (object[])
  - `message` (string)
    A human-readable message of the error.
  - `code` (string)
    An identifier for this type of error.
## Code examples

#### curl

```curl
curl -X GET "https://api.elastic-cloud.com/api/v1/cloud-connected/organizations/198583657190/subscription" \
  -H "Authorization: ApiKey ${API_KEY}"
```

