Profiles
Create a profile key
https://postifuse.com/v1/keysA read or write key that sees only the listed profiles: their accounts, posts and media. Give one to a client's own backend, or to the agent that works for that client: it cannot reach anyone else's accounts. The key is shown once.
curl --request POST \
--url 'https://postifuse.com/v1/keys' \
--header 'Authorization: Bearer pf_live_…' \
--header 'Content-Type: application/json' \
--data '{
"name": "martin-agent",
"scope": "write",
"profiles": [
"prf_martin"
],
"limits": {
"max_posts_per_day": 3,
"require_approval": true
}
}'
const res = await fetch("https://postifuse.com/v1/keys", {
method: "POST",
headers: {
"Authorization": "Bearer pf_live_…",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "martin-agent",
"scope": "write",
"profiles": [
"prf_martin"
],
"limits": {
"max_posts_per_day": 3,
"require_approval": true
}
}),
});
const data = await res.json();
import requests
res = requests.post(
"https://postifuse.com/v1/keys",
headers={"Authorization": "Bearer pf_live_…"},
json={
"name": "martin-agent",
"scope": "write",
"profiles": [
"prf_martin"
],
"limits": {
"max_posts_per_day": 3,
"require_approval": True
}
},
)
print(res.json())
{
"id": "key_31",
"key": "pf_live_…",
"scope": "write",
"profiles": [
"prf_martin"
],
"limits": {
"max_posts_per_day": 3,
"require_approval": true
},
"expires_at": null
}
{
"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_…
Body application/json
namestringrequiredA label for the key.
Example martin-agent
scopestringrequiredread lists, checks and reports. write can also publish.
One of read write
Example write
profilesarray<string>requiredThe profiles the key can see.
Example ["prf_martin"]
expires_in_daysintegerOptional expiry. Default: never.
Example 90
limitsobjectOptional caps for an agent that runs unattended: posts per day across the key, allowed networks, and whether every post needs an approval. A post over a cap is held (reason <code>limit_reached</code>, webhook <code>post.held</code>), never dropped.
Example {"max_posts_per_day":3,"networks":["instagram","linkedin"],"require_approval":true}
Show 3 child attributes
max_posts_per_dayintegernetworksarray<string>require_approvalboolean