> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api.alsona.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api.alsona.com/_mcp/server.

# List inbox labels

GET https://alsona.com/rest/accounts/{account_id}/inbox/labels

All inbox labels on the account, keyed by label id.

Reference: https://api.alsona.com/api-reference/inbox/list-inbox-labels

## Authentication

- `X-API-KEY` header (required) — API Key authentication via header

## Request

### Path parameters

- `account_id` (string, required)

## Response

### 200

Successful response

- `success` (boolean, optional)
- `labels` (RestAccountsAccountIdInboxLabelsGetResponsesContentApplicationJsonSchemaLabels, optional)

## Types

### RestAccountsAccountIdInboxLabelsGetResponsesContentApplicationJsonSchemaLabels

## Examples

**Response**

```json
{
  "success": true,
  "labels": {
    "account_id": "ACCOXXXXXXXXXXXXXXXXXXXX",
    "labels": {
      "1XXXXXXXXXXXXXXX": {
        "name": "Follow up later",
        "color": "purple"
      }
    }
  }
}
```

**SDK Code**

```python Inbox_listInboxLabels_example
import requests

url = "https://alsona.com/rest/accounts/account_id/inbox/labels"

headers = {"X-API-KEY": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Inbox_listInboxLabels_example
const url = 'https://alsona.com/rest/accounts/account_id/inbox/labels';
const options = {method: 'GET', headers: {'X-API-KEY': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Inbox_listInboxLabels_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://alsona.com/rest/accounts/account_id/inbox/labels"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-API-KEY", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Inbox_listInboxLabels_example
require 'uri'
require 'net/http'

url = URI("https://alsona.com/rest/accounts/account_id/inbox/labels")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java Inbox_listInboxLabels_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://alsona.com/rest/accounts/account_id/inbox/labels")
  .header("X-API-KEY", "<apiKey>")
  .asString();
```

```php Inbox_listInboxLabels_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://alsona.com/rest/accounts/account_id/inbox/labels', [
  'headers' => [
    'X-API-KEY' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Inbox_listInboxLabels_example
using RestSharp;

var client = new RestClient("https://alsona.com/rest/accounts/account_id/inbox/labels");
var request = new RestRequest(Method.GET);
request.AddHeader("X-API-KEY", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Inbox_listInboxLabels_example
import Foundation

let headers = ["X-API-KEY": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://alsona.com/rest/accounts/account_id/inbox/labels")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```