> This page is for Developer.

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

# List Company Users

GET https://api-b2b.bigcommerce.com/api/v2/companies/{companyId}/users

Returns a list of users associated with a Company account.

Equivalent Storefront GraphQL API Query: `users`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground).

Reference: https://docs.bigcommerce.com/developer/api-reference/rest/b2b/storefront/company/companies/get-companies-company-id-users

## Authentication

- `Authorization` header (bearer token, required) — ### Authentication header | Header | Argument | Description | | :-------------- | :------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `Authorization` | `Bearer {{B2B_JWT_TOKEN}}` | You can obtain this token using the steps described in the [REST Storefront API](/developer/docs/b2b-edition/getting-started/authentication#rest-storefront-api) section\[...] |

## Request

### Path parameters

- `companyId` (string, required) — The unique numeric ID of the Company account.

### Query parameters

- `role[]` (enum, optional) — The ID of the role assigned to the Company user account as defined at [Specifying User Role](/developer/api-reference/rest/b2b/storefront/company/companies#specifying-user-role).
  - Allowed values: `0`, `1`, `2`
- `limit` (string, optional, default: 10) — The total number of items per page of the response.
- `offset` (string, optional) — The number of items to skip before the current page of the response.
- `q` (string, optional) — The search string for the request.
- `minLastModifiedTime` (string, optional) — The earliest [Unix timestamp](https://www.unixtimestamp.com/) for when the Company account was modified that can be returned.
- `maxLastModifiedTime` (string, optional) — The latest [Unix timestamp](https://www.unixtimestamp.com/) for when the Company account was modified that can be returned.
- `minLastCreatedTime` (string, optional) — The earliest [Unix timestamp](https://www.unixtimestamp.com/) for when the Company account was created that can be returned.
- `maxLastCreatedTime` (string, optional) — The earliest [Unix timestamp](https://www.unixtimestamp.com/) for when the Company account was created that can be returned.

## Response

### 200

OK

- `message` (string, optional)
- `code` (double, optional, default: 200)
- `data` (CompaniesCompanyIdUsersGetResponsesContentApplicationJsonSchemaData, optional)

## Types

### CompaniesCompanyIdUsersGetResponsesContentApplicationJsonSchemaData

- `list` (list of CompaniesCompanyIdUsersGetResponsesContentApplicationJsonSchemaDataListItems, optional)
- `pagination` (responsePagination, optional)

### CompaniesCompanyIdUsersGetResponsesContentApplicationJsonSchemaDataListItems

- `firstName` (string, optional) — The user's first name.
- `lastName` (string, optional) — The user's last name.
- `email` (string, optional) — The email address associated with the user's account.
- `id` (string, optional) — The unique ID for the customer account.
- `role` (enum, optional) — The ID of the role assigned to the Company user account as defined at [Specifying User Role](/developer/api-reference/rest/b2b/storefront/company/companies#specifying-user-role).
  - Allowed values: `0`, `1`, `2`
- `phoneNumber` (string, optional) — The phone number associated with the user's account.
- `createdAt` (string, optional) — The [Unix timestamp](https://www.unixtimestamp.com/) for when the user's account was created.
- `updatedAt` (string, optional) — The [Unix timestamp](https://www.unixtimestamp.com/) for when the user's account was most recently updated.
- `uuid` (string, optional) — A unique ID associated with the user's account. Does not match the `id` field by default.
- `catalogId` (string, optional) — The ID of the price list assigned to the Company account.

### responsePagination

- `totalCount` (double, optional) — The total number of items matching the query.
- `offset` (double, optional) — The starting offset for the current page of the response.
- `limit` (double, optional) — The maximum number of items allowed per page of the response.

## Examples

**Response**

```json
{
  "message": "string",
  "code": 200,
  "data": {
    "list": [
      {
        "firstName": "Marie",
        "lastName": "Curie",
        "email": "m.curie@greatbuys.com",
        "id": "123",
        "role": "1",
        "phoneNumber": "8001234567",
        "createdAt": "1618794615",
        "updatedAt": "1618794615",
        "uuid": "string",
        "catalogId": "123456"
      }
    ],
    "pagination": {
      "totalCount": 175,
      "offset": 0,
      "limit": 10
    }
  }
}
```

**SDK Code**

```python
import requests

url = "https://api-b2b.bigcommerce.com/api/v2/companies/123/users"

querystring = {"limit":"10","maxLastCreatedTime":"1618794615","maxLastModifiedTime":"1618794615","minLastCreatedTime":"1618794615","minLastModifiedTime":"1618794615","offset":"0","role[]":"0"}

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

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

print(response.json())
```

```javascript
const url = 'https://api-b2b.bigcommerce.com/api/v2/companies/123/users?limit=10&maxLastCreatedTime=1618794615&maxLastModifiedTime=1618794615&minLastCreatedTime=1618794615&minLastModifiedTime=1618794615&offset=0&role%5B%5D=0';
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
package main

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

func main() {

	url := "https://api-b2b.bigcommerce.com/api/v2/companies/123/users?limit=10&maxLastCreatedTime=1618794615&maxLastModifiedTime=1618794615&minLastCreatedTime=1618794615&minLastModifiedTime=1618794615&offset=0&role%5B%5D=0"

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

url = URI("https://api-b2b.bigcommerce.com/api/v2/companies/123/users?limit=10&maxLastCreatedTime=1618794615&maxLastModifiedTime=1618794615&minLastCreatedTime=1618794615&minLastModifiedTime=1618794615&offset=0&role%5B%5D=0")

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

HttpResponse<String> response = Unirest.get("https://api-b2b.bigcommerce.com/api/v2/companies/123/users?limit=10&maxLastCreatedTime=1618794615&maxLastModifiedTime=1618794615&minLastCreatedTime=1618794615&minLastModifiedTime=1618794615&offset=0&role%5B%5D=0")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-b2b.bigcommerce.com/api/v2/companies/123/users?limit=10&maxLastCreatedTime=1618794615&maxLastModifiedTime=1618794615&minLastCreatedTime=1618794615&minLastModifiedTime=1618794615&offset=0&role%5B%5D=0', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api-b2b.bigcommerce.com/api/v2/companies/123/users?limit=10&maxLastCreatedTime=1618794615&maxLastModifiedTime=1618794615&minLastCreatedTime=1618794615&minLastModifiedTime=1618794615&offset=0&role%5B%5D=0");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api-b2b.bigcommerce.com/api/v2/companies/123/users?limit=10&maxLastCreatedTime=1618794615&maxLastModifiedTime=1618794615&minLastCreatedTime=1618794615&minLastModifiedTime=1618794615&offset=0&role%5B%5D=0")! 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()
```