Contact Properties
Create Contact Property
Create a new contact property to store additional contact attributes using the AutoSend API.
POST
/
contact-properties
curl --request POST \
--url https://api.autosend.com/v1/contact-properties \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "company",
"type": "string"
}'
import requests
url = "https://api.autosend.com/v1/contact-properties"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
payload = {
"name": "company",
"type": "string"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const response = await fetch("https://api.autosend.com/v1/contact-properties", {
method: "POST",
headers: {
Authorization: "Bearer <token>",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "company",
type: "string",
}),
});
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.autosend.com/v1/contact-properties",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode([
"name" => "company",
"type" => "string",
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"io/ioutil"
)
func main() {
payload, _ := json.Marshal(map[string]string{
"name": "company",
"type": "string",
})
req, _ := http.NewRequest("POST", "https://api.autosend.com/v1/contact-properties", bytes.NewBuffer(payload))
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
String body = """
{
"name": "company",
"type": "string"
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.autosend.com/v1/contact-properties"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
require "net/http"
require "uri"
require "json"
uri = URI.parse("https://api.autosend.com/v1/contact-properties")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
name: "company",
type: "string"
})
response = http.request(request)
puts response.body
{
"success": true,
"message": "Contact property created successfully",
"data": {
"id": "6960953e729f65f154369408",
"name": "company",
"type": "string",
"fieldName": "company",
"fieldType": "string",
"createdAt": "2026-01-09T05:42:22.171Z",
"updatedAt": "2026-01-09T05:42:22.171Z"
}
}
curl --request POST \
--url https://api.autosend.com/v1/contact-properties \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "company",
"type": "string"
}'
import requests
url = "https://api.autosend.com/v1/contact-properties"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
payload = {
"name": "company",
"type": "string"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const response = await fetch("https://api.autosend.com/v1/contact-properties", {
method: "POST",
headers: {
Authorization: "Bearer <token>",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "company",
type: "string",
}),
});
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.autosend.com/v1/contact-properties",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode([
"name" => "company",
"type" => "string",
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"io/ioutil"
)
func main() {
payload, _ := json.Marshal(map[string]string{
"name": "company",
"type": "string",
})
req, _ := http.NewRequest("POST", "https://api.autosend.com/v1/contact-properties", bytes.NewBuffer(payload))
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
String body = """
{
"name": "company",
"type": "string"
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.autosend.com/v1/contact-properties"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
require "net/http"
require "uri"
require "json"
uri = URI.parse("https://api.autosend.com/v1/contact-properties")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
name: "company",
type: "string"
})
response = http.request(request)
puts response.body
{
"success": true,
"message": "Contact property created successfully",
"data": {
"id": "6960953e729f65f154369408",
"name": "company",
"type": "string",
"fieldName": "company",
"fieldType": "string",
"createdAt": "2026-01-09T05:42:22.171Z",
"updatedAt": "2026-01-09T05:42:22.171Z"
}
}
Authorizations
string | header
required
Bearer authentication header of the form Bearer
<token>, where <token> is your auth token.Body Parameters
string
required
The programmatic name for the contact property. Must be unique within the project. Cannot be one of the reserved names:
firstName, first_name, lastName, last_name, email, mobile, unsubscribed, unsubscribe, unsubscribe_groups, unsubscribe_preferences, userId, externalId, createdAt, updatedAt, contactLists, address, address_line_1, address_line_2, city, state, zip, country.The legacy fieldName parameter is still accepted as an alias for name.string
required
The data type of the contact property. Must be one of:
string, number, boolean, date.The legacy fieldType parameter is still accepted as an alias for type.string
A human-readable description of what the property represents.
string
A fallback value used when a contact does not have an explicit value for this property.
Response
Contact property created successfullyboolean
Indicates whether the request was successful.
string
Confirmation message.Example:
"Contact property created successfully"object
The created contact property.
Show data
Show data
string
Unique identifier of the contact property.
string
The programmatic name of the contact property.
string
The data type:
string, number, boolean, or date.string
Legacy alias of
name, returned for backward compatibility.string
Legacy alias of
type, returned for backward compatibility.string
ISO 8601 timestamp when the property was created.
string
ISO 8601 timestamp when the property was last updated.
Was this page helpful?
⌘I
curl --request POST \
--url https://api.autosend.com/v1/contact-properties \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "company",
"type": "string"
}'
import requests
url = "https://api.autosend.com/v1/contact-properties"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
payload = {
"name": "company",
"type": "string"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const response = await fetch("https://api.autosend.com/v1/contact-properties", {
method: "POST",
headers: {
Authorization: "Bearer <token>",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "company",
type: "string",
}),
});
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.autosend.com/v1/contact-properties",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode([
"name" => "company",
"type" => "string",
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"io/ioutil"
)
func main() {
payload, _ := json.Marshal(map[string]string{
"name": "company",
"type": "string",
})
req, _ := http.NewRequest("POST", "https://api.autosend.com/v1/contact-properties", bytes.NewBuffer(payload))
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
String body = """
{
"name": "company",
"type": "string"
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.autosend.com/v1/contact-properties"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
require "net/http"
require "uri"
require "json"
uri = URI.parse("https://api.autosend.com/v1/contact-properties")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
name: "company",
type: "string"
})
response = http.request(request)
puts response.body
{
"success": true,
"message": "Contact property created successfully",
"data": {
"id": "6960953e729f65f154369408",
"name": "company",
"type": "string",
"fieldName": "company",
"fieldType": "string",
"createdAt": "2026-01-09T05:42:22.171Z",
"updatedAt": "2026-01-09T05:42:22.171Z"
}
}