---
title: List guests · Tallyfy Pro
description: Retrieve a paginated list of guest users in your organization. You'll get detailed profiles with access history, and you can filter by email or include completion statistics.
lastUpdated: 2026-03-22T00:00:00.000Z
source_url:
  html: https://tallyfy.com/products/pro/integrations/open-api/code-samples/guests/list-guests/
  md: https://tallyfy.com/products/pro/integrations/open-api/code-samples/guests/list-guests/index.md
---

## Endpoint

`GET /organizations/{org_id}/guests`

Retrieves a paginated list of guest users in your organization.

## Request

Replace `{org_id}` with your organization ID.

### Headers

* `Authorization: Bearer {your_access_token}`
* `Accept: application/json`
* `X-Tallyfy-Client: APIClient`

### Query parameters (optional)

| Parameter | Type | Description |
| - | - | - |
| `q` | string | Search query to filter guests by email |
| `sort` | string | Sort field (also accepts `sort_by`). Defaults to `created_at` |
| `per_page` | integer | Results per page (defaults to `999`) |
| `page` | integer | Page number |
| `without_pagination` | boolean | Return all results without pagination |
| `with` | string | Include extra data. Use `stats` for completion statistics |

### Code samples

* Javascript

  ```javascript
  const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
  const orgId = 'YOUR_ORGANIZATION_ID';


  const queryParams = '?with=stats&per_page=50&page=1';
  const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/guests${queryParams}`;


  const headers = new Headers();
  headers.append('Authorization', `Bearer ${accessToken}`);
  headers.append('Accept', 'application/json');
  headers.append('X-Tallyfy-Client', 'APIClient');


  fetch(apiUrl, {
      method: 'GET',
      headers: headers
  })
  .then(response => {
      return response.json().then(data => {
          if (!response.ok) {
              console.error("Failed to list guests:", data);
              throw new Error(`HTTP error! status: ${response.status}`);
          }
          return data;
      });
  })
  .then(data => {
      console.log('Successfully listed guests:');
      console.log(JSON.stringify(data, null, 2));
  })
  .catch(error => {
      console.error('Error listing guests:', error.message);
  });
  ```

* Python

  ```python
  import requests
  import json
  import os


  access_token = os.environ.get('TALLYFY_ACCESS_TOKEN', 'YOUR_PERSONAL_ACCESS_TOKEN')
  org_id = os.environ.get('TALLYFY_ORG_ID', 'YOUR_ORGANIZATION_ID')
  api_url = f'https://go.tallyfy.com/api/organizations/{org_id}/guests'


  headers = {
      'Authorization': f'Bearer {access_token}',
      'Accept': 'application/json',
      'X-Tallyfy-Client': 'APIClient'
  }


  params = {
      'with': 'stats',
      'page': 1,
      'per_page': 50
  }


  response = None
  try:
      response = requests.get(api_url, headers=headers, params=params)
      response.raise_for_status()


      guests_data = response.json()
      print('Successfully listed guests:')
      print(json.dumps(guests_data, indent=4))


  except requests.exceptions.HTTPError as http_err:
      print(f"HTTP error occurred listing guests: {http_err}")
      if response is not None:
          print(f"Response Body: {response.text}")
  except requests.exceptions.RequestException as req_err:
      print(f"Request failed listing guests: {req_err}")
  except json.JSONDecodeError:
      print("Failed to decode JSON response when listing guests")
      if response is not None:
          print(f"Response Text: {response.text}")
  except Exception as err:
      print(f"An unexpected error occurred: {err}")
  ```

* Java

  ```java
  import java.net.URI;
  import java.net.URLEncoder;
  import java.net.http.HttpClient;
  import java.net.http.HttpRequest;
  import java.net.http.HttpResponse;
  import java.io.IOException;
  import java.nio.charset.StandardCharsets;
  import java.util.Map;
  import java.util.stream.Collectors;


  public class ListGuests {
      public static void main(String[] args) {
          String accessToken = System.getenv().getOrDefault("TALLYFY_ACCESS_TOKEN", "YOUR_PERSONAL_ACCESS_TOKEN");
          String orgId = System.getenv().getOrDefault("TALLYFY_ORG_ID", "YOUR_ORGANIZATION_ID");
          String baseUrl = "https://go.tallyfy.com/api/organizations/" + orgId + "/guests";


          Map<String, String> queryParamsMap = Map.of("with", "stats", "page", "1", "per_page", "50");
          String queryParamsString = queryParamsMap.entrySet().stream()
              .map(entry -> URLEncoder.encode(entry.getKey(), StandardCharsets.UTF_8) + "=" + URLEncoder.encode(entry.getValue(), StandardCharsets.UTF_8))
              .collect(Collectors.joining("&", "?", ""));


          String apiUrl = baseUrl + (queryParamsMap.isEmpty() ? "" : queryParamsString);


          HttpClient client = HttpClient.newHttpClient();
          HttpRequest request = HttpRequest.newBuilder()
                  .uri(URI.create(apiUrl))
                  .header("Authorization", "Bearer " + accessToken)
                  .header("Accept", "application/json")
                  .header("X-Tallyfy-Client", "APIClient")
                  .GET()
                  .build();


          try {
              HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());


              if (response.statusCode() == 200) {
                  System.out.println("Successfully listed guests:");
                  System.out.println(response.body());
              } else {
                  System.err.println("Failed to list guests. Status: " + response.statusCode());
                  System.err.println("Response Body: " + response.body());
              }
          } catch (IOException | InterruptedException e) {
              System.err.println("Request failed: " + e.getMessage());
              Thread.currentThread().interrupt();
          } catch (Exception e) {
              System.err.println("An unexpected error occurred: " + e.getMessage());
              e.printStackTrace();
          }
      }
  }
  ```

* Go

  ```go
  package main


  import (
    "bytes"
    "encoding/json"
    "fmt"
    "io"
    "net/http"
    "net/url"
    "os"
    "time"
  )


  func main() {
    accessToken := os.Getenv("TALLYFY_ACCESS_TOKEN")
    if accessToken == "" { accessToken = "YOUR_PERSONAL_ACCESS_TOKEN" }
    orgId := os.Getenv("TALLYFY_ORG_ID")
    if orgId == "" { orgId = "YOUR_ORGANIZATION_ID" }
    baseURL := fmt.Sprintf("https://go.tallyfy.com/api/organizations/%s/guests", orgId)


    queryParams := url.Values{}
    queryParams.Add("with", "stats")
    queryParams.Add("page", "1")
    queryParams.Add("per_page", "50")


    apiUrl := baseURL
    if len(queryParams) > 0 {
      apiUrl += "?" + queryParams.Encode()
    }


    client := &http.Client{Timeout: 15 * time.Second}
    req, err := http.NewRequest("GET", apiUrl, nil)
    if err != nil {
      fmt.Printf("Error creating request: %v\n", err)
      return
    }


    req.Header.Set("Authorization", "Bearer "+accessToken)
    req.Header.Set("Accept", "application/json")
    req.Header.Set("X-Tallyfy-Client", "APIClient")


    resp, err := client.Do(req)
    if err != nil {
      fmt.Printf("Error executing request: %v\n", err)
      return
    }
    defer resp.Body.Close()


    body, err := io.ReadAll(resp.Body)
    if err != nil {
      fmt.Printf("Error reading response body: %v\n", err)
      return
    }


    if resp.StatusCode != http.StatusOK {
      fmt.Printf("Failed to list guests. Status: %d\nBody: %s\n", resp.StatusCode, string(body))
      return
    }


    fmt.Println("Successfully listed guests:")
    var prettyJSON bytes.Buffer
    if err := json.Indent(&prettyJSON, body, "", "  "); err == nil {
      fmt.Println(prettyJSON.String())
    } else {
      fmt.Println(string(body))
    }
  }
  ```

* C++

  ```cpp
  #include <iostream>
  #include <string>
  #include <cpprest/http_client.h>
  #include <cpprest/json.h>


  using namespace web;
  using namespace web::http;
  using namespace web::http::client;
  using namespace web::json;


  pplx::task<void> ListTallyfyGuests()
  {
      utility::string_t accessToken = U("YOUR_PERSONAL_ACCESS_TOKEN");
      utility::string_t orgId = U("YOUR_ORGANIZATION_ID");


      uri_builder builder(U("https://go.tallyfy.com/api/organizations/"));
      builder.append_path(orgId);
      builder.append_path(U("guests"));
      builder.append_query(U("with"), U("stats"));
      builder.append_query(U("per_page"), 50);
      builder.append_query(U("page"), 1);
      utility::string_t apiUrl = builder.to_string();


      http_client client(apiUrl);
      http_request request(methods::GET);


      request.headers().add(U("Authorization"), U("Bearer ") + accessToken);
      request.headers().add(U("Accept"), U("application/json"));
      request.headers().add(U("X-Tallyfy-Client"), U("APIClient"));


      return client.request(request).then([](http_response response)
      {
          return response.extract_json().then([response](pplx::task<value> task)
          {
              try {
                  value const & body = task.get();
                  if (response.status_code() == status_codes::OK) {
                      std::wcout << L"Successfully listed guests:\n" << body.serialize() << std::endl;
                  } else {
                      std::wcerr << L"Failed to list guests. Status: " << response.status_code() << L"\nResponse: " << body.serialize() << std::endl;
                  }
              } catch (const http_exception& e) {
                  std::wcerr << L"HTTP exception: " << e.what() << std::endl;
              } catch (const std::exception& e) {
                  std::wcerr << L"Exception: " << e.what() << std::endl;
              }
          });
      });
  }


  int main() {
      try {
          ListTallyfyGuests().wait();
      } catch (const std::exception &e) {
          std::cerr << "Error: " << e.what() << std::endl;
      }
      return 0;
  }
  // Requires C++ REST SDK (Casablanca)
  ```

* C#

  ```csharp
  using System;
  using System.Net.Http;
  using System.Net.Http.Headers;
  using System.Threading.Tasks;
  using System.Text.Json;
  using System.Web;


  public class TallyfyGuestLister
  {
      private static readonly HttpClient client = new HttpClient();


      public static async Task ListGuestsAsync()
      {
          var accessToken = Environment.GetEnvironmentVariable("TALLYFY_ACCESS_TOKEN") ?? "YOUR_PERSONAL_ACCESS_TOKEN";
          var orgId = Environment.GetEnvironmentVariable("TALLYFY_ORG_ID") ?? "YOUR_ORGANIZATION_ID";


          var query = HttpUtility.ParseQueryString(string.Empty);
          query["with"] = "stats";
          query["per_page"] = "50";
          query["page"] = "1";
          string queryString = query.ToString();
          var apiUrl = $"https://go.tallyfy.com/api/organizations/{orgId}/guests?{queryString}";


          try
          {
              using var request = new HttpRequestMessage(HttpMethod.Get, apiUrl);
              request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);
              request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
              request.Headers.Add("X-Tallyfy-Client", "APIClient");


              HttpResponseMessage response = await client.SendAsync(request);
              string responseBody = await response.Content.ReadAsStringAsync();


              if (response.IsSuccessStatusCode)
              {
                  Console.WriteLine("Successfully listed guests:");
                  try {
                      using var doc = JsonDocument.Parse(responseBody);
                      Console.WriteLine(JsonSerializer.Serialize(doc.RootElement, new JsonSerializerOptions { WriteIndented = true }));
                  } catch (JsonException) {
                      Console.WriteLine(responseBody);
                  }
              }
              else
              {
                  Console.WriteLine($"Failed to list guests. Status: {response.StatusCode}");
                  Console.WriteLine($"Response: {responseBody}");
              }
          }
          catch (HttpRequestException e)
          {
              Console.WriteLine($"Request exception: {e.Message}");
          }
          catch (Exception ex)
          {
              Console.WriteLine($"An unexpected error occurred: {ex.Message}");
          }
      }


      // Example usage:
      // static async Task Main(string[] args)
      // {
      //     await ListGuestsAsync();
      // }
  }
  ```

## Response

A successful request returns a `200 OK` status with a JSON object. There’s a `data` array of guest objects and a `meta` object with pagination details.

```json
{
  "data": [
    {
      "id": 1234,
      "email": "guest.user@external.com",
      "last_accessed_at": "2025-05-15T10:00:00Z",
      "last_known_ip": "192.0.2.1",
      "last_known_country": "US",
      "details": {
        "status": "active",
        "phone_1": null,
        "phone_2": null,
        "timezone": "America/Chicago",
        "image_url": null,
        "contact_url": null,
        "company_url": null,
        "opportunity_url": null,
        "company_name": "External Inc.",
        "opportunity_name": null,
        "external_sync_source": null,
        "external_date_creation": null,
        "cadence_days": null,
        "associated_members": null,
        "last_city": null,
        "last_country": "US",
        "last_accessed_at": "2025-05-15T10:00:00Z",
        "disabled_at": null,
        "disabled_by": null,
        "reactivated_at": null,
        "reactivated_by": null
      },
      "first_name": "External",
      "last_name": "Collaborator",
      "created_at": "2025-01-10T08:30:00Z",
      "deleted_at": null,
      "link": "https://go.tallyfy.com/...",
      "stats": {
        "assigned_tasks": 2,
        "tasks_completed": 5,
        "last_task_completed_at": "2025-05-14T16:30:00Z",
        "one_off_tasks_completed": 1,
        "last_one_off_task_completed_at": "2025-04-20T12:00:00Z"
      }
    }
  ],
  "meta": {
    "pagination": {
      "total": 25,
      "count": 25,
      "per_page": 999,
      "current_page": 1,
      "total_pages": 1
    }
  }
}
```

The `stats` object won’t appear unless you request `with=stats`. The `link` field contains the guest’s forever-link URL for accessing their tasks.

***

## Related articles

[**Guests > Get guest**](https://tallyfy.com/products/pro/integrations/open-api/code-samples/guests/get-guest/)

Retrieve a specific guest’s details by making a GET request to…

[**Members > List members**](https://tallyfy.com/products/pro/integrations/open-api/code-samples/members/list-members/)

Tallyfy’s API lets you retrieve a paginated list of organization members via a GET request…

[**Code Samples > Managing guests**](https://tallyfy.com/products/pro/integrations/open-api/code-samples/guests/)

Tallyfy’s API lets you manage external guest users who participate in tasks without full…

[**Groups > List groups**](https://tallyfy.com/products/pro/integrations/open-api/code-samples/groups/list-groups/)

Retrieve a paginated list of all groups in your Tallyfy organization. Filter by name, sort…

## Was this helpful?
