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

# List a company's branches

GET https://api.modex.com/v1/resources/companies/{company_id}/branches

Active branches of a company, ordered by ID. Cursor-paginated, and limited to your permitted states.

**Includes:** same as **Show Branch**.
**Query parameters:** `include`, `limit`, `cursor`.

Each item has the **Show Branch** fields. Saves the first branch to `branch_id`.

Reference: https://docs.modex.com/api-reference/mortgage-data/companies/list-company-branches

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `company_id` (string, required)

### Query parameters

- `include` (string, optional) — Comma-separated extras: mortgage, licenses, census, non_qm, lender_beneficiaries, trade_names. trade_names returns current and prior trade names. lender_beneficiaries returns 403 when lender beneficiaries aren't enabled for your account.
- `limit` (integer, optional) — Page size. Defaults to 25. Maximum is 100.
- `cursor` (string, optional) — Cursor from pagination.next_cursor on the previous page. Leave disabled for the first page.

## Response

### 200

OK

- `data` (list of V1ResourcesCompaniesCompanyIdBranchesGetResponsesContentApplicationJsonSchemaDataItems, optional) — The records on this page.
- `pagination` (V1ResourcesCompaniesCompanyIdBranchesGetResponsesContentApplicationJsonSchemaPagination, optional) — Cursor details for the next and previous pages. See Pagination in Getting started.

## Errors

### 400 Bad Request Error

Bad Request

- `error` (ApiErrorError, required)

## Types

### V1ResourcesCompaniesCompanyIdBranchesGetResponsesContentApplicationJsonSchemaDataItems

- `id` (string, optional) — Branch ID
- `type` (string, optional) — Always `branch`
- `name` (string, optional) — Branch name
- `nmls_id` (integer, optional) — Branch NMLS ID
- `company` (V1ResourcesCompaniesCompanyIdBranchesGetResponsesContentApplicationJsonSchemaDataItemsCompany, optional) — Parent company: `id`, `name`, `nmls_id`
- `address` (V1ResourcesCompaniesCompanyIdBranchesGetResponsesContentApplicationJsonSchemaDataItemsAddress, optional) — Branch address

### V1ResourcesCompaniesCompanyIdBranchesGetResponsesContentApplicationJsonSchemaPagination

Cursor details for the next and previous pages. See Pagination in Getting started.

- `per_page` (integer, optional) — Page size used for this response.
- `next_cursor` (string, optional) — Pass as `cursor` to get the next page. `null` on the last page.
- `next_page_url` (string, optional) — Full URL of the next page. `null` on the last page.
- `prev_cursor` (any, optional) — Pass as `cursor` to get the previous page. `null` on the first page.
- `prev_page_url` (any, optional) — Full URL of the previous page. `null` on the first page.

### ApiErrorError

- `type` (string, required) — Error category: invalid_request, authentication_error, permission_error, not_found, rate_limit_error, or api_error.
- `code` (string, required) — Specific error code. Same as `type`, except `validation_error` for request-body validation failures.
- `message` (string, required) — Human-readable explanation.
- `details` (map from string to list of string, optional) — Validation errors only: each invalid field mapped to its messages.

### V1ResourcesCompaniesCompanyIdBranchesGetResponsesContentApplicationJsonSchemaDataItemsCompany

Parent company: `id`, `name`, `nmls_id`

- `id` (string, optional) — Modex ID (UUID)
- `name` (string, optional) — Name
- `nmls_id` (integer, optional) — NMLS ID

### V1ResourcesCompaniesCompanyIdBranchesGetResponsesContentApplicationJsonSchemaDataItemsAddress

Branch address

- `street` (string, optional) — Street line
- `city` (string, optional) — Breakdown by city
- `state` (string, optional) — Two-letter state code
- `zipcode` (string, optional) — ZIP code
- `formatted` (string, optional) — Full single-line address

## Examples

**Response**

