Skip to main content
PUT
/
v4
/
subscribers
/
{id}
Update a subscriber
curl --request PUT \
  --url https://api.kit.com/v4/subscribers/{id} \
  --header 'Content-Type: application/json' \
  --header 'X-Kit-Api-Key: <api-key>' \
  --data '
{
  "first_name": "Alice",
  "email_address": "alice@convertkit.dev",
  "fields": {
    "last_name": "Lamarr",
    "birthday": "Feb 17",
    "source": "landing page",
    "role": "Software developer",
    "company": "Convertkit",
    "postal_code": "83702",
    "website": "convertkit.com",
    "social_media": "https://www.linkedin.com/company/convertkit",
    "how_did_you_hear_about_us": "Social media",
    "interests": "Monetization",
    "coupon": ""
  }
}
'
require 'uri'
require 'net/http'

url = URI("https://api.kit.com/v4/subscribers/{id}")

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

request = Net::HTTP::Put.new(url)
request["X-Kit-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"Alice\",\n \"email_address\": \"alice@convertkit.dev\",\n \"fields\": {\n \"last_name\": \"Lamarr\",\n \"birthday\": \"Feb 17\",\n \"source\": \"landing page\",\n \"role\": \"Software developer\",\n \"company\": \"Convertkit\",\n \"postal_code\": \"83702\",\n \"website\": \"convertkit.com\",\n \"social_media\": \"https://www.linkedin.com/company/convertkit\",\n \"how_did_you_hear_about_us\": \"Social media\",\n \"interests\": \"Monetization\",\n \"coupon\": \"\"\n }\n}"

response = http.request(request)
puts response.read_body
const options = {
method: 'PUT',
headers: {'X-Kit-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: 'Alice',
email_address: 'alice@convertkit.dev',
fields: {
last_name: 'Lamarr',
birthday: 'Feb 17',
source: 'landing page',
role: 'Software developer',
company: 'Convertkit',
postal_code: '83702',
website: 'convertkit.com',
social_media: 'https://www.linkedin.com/company/convertkit',
how_did_you_hear_about_us: 'Social media',
interests: 'Monetization',
coupon: ''
}
})
};

fetch('https://api.kit.com/v4/subscribers/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main

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

func main() {

url := "https://api.kit.com/v4/subscribers/{id}"

payload := strings.NewReader("{\n \"first_name\": \"Alice\",\n \"email_address\": \"alice@convertkit.dev\",\n \"fields\": {\n \"last_name\": \"Lamarr\",\n \"birthday\": \"Feb 17\",\n \"source\": \"landing page\",\n \"role\": \"Software developer\",\n \"company\": \"Convertkit\",\n \"postal_code\": \"83702\",\n \"website\": \"convertkit.com\",\n \"social_media\": \"https://www.linkedin.com/company/convertkit\",\n \"how_did_you_hear_about_us\": \"Social media\",\n \"interests\": \"Monetization\",\n \"coupon\": \"\"\n }\n}")

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

req.Header.Add("X-Kit-Api-Key", "<api-key>")
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))

}
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kit.com/v4/subscribers/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'first_name' => 'Alice',
'email_address' => 'alice@convertkit.dev',
'fields' => [
'last_name' => 'Lamarr',
'birthday' => 'Feb 17',
'source' => 'landing page',
'role' => 'Software developer',
'company' => 'Convertkit',
'postal_code' => '83702',
'website' => 'convertkit.com',
'social_media' => 'https://www.linkedin.com/company/convertkit',
'how_did_you_hear_about_us' => 'Social media',
'interests' => 'Monetization',
'coupon' => ''
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Kit-Api-Key: <api-key>"
],
]);

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

curl_close($curl);

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

url = "https://api.kit.com/v4/subscribers/{id}"

payload = {
"first_name": "Alice",
"email_address": "alice@convertkit.dev",
"fields": {
"last_name": "Lamarr",
"birthday": "Feb 17",
"source": "landing page",
"role": "Software developer",
"company": "Convertkit",
"postal_code": "83702",
"website": "convertkit.com",
"social_media": "https://www.linkedin.com/company/convertkit",
"how_did_you_hear_about_us": "Social media",
"interests": "Monetization",
"coupon": ""
}
}
headers = {
"X-Kit-Api-Key": "<api-key>",
"Content-Type": "application/json"
}

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

print(response.text)
{
  "subscriber": {
    "id": 378,
    "first_name": "Alice",
    "email_address": "alice@convertkit.dev",
    "state": "active",
    "created_at": "2023-02-17T11:43:55Z",
    "fields": {
      "birthday": "Feb 17",
      "last_name": "Lamarr",
      "source": "landing page"
    }
  }
}
{
"subscriber": {
"id": 380,
"first_name": "Alice",
"email_address": "alice@convertkit.dev",
"state": "active",
"created_at": "2023-02-17T11:43:55Z",
"fields": {
"birthday": null,
"company": null,
"coupon": null,
"how_did_you_hear_about_us": null,
"interests": null,
"last_name": null,
"postal_code": null,
"role": null,
"social_media": null,
"source": null,
"website": null
}
}
}
{
"errors": [
"The access token is invalid"
]
}
{
"errors": [
"Not Found"
]
}
{
"errors": [
"Email address has already been taken"
]
}

Authorizations

X-Kit-Api-Key
string
header
required

Authenticate API requests via an API Key

Path Parameters

id
integer
required

Body

application/json
email_address
string
required
first_name
string | null
fields
object

Custom field values keyed by the custom field's key (e.g. last_name, not Last Name). Unknown keys are ignored and reported in the response warnings array.

Response

Updates the subscriber's email address and first name

subscriber
object
required
warnings
string[]

Present only when the request referenced custom field keys that don't exist on the account. Each entry names an unknown key that was ignored; the subscriber is still created or updated.