Rename group
Changes group name.
Endpoint
Section titled “Endpoint”HTTP method: PATCH
https://api.sender.net/v2/groups/{id}
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
id | string required | Group ID |
title | string | Provide a different name for this group |
Request Examples
Section titled “Request Examples”const url = new URL("https://api.sender.net/v2/groups/{id}");
let headers = { "Authorization": "Bearer [your-token]", "Content-Type": "application/json", "Accept": "application/json",};
let bodyContent = { "title": "My Renamed Group"};
fetch(url, { method: "PATCH", headers, body: JSON.stringify(bodyContent)}).then(response => response.json()).then(data => console.log(data)).catch(error => console.error('Error:', error));$client = new \GuzzleHttp\Client();
$json = [ "title" => "My Renamed Group"];
$response = $client->patch( 'https://api.sender.net/v2/groups/{id}', [ 'headers' => [ 'Authorization' => 'Bearer [your-token]', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => $json ]);
$body = $response->getBody()->getContents();$data = json_decode($body, true);print_r($data);import requestsimport json
url = "https://api.sender.net/v2/groups/{id}"
headers = { "Authorization": "Bearer [your-token]", "Content-Type": "application/json", "Accept": "application/json",}
payload = { "title": "My Renamed Group"}
response = requests.request('PATCH', url, headers=headers, json=payload)
print(response.json())curl -X PATCH \"https://api.sender.net/v2/groups/{id}" \-H "Authorization: Bearer [your-token]" \-H "Content-Type: application/json" \-H "Accept: application/json" \-d '{"title":"My Renamed Group"}'Response
Section titled “Response”{ "success": true, "message": "Group updated!"}