Skip to main content
Support

Rename a permission group

PATCH https://api.helpdocs.io/v1/account/group/{group_id}

Example request

Generated
curl -X PATCH https://api.helpdocs.io/v1/account/group/ahovCJQX4b \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string"
  }'
const url = "https://api.helpdocs.io/v1/account/group/ahovCJQX4b";

const response = await fetch(url, {
  method: "PATCH",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "name": "string"
  }),
});

const data = await response.json();
console.log(data);
const url = "https://api.helpdocs.io/v1/account/group/ahovCJQX4b";

const options: RequestInit = {
  method: "PATCH",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "name": "string"
  }),
};

const response = await fetch(url, options);

const data: unknown = await response.json();
console.log(data);
import requests

url = "https://api.helpdocs.io/v1/account/group/ahovCJQX4b"

headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}

payload = {
    "name": "string",
}

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

print(response.json())
<?php

$ch = curl_init("https://api.helpdocs.io/v1/account/group/ahovCJQX4b");

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "PATCH",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOUR_TOKEN",
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "name" => "string",
    ]),
]);

$response = curl_exec($ch);

print_r(json_decode($response, true));
package main

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

func main() {
	body := strings.NewReader(`{
  "name": "string"
}`)

	req, err := http.NewRequest(http.MethodPatch, "https://api.helpdocs.io/v1/account/group/ahovCJQX4b", body)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Authorization", "Bearer YOUR_TOKEN")
	req.Header.Set("Content-Type", "application/json")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	data, err := io.ReadAll(res.Body)
	if err != nil {
		panic(err)
	}
	fmt.Println(string(data))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Main {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();

        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.helpdocs.io/v1/account/group/ahovCJQX4b"))
            .header("Authorization", "Bearer YOUR_TOKEN")
            .header("Content-Type", "application/json")
            .method("PATCH", HttpRequest.BodyPublishers.ofString("""
                {
                  "name": "string"
                }"""))
            .build();

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

        System.out.println(response.body());
    }
}
require "json"
require "net/http"

uri = URI("https://api.helpdocs.io/v1/account/group/ahovCJQX4b")

request = Net::HTTP::Patch.new(uri)
request["Authorization"] = "Bearer YOUR_TOKEN"
request["Content-Type"] = "application/json"
request.body = JSON.generate({
  "name" => "string",
})

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
  http.request(request)
end

pp JSON.parse(response.body)
using System.Text;

var client = new HttpClient();

var request = new HttpRequestMessage(HttpMethod.Patch, "https://api.helpdocs.io/v1/account/group/ahovCJQX4b");
request.Headers.Add("Authorization", "Bearer YOUR_TOKEN");
request.Content = new StringContent(
    """
    {
      "name": "string"
    }
    """,
    Encoding.UTF8,
    "application/json");

var response = await client.SendAsync(request);

Console.WriteLine(await response.Content.ReadAsStringAsync());

Responses

{
  "user_group": {
    "group_id": "string",
    "name": "string",
    "created_at": "2024-01-15T09:30:00Z"
  }
}

The updated permission group.

Schemas
string

The request was rejected: a required field is missing from the body, or a value in it is not acceptable.

Schemas
{
  "code": 1,
  "err": "string"
}

Authentication failed or no API key was supplied.

Schemas
{
  "code": 1,
  "err": "string"
}

The account’s billing is past due and writes are locked. Reads keep working; editing resumes once billing is settled.

Schemas
{
  "code": 1,
  "err": "string"
}

The key lacks write permission, or the account’s plan does not include API access.

Schemas
string

No such resource in this account, or group_id does not match the pattern this route accepts.

Schemas
{
  "code": 1,
  "err": "string"
}

Rate limited. Wait the number of seconds in Retry-After before trying again. X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset say which allowance was spent and when it refills.

Schemas
Generated

Only the name can change. Articles keep their membership, because they reference the group by id.

Authentication

    • ApiKeyBearer http bearer

      An API key sent as Authorization: Bearer <key>. A key holds scopes, the same ones OAuth uses, and an operation needs the scope listed for it under OAuth2. A key may also expire, or be revoked or rotated in Settings > API, after which it is refused with a 401.

Path parameters

  • group_id string Required

    pattern ^[a-zA-Z0-9]{10}$

Request body Required

The fields to change.

application/json GroupRequest
  • name string Required
{
  "name": "string"
}

Generated from the schema

Responses

200

The updated permission group.

application/json GroupResponse
400

The request was rejected: a required field is missing from the body, or a value in it is not acceptable.

text/plain

The failure, as a human-readable message.

  • string

    The failure, as a human-readable message.

401

Authentication failed or no API key was supplied.

application/json Error

An error response.

  • code integer Required

    The HTTP status code.

  • err string Required

    A human-readable description of the failure.

402

The account’s billing is past due and writes are locked. Reads keep working; editing resumes once billing is settled.

application/json Error

An error response.

  • code integer Required

    The HTTP status code.

  • err string Required

    A human-readable description of the failure.

403

The key lacks write permission, or the account’s plan does not include API access.

application/json Error

An error response.

  • code integer Required

    The HTTP status code.

  • err string Required

    A human-readable description of the failure.

404

No such resource in this account, or group_id does not match the pattern this route accepts.

text/plain

The failure, as a human-readable message.

  • string

    The failure, as a human-readable message.

429

Rate limited. Wait the number of seconds in Retry-After before trying again. X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset say which allowance was spent and when it refills.

headers

  • Retry-After integer
  • X-RateLimit-Limit integer
  • X-RateLimit-Remaining integer
  • X-RateLimit-Reset integer
application/json Error

An error response.

  • code integer Required

    The HTTP status code.

  • err string Required

    A human-readable description of the failure.

All endpoints