> For the complete documentation index, see [llms.txt](https://docs.labs.zelus.io/zelus-labs-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.labs.zelus.io/zelus-labs-api/reference/account/getaccountcontracts.md).

# Account Contracts

The `getAccountContracts` API method provides the client with a list of available NFT smart contracts that can be used with the Wallet and Minting APIs. Need to have NFT contracts set up, or want to add your own? [Reach out to us](mailto:kyle@zelus.io).

## Endpoint Details

| Description | Data                                                                                             |
| ----------- | ------------------------------------------------------------------------------------------------ |
| API Name    | [getAccountContracts](https://sandbox.api.labs.zelus.io/docs/#/Account/get_v1_account_contracts) |
| HTTP Method | GET                                                                                              |
| URL         | `/v1/account/contracts`                                                                          |

{% tabs %}
{% tab title="Request" %}

#### Headers

| Key          | Value              |
| ------------ | ------------------ |
| Content-Type | `application/json` |
| x-api-key    | API\_KEY           |

#### Parameters

There are no parameters required for this request.
{% endtab %}

{% tab title="Response" %}
The response will contain a list of available NFT contracts.

```tsx
{
    result: {
        contracts: [
            {
                id:   string, // id of contract, form "contract_UUID"
                name: string  // name of contract
            },
        ]
    } | error?: IResponseError   // Optional error information
}
```

#### Success response example

```json
{
    "result": {
        "contracts": [
            {
                "id": "contract_6635e90e-31f0-11ee-be56-0242ac120002",
                "name": "DEMO_DIGITAL_COLLECTIBLES"
            },
        ]
    }
}
```

#### Error messages

* Invalid API Key
  * `{ "code: 401, "message": "Invalid api key" }`
    {% endtab %}
    {% endtabs %}

## Examples

{% tabs %}
{% tab title="CURL" %}

```bash
curl -X GET 'https://sandbox.api.labs.zelus.io/v1/account/contracts' \
     -H "x-api-key: YOUR_API_KEY"
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://sandbox.api.labs.zelus.io/v1/account/contracts"
headers = {
    "x-api-key": "YOUR_API_KEY"
}

response = requests.get(url, headers=headers)
contracts = response.json()['result']['contracts'] # Parsing response

for contract in contracts:
    print(f"Contract ID: {contract['id']}")
    print(f"Contract Name: {contract['name']}\n")
```

{% endtab %}

{% tab title="NodeJS" %}

```javascript
const axios = require('axios');

const url = "https://sandbox.api.labs.zelus.io/v1/account/contracts";
const headers = {
    "x-api-key": "YOUR_API_KEY"
};

axios.get(url, { headers: headers }).then(response => {
    const contracts = response.data.result.contracts; // Parsing response
    
    contracts.forEach(contract => {
        console.log(`Contract ID: ${contract.id}`);
        console.log(`Contract Name: ${contract.name}\n`);
    });
}).catch(error => {
    console.error('Error:', error.response.data);
});
```

{% endtab %}
{% endtabs %}

### Notes

* The request to this endpoint does not require any specific parameters or form-data.
* The response will contain a list of active NFT contracts available for the customer. If an error occurs, an `IResponseError` object may be included in the response.


---

# 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://docs.labs.zelus.io/zelus-labs-api/reference/account/getaccountcontracts.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.
