> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting started with the Chainstack Platform API

> Get started with the Chainstack Platform API to manage projects, networks, and nodes programmatically. Learn authentication, base URL, and request format.

The Chainstack platform API allows you to manage your infrastructure programmatically.

The API has two versions:

* **v2 (recommended)** — manage your organization, deployment options, projects, nodes, node access rules, and node usage reports.
* **v1** — manage organizations, projects, networks, nodes, and faucets.

## Create API key

You must create an API key to authenticate your requests to the Chainstack API.

To create an API key:

<Steps>
  <Step>
    Go to the [API keys](https://console.chainstack.com/user/settings/api-keys) section.
  </Step>

  <Step>
    Click **Create key**.
  </Step>

  <Step>
    Type in a name for the key and click **Next**.
  </Step>

  <Step>
    Copy or write down the created API key.
  </Step>
</Steps>

<Warning>
  The API key value is only shown once and cannot be retrieved. Make sure you keep the API key secure.
</Warning>

## Delete API key

You can delete your existing API keys.

To delete an API key:

<Steps>
  <Step>
    Go to the [API keys](https://console.chainstack.com/user/settings/api-keys) section.
  </Step>

  <Step>
    Click the edit icon next to the key you want to delete.
  </Step>

  <Step>
    Click **Delete**.
  </Step>
</Steps>

## Errors

Every error response has the same JSON body:

```json theme={"system"}
{
  "error": {
    "code": "invalid",
    "message": "A human-readable description of the error.",
    "fields": {
      "name": ["This field is required."]
    }
  }
}
```

The `fields` object appears only on validation errors. Nested fields are flattened with dots — for example, `nodes.0.configuration.archive`.

| Status | `code` | Meaning |
| - | - | - |
| `400` | `invalid` | The request body or parameters failed validation. |
| `401` | `not_authenticated` | The request has no `Authorization: Bearer YOUR_CHAINSTACK_API_KEY` header. |
| `401` | `authentication_failed` | The API key is invalid, deleted, or expired. |
| `403` | `permission_denied` | The action isn't allowed. Every write also returns this code while the platform is under maintenance — retry later — or while your organization has outstanding invoices. The message says which. |
| `403` | `protected` | The resource can't be deleted yet — for example, a project that still has nodes. |
| `403` | `quota_exceeded` | Your plan doesn't include what you requested — for example, a deployment option or a feature. |
| `403` | `extra_usage_required` | The resource needs pay-as-you-go enabled on the **Billing** page. |
| `404` | `not_found` | The resource doesn't exist or belongs to another organization. |
| `405` | `method_not_allowed` | The method isn't supported — for example, `PUT`. Use `PATCH` to update a resource. |
| `415` | `unsupported_media_type` | The request body isn't JSON on an endpoint that accepts only JSON, such as node access rules. |
| `429` | `throttled` | Too many requests. Wait the number of seconds in the `Retry-After` header before retrying. |
