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

# List companies

GET https://public-api.alphax.com/v1/companies

The companies linked to your partner account.

Reference: https://docs.alphax.asia/api-reference/swap-api/companies/list-swap-companies

## Authentication

- `X-API-Key` header (required) — Your partner API key.

## Servers

- `https://public-api.alphax.com` (Production server, default)
- `https://public-api.demo.alphax.asia` (Staging (sandbox) server)

## Response

### 200

OK

- `companies` (list of object, optional)
  - `id` (string, optional)
  - `name` (string, optional)
  - `countryCode` (string, optional)
  - `status` (string, optional) — Onboarding status.
  - `createdAt` (datetime, optional)
  - `swap` (object, optional, nullable) — Present only for companies onboarded onto swap; otherwise `null`.
    - `kycUrl` (string, optional) — An unbranded page AlphaX hosts. Embeddable in an iframe from any origin.
    - `kycStatus` (enum, optional) — How far the company is through identity verification. `not_started` — a link exists but the customer has not begun. `incomplete` — begun but not submitted. `awaiting_questionnaire` — extra questions must be answered. `awaiting_ubo` — details of the ultimate beneficial owners are needed. `under_review` — submitted; a human is looking at it. `approved` — verified; routes can be opened. `rejected` — declined. `paused` — temporarily halted. `offboarded` — the customer has been removed. The two `awaiting_*` states block progress until the customer supplies something; surface those in your own UI.
      - Allowed values: `not_started`, `incomplete`, `awaiting_questionnaire`, `awaiting_ubo`, `under_review`, `approved`, `rejected`, `paused`, `offboarded`
    - `tosUrl` (string, optional) — A second unbranded page, for accepting the terms of service. Embedded the same way as `kycUrl`, and kept separate so you can send the customer straight to whichever step is outstanding.
    - `tosAccepted` (boolean, optional) — Whether the company has accepted the terms. It cannot be endorsed until it has, so treat `false` as blocking alongside verification.

## Examples

**Response**

```json
{
  "companies": [
    {
      "id": "01KZ2WJKWVFPCVAB6MY106QRZV",
      "name": "Acme Ltd",
      "countryCode": "HK",
      "status": "Pending",
      "createdAt": "2024-01-15T09:30:00Z",
      "swap": {
        "kycUrl": "https://public-api.alphax.com/kyc/9f2c1d84e7b6a5309c8f",
        "kycStatus": "awaiting_ubo",
        "tosUrl": "https://public-api.alphax.com/kyc/9f2c1d84e7b6a5309c8f/terms",
        "tosAccepted": false
      }
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://public-api.alphax.com/v1/companies"

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

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

print(response.json())
```

```javascript
const url = 'https://public-api.alphax.com/v1/companies';
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
package main

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

func main() {

	url := "https://public-api.alphax.com/v1/companies"

	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
require 'uri'
require 'net/http'

url = URI("https://public-api.alphax.com/v1/companies")

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
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://public-api.alphax.com/v1/companies")
  .header("X-API-Key", "<apiKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://public-api.alphax.com/v1/companies', [
  'headers' => [
    'X-API-Key' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://public-api.alphax.com/v1/companies");
var request = new RestRequest(Method.GET);
request.AddHeader("X-API-Key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://public-api.alphax.com/v1/companies")! 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()
```