Set custom field values for an entity
Bulk set or update custom field values for a specific entity. Keys in the `fields` object are field slugs; values must match the corresponding field definition's type. Existing values for provided slugs are overwritten. Values for omitted slugs are left unchanged.
Authorization
apiKey API key from your nodestash dashboard. Pass as a Bearer token in the Authorization header.
In: header
Path Parameters
The plural entity type whose custom field values to access.
"contacts" | "companies" | "deals" | "activities"The ID of the entity to get/set custom field values for.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X PUT "https://api.nodestash.io/v1/contacts/ct_5hJ3kM9pQrVwXyZaB2cD4/custom-fields" \ -H "Content-Type: application/json" \ -d '{ "fields": { "plan": "enterprise", "region": "us-west" } }'{
"data": [
{
"id": "cfv_5hJ3kM9pQrVwXyZaB2cD4",
"type": "custom_field_value",
"attributes": {
"id": "cfv_5hJ3kM9pQrVwXyZaB2cD4",
"field_definition_id": "cf_5hJ3kM9pQrVwXyZaB2cD4",
"slug": "plan",
"name": "Plan",
"field_type": "select",
"value": "enterprise"
}
},
{
"id": "cfv_9xK7mN2qTsYvAzCe4fG6",
"type": "custom_field_value",
"attributes": {
"id": "cfv_9xK7mN2qTsYvAzCe4fG6",
"field_definition_id": "cf_9xK7mN2qTsYvAzCe4fG6",
"slug": "region",
"name": "Region",
"field_type": "text",
"value": "us-west"
}
}
],
"meta": {
"request_id": "req_7nR4tW8xKqMvPyZbC3dF5"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"details": [
{
"field": "email",
"message": "Invalid email"
}
]
},
"meta": {
"request_id": "req_abc123def456"
}
}{
"error": {
"code": "INVALID_API_KEY",
"message": "Missing or invalid Authorization header"
},
"meta": {
"request_id": "req_abc123def456"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded"
},
"meta": {
"request_id": "req_abc123def456"
}
}List custom field definitions
Returns a paginated list of custom field definitions in the authenticated workspace. Optionally filter by `entity_type`.
Update a custom field definition
Partially updates a custom field definition. Only the provided fields are changed — omitted fields remain untouched. `entity_type`, `slug`, and `field_type` cannot be changed after creation.