Profiles
Delete a profile
DEL
https://postifuse.com/v1/profiles/{id}Deletes an empty profile. Refused while it still holds accounts: disconnect them, or move them with update an account. The default profile cannot be deleted.
curl --request DELETE \ --url 'https://postifuse.com/v1/profiles/id_1' \ --header 'Authorization: Bearer pf_live_…'
const res = await fetch("https://postifuse.com/v1/profiles/id_1", {
method: "DELETE",
headers: {
"Authorization": "Bearer pf_live_…"
},
});
const data = await res.json();
import requests
res = requests.delete(
"https://postifuse.com/v1/profiles/id_1",
headers={"Authorization": "Bearer pf_live_…"},
)
print(res.json())
{
"id": "prf_martin",
"deleted": true
}
{
"error": "profile_not_empty",
"message": "prf_martin still holds 3 accounts.",
"fix": "Disconnect or move its accounts first",
"docs": "https://postifuse.com/docs/api/delete-profile/"
}
{
"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.
Response
200Deleted
409Profile not empty
403Workspace not active