API referenceObject Types
Update a object type
Renames it, or saves a new draft version on top of `baseVersionId`, which must be the current draft (409 `version_stale` otherwise). The published version doesn’t change.
PATCH
Renames it, or saves a new draft version on top of baseVersionId, which must be the current draft (409 version_stale otherwise). The published version doesn’t change.
apiKey writeheader
AuthorizationBearer <token>A workspace API key (pf_…), created under Developers → API keys.
Scope: write
id*stringFormat
uuididempotency-key?stringRun this write once: a retry with the same key gets the first answer (24 hours).
Length
1 <= length <= 255application/json- body
name?stringLength
1 <= length <= 200definition?baseVersionId?stringFormat
uuidOK
application/json- response
id*stringFormat
uuidkind*stringname*stringstatus*stringValue in
"draft""published""archived"draftVersionId*stringFormat
uuidpublishedVersionId*|Format
uuidhasUnpublishedChanges*booleancreatedAt*stringFormat
date-timeupdatedAt*stringFormat
date-timearchivedAt*|Format
date-timedraft*curl -X PATCH 'https://api.postforge.dev/v1/object-types/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "kind": "string", "name": "string", "status": "draft", "draftVersionId": "e7fc80a1-b65e-482e-8fcd-f6c647b4104b", "publishedVersionId": "9786f1b1-ef7e-4f6a-94c4-c8eb67e924eb", "hasUnpublishedChanges": true, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "archivedAt": "2019-08-24T14:15:22Z", "draft": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "definitionId": "058563fe-6949-46e9-9fb3-06a0e3a11f6a", "parentVersionId": "abf80970-9686-419e-bc00-5ddcccc33ba6", "origin": "edit", "schemaVersion": 0, "author": { "type": "user", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "createdAt": "2019-08-24T14:15:22Z", "definition": { "key": "string", "description": "string", "fields": [ { "key": "string", "label": "string", "description": "string", "type": "text", "required": true, "indexed": true } ], "relationships": [ { "key": "string", "label": "string", "to": "string", "cardinality": "one" } ] } }}