Accounts
Who am I
GET
https://postifuse.com/v1/whoamiThe first call for an agent: the workspace, the scope of the key, the profiles it can see, the connected accounts, and what each network accepts. The agent picks its targets from this instead of guessing.
curl --request GET \ --url 'https://postifuse.com/v1/whoami' \ --header 'Authorization: Bearer pf_live_…'
const res = await fetch("https://postifuse.com/v1/whoami", {
method: "GET",
headers: {
"Authorization": "Bearer pf_live_…"
},
});
const data = await res.json();
import requests
res = requests.get(
"https://postifuse.com/v1/whoami",
headers={"Authorization": "Bearer pf_live_…"},
)
print(res.json())
{
"workspace": "wsp_7",
"scope": "write",
"profiles": [
"prf_martin"
],
"accounts": [
{
"id": "acc_tt",
"network": "tiktok",
"profile": "prf_martin",
"handle": "@martinbakery",
"status": "active"
}
],
"networks": {
"tiktok": {
"video": true,
"images": true,
"text_only": false,
"unpublish": false
}
}
}
{
"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_…
Response
200The key's workspace
403Workspace not active