> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.beehiiv.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.beehiiv.com/_mcp/server.

# Create newsletter list subscriber import <Badge intent="info" minimal outlined>OAuth Scope: newsletter_lists:write</Badge>

POST https://api.beehiiv.com/v2/publications/{publicationId}/newsletter_lists/{newsletterListId}/subscriptions/import
Content-Type: application/json

Add a publication's existing subscribers to a newsletter list in the background. With no body, every active subscriber is added. Pass `custom_field_id` to add only subscribers whose boolean custom field is `true`, or `tag` to add only subscribers with that tag. Subscribers already on the list are skipped, and only one import can run per list at a time. Poll [Get newsletter list subscriber import](/api-reference/newsletter-list-subscriptions/get-import) to follow its progress.

Reference: https://developers.beehiiv.com/api-reference/newsletter-list-subscriptions/create-import

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `publicationId` (string, required) — The prefixed ID of the publication object
- `newsletterListId` (string, required) — The prefixed ID of the newsletter list object

### Body (application/json)

This endpoint expects an object.

- `custom_field_id` (string, optional) — The ID of a boolean custom field. Only subscribers with this field set to `true` are added. Cannot be combined with `tag`.
- `tag` (string, optional) — The name of a subscriber tag. Only subscribers with this tag are added. Cannot be combined with `custom_field_id`.

## Response

### 202

Accepted

- `data` (NewsletterListSubscriberImportInfo, required)

## Errors

### 400 Bad Request Error

Bad Request

- `status` (integer, required)
- `statusText` (string, required)
- `errors` (list of ErrorDetail, required)

### 401 Unauthorized Error

Unauthorized. The API key or OAuth access token is missing, invalid, or expired.

- `status` (integer, required)
- `statusText` (string, required)
- `errors` (list of ErrorDetail, required)

### 404 Not Found Error

Resource Not Found

- `status` (integer, required)
- `statusText` (string, required)
- `errors` (list of ErrorDetail, required)

### 422 Unprocessable Entity Error

Unprocessable Entity

- `status` (integer, required)
- `statusText` (string, required)
- `errors` (list of ErrorDetail, required)

### 429 Too Many Requests Error

Rate Limit Exceeded

- `status` (integer, required)
- `statusText` (string, required)
- `errors` (list of ErrorDetail, required)

### 500 Internal Server Error

Internal Server Error

- `status` (integer, required)
- `statusText` (string, required)
- `errors` (list of ErrorDetail, required)

## Types

### NewsletterListSubscriberImportInfo

- `newsletter_list_id` (string, required) — The prefixed ID of the newsletter list.
- `status` (enum, required) — The status of the import.
  - Allowed values: `processing`, `completed`, `failed`
- `total` (integer, required) — The number of subscribers queued for import. This is `0` until every matching subscriber has been queued.
- `processed` (integer, required) — The number of subscribers added to the list so far.
- `failed` (integer, required) — The number of subscribers that could not be added to the list.
- `progress_percentage` (double, required) — The percentage of queued subscribers that have been processed or failed.
- `error_message` (string, optional) — The reason the import failed, when `status` is `failed`.

### ErrorDetail

- `message` (string, required)
- `code` (string, required)

## Examples

**Request**

```json
{
  "tag": "weekly-readers"
}
```

**Response**

```json
{
  "data": {
    "newsletter_list_id": "nl_list_00000000-0000-0000-0000-000000000000",
    "status": "processing",
    "total": 2500,
    "processed": 1000,
    "failed": 0,
    "progress_percentage": 40,
    "error_message": null
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/newsletter_lists/nl_list_00000000-0000-0000-0000-000000000000/subscriptions/import"

payload = { "tag": "weekly-readers" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/newsletter_lists/nl_list_00000000-0000-0000-0000-000000000000/subscriptions/import';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"tag":"weekly-readers"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

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

func main() {

	url := "https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/newsletter_lists/nl_list_00000000-0000-0000-0000-000000000000/subscriptions/import"

	payload := strings.NewReader("{\n  \"tag\": \"weekly-readers\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/newsletter_lists/nl_list_00000000-0000-0000-0000-000000000000/subscriptions/import")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"tag\": \"weekly-readers\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/newsletter_lists/nl_list_00000000-0000-0000-0000-000000000000/subscriptions/import")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"tag\": \"weekly-readers\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/newsletter_lists/nl_list_00000000-0000-0000-0000-000000000000/subscriptions/import', [
  'body' => '{
  "tag": "weekly-readers"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/newsletter_lists/nl_list_00000000-0000-0000-0000-000000000000/subscriptions/import");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"tag\": \"weekly-readers\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["tag": "weekly-readers"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/newsletter_lists/nl_list_00000000-0000-0000-0000-000000000000/subscriptions/import")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```