Change a custom field’s type
Changes the type to the previewed one: new writes are checked against it at once, and every value is converted, a batch at a time. A value that doesn’t convert is removed and recorded in the profile’s history with why; a value converted keeps where it came from. A conversion that stopped carries on from where it was. 409 `custom_field_conversion_not_ready` without a finished preview of this type.
Changes the type to the previewed one: new writes are checked against it at once, and every value is converted, a batch at a time. A value that doesn’t convert is removed and recorded in the profile’s history with why; a value converted keeps where it came from. A conversion that stopped carries on from where it was. 409 custom_field_conversion_not_ready without a finished preview of this type.
apiKey writeAuthorizationBearer <token>A workspace API key (pf_…), created under Developers → API keys.
Scope: write
id*stringuuididempotency-key?stringRun this write once: a retry with the same key gets the first answer (24 hours).
1 <= length <= 255application/json- body
type*string"text""number""boolean""date""list""json"OK
application/json- response
id*stringuuidfieldId*stringuuidfromType*string"text""number""boolean""date""list""json"toType*string"text""number""boolean""date""list""json"status*string"previewing""ready""converting""completed""failed"counts*converts*array<>removes*array<>reasons*array<>error*string|nullcreatedAt*stringdate-timereadyAt*|date-timestartedAt*|date-timecompletedAt*|date-timecurl -X POST 'https://api.postforge.dev/v1/custom-fields/497f6eca-6276-4993-bfeb-53cbbbba6f08/convert' \ -H 'Content-Type: application/json' \ -d '{ "type": "text"}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "fieldId": "84922011-b03d-4966-bc95-c5b49bc2e342", "fromType": "text", "toType": "text", "status": "previewing", "counts": { "values": 0, "checked": 0, "converts": 0, "removes": 0, "converted": 0, "removed": 0 }, "converts": [ { "before": "string", "after": "string" } ], "removes": [ { "value": "string", "reason": "string" } ], "reasons": [ { "reason": "string", "count": 0 } ], "error": "string", "createdAt": "2019-08-24T14:15:22Z", "readyAt": "2019-08-24T14:15:22Z", "startedAt": "2019-08-24T14:15:22Z", "completedAt": "2019-08-24T14:15:22Z"}Get a custom field’s type change GET
The field’s open type change (being previewed, waiting to convert or converting), else the last one; null when its type never changed.
Archive a custom field POST
Hides the field and stops every writer, a store’s too: writes to it are refused and recorded. Its values stay until it’s deleted. 409 `custom_field_converting` while its type is being changed.