Skip to main content
GET
/
customers
/
{customerID}
/
users
Get Customer Users
curl --request GET \
  --url https://api.joinworth.com/auth/api/v1/customers/{customerID}/users \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.joinworth.com/auth/api/v1/customers/{customerID}/users"

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

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

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.joinworth.com/auth/api/v1/customers/{customerID}/users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.joinworth.com/auth/api/v1/customers/{customerID}/users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

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

func main() {

url := "https://api.joinworth.com/auth/api/v1/customers/{customerID}/users"

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(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.joinworth.com/auth/api/v1/customers/{customerID}/users")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.joinworth.com/auth/api/v1/customers/{customerID}/users")

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
{
  "status": "success",
  "message": "Success",
  "data": {
    "records": [
      {
        "id": "94520740-d63c-4e02-85ca-c4e138801e73",
        "first_name": "Sandbox",
        "last_name": "CRO",
        "email": "dummy.customer.user@email.com",
        "mobile": null,
        "is_email_verified": false,
        "is_first_login": true,
        "created_at": "2024-02-12T14:16:49.053Z",
        "created_by": "b03d6f6a-063b-4e71-8195-9f6f590a6257",
        "updated_at": "2024-02-12T14:16:49.053Z",
        "updated_by": "b03d6f6a-063b-4e71-8195-9f6f590a6257",
        "ext_auth_ref_id": "ec46bd5b-0fae-47e1-8e4e-d37a5ac87e7e",
        "status": "ACTIVE",
        "subrole": {
          "id": "f1fa445c-743b-4a0e-ad54-bb9294c41005",
          "code": "cro",
          "display_name": "CRO",
          "label": "CRO",
          "description": "This is Sandbox's CRO"
        }
      }
    ],
    "total_pages": 1,
    "total_items": "1"
  }
}
{
"message": "Error occurred",
"errorCode": "ERR_INTERNAL_SERVER"
}
{
"message": "Unauthorized",
"errorCode": "ERR_UNAUTHORIZED"
}
{
"message": "Forbidden",
"errorCode": "ERR_FORBIDDEN"
}
{
"message": "Internal Server Error",
"errorCode": "ERR_INTERNAL_SERVER"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

customerID
string<uuid>
required

Query Parameters

query
object

You can pass any query parameters as needed to filter

Response

OK

status
string
Example:

"success"

message
string
Example:

"Success"

data
object