Create a group
v1
post
/1/newsletters/{domain}/groups
Create a new group.
Path parameters
domain
requiredinteger
Unique identifier of the Domain
Examples:52467
Body Parameters
application/jsonnamerequiredstring
Name of the resource {name}
Examples:example
Response Body
application/json
resultrequiredstring
Possible values:successerrorasynchronous
Result of the HTTP request
Examples:success
dataGroup
Example request
<?php
use GuzzleHttp\Client;
$client = new Client();
$headers = [
'Authorization' => 'Bearer YOUR-TOKEN-HERE',
'Content-Type' => 'application/json'
];
$body = '{
"name": "example"
}';
$request = new Request('POST', 'https://api.infomaniak.com/1/newsletters/{domain}/groups', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
Example response
application/json
{"result":"success","data":{"id":89889,"name":"example","updated_at":1731441176}}