Create Field

Create a field on a standard or custom object. Use POST /v2/fields/relationships to link two objects.

post/v2/fields

Request

  • Base URL
    https://pub-api.conversion.ai/api
  • Auth
    • API key in header X-API-Key
    • or API key in query parameter api_key

Request body

labelstring required

The human-readable display name of the field.

keystring

Key used in record field maps. Leading and trailing whitespace is trimmed. Use letters, numbers, or underscores, including Unicode letters. Optional; derived from the label when omitted, preserving Unicode letters. Must be unique within this object.

objectType'CONTACT' | 'COMPANY' | 'OPPORTUNITY' | 'CAMPAIGN' | 'CAMPAIGN_MEMBER' | 'CUSTOM_OBJECT' required

The object the field belongs to (case-insensitive). An unsupported value returns an invalid_object_type error.

dataType'STRING' | 'NUMBER' | 'BOOLEAN' | 'DATE' | 'DATETIME' | 'PICKLIST' required

The data type of the field's value (case-insensitive).

customObjectIdstring uuid

Required for CUSTOM_OBJECT; omit for standard objects.

Example request

{
  "label": "Lead Score",
  "key": "lead_score"
}

Response

Field created successfully.

Changes

No recorded changes to this operation across all 1 revision of this API.