Profiles
Rename a profile
PATCH
https://postifuse.com/v1/profiles/{id}Changes the name or the external_id of a profile. Its accounts and posts are not touched.
curl --request PATCH \
--url 'https://postifuse.com/v1/profiles/id_1' \
--header 'Authorization: Bearer pf_live_…' \
--header 'Content-Type: application/json' \
--data '{
"name": "Martin Bakery Lyon"
}'
const res = await fetch("https://postifuse.com/v1/profiles/id_1", {
method: "PATCH",
headers: {
"Authorization": "Bearer pf_live_…",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "Martin Bakery Lyon"
}),
});
const data = await res.json();
import requests
res = requests.patch(
"https://postifuse.com/v1/profiles/id_1",
headers={"Authorization": "Bearer pf_live_…"},
json={
"name": "Martin Bakery Lyon"
},
)
print(res.json())
{
"id": "prf_martin",
"name": "Martin Bakery Lyon",
"external_id": "cus_8f3a2",
"is_default": false,
"accounts": 3
}
{
"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_…
Path parameters
idstringrequiredThe profile id.
Body application/json
namestringNew name.
Example Martin Bakery Lyon
external_idstringNew customer id.
Example cus_8f3a2
Response
200The profile
403Workspace not active