Assign subscribers

v1
post
/1/newsletters/{domain}/groups/{group}/subscribers/assign

Assign subscribers to a group.

Path parameters

domain
requiredinteger

Unique identifier of the Domain

Examples:48312
group
requiredinteger

Unique identifier of the Group

Examples:23129

Body Parameters

application/json
subscriber_idsrequiredarrayofinteger

Response Body

application/json
resultstring
Possible values:successerrorasynchronous

Result of the HTTP request

Examples:success
dataarrayofSubscriber

Example request

                <?php
use GuzzleHttp\Client;

$client = new Client();
$headers = [
	'Authorization' => 'Bearer YOUR-TOKEN-HERE',
	'Content-Type' => 'application/json'
];

$body = '{
    "subscriber_ids": [
        35938
    ]
}';

$request = new Request('POST', 'https://api.infomaniak.com/1/newsletters/{domain}/groups/{group}/subscribers/assign', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
            

Example response

application/json
                
                    
{
"result":"success",
"data":[
{
"id":17892,
"email":"hwaelchi@marks.com",
"status":"bounced",
"created_at":1743216131
}
]
}