---
title: "List Cloud Cost Management cloud accounts"
method: GET
path: "/api/v2/cost/cloud_accounts"
tags: ["Cloud Cost Management"]
---

# List Cloud Cost Management cloud accounts

`GET /api/v2/cost/cloud_accounts`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/cost/cloud_accounts`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `cloud_cost_management_read`
- TypeScript: <https://skmtc.dev/datadog/apis/datadog-api-v2-collection/docs/api/v2/cost/cloud_accounts/get.ts> (a function with typed inputs; its response is checked against the schema)

List the OCI and AWS CUR 2.0 cloud accounts for your organization, including account IDs, status, and validation errors.
Use `filter[cloud]=oci` or `filter[cloud]=aws_cur2` to return a single cloud. When omitted or empty, both clouds are returned.
AWS CUR 1.0, Azure, and GCP accounts are available through their dedicated configuration endpoints.
Archived accounts are excluded. The response contains all matching accounts and is not paginated.

This endpoint replaces `GET /api/v2/cost/oci_config`. To migrate, use `filter[cloud]=oci` and update clients to accept
the `cloud_account` resource type instead of `oci_config`. Account IDs and the existing attributes are preserved;
each account also includes the `cloud` attribute.

## Query parameters

- `filter[cloud]` string

## Response `200`

OK

- CloudCostAccountsResponse: List of cloud cost accounts.
  - `data` CloudCostAccount[], required: The cloud cost accounts matching the filter.
    - `attributes` CloudCostAccountAttributes, required: Read-only status and identifiers for a cloud cost account.
      - `account_id` string, required: The cloud provider account identifier, such as an OCI tenancy OCID or AWS account ID.
      - `cloud` string, required: The cloud provider and cost report type. Currently supports `oci` and `aws_cur2`.
      - `created_at` string, required: The timestamp when the cloud account was created.
      - `error_messages` string[], required: Validation errors for the cloud account. Empty when there are no errors.
      - `status` string, required: The cloud account status, one of `active`, `warn`, `error`, or `disabled`.
      - `status_updated_at` string, required: The timestamp when the cloud account status was last updated.
      - `updated_at` string, required: The timestamp when the cloud account was last updated.
    - `id` string, required: The Datadog cloud account ID used by the account filters API.
    - `type` 'cloud_account', required: Type of a cloud cost account.

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/3f70db624329?raw)
