API referenceProfiles
Update a profile
Changes custom properties: a value sets its key, null removes it, other keys stay. 422 `too_many_properties` past the limit. A merged profile answers with the profile it joined; its id differs from the one asked for.
PATCH
Changes custom properties: a value sets its key, null removes it, other keys stay. 422 too_many_properties past the limit. A merged profile answers with the profile it joined; its id differs from the one asked for.
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
properties*OK
application/json- response
id*stringFormat
uuidname*string|nullemail*string|nullphone*string|nulllocale*string|nullstoreIds*array<>ordersCount*integerlastOrderAt*|Format
date-timeemailMarketingConsent*stringValue in
"subscribed""not_subscribed""unsubscribed""pending"smsMarketingConsent*stringValue in
"subscribed""not_subscribed""unsubscribed""pending"firstSeenAt*stringFormat
date-timelastSeenAt*stringFormat
date-timefirstName*string|nulllastName*string|nulllocaleSource*|nullstores*array<>metrics*properties*curl -X PATCH 'https://api.postforge.dev/v1/profiles/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Content-Type: application/json' \ -d '{ "properties": { "property1": "string", "property2": "string" }}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "email": "string", "phone": "string", "locale": "string", "storeIds": [ "636b56cb-e414-46d5-b6c0-0e73b3e0106b" ], "ordersCount": 0, "lastOrderAt": "2019-08-24T14:15:22Z", "emailMarketingConsent": "subscribed", "smsMarketingConsent": "subscribed", "firstSeenAt": "2019-08-24T14:15:22Z", "lastSeenAt": "2019-08-24T14:15:22Z", "firstName": "string", "lastName": "string", "localeSource": { "source": "order", "storeId": "b8adcdc8-9238-4168-90f8-77b2d14c211c", "signal": "hard", "at": "2019-08-24T14:15:22Z" }, "stores": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "platform": "string" } ], "metrics": { "ordersCount": 0, "firstOrderAt": "2019-08-24T14:15:22Z", "lastOrderAt": "2019-08-24T14:15:22Z", "currencies": [ { "currency": "str", "ordersCount": 0, "totalSpent": { "amount": 0, "currency": "str" }, "averageOrderValue": { "amount": 0, "currency": "str" }, "firstOrderAt": "2019-08-24T14:15:22Z", "lastOrderAt": "2019-08-24T14:15:22Z" } ], "stores": [ { "currency": "str", "ordersCount": 0, "totalSpent": { "amount": 0, "currency": "str" }, "averageOrderValue": { "amount": 0, "currency": "str" }, "firstOrderAt": "2019-08-24T14:15:22Z", "lastOrderAt": "2019-08-24T14:15:22Z", "storeId": "b8adcdc8-9238-4168-90f8-77b2d14c211c" } ] }, "properties": { "property1": "string", "property2": "string" }}