Profiles
Create a profile
POST
https://postifuse.com/v1/profilesAdds a client, brand or end user. Put your own customer id in external_id: it is unique in the workspace, so a retried signup never makes a second profile, and every webhook carries it back.
curl --request POST \
--url 'https://postifuse.com/v1/profiles' \
--header 'Authorization: Bearer pf_live_…' \
--header 'Idempotency-Key: create-profile-1' \
--header 'Content-Type: application/json' \
--data '{
"name": "Martin Bakery",
"external_id": "cus_8f3a2"
}'
const res = await fetch("https://postifuse.com/v1/profiles", {
method: "POST",
headers: {
"Authorization": "Bearer pf_live_…",
"Idempotency-Key": "create-profile-1",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "Martin Bakery",
"external_id": "cus_8f3a2"
}),
});
const data = await res.json();
import requests
res = requests.post(
"https://postifuse.com/v1/profiles",
headers={"Authorization": "Bearer pf_live_…", "Idempotency-Key": "create-profile-1"},
json={
"name": "Martin Bakery",
"external_id": "cus_8f3a2"
},
)
print(res.json())
{
"id": "prf_martin",
"name": "Martin Bakery",
"external_id": "cus_8f3a2",
"is_default": false,
"accounts": 0
}
{
"error": "workspace_not_active",
"message": "The workspace for this key is not active yet.",
"docs": "https://postifuse.com/docs/errors/"
}
Headers
AuthorizationstringrequiredBearer followed by a workspace key, a profile key or an OAuth token. See authentication.
Example Bearer pf_live_…
Idempotency-KeystringrequiredAny unique string. The same key within 24 h returns the same result and posts nothing twice.
Body application/json
namestringrequiredShown in the dashboard.
Example Martin Bakery
external_idstringYour own customer id. Unique in the workspace.
Example cus_8f3a2
Response
200The profile
403Workspace not active