# subscription

```graphql
query Subscription {
  subscription {
    id
    type
    cycle
    status
    currentPeriodStart
    currentPeriodEnd
    quantity
    expiresAt
    createdAt
    canceledAt
    seatUsage {
      purchased
      active
      reserved
      used
      available
      overCapacity
    }
    projectId
    lineItems {
      kind
      quantity
    }
  }
}
```

Read the plan, billing cycle, seats and add-ons of an account before changing or cancelling its subscription; returns the subscription with its seat usage. Requires account.billing.read.

## Responses

| Status | Description                            |
| ------ | -------------------------------------- |
| 200    | The Subscription in data.subscription. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "query Subscription {\n  subscription {\n    id\n    type\n    cycle\n    status\n    currentPeriodStart\n    currentPeriodEnd\n    quantity\n    expiresAt\n    createdAt\n    canceledAt\n    seatUsage {\n      purchased\n      active\n      reserved\n      used\n      available\n      overCapacity\n    }\n    projectId\n    lineItems {\n      kind\n      quantity\n    }\n  }\n}"
}'
```

## Example response

```json
{
  "data": {
    "subscription": {
      "id": "string",
      "type": "free",
      "cycle": "monthly",
      "status": "string",
      "currentPeriodStart": "string",
      "currentPeriodEnd": "string",
      "quantity": 0,
      "expiresAt": "string",
      "createdAt": "string",
      "canceledAt": "string",
      "seatUsage": {
        "purchased": 0,
        "active": 0,
        "reserved": 0,
        "used": 0,
        "available": 0,
        "overCapacity": false
      },
      "projectId": "string",
      "lineItems": [
        {
          "kind": "string",
          "quantity": 0
        }
      ]
    }
  }
}
```
