> 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/opentradelinemutation.md).

# OpenTradeline

{% hint style="info" icon="lock" %}
**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.
{% endhint %}

The `openTradeline` mutation is used to confirm that a user has opted to have a recurring bill reported to the credit bureau(s). Upon successful execution, it returns the attestation agreements associated with the tradeline that has been opened. This process ensures the tradeline is correctly configured for credit reporting.

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

{% code title="Mutation" %}

```graphql
mutation OpenTradeline  {
  openTradeline(
    input: {
      tradelineId: ID!
      serviceAddress: String
      servicePhone: String
      serviceAddressType: AddressType
      leaseStartDate: Date
      utilityTypes: [UtilityType!]
      agreements: AttestationAgreementsInput!
    }
  ){
    attestation {
      agreements {
        rent {
          isPrimaryAddress
          hasOtherMortgageOrRent
        }
        utility {
          isPrimaryAddress
        }
      }
    }
  }
}
```

{% endcode %}

#### Input Attributes

| Attribute              | Description                                                                                                               |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| **tradelineId**        | Unique tradeline identifier.                                                                                              |
| **serviceAddress**     | The address associated with this tradeline.                                                                               |
| **servicePhone**       | The phone number associated with this tradeline.                                                                          |
| **serviceAddressType** | [AddressType](/enablement-services/models/address/addresstype.md)                                                         |
| **leaseStartDate**     | If rent this is the start date of the lease.                                                                              |
| **utilityTypes**       | The [UtilityTypes](/enablement-services/models/utilitytype.md) covered in this bill.                                      |
| **agreements**         | The rent or utility agreement found in [AttestationAgreements](/enablement-services/models/attestationagreementsinput.md) |

***

#### Output Attributes - [User](/enablement-services/models/user.md)

| Attribute       | Description                                         |
| --------------- | --------------------------------------------------- |
| **id**          | Global identifier for the user.                     |
| **email**       | User's email address                                |
| **phoneNumber** | User's phone number                                 |
| **name**        | User's [name](/enablement-services/models/name.md). |

<br>

***

### How to Attest Different Tradeline Categories

A tradeline can fall into multiple categories. For each applicable category, the following requirements must be met. The category can be determined by using the [Me](/enablement-services/queries/userquery.md) query, under tradlines > edges > node > category.

#### Rent

* Primary residence confirmation - the rental property must be confirmed to be the consumer's primary residence by including the `isPrimaryAddress` field in the `rent` agreement, set to `true`
* No mortgage confirmation - consumer confirms they do not have an active mortgage by including the `hasOtherMortgageOrRent` field in the `rent` agreement, set to `false`.
* Lease start date - required for Metro2 reporting. Included in the `input` via the `leaseStartDate` field.

{% code title="GraphQL" %}

```graphql
mutation OpenTradeline {
    openTradeline(
        input: {
            serviceAddressType: PRIMARY
            leaseStartDate: "2025-01-01"
            agreements: {
                rent: { isPrimaryAddress: true, hasOtherMortgageOrRent: false }
            }
            tradelineId: "0195dd14-2c8f-7ec3-8b0e-7db586a75df5"
        }
    ) {
        attestation {
            agreements {
                rent {
                    isPrimaryAddress
                    hasOtherMortgageOrRent
                }
            }
        }
    }
}
```

{% endcode %}

#### Utility

* Utility type - consumer selects the type of utility, set via the `UtilityType` property. See [Utility Type](/enablement-services/models/utilitytype.md) for possible values.
* Primary Residence Confirmation - the rental property must be confirmed to be the consumer's primary residence with including the `isPrimaryAddress` field in the `rent` agreement
* Payment Frequency - this does not have to be set in the mutation. It is determined from the tradeline's `paymentFrequency` field, found under the tradelines in the [Me](/enablement-services/queries/userquery.md) query.

{% code title="GraphQL" %}

```graphql
mutation OpenTradeline {
    openTradeline(
        input: {
            agreements: { utility: { isPrimaryAddress: true } }
            tradelineId: "0195dd14-2d29-7578-8029-24e4818084c5"
            utilityTypes: ELECTRIC
        }
    ) {
        attestation {
            agreements {
                utility {
                    isPrimaryAddress
                }
            }
        }
    }
}
```

{% endcode %}

#### Telco

* Associated Phone number - the phone number linked to the telecom bill. Set the `servicePhone` field in the mutation to the phone number.
* Payment Frequency - this does not have to be set in the mutation. It is determined from the tradeline's `paymentFrequency` field, found under the tradelines in the [Me](/enablement-services/queries/userquery.md) query.

{% code title="GraphQL" %}

```graphql
mutation OpenTradeline {
    openTradeline(
        input: {
            servicePhone: "1234567890"
            agreements: {}
            tradelineId: "0195dd14-2d0d-7139-af5a-b615455228e8"
        }
    ) {
        attestation {
            agreements {
                rent {
                    isPrimaryAddress
                    hasOtherMortgageOrRent
                }
                utility {
                    isPrimaryAddress
                }
            }
        }
    }
}
```

{% endcode %}


---

# 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/opentradelinemutation.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.
