---
updatedAt: 2025-08-22T22:28:02.000Z
agentTools:
  projectIndex: https://docs.cloudzero.com/llms.txt
---

# /v2/connections/billing/{connection_id}

Delete a single Billing Connection
Upon disconnect of a billing connection, after the next ingest, all billing data related to that connection will be removed from the platform. However, be aware that although this data is no longer visible in the platform, it will still exist in the CloudZero data stores. If you need a more permanent deletion due to audit or security concerns, see your CloudZero Account Manager.
Note: This is not supported for AWS and Snowflake connections


# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "version": "2.0.0",
    "title": "CloudZero API V2 Resources",
    "description": "CloudZero V2 API",
    "contact": {
      "name": "CloudZero Support",
      "url": "https://www.cloudzero.com/contact",
      "email": "support@cloudzero.com"
    },
    "license": {
      "name": "BSD 3",
      "identifier": "BSD-3"
    }
  },
  "servers": [
    {
      "url": "https://api.cloudzero.com"
    }
  ],
  "tags": [
    {
      "name": "billing_connections",
      "description": "Billing Connection Resources"
    }
  ],
  "paths": {
    "/v2/connections/billing/{connection_id}": {
      "delete": {
        "operationId": "deleteOneBillingConnection",
        "description": "Delete a single Billing Connection\nUpon disconnect of a billing connection, after the next ingest, all billing data related to that connection will be removed from the platform. However, be aware that although this data is no longer visible in the platform, it will still exist in the CloudZero data stores. If you need a more permanent deletion due to audit or security concerns, see your CloudZero Account Manager.\nNote: This is not supported for AWS and Snowflake connections\n",
        "tags": [
          "billing_connections"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/cloudzero_idempotency_key"
          },
          {
            "$ref": "#/components/parameters/cloudzero_test_key"
          },
          {
            "$ref": "#/components/parameters/connection_id"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "connection": {
                      "$ref": "#/components/schemas/billing_connection"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequestError"
          },
          "403": {
            "$ref": "#/components/responses/forbiddenError"
          }
        },
        "security": [
          {
            "APIKeyAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "parameters": {
      "cloudzero_test_key": {
        "description": "If passed, the operation executes in the namespace specified by this key.\nResource mutations in the namespace last for 1 hour.\n",
        "name": "cloudzero-test-key",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "cloudzero_idempotency_key": {
        "description": "If passed, any subsequent operation with the same value for this header will return the exact same result.\nThis is true for all responses, i.e. successes and errors.\n",
        "name": "cloudzero-idempotency-key",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "connection_id": {
        "description": "Unique Billing Connection identifier",
        "name": "connection_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "forbiddenError": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ]
            }
          }
        }
      },
      "badRequestError": {
        "description": "Bad Request Error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "$ref": "#/components/schemas/error"
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "error": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      },
      "epoch": {
        "description": "String representation of an epoch (UTC timestamp)",
        "type": "string",
        "pattern": "^\\d+(\\.\\d{1,})?$"
      },
      "with_id": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ]
      },
      "with_created": {
        "type": "object",
        "properties": {
          "created": {
            "description": "UTC timestamp for the creation of this entity",
            "$ref": "#/components/schemas/epoch"
          }
        },
        "required": [
          "created"
        ]
      },
      "with_last_updated": {
        "type": "object",
        "properties": {
          "last_updated": {
            "description": "UTC timestamp for the last update of this entity",
            "$ref": "#/components/schemas/epoch"
          }
        },
        "required": [
          "last_updated"
        ]
      },
      "billing_connection": {
        "allOf": [
          {
            "$ref": "#/components/schemas/billing_connection_existing"
          },
          {
            "$ref": "#/components/schemas/with_id"
          },
          {
            "$ref": "#/components/schemas/with_created"
          },
          {
            "$ref": "#/components/schemas/with_last_updated"
          }
        ]
      },
      "s3_bucket_info_new": {
        "type": "object",
        "properties": {
          "bucket_name": {
            "type": "string",
            "example": [
              "test-bucket"
            ]
          },
          "bucket_path": {
            "type": "string",
            "example": [
              "path/to/data"
            ]
          },
          "cloud_account_id": {
            "description": "This is the AWS Account ID with the S3 Bucket that the AnyCost Adaptor will be writing Common Bill Format files into.",
            "type": "string"
          }
        },
        "required": [
          "bucket_name",
          "bucket_path"
        ]
      },
      "billing_connection_existing": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "connection_type": {
            "type": "string"
          },
          "cloud_provider": {
            "type": "string"
          },
          "s3_bucket_info": {
            "$ref": "#/components/schemas/s3_bucket_info_new"
          },
          "expected_ingest_rate": {
            "type": "number",
            "format": "float"
          },
          "is_enabled": {
            "type": "boolean"
          },
          "capabilities": {
            "type": "object"
          },
          "is_draft": {
            "type": "boolean"
          },
          "connection_id": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "connection_type",
          "cloud_provider",
          "s3_bucket_info",
          "expected_ingest_rate",
          "is_enabled",
          "capabilities",
          "is_draft",
          "connection_id"
        ]
      }
    },
    "securitySchemes": {
      "APIKeyAuth": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "x-readme": {}
}
```