Create a contact
curl --request POST \
--url https://api.kajabi.com/v1/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"type": "<string>",
"attributes": {
"name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"business_number": "<string>",
"subscribed": true,
"address_line_1": "<string>",
"address_line_2": "<string>",
"address_city": "<string>",
"address_state": "<string>",
"address_country": "<string>",
"external_user_id": "<string>",
"address_zip": "<string>",
"custom_1": "<string>",
"custom_2": "<string>",
"custom_3": "<string>"
},
"relationships": {
"site": {}
}
}
}
'import requests
url = "https://api.kajabi.com/v1/contacts"
payload = { "data": {
"type": "<string>",
"attributes": {
"name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"business_number": "<string>",
"subscribed": True,
"address_line_1": "<string>",
"address_line_2": "<string>",
"address_city": "<string>",
"address_state": "<string>",
"address_country": "<string>",
"external_user_id": "<string>",
"address_zip": "<string>",
"custom_1": "<string>",
"custom_2": "<string>",
"custom_3": "<string>"
},
"relationships": { "site": {} }
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.api+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({
data: {
type: '<string>',
attributes: {
name: '<string>',
email: '<string>',
phone_number: '<string>',
business_number: '<string>',
subscribed: true,
address_line_1: '<string>',
address_line_2: '<string>',
address_city: '<string>',
address_state: '<string>',
address_country: '<string>',
external_user_id: '<string>',
address_zip: '<string>',
custom_1: '<string>',
custom_2: '<string>',
custom_3: '<string>'
},
relationships: {site: {}}
}
})
};
fetch('https://api.kajabi.com/v1/contacts', 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.kajabi.com/v1/contacts",
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([
'data' => [
'type' => '<string>',
'attributes' => [
'name' => '<string>',
'email' => '<string>',
'phone_number' => '<string>',
'business_number' => '<string>',
'subscribed' => true,
'address_line_1' => '<string>',
'address_line_2' => '<string>',
'address_city' => '<string>',
'address_state' => '<string>',
'address_country' => '<string>',
'external_user_id' => '<string>',
'address_zip' => '<string>',
'custom_1' => '<string>',
'custom_2' => '<string>',
'custom_3' => '<string>'
],
'relationships' => [
'site' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/vnd.api+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.kajabi.com/v1/contacts"
payload := strings.NewReader("{\n \"data\": {\n \"type\": \"<string>\",\n \"attributes\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"business_number\": \"<string>\",\n \"subscribed\": true,\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"address_city\": \"<string>\",\n \"address_state\": \"<string>\",\n \"address_country\": \"<string>\",\n \"external_user_id\": \"<string>\",\n \"address_zip\": \"<string>\",\n \"custom_1\": \"<string>\",\n \"custom_2\": \"<string>\",\n \"custom_3\": \"<string>\"\n },\n \"relationships\": {\n \"site\": {}\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/vnd.api+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.kajabi.com/v1/contacts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": {\n \"type\": \"<string>\",\n \"attributes\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"business_number\": \"<string>\",\n \"subscribed\": true,\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"address_city\": \"<string>\",\n \"address_state\": \"<string>\",\n \"address_country\": \"<string>\",\n \"external_user_id\": \"<string>\",\n \"address_zip\": \"<string>\",\n \"custom_1\": \"<string>\",\n \"custom_2\": \"<string>\",\n \"custom_3\": \"<string>\"\n },\n \"relationships\": {\n \"site\": {}\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kajabi.com/v1/contacts")
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/vnd.api+json'
request.body = "{\n \"data\": {\n \"type\": \"<string>\",\n \"attributes\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"business_number\": \"<string>\",\n \"subscribed\": true,\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"address_city\": \"<string>\",\n \"address_state\": \"<string>\",\n \"address_country\": \"<string>\",\n \"external_user_id\": \"<string>\",\n \"address_zip\": \"<string>\",\n \"custom_1\": \"<string>\",\n \"custom_2\": \"<string>\",\n \"custom_3\": \"<string>\"\n },\n \"relationships\": {\n \"site\": {}\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"type": "<string>",
"attributes": {
"name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"business_number": "<string>",
"subscribed": true,
"address_line_1": "<string>",
"address_line_2": "<string>",
"address_city": "<string>",
"address_state": "<string>",
"address_country": "<string>",
"external_user_id": "<string>",
"address_zip": "<string>",
"custom_1": "<string>",
"custom_2": "<string>",
"custom_3": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"relationships": {
"customer": {
"data": {
"id": "<string>",
"type": "<string>"
}
},
"offers": {
"data": [
{
"id": "<string>",
"type": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"site": {
"data": {
"id": "<string>",
"type": "<string>"
}
},
"tags": {
"data": [
{
"id": "<string>",
"type": "<string>"
}
]
}
},
"links": {
"customer": "<string>"
}
},
"links": {
"self": "<string>",
"current": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"source": {
"pointer": "<string>"
},
"title": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"status": "<string>",
"source": {
"pointer": "<string>"
},
"title": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"status": "<string>",
"source": {
"pointer": "<string>"
},
"title": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"status": "<string>",
"source": {
"pointer": "<string>"
},
"title": "<string>",
"detail": "<string>"
}
]
}Contacts
Create a contact
Create a contact for a site.
Contact attributes
- New contact does not support
external_user_idattribute. - See custom_fields endpoint to discover attributes for using custom fields attributes.
Create a contact
Request body must include a site relationship.
Example request body:
{
"data": {
"type": "contacts",
"attributes": {
"name": "John Doe",
"email": "john.doe@example.com"
},
"relationships": {
"site": {
"data": {
"type": "sites",
"id": "123"
}
}
}
}
}
Response will include the newly created contact resource.
{
"data": {
"id": "456",
"type": "contacts",
"attributes": {
"name": "John Doe",
"email": "john.doe@example.com",
"address_line_1": null,
"address_line_2": null,
"address_city": null,
"address_country": null,
"address_state": null,
"address_zip": null,
"phone_number": null,
"business_number": null,
"subscribed": false,
"external_user_id": null,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
},
"relationships": {
"site": {
"data": {
"id": "123",
"type": "sites"
}
}
}
}
}
POST
/
v1
/
contacts
Create a contact
curl --request POST \
--url https://api.kajabi.com/v1/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"type": "<string>",
"attributes": {
"name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"business_number": "<string>",
"subscribed": true,
"address_line_1": "<string>",
"address_line_2": "<string>",
"address_city": "<string>",
"address_state": "<string>",
"address_country": "<string>",
"external_user_id": "<string>",
"address_zip": "<string>",
"custom_1": "<string>",
"custom_2": "<string>",
"custom_3": "<string>"
},
"relationships": {
"site": {}
}
}
}
'import requests
url = "https://api.kajabi.com/v1/contacts"
payload = { "data": {
"type": "<string>",
"attributes": {
"name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"business_number": "<string>",
"subscribed": True,
"address_line_1": "<string>",
"address_line_2": "<string>",
"address_city": "<string>",
"address_state": "<string>",
"address_country": "<string>",
"external_user_id": "<string>",
"address_zip": "<string>",
"custom_1": "<string>",
"custom_2": "<string>",
"custom_3": "<string>"
},
"relationships": { "site": {} }
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.api+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({
data: {
type: '<string>',
attributes: {
name: '<string>',
email: '<string>',
phone_number: '<string>',
business_number: '<string>',
subscribed: true,
address_line_1: '<string>',
address_line_2: '<string>',
address_city: '<string>',
address_state: '<string>',
address_country: '<string>',
external_user_id: '<string>',
address_zip: '<string>',
custom_1: '<string>',
custom_2: '<string>',
custom_3: '<string>'
},
relationships: {site: {}}
}
})
};
fetch('https://api.kajabi.com/v1/contacts', 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.kajabi.com/v1/contacts",
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([
'data' => [
'type' => '<string>',
'attributes' => [
'name' => '<string>',
'email' => '<string>',
'phone_number' => '<string>',
'business_number' => '<string>',
'subscribed' => true,
'address_line_1' => '<string>',
'address_line_2' => '<string>',
'address_city' => '<string>',
'address_state' => '<string>',
'address_country' => '<string>',
'external_user_id' => '<string>',
'address_zip' => '<string>',
'custom_1' => '<string>',
'custom_2' => '<string>',
'custom_3' => '<string>'
],
'relationships' => [
'site' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/vnd.api+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.kajabi.com/v1/contacts"
payload := strings.NewReader("{\n \"data\": {\n \"type\": \"<string>\",\n \"attributes\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"business_number\": \"<string>\",\n \"subscribed\": true,\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"address_city\": \"<string>\",\n \"address_state\": \"<string>\",\n \"address_country\": \"<string>\",\n \"external_user_id\": \"<string>\",\n \"address_zip\": \"<string>\",\n \"custom_1\": \"<string>\",\n \"custom_2\": \"<string>\",\n \"custom_3\": \"<string>\"\n },\n \"relationships\": {\n \"site\": {}\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/vnd.api+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.kajabi.com/v1/contacts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": {\n \"type\": \"<string>\",\n \"attributes\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"business_number\": \"<string>\",\n \"subscribed\": true,\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"address_city\": \"<string>\",\n \"address_state\": \"<string>\",\n \"address_country\": \"<string>\",\n \"external_user_id\": \"<string>\",\n \"address_zip\": \"<string>\",\n \"custom_1\": \"<string>\",\n \"custom_2\": \"<string>\",\n \"custom_3\": \"<string>\"\n },\n \"relationships\": {\n \"site\": {}\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kajabi.com/v1/contacts")
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/vnd.api+json'
request.body = "{\n \"data\": {\n \"type\": \"<string>\",\n \"attributes\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"business_number\": \"<string>\",\n \"subscribed\": true,\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"address_city\": \"<string>\",\n \"address_state\": \"<string>\",\n \"address_country\": \"<string>\",\n \"external_user_id\": \"<string>\",\n \"address_zip\": \"<string>\",\n \"custom_1\": \"<string>\",\n \"custom_2\": \"<string>\",\n \"custom_3\": \"<string>\"\n },\n \"relationships\": {\n \"site\": {}\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"type": "<string>",
"attributes": {
"name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"business_number": "<string>",
"subscribed": true,
"address_line_1": "<string>",
"address_line_2": "<string>",
"address_city": "<string>",
"address_state": "<string>",
"address_country": "<string>",
"external_user_id": "<string>",
"address_zip": "<string>",
"custom_1": "<string>",
"custom_2": "<string>",
"custom_3": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"relationships": {
"customer": {
"data": {
"id": "<string>",
"type": "<string>"
}
},
"offers": {
"data": [
{
"id": "<string>",
"type": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"site": {
"data": {
"id": "<string>",
"type": "<string>"
}
},
"tags": {
"data": [
{
"id": "<string>",
"type": "<string>"
}
]
}
},
"links": {
"customer": "<string>"
}
},
"links": {
"self": "<string>",
"current": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"source": {
"pointer": "<string>"
},
"title": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"status": "<string>",
"source": {
"pointer": "<string>"
},
"title": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"status": "<string>",
"source": {
"pointer": "<string>"
},
"title": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"status": "<string>",
"source": {
"pointer": "<string>"
},
"title": "<string>",
"detail": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/vnd.api+json
Show child attributes
Show child attributes
Was this page helpful?
⌘I