Delete a custom field
SDK platic.customFields.delete()
Remove a field you no longer need by sending its fieldId. Its values are also removed from all workspace contacts.
Warning
This operation removes the field's value across every contact in the workspace and cannot be reversed from the API.
Example
curl -X DELETE https://api.platic.ai/v1/custom-fields/$FIELD_ID \
-H "Authorization: Bearer $PLATIC_API_KEY" await platic.customFields.delete("plan"); If your credential covers several workspaces, add ?workspace=<id> to say which one you work in (list workspaces); without it the answer is 400. A single-workspace credential never needs it.
URL parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
fieldId | string | Unique identifier of the custom field | ✓ |
Response
{
"status": "success",
"message": "Custom field deleted successfully",
"data": {
"id": "membership_level",
"deleted": true,
"clientsUpdated": 142
}
} Response fields
| Field | Description |
|---|---|
data.id | Identifier of the deleted field |
data.deleted | Always true |
data.clientsUpdated | Number of contacts whose field value was removed |
Errors
| Status | details.code | When it happens |
|---|---|---|
400 | INVALID_REQUEST | Your credential covers several workspaces and you did not send ?workspace=, or you sent one it does not cover. details.available lists the ones you can use |
401 | UNAUTHENTICATED | The credential is missing or invalid |
403 | FORBIDDEN | The credential does not have the Contacts module (Missing contacts permission), or it is an OAuth token without the platica:write scope |
404 | CUSTOM_FIELD_NOT_FOUND | The field does not exist in the workspace or was already deleted |
{
"code": 404,
"error": "Not Found - The resource doesn't exist",
"details": {
"code": "CUSTOM_FIELD_NOT_FOUND",
"message": "Custom field membership_level not found in this workspace"
}
} The general error format is in Errors.