> For the complete documentation index, see [llms.txt](https://developers.bloomcredit.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.bloomcredit.io/enablement-services/mutations/closetradelinemutation.md).

# CloseTradeline

> 🔒 Authorization
>
> Requires user scoped authorization via session token. See the 'Session Token Authentication' section in [Enablement Services Authorization](/enablement-services/enablement-services-getting-started/enablement-services-authentication.md) guide for reference.

The `closeTradeline` mutation is used to confirm that a user has opted to stop having a recurring bill reported to the credit bureau(s). Upon successful execution, it returns the tradeline object.

Below is an example of the `closeTradeline` mutation, detailing all available input fields and the fields included in the output.

{% code title="Mutation" %}

```graphql
mutation CloseTradeline  {
  closeTradeline(
    input: {
      id: ID!
    }
  ){
    tradeline {
      id
      merchant
      category
      isOpen
      isEligible
      paymentFrequency
      serviceAddress
      servicePhone
      leaseStartDate
      utilityTypes
      serviceAddressType
      createdAt
      updatedAt
      transactions(input: { first: Int!, after: Int! }) {
        totalCount
        edges {
          cursor
          node {
            id
            date
            value {
              amount
              currency
            }
          }
        }
      }
    }
  }
}
```

{% endcode %}

#### Input Attributes

| Attribute | Description                  |
| --------- | ---------------------------- |
| **id**    | Unique tradeline identifier. |

***

#### Output Attributes - [Tradeline](/enablement-services/models/tradeline.md)

| Attribute              | Description                                                                                                                                 |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| **id**                 | Global identifier for the tradeline.                                                                                                        |
| **merchant**           | User's email address                                                                                                                        |
| **category**           | User's phone number                                                                                                                         |
| **isOpen**             | User's [name](/enablement-services/models/name.md).                                                                                         |
| **isEligible**         | Whether or not this tradeline is eligible to be reported to the credit bureaus.                                                             |
| **attestation**        | See [Attestation](/enablement-services/models/opentradelineoutput/attestation.md)                                                           |
| **paymentFrequency**   | See [PaymentFrequency](/enablement-services/models/paymentfrequency.md)                                                                     |
| **serviceAddress**     | Address associated with the tradeline.                                                                                                      |
| **servicePhone**       | Phone number associated with the tradeline.                                                                                                 |
| **leaseStartDate**     | If tradeline is that of `RENT` the lease start date should be provided.                                                                     |
| **utilityTypes**       | The different utility types covered by this tradeline. (Can be more than one) See [UtilityType](/enablement-services/models/utilitytype.md) |
| **serviceAddressType** | The [AddressType](/enablement-services/models/address/addresstype.md)                                                                       |
| **createdAt**          |                                                                                                                                             |
| **updatedAt**          |                                                                                                                                             |
| **transactions**       | The transactions for this particular tradeline                                                                                              |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.bloomcredit.io/enablement-services/mutations/closetradelinemutation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
