Skip to main content
POST
/
contacts
/
{id}
/
lists
Add a contact to lists
curl --request POST \
  --url https://api.sendkit.dev/contacts/{id}/lists \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "list_ids": [
    "550e8400-e29b-41d4-a716-446655440000",
    "660e8400-e29b-41d4-a716-446655440000"
  ]
}
'
import requests

url = "https://api.sendkit.dev/contacts/{id}/lists"

payload = { "list_ids": ["550e8400-e29b-41d4-a716-446655440000", "660e8400-e29b-41d4-a716-446655440000"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
list_ids: ['550e8400-e29b-41d4-a716-446655440000', '660e8400-e29b-41d4-a716-446655440000']
})
};

fetch('https://api.sendkit.dev/contacts/{id}/lists', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sendkit.dev/contacts/{id}/lists",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'list_ids' => [
'550e8400-e29b-41d4-a716-446655440000',
'660e8400-e29b-41d4-a716-446655440000'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

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

func main() {

url := "https://api.sendkit.dev/contacts/{id}/lists"

payload := strings.NewReader("{\n \"list_ids\": [\n \"550e8400-e29b-41d4-a716-446655440000\",\n \"660e8400-e29b-41d4-a716-446655440000\"\n ]\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(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.sendkit.dev/contacts/{id}/lists")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"list_ids\": [\n \"550e8400-e29b-41d4-a716-446655440000\",\n \"660e8400-e29b-41d4-a716-446655440000\"\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.sendkit.dev/contacts/{id}/lists")

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 \"list_ids\": [\n \"550e8400-e29b-41d4-a716-446655440000\",\n \"660e8400-e29b-41d4-a716-446655440000\"\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "email": "john@example.com",
  "first_name": "John",
  "last_name": "Doe",
  "user_id": "ext_123",
  "unsubscribed": false,
  "properties": {
    "COMPANY": "Acme",
    "PLAN": "pro"
  },
  "lists": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Newsletter",
      "created_at": "2026-03-03 10:00:00",
      "updated_at": "2026-03-03 10:00:00"
    }
  ],
  "created_at": "2026-03-03 10:00:00",
  "updated_at": "2026-03-03 10:00:00"
}
{
"message": "Invalid API key."
}
{
"message": "Not found."
}
{
"message": "The email field is required."
}

Authorizations

Authorization
string
header
required

API key from your SendKit dashboard. Pass it as a Bearer token in the Authorization header.

Path Parameters

id
string<uuid>
required

The contact ID.

Body

application/json
list_ids
string<uuid>[]
required

IDs of the lists to add the contact to.

Minimum array length: 1
Example:
[
"550e8400-e29b-41d4-a716-446655440000",
"660e8400-e29b-41d4-a716-446655440000"
]

Response

Contact added to lists successfully

id
string<uuid>

Unique identifier.

Example:

"550e8400-e29b-41d4-a716-446655440000"

email
string<email>

The contact's email address.

Example:

"john@example.com"

first_name
string | null

The contact's first name.

Example:

"John"

last_name
string | null

The contact's last name.

Example:

"Doe"

user_id
string | null

An external user identifier from your application.

Example:

"ext_123"

unsubscribed
boolean

Whether the contact has unsubscribed.

Example:

false

properties
object

Custom property values. Keys are uppercased property names.

Example:
{ "COMPANY": "Acme", "PLAN": "pro" }
lists
object[]

Lists this contact belongs to.

created_at
string<date-time>

When the contact was created.

Example:

"2026-03-03 10:00:00"

updated_at
string<date-time>

When the contact was last updated.

Example:

"2026-03-03 10:00:00"