Create a custom field
Declares a field with its type. The key is made from the label when it isn’t given, and never changes after (emails and the API use it). A write to a key that doesn’t exist yet (the API, an automation, a store) declares a field too, with the type of its first value. 409 `custom_field_exists` when the key is taken; 422 `too_many_custom_fields` past 1,000.
Declares a field with its type. The key is made from the label when it isn’t given, and never changes after (emails and the API use it). A write to a key that doesn’t exist yet (the API, an automation, a store) declares a field too, with the type of its first value. 409 custom_field_exists when the key is taken; 422 too_many_custom_fields past 1,000.
apiKey writeAuthorizationBearer <token>A workspace API key (pf_…), created under Developers → API keys.
Scope: write
idempotency-key?stringRun this write once: a retry with the same key gets the first answer (24 hours).
1 <= length <= 255application/json- body
key?string^[a-z][a-z0-9_]{0,63}$label*string1 <= length <= 100description?|length <= 500nulltype*string"text""number""boolean""date""list""json"Created
application/json- response
id*stringuuidkey*stringlabel*stringdescription*string|nulltype*string"text""number""boolean""date""list""json"platform*string|nullprofilesCount*integerarchivedAt*|date-timecreatedAt*stringdate-timeupdatedAt*stringdate-timecurl -X POST 'https://api.postforge.dev/v1/custom-fields' \ -H 'Content-Type: application/json' \ -d '{ "label": "string", "type": "text"}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "key": "string", "label": "string", "description": "string", "type": "text", "platform": "string", "profilesCount": 0, "archivedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z"}