# POST /campaigns/send-to-individual — Send Campaign to Individual

> Product: **Pabbly Email Marketing** (v2)
> Base URL: `https://emails.pabbly.com/api/v2`
> Auth: Bearer via `Authorization` header
> Canonical: `/email-marketing/campaigns/send-campaign-to-individual`

The token must be included in the Authorization header as a Bearer token. The campaign must exist and belong to your business. Sends a campaign to one or more individual email addresses using the campaign's template. This endpoint allows you to send personalized emails to specific recipients without requiring them to be in a subscriber list. The campaign template content is used, but you can optionally override the subject line. Emails are queued for sending asynchronously. Only campaigns with status "live" can be sent. All specified email addresses must be in a valid format.

**Body parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| campaignId | string | No |  |
| emails | array | No |  |
| deliveryServerId | string | No |  |
| senderEmail | string | No |  |
| fromName | string | No |  |
| subject | string | No |  |

**Example request body:**

```json
{
    "campaignId": "507f1f77bcf86cd799439011",
    "emails": ["user1@example.com", "user2@example.com"],
    "deliveryServerId": "server123",
    "senderEmail": "noreply@example.com",
    "fromName": "John Doe",
    "subject": "Custom Subject Line"
}
```

**Response (200)** — Campaign Send to Individual:

```json
{
    "success": true,
    "status": "success",
    "message": "All emails queued successfully",
    "data": {
        "campaignId": "693a741cb1dd9aa1a3c770eb",
        "campaignName": "Sarah Mcgowan",
        "totalEmails": 1,
        "queued": 1,
        "message": "1 email(s) queued for sending"
    }
}
```

**Code examples:**

_cURL_

```curl
curl -X POST https://emails.pabbly.com/api/v2/campaigns/send-to-individual \
  -H "Authorization: Bearer {{YOUR_API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{
    "campaignId": "507f1f77bcf86cd799439011",
    "emails": [
      "user1@example.com",
      "user2@example.com"
    ],
    "deliveryServerId": "server123",
    "senderEmail": "noreply@example.com",
    "fromName": "John Doe",
    "subject": "Custom Subject Line"
  }'
```

_Ruby_

```ruby
require 'net/http'
require 'json'

uri = URI('https://emails.pabbly.com/api/v2/campaigns/send-to-individual')
request = Net::HTTP::Post.new(uri)
request['Authorization'] = 'Bearer {{YOUR_API_KEY}}'
request['Content-Type'] = 'application/json'
request.body = "{\"campaignId\":\"507f1f77bcf86cd799439011\",\"emails\":[\"user1@example.com\",\"user2@example.com\"],\"deliveryServerId\":\"server123\",\"senderEmail\":\"noreply@example.com\",\"fromName\":\"John Doe\",\"subject\":\"Custom Subject Line\"}"

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

data = JSON.parse(response.body)
```

_Python_

```python
import requests

response = requests.post(
    'https://emails.pabbly.com/api/v2/campaigns/send-to-individual',
    headers={'Authorization': 'Bearer {{YOUR_API_KEY}}'},
    json={
    'campaignId': '507f1f77bcf86cd799439011',
    'emails': [
        'user1@example.com',
        'user2@example.com'
    ],
    'deliveryServerId': 'server123',
    'senderEmail': 'noreply@example.com',
    'fromName': 'John Doe',
    'subject': 'Custom Subject Line'
},
)

data = response.json()
```

_PHP_

```php
<?php
$ch = curl_init('https://emails.pabbly.com/api/v2/campaigns/send-to-individual');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer {{YOUR_API_KEY}}', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"campaignId":"507f1f77bcf86cd799439011","emails":["user1@example.com","user2@example.com"],"deliveryServerId":"server123","senderEmail":"noreply@example.com","fromName":"John Doe","subject":"Custom Subject Line"}');

$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
```

_Java_

```java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder()
    .uri(URI.create("https://emails.pabbly.com/api/v2/campaigns/send-to-individual"))
    .header("Authorization", "Bearer {{YOUR_API_KEY}}")
    .header("Content-Type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\"campaignId\":\"507f1f77bcf86cd799439011\",\"emails\":[\"user1@example.com\",\"user2@example.com\"],\"deliveryServerId\":\"server123\",\"senderEmail\":\"noreply@example.com\",\"fromName\":\"John Doe\",\"subject\":\"Custom Subject Line\"}"));

HttpRequest request = builder.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

_Node.js_

```node
const response = await fetch('https://emails.pabbly.com/api/v2/campaigns/send-to-individual', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer {{YOUR_API_KEY}}',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "campaignId": "507f1f77bcf86cd799439011",
    "emails": [
      "user1@example.com",
      "user2@example.com"
    ],
    "deliveryServerId": "server123",
    "senderEmail": "noreply@example.com",
    "fromName": "John Doe",
    "subject": "Custom Subject Line"
  }),
});

const data = await response.json();
```

_Go_

```go
package main

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

func main() {
    payload := strings.NewReader("{\"campaignId\":\"507f1f77bcf86cd799439011\",\"emails\":[\"user1@example.com\",\"user2@example.com\"],\"deliveryServerId\":\"server123\",\"senderEmail\":\"noreply@example.com\",\"fromName\":\"John Doe\",\"subject\":\"Custom Subject Line\"}")
    req, _ := http.NewRequest("POST", "https://emails.pabbly.com/api/v2/campaigns/send-to-individual", payload)
    req.Header.Set("Content-Type", "application/json")
    req.Header.Set("Authorization", "Bearer {{YOUR_API_KEY}}")

    res, _ := http.DefaultClient.Do(req)
    defer res.Body.Close()
    body, _ := io.ReadAll(res.Body)
    fmt.Println(string(body))
}
```

_.NET_

```dotnet
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://emails.pabbly.com/api/v2/campaigns/send-to-individual");
request.Headers.TryAddWithoutValidation("Authorization", "Bearer {{YOUR_API_KEY}}");
request.Content = new StringContent("{\"campaignId\":\"507f1f77bcf86cd799439011\",\"emails\":[\"user1@example.com\",\"user2@example.com\"],\"deliveryServerId\":\"server123\",\"senderEmail\":\"noreply@example.com\",\"fromName\":\"John Doe\",\"subject\":\"Custom Subject Line\"}");
request.Content.Headers.ContentType = new MediaTypeHeaderValue("application/json");

var response = await client.SendAsync(request);
var data = await response.Content.ReadAsStringAsync();
Console.WriteLine(data);
```

---

**Other endpoints in Campaigns:**

- [POST /campaigns — Create Campaign](/email-marketing/campaigns/create-campaign)
- [GET /campaigns — Get All Campaigns](/email-marketing/campaigns/get-all-campaigns)
- [GET /campaigns/{Campaign ID} — Get Campaign by ID](/email-marketing/campaigns/get-campaign-by-id)
- [POST /campaigns/send-to-list — Send Campaign to Lists](/email-marketing/campaigns/send-campaign-to-lists)

