Retrieve details for a specific guest user by their email address.
Delete guest
DELETE /organizations/{org_id}/guests/{guest_email}
This endpoint removes a guest user record from the organization, identified by their email address. This action likely prevents the guest from accessing any further tasks or information within this organization.
Replace {org_id}
with your Organization ID and {guest_email}
with the URL-encoded email address of the guest to remove.
Authorization: Bearer {your_access_token}
Accept: application/json
X-Tallyfy-Client: APIClient
No request body is needed for this DELETE request.
const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';const orgId = 'YOUR_ORGANIZATION_ID';const guestEmail = "guest.to.delete@example.com";const encodedEmail = encodeURIComponent(guestEmail);const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/guests/${encodedEmail}`;
const headers = new Headers();headers.append('Authorization', `Bearer ${accessToken}`);headers.append('Accept', 'application/json');headers.append('X-Tallyfy-Client', 'APIClient');
fetch(apiUrl, { method: 'DELETE', headers: headers}).then(response => { // Expect 201 or potentially 200/204 for successful deletion if (response.status === 201 || response.status === 200 || response.status === 204) { console.log(`Successfully deleted guest ${guestEmail}. Status: ${response.status}`); // Body might be empty or contain the deleted guest record if (response.status !== 204) { return response.json(); // Attempt to parse if not 204 } return null; } else { // Error handling... return response.json().then(errData => { throw new Error(/*...*/); }).catch(() => { throw new Error(/*...*/); }); }}).then(data => { if (data) { console.log('Deleted guest details (if returned):'); console.log(JSON.stringify(data, null, 2)); }}).catch(error => { console.error(`Error deleting guest ${guestEmail}:`, error);});
import requestsimport jsonimport osfrom urllib.parse import quote
access_token = os.environ.get('TALLYFY_ACCESS_TOKEN', 'YOUR_PERSONAL_ACCESS_TOKEN')org_id = os.environ.get('TALLYFY_ORG_ID', 'YOUR_ORGANIZATION_ID')guest_email = "guest.to.delete@example.com"encoded_email = quote(guest_email)api_url = f'https://go.tallyfy.com/api/organizations/{org_id}/guests/{encoded_email}'
headers = { 'Authorization': f'Bearer {access_token}', 'Accept': 'application/json', 'X-Tallyfy-Client': 'APIClient'}
try: response = requests.delete(api_url, headers=headers)
# Check for successful status codes if response.status_code in [200, 201, 204]: print(f'Successfully deleted guest {guest_email}. Status: {response.status_code}') if response.status_code != 204 and response.content: try: deleted_guest = response.json() print('Deleted guest details (if returned):') print(json.dumps(deleted_guest, indent=4)) except json.JSONDecodeError: print(f"(Received status {response.status_code} but body is not valid JSON: {response.text})") elif response.status_code == 204: print("(Received status 204 No Content)") else: response.raise_for_status() # Raise for other errors
except requests.exceptions.RequestException as e: # Error handling... print(f"Request failed: {e}")
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;
public class DeleteGuest { 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 guestEmail = "guest.to.delete@example.com"; String encodedEmail = URLEncoder.encode(guestEmail, StandardCharsets.UTF_8); String apiUrl = String.format("https://go.tallyfy.com/api/organizations/%s/guests/%s", orgId, encodedEmail);
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") .DELETE() .build();
try { // Send request expecting potential body for 200/201, empty for 204 HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() == 200 || response.statusCode() == 201 || response.statusCode() == 204) { System.out.println("Successfully deleted guest " + guestEmail + ". Status: " + response.statusCode()); if (response.statusCode() != 204 && response.body() != null && !response.body().isEmpty()) { System.out.println("Response Body:"); System.out.println(response.body()); // TODO: Parse JSON } } else { // Error handling... System.err.println("Failed. Status: " + response.statusCode()); System.err.println("Response: " + response.body()); } } catch (IOException | InterruptedException e) { // Error handling... System.err.println("Request failed: " + e.getMessage()); } }}
package main
import ( "fmt" "io/ioutil" "net/http" "net/url" "os")
func main() { accessToken := os.Getenv("TALLYFY_ACCESS_TOKEN") orgId := os.Getenv("TALLYFY_ORG_ID") email := "guest.to.delete@example.com"
// URL-encode the email encodedEmail := url.QueryEscape(email)
apiUrl := fmt.Sprintf("https://go.tallyfy.com/api/organizations/%s/guests/%s", orgId, encodedEmail)
client := &http.Client{} req, err := http.NewRequest(http.MethodDelete, apiUrl, nil) if err != nil { fmt.Println("Error creating request:", 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.Println("Error making request:", err) return } defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body) if err != nil { fmt.Println("Error reading response body:", err) return }
if resp.StatusCode == http.StatusOK || resp.StatusCode == http.StatusCreated || resp.StatusCode == http.StatusNoContent { fmt.Printf("Successfully deleted guest %s. Status: %d\n", email, resp.StatusCode) if resp.StatusCode != http.StatusNoContent && len(body) > 0 { fmt.Println("Response Body:") fmt.Println(string(body)) // TODO: Unmarshal JSON } } else { fmt.Printf("Failed. Status: %d\nBody: %s\n", resp.StatusCode, string(body)) }}
A successful deletion might return 201 Created
, 200 OK
, or 204 No Content
.
- If
201
or200
, the body might contain the details of the deleted guest record. - If
204
, there is no response body.
If the guest email is not found, a 404 Not Found
error will be returned.
Retrieve a list of guest users associated with your organization.
Create a new guest user record in your organization.
Modify details for an existing guest user.
About Tallyfy
- 2025 Tallyfy, Inc.
- Privacy Policy
- Terms of Use
- Report Issue
- Trademarks