---
title: Delete group · Tallyfy Pro
description: Tallyfy's DELETE endpoint at /organizations/{org_id}/groups/{group_id} permanently removes a group without deleting its members or guests. Returns a 204 No Content status on success, with code samples in JavaScript, Python, Java, Go, C++, and C#.
lastUpdated: 2026-09-22T00:00:00.000Z
source_url:
  html: https://tallyfy.com/products/pro/integrations/open-api/code-samples/groups/delete-group/
  md: https://tallyfy.com/products/pro/integrations/open-api/code-samples/groups/delete-group/index.md
---

## Endpoint

`DELETE /organizations/{org_id}/groups/{group_id}`

This permanently deletes a group from your Tallyfy organization. The members and guests in the group aren’t deleted. Only the group itself goes.

Tallyfy also takes the group off every template step, task and process it was assigned to. Any template or process permissions it granted are removed too. Members and guests who already got a task through the group keep that task as individuals. A template step assigned only to this group is left with no assignee.

## Request

Replace `{org_id}` with your organization ID. Replace `{group_id}` with the ID of the group to delete.

### Headers

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

### Body

You don’t need a request body.

### Code samples

* Javascript

  ```javascript
  const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
  const orgId = 'YOUR_ORGANIZATION_ID';
  const groupId = 'GROUP_ID_TO_DELETE';
  const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/groups/${groupId}`;


  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 => {
      if (response.status === 204) {
          console.log(`Successfully deleted group ${groupId}. Status: 204 No Content`);
      } else {
          return response.json()
              .catch(() => response.text())
              .then(errData => {
                  console.error(`Failed to delete group ${groupId}. Status: ${response.status}`, errData);
                  throw new Error(`HTTP error! status: ${response.status}`);
              });
      }
  })
  .catch(error => {
      console.error(`Error deleting group ${groupId}:`, error.message);
  });
  ```

* Python

  ```python
  import requests
  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')
  group_id = 'GROUP_ID_TO_DELETE'
  api_url = f'https://go.tallyfy.com/api/organizations/{org_id}/groups/{group_id}'


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


  response = requests.delete(api_url, headers=headers)


  if response.status_code == 204:
      print(f'Successfully deleted group {group_id}. Status: 204 No Content')
  else:
      print(f'Failed to delete group {group_id}. Status: {response.status_code}')
      print(f'Response: {response.text}')
  ```

* Java

  ```java
  import java.net.URI;
  import java.net.http.HttpClient;
  import java.net.http.HttpRequest;
  import java.net.http.HttpResponse;
  import java.io.IOException;


  public class DeleteGroup {
      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 groupId = "GROUP_ID_TO_DELETE";
          String apiUrl = String.format("https://go.tallyfy.com/api/organizations/%s/groups/%s", orgId, groupId);


          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 {
              HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());


              if (response.statusCode() == 204) {
                  System.out.println("Successfully deleted group " + groupId + ". Status: 204 No Content");
              } else {
                  System.err.println("Failed to delete group " + groupId + ". Status: " + response.statusCode());
                  System.err.println("Response Body: " + response.body());
              }
          } catch (IOException | InterruptedException e) {
              System.err.println("Request failed: " + e.getMessage());
              Thread.currentThread().interrupt();
          }
      }
  }
  ```

* Go

  ```go
  package main


  import (
    "fmt"
    "io"
    "net/http"
    "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" }
    groupId := "GROUP_ID_TO_DELETE"
    apiUrl := fmt.Sprintf("https://go.tallyfy.com/api/organizations/%s/groups/%s", orgId, groupId)


    client := &http.Client{Timeout: 15 * time.Second}
    req, err := http.NewRequest(http.MethodDelete, apiUrl, nil)
    if err != nil {
      fmt.Printf("Error creating request for group %s: %v\n", groupId, 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 for group %s: %v\n", groupId, err)
      return
    }
    defer resp.Body.Close()


    if resp.StatusCode == http.StatusNoContent {
      fmt.Printf("Successfully deleted group %s. Status: 204 No Content\n", groupId)
    } else {
      body, _ := io.ReadAll(resp.Body)
      fmt.Printf("Failed to delete group %s. Status: %d\nBody: %s\n", groupId, resp.StatusCode, string(body))
    }
  }
  ```

* C++

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


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


  pplx::task<void> DeleteTallyfyGroup(const utility::string_t& groupId)
  {
      utility::string_t accessToken = U("YOUR_PERSONAL_ACCESS_TOKEN");
      utility::string_t orgId = U("YOUR_ORGANIZATION_ID");
      utility::string_t apiUrl = U("https://go.tallyfy.com/api/organizations/") + orgId + U("/groups/") + groupId;


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


      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([groupId](http_response response)
      {
          if (response.status_code() == status_codes::NoContent) {
              std::wcout << L"Successfully deleted group " << groupId << L". Status: 204 No Content." << std::endl;
          } else {
              return response.extract_string().then([response, groupId](utility::string_t errorBody) {
                  std::wcerr << L"Failed to delete group " << groupId << L". Status: " << response.status_code() << std::endl;
                  std::wcerr << L"Response Body: " << errorBody << std::endl;
                  throw std::runtime_error("Failed to delete group");
              });
          }
          return pplx::task_from_result();
      });
  }


  int main() {
      try {
          DeleteTallyfyGroup(U("GROUP_ID_TO_DELETE")).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;


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


      public static async Task DeleteGroupAsync(string groupId)
      {
          var accessToken = Environment.GetEnvironmentVariable("TALLYFY_ACCESS_TOKEN") ?? "YOUR_PERSONAL_ACCESS_TOKEN";
          var orgId = Environment.GetEnvironmentVariable("TALLYFY_ORG_ID") ?? "YOUR_ORGANIZATION_ID";
          var apiUrl = $"https://go.tallyfy.com/api/organizations/{orgId}/groups/{groupId}";


          try
          {
              using var request = new HttpRequestMessage(HttpMethod.Delete, 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);


              if (response.StatusCode == System.Net.HttpStatusCode.NoContent)
              {
                  Console.WriteLine($"Successfully deleted group {groupId}. Status: 204 No Content");
              }
              else
              {
                  string responseBody = await response.Content.ReadAsStringAsync();
                  Console.WriteLine($"Failed to delete group {groupId}. Status: {response.StatusCode}");
                  Console.WriteLine($"Response: {responseBody}");
              }
          }
          catch (HttpRequestException e)
          {
              Console.WriteLine($"Request exception deleting group {groupId}: {e.Message}");
          }
      }


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

## Response

You’ll get `204 No Content`. The response body is empty. The delete is permanent, so you can’t get the group back.

## Related articles

[**Tags > Delete tag**](https://tallyfy.com/products/pro/integrations/open-api/code-samples/tags/archive-tag/)

Tallyfy’s DELETE API endpoint at `/organizations/[org_id]/tags/[tag_id]` permanently removes a…

[**Tasks > Delete task**](https://tallyfy.com/products/pro/integrations/open-api/code-samples/tasks/delete-task/)

Tallyfy’s API lets you permanently delete a standalone one-off task along with its form fields…

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

Tallyfy’s Groups API lets you bundle members and guests into reusable groups that can be…

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

Fetch details of a specific group in your Tallyfy organization using a GET request. Returns the…

## Was this helpful?
