# List Configurations

**GET** `/v1/keys/{key}/configs`

Returns every configuration stored against a key, oldest first.

## Example request

**URL**

```http
https://api.addresszen.com/v1/keys/ak_test/configs?user_token=uk_secret
```

**curl**

```bash
curl -G 'https://api.addresszen.com/v1/keys/ak_test/configs' \
  -d 'user_token=uk_secret'
```

**JavaScript**

```javascript
const response = await fetch(
  'https://api.addresszen.com/v1/keys/ak_test/configs?' +
  new URLSearchParams({
    user_token: 'uk_secret',
  })
);

const { result } = await response.json();
```

**Python**

```python
import requests

response = requests.get(
    "https://api.addresszen.com/v1/keys/ak_test/configs",
    params={
        "user_token": "uk_secret",
    },
)
result = response.json()["result"]
```

**Ruby**

```ruby
require "net/http"
require "json"

uri = URI("https://api.addresszen.com/v1/keys/ak_test/configs")
uri.query = URI.encode_www_form(user_token: "uk_secret")
result = JSON.parse(Net::HTTP.get(uri))["result"]
```

**PHP**

```php
<?php
$response = file_get_contents(
  "https://api.addresszen.com/v1/keys/ak_test/configs?" .
  http_build_query([
    "user_token" => "uk_secret",
  ])
);
$result = json_decode($response, true)["result"];
```

## Example response

**200 OK**

```json
{
  "result": {
    "configs": [
      {
        "updatedAt": "2016-01-21T17:14:49.971Z",
        "createdAt": "2016-01-21T17:14:49.971Z",
        "name": "woocommerce",
        "payload": "{\n  \"removeOrganisation\": false\n}\n"
      }
    ]
  },
  "message": "Success",
  "code": 2000
}
```

## Path parameters

* `key` string

  **API Key**

  The API Key to retrieve. Begins `ak_`.

  Example: `ak_test`

## Query parameters

* `user_token` string optional

  **Private User Token**

  A secret key used for sensitive operations on your account and API Keys.

  Your user token can be retrieved and managed from your [accounts page](https://addresszen.com/account).

  Typically begins `uk_...`

  Example: `uk_B59ScW1p1HHouf1VqclEPZUx`

## Response

`result` contains a `configs` array of configuration objects. Each config has a unique name, timestamps, and the serialized payload.

* `result` object

  List of configurations

  * `configs` object\[]

    | Field       | Type   | Description                                                                                  |
    | ----------- | ------ | -------------------------------------------------------------------------------------------- |
    | `updatedAt` | string | Timestamp for when the config was created. Example: `2016-01-21T17:14:49.971Z`               |
    | `createdAt` | string | Timestamp for when the config was updated. Example: `2016-01-21T17:14:49.971Z`               |
    | `name`      | string | A unique name to identify the configuration payload. Example: `woocommerce`                  |
    | `payload`   | string | A serialised payload of up to `65536` characters. Example: `{ "removeOrganisation": false }` |

The `result` sits inside the standard `{ result, code, message }` envelope — see the [API reference](/docs/api/api-reference.md) for the wrapper format.
