# Send a campaign

# HTTP method: POST

https://api.sender.net/v2/campaigns/{id}/send

Starts sending the campaign.

id string required

The campaign id you want to send.

Code snippets

const url = new URL(
    "https://api.sender.net/v2/campaigns/{id}/send"
);

let headers = {
    "Authorization": "Bearer [your-token]",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.sender.net/v2/campaigns/{id}/send',
    [
        'headers' => [
            'Authorization' => 'Bearer [your-token]',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody()->getContents();
$data = json_decode($body, true);
import requests
import json

url = "https://api.sender.net/v2/campaigns/{id}/send"

headers = {
    "Authorization": "Bearer [your-token]",
    "Content-Type": "application/json",
    "Accept": "application/json",
}

response = requests.request('POST', url, headers=headers)
response.json()
curl -X POST \
"https://api.sender.net/v2/campaigns/{id}/send" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Response example

{
  "success": true,
  "message": "Campaign started to send"
}