Skip to main content
PATCH
/
v2
/
fields
/
{id}
curl --location --request PATCH 'https://api.audienceful.com/v2/fields/o4i4TNZnWsq2f2ZWVqNNWY' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <your-api-key>' \
--data-raw '{
    "name": "Subscription Plan"
}'
import requests

url = "https://api.audienceful.com/v2/fields/o4i4TNZnWsq2f2ZWVqNNWY"
headers = {
    "Content-Type": "application/json",
    "X-Api-Key": "<your-api-key>",
}
payload = {
    "name": "Subscription Plan",
}

response = requests.patch(url, headers=headers, json=payload)
print(response.json())
const response = await fetch("https://api.audienceful.com/v2/fields/o4i4TNZnWsq2f2ZWVqNNWY", {
  method: "PATCH",
  headers: {
    "Content-Type": "application/json",
    "X-Api-Key": "<your-api-key>",
  },
  body: JSON.stringify({
    "name": "Subscription Plan"
  }),
});
const data = await response.json();
console.log(data);
{
  "id": "o4i4TNZnWsq2f2ZWVqNNWY",
  "name": "Subscription Plan",
  "data_name": "plan",
  "type": "string",
  "editable": true,
  "internal": false,
  "required": false
}
Requires the fields:write scope. Send only the fields you want to change.

Path parameters

id
string
required
The id of the field to update.

Body

name
string
A new human-readable field name.
data_name
string
A new key for setting and reading this field’s value. Must remain unique within the workspace.
type
string
The data type of the field (string, boolean, tag, number).
required
boolean
Whether a value for this field is required.
The internal flag is system-managed and read-only — it cannot be changed via the API.

Response

Returns the updated field.
id
string
The id of the field. Used to address the field in the retrieve, update, and delete endpoints.
name
string
The human-readable name of the field.
data_name
string
The key used to set and read this field's value on a contact (in extra_data).
type
string
The type of data stored in the field. One of string, boolean, number, tag, datetime, or phone.
editable
boolean
Whether the field can be edited. Default fields such as email or tags are not editable.
internal
boolean
Whether the field is a built-in, internally managed field.
required
boolean
Whether a value for this field is required.
curl --location --request PATCH 'https://api.audienceful.com/v2/fields/o4i4TNZnWsq2f2ZWVqNNWY' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <your-api-key>' \
--data-raw '{
    "name": "Subscription Plan"
}'
import requests

url = "https://api.audienceful.com/v2/fields/o4i4TNZnWsq2f2ZWVqNNWY"
headers = {
    "Content-Type": "application/json",
    "X-Api-Key": "<your-api-key>",
}
payload = {
    "name": "Subscription Plan",
}

response = requests.patch(url, headers=headers, json=payload)
print(response.json())
const response = await fetch("https://api.audienceful.com/v2/fields/o4i4TNZnWsq2f2ZWVqNNWY", {
  method: "PATCH",
  headers: {
    "Content-Type": "application/json",
    "X-Api-Key": "<your-api-key>",
  },
  body: JSON.stringify({
    "name": "Subscription Plan"
  }),
});
const data = await response.json();
console.log(data);
{
  "id": "o4i4TNZnWsq2f2ZWVqNNWY",
  "name": "Subscription Plan",
  "data_name": "plan",
  "type": "string",
  "editable": true,
  "internal": false,
  "required": false
}