Create or update a profile
Finds the person by email address or phone number and updates their profile, or creates one when nobody has either yet: 201 when created, 200 when it existed. Never a duplicate: when the email address and the phone number belong to two profiles, sending them together says they are one person, and the profiles merge into the oldest. `properties` sets custom properties: a value sets its key, null removes it, other keys stay. 400 when neither email nor phone is usable.
Finds the person by email address or phone number and updates their profile, or creates one when nobody has either yet: 201 when created, 200 when it existed. Never a duplicate: when the email address and the phone number belong to two profiles, sending them together says they are one person, and the profiles merge into the oldest. properties sets custom properties: a value sets its key, null removes it, other keys stay. 400 when neither email nor phone is usable.
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
email?stringlength <= 320phone?stringE.164, e.g. +31612345678
length <= 32properties?OK
application/json- response
id*stringuuidname*string|nullemail*string|nullphone*string|nulllocale*string|nullstoreIds*array<>ordersCount*integerlastOrderAt*|date-timeemailMarketingConsent*string"subscribed""not_subscribed""unsubscribed""pending"smsMarketingConsent*string"subscribed""not_subscribed""unsubscribed""pending"firstSeenAt*stringdate-timelastSeenAt*stringdate-timefirstName*string|nulllastName*string|nulllocaleSource*|nullstores*array<>metrics*properties*curl -X POST 'https://api.postforge.dev/v1/profiles' \ -H 'Content-Type: application/json' \ -d '{}'{ "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" }}