---
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/4371/api/doc/cloud-connect/operation/operation-getsubscription
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/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`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/cloud-connect/authentication#apikey)

## Description

Get the Cloud Connected subscription state for an organization.

## Responses

#### `200`

The subscription state for the organization

`application/json`

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

Bad request

`application/json`

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

Unauthorized

`application/json`

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

Forbidden

`application/json`

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

#### Console

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

#### curl

```curl
curl -X GET "https://api.elastic-cloud.com/api/v1/cloud-connected/organizations/{organization_id}/subscription"
```

