Skip to contentSkip to navigationSkip to topbar
On this page

Delete Custom Field Definition



API Overview

api-overview page anchor

Custom Fields allow you to add extra information about your contacts to your contact database. With custom fields, you can create custom segments from your individual contacts or from your contact database that will dynamically update your content with the values for the individual contact receiving the email. Your custom fields are completely customizable to the use cases and user information that you need.

You can also manage your Custom Fields using the Custom Fields UI in the Marketing Campaigns App(link takes you to an external page). For more about creating Custom Fields, including a list of Reserved Fields, see our Custom Fields documentation.


DELETE/v3/marketing/field_definitions/{custom_field_id}

Base url: https://api.sendgrid.com (The Twilio SendGrid v3 API)

This endpoint deletes a defined Custom Field.

You can delete only Custom Fields; Reserved Fields cannot be deleted.


Authentication

authentication page anchor
Property nameTypeRequiredDescription
Authorizationstringrequired
Default: Bearer <<YOUR_API_KEY_HERE>>
Property nameTypeRequiredDescription
custom_field_idstringrequired
204404
No response body.
Delete Custom Field DefinitionLink to code sample: Delete Custom Field Definition
1
const client = require("@sendgrid/client");
2
client.setApiKey(process.env.SENDGRID_API_KEY);
3
4
const custom_field_id = "ZGkrHSypTsudrGkmdpJJ";
5
6
const request = {
7
url: `/v3/marketing/field_definitions/${custom_field_id}`,
8
method: "DELETE",
9
};
10
11
client
12
.request(request)
13
.then(([response, body]) => {
14
console.log(response.statusCode);
15
console.log(response.body);
16
})
17
.catch((error) => {
18
console.error(error);
19
});

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.