---
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/4641/api/doc/cloud-connect/operation/operation-getsubscription
resource: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/cloud-connect/operation/operation-getsubscription
products:
  - Elastic Cloud Hosted
---

# Get subscription state

Authentication: required

- 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.

## 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}"
```

## Response examples

#### 200

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "state": "trial"
}
```

#### 400

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "errors": [
    {
      "message": "Explicative error message",
      "code": "code.error"
    }
  ]
}
```

#### 401

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "errors": [
    {
      "message": "Explicative error message",
      "code": "code.error"
    }
  ]
}
```

#### 403

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "errors": [
    {
      "message": "Explicative error message",
      "code": "code.error"
    }
  ]
}
```

