Skip to content

Rename a field

Allows renaming a field and showing or hiding it in the subscribers section. Changing field type is not allowed.

HTTP method: PATCH

https://api.sender.net/v2/fields/{id}


ParameterTypeDescription
idstring requiredField ID
titlestringThe new field title
showbooleanTrue or false. It will display as an active filter field in the subscribers dashboard

const url = new URL("https://api.sender.net/v2/fields/{id}");
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
let bodyContent = {
"title": "Changing title",
"show": true
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(bodyContent)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Example Response
{
"success": true,
"message": "Field successfully updated"
}