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

# Get Members By Organisation

POST https://api.staple.io/v1/users/members
Content-Type: application/json

This endpoint allows you to get a list of your team members.

Reference: https://docs.staple.ai/api-reference/v1/users/get-members-by-organisation

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: v1
  version: 1.0.0
paths:
  /v1/users/members:
    post:
      operationId: getMembersByOrganisation
      summary: Get Members By Organisation
      description: This endpoint allows you to get a list of your team members.
      tags:
        - users
      parameters:
        - name: x-api-key
          in: header
          description: API key issued by Staple.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Users_getMembersByOrganisation_Response_200
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                pagination:
                  $ref: >-
                    #/components/schemas/V1UsersMembersPostRequestBodyContentApplicationJsonSchemaPagination
servers:
  - url: https://api.staple.io
    description: https://api.staple.io
components:
  schemas:
    V1UsersMembersPostRequestBodyContentApplicationJsonSchemaPagination:
      type: object
      properties:
        skip:
          type: integer
        take:
          type: integer
      title: V1UsersMembersPostRequestBodyContentApplicationJsonSchemaPagination
    Users_getMembersByOrganisation_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: Users_getMembersByOrganisation_Response_200
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key issued by Staple.
    bearerAuth:
      type: http
      scheme: bearer
      description: JWT obtained from the login endpoint.

```

## Examples

### Get Members By Organisation



**Request**

```json
undefined
```

**Response**

```json
{
  "getListMembers": {
    "data": [
      {
        "createdAt": 1578047471603,
        "email": "member1@gmail.com",
        "firstName": "Organisation A",
        "id": 1,
        "lastName": "Employee",
        "organisation": null,
        "phoneNumber": "095950595",
        "position": "Employee",
        "queuesAccess": 11
      },
      {
        "createdAt": 1583998168286,
        "email": "member2@staple.io",
        "firstName": "Josh",
        "id": 2,
        "lastName": "Dude",
        "organisation": null,
        "phoneNumber": "095950595",
        "position": "Employee",
        "queuesAccess": 9
      },
      {
        "createdAt": 1585722687291,
        "email": "member3@gmail.com",
        "firstName": "Demo account",
        "id": 3,
        "lastName": "Employee",
        "organisation": null,
        "phoneNumber": "095950595",
        "position": "Employee",
        "queuesAccess": 3
      },
      {
        "createdAt": 1587636399919,
        "email": "member4@gmail.com",
        "firstName": "Demo account",
        "id": 4,
        "lastName": "Employee",
        "organisation": null,
        "phoneNumber": "095950595",
        "position": "Employee",
        "queuesAccess": 3
      }
    ],
    "pageInfo": {
      "hasNextPage": false,
      "hasPreviousPage": false,
      "lastCursor": 106
    },
    "total": 4
  }
}
```

**SDK Code**

```python Get Members By Organisation
import requests

url = "https://api.staple.io/v1/users/members"

headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Get Members By Organisation
const url = 'https://api.staple.io/v1/users/members';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: undefined
};

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

```go Get Members By Organisation
package main

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

func main() {

	url := "https://api.staple.io/v1/users/members"

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

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

```ruby Get Members By Organisation
require 'uri'
require 'net/http'

url = URI("https://api.staple.io/v1/users/members")

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'

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

```java Get Members By Organisation
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.staple.io/v1/users/members")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .asString();
```

```php Get Members By Organisation
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.staple.io/v1/users/members', [
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Get Members By Organisation
using RestSharp;

var client = new RestClient("https://api.staple.io/v1/users/members");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift Get Members By Organisation
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.staple.io/v1/users/members")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```

### Users_getMembersByOrganisation_example



**Request**

```json
{
  "pagination": {
    "skip": 0,
    "take": 10
  }
}
```

**Response**

```json
{
  "getListMembers": {
    "data": [
      {
        "createdAt": 1578047471603,
        "email": "member1@gmail.com",
        "firstName": "Organisation A",
        "id": 1,
        "lastName": "Employee",
        "organisation": null,
        "phoneNumber": "095950595",
        "position": "Employee",
        "queuesAccess": 11
      },
      {
        "createdAt": 1583998168286,
        "email": "member2@staple.io",
        "firstName": "Josh",
        "id": 2,
        "lastName": "Dude",
        "organisation": null,
        "phoneNumber": "095950595",
        "position": "Employee",
        "queuesAccess": 9
      },
      {
        "createdAt": 1585722687291,
        "email": "member3@gmail.com",
        "firstName": "Demo account",
        "id": 3,
        "lastName": "Employee",
        "organisation": null,
        "phoneNumber": "095950595",
        "position": "Employee",
        "queuesAccess": 3
      },
      {
        "createdAt": 1587636399919,
        "email": "member4@gmail.com",
        "firstName": "Demo account",
        "id": 4,
        "lastName": "Employee",
        "organisation": null,
        "phoneNumber": "095950595",
        "position": "Employee",
        "queuesAccess": 3
      }
    ],
    "pageInfo": {
      "hasNextPage": false,
      "hasPreviousPage": false,
      "lastCursor": 106
    },
    "total": 4
  }
}
```

**SDK Code**

```python Users_getMembersByOrganisation_example
import requests

url = "https://api.staple.io/v1/users/members"

payload = { "pagination": {
        "skip": 0,
        "take": 10
    } }
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Users_getMembersByOrganisation_example
const url = 'https://api.staple.io/v1/users/members';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"pagination":{"skip":0,"take":10}}'
};

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

```go Users_getMembersByOrganisation_example
package main

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

func main() {

	url := "https://api.staple.io/v1/users/members"

	payload := strings.NewReader("{\n  \"pagination\": {\n    \"skip\": 0,\n    \"take\": 10\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

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

url = URI("https://api.staple.io/v1/users/members")

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"pagination\": {\n    \"skip\": 0,\n    \"take\": 10\n  }\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.staple.io/v1/users/members")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"pagination\": {\n    \"skip\": 0,\n    \"take\": 10\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.staple.io/v1/users/members', [
  'body' => '{
  "pagination": {
    "skip": 0,
    "take": 10
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Users_getMembersByOrganisation_example
using RestSharp;

var client = new RestClient("https://api.staple.io/v1/users/members");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"pagination\": {\n    \"skip\": 0,\n    \"take\": 10\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Users_getMembersByOrganisation_example
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["pagination": [
    "skip": 0,
    "take": 10
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.staple.io/v1/users/members")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```