```json
{
  "data": [
    {
      "id": "2b9d4e71-6c3a-4f8b-b2d1-7e8f9a0b1c22",
      "type": "branch",
      "name": "Northstar Lending Group, LLC, Portland, OR",
      "nmls_id": 1234568,
      "company": {
        "id": "8f3c2a10-4b7e-4d21-9a6f-1c2d3e4f5a60",
        "name": "Northstar Lending Group, LLC",
        "nmls_id": 1234567
      },
      "address": {
        "street": "500 SW Main Street, Suite 300",
        "city": "Portland",
        "state": "OR",
        "zipcode": "97204",
        "formatted": "500 SW Main Street, Suite 300, Portland, OR 97204"
      }
    },
    {
      "id": "3c0e5f82-7d4b-4a9c-83e2-8f9a0b1c2d33",
      "type": "branch",
      "name": "Northstar Lending Group, LLC, Vancouver, WA",
      "nmls_id": 1234569,
      "company": {
        "id": "8f3c2a10-4b7e-4d21-9a6f-1c2d3e4f5a60",
        "name": "Northstar Lending Group, LLC",
        "nmls_id": 1234567
      },
      "address": {
        "street": "700 Washington Street, Suite 210",
        "city": "Vancouver",
        "state": "WA",
        "zipcode": "98660",
        "formatted": "700 Washington Street, Suite 210, Vancouver, WA 98660"
      }
    }
  ],
  "pagination": {
    "per_page": 2,
    "next_cursor": "eyJpZCI6IjNjMGU1ZjgyLTdkNGItNGE5Yy04M2UyLThmOWEwYjFjMmQzMyIsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0",
    "next_page_url": "https://api.modex.com/v1/resources/companies/8f3c2a10-4b7e-4d21-9a6f-1c2d3e4f5a60/branches?cursor=eyJpZCI6IjNjMGU1ZjgyLTdkNGItNGE5Yy04M2UyLThmOWEwYjFjMmQzMyIsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0"
  }
}
```

**SDK Code**

```python Branches
import requests

url = "https://api.modex.com/v1/resources/companies/company_id/branches"

querystring = {"cursor":"{{cursor}}","include":"mortgage,licenses,census,non_qm,lender_beneficiaries,trade_names","limit":"25"}

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

```javascript Branches
const url = 'https://api.modex.com/v1/resources/companies/company_id/branches?cursor=%7B%7Bcursor%7D%7D&include=mortgage%2Clicenses%2Ccensus%2Cnon_qm%2Clender_beneficiaries%2Ctrade_names&limit=25';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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

```go Branches
package main

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

func main() {

	url := "https://api.modex.com/v1/resources/companies/company_id/branches?cursor=%7B%7Bcursor%7D%7D&include=mortgage%2Clicenses%2Ccensus%2Cnon_qm%2Clender_beneficiaries%2Ctrade_names&limit=25"

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

	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

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

url = URI("https://api.modex.com/v1/resources/companies/company_id/branches?cursor=%7B%7Bcursor%7D%7D&include=mortgage%2Clicenses%2Ccensus%2Cnon_qm%2Clender_beneficiaries%2Ctrade_names&limit=25")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

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

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

HttpResponse<String> response = Unirest.get("https://api.modex.com/v1/resources/companies/company_id/branches?cursor=%7B%7Bcursor%7D%7D&include=mortgage%2Clicenses%2Ccensus%2Cnon_qm%2Clender_beneficiaries%2Ctrade_names&limit=25")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.modex.com/v1/resources/companies/company_id/branches?cursor=%7B%7Bcursor%7D%7D&include=mortgage%2Clicenses%2Ccensus%2Cnon_qm%2Clender_beneficiaries%2Ctrade_names&limit=25', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Branches
using RestSharp;

var client = new RestClient("https://api.modex.com/v1/resources/companies/company_id/branches?cursor=%7B%7Bcursor%7D%7D&include=mortgage%2Clicenses%2Ccensus%2Cnon_qm%2Clender_beneficiaries%2Ctrade_names&limit=25");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Branches
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.modex.com/v1/resources/companies/company_id/branches?cursor=%7B%7Bcursor%7D%7D&include=mortgage%2Clicenses%2Ccensus%2Cnon_qm%2Clender_beneficiaries%2Ctrade_names&limit=25")! 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()
```