Brands
Group each business's accounts and publish as that brand.
View as Markdown OpenAPI Base URL https://postwire.io
A brand is one business: its own TikTok, its own Instagram, and so on. Pass brand_id when you publish or schedule. With one brand you never need it. When the same network is connected in two brands and no brand_id is sent, PostWire refuses (409 ambiguous_brand) instead of guessing.
GET /api/brands
A brand groups one business's accounts. Use a brand's id as `brand_id` when publishing.
Needs an API key: Authorization: Bearer pw_live_….
Responses Status Means 200{ brands: [{ id, name, platforms[], accounts: [{ platform, label, handle, display_name, avatar_url, profile_url, connected_at, needs }] }], limit, plan } — handle, display name and picture are what the network itself reports for that account.
curl Node Python
curl Copy
curl "https://postwire.io/api/brands" \
-H "Authorization: Bearer $POSTWIRE_API_KEY"Node Copy
const res = await fetch("https://postwire.io/api/brands", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.POSTWIRE_API_KEY}` },
});
console.log(res.status, await res.json());Python Copy
import os, requests
r = requests.get(
"https://postwire.io/api/brands",
headers={"Authorization": f"Bearer {os.environ['POSTWIRE_API_KEY']}"},
)
print(r.status_code, r.json())
POST /api/brands
A brand groups one business's connected accounts. The plan sets how many brands an account has (Free 1, Starter 3, Pro 10, Agency 50, Scale 200); one more answers 400 brand_limit_reached with an upgrade link.
Needs an API key: Authorization: Bearer pw_live_….
Body (JSON) Field Type Description name required string
Responses Status Means 200{ ok, brand: { id, name } } 400name required, or code brand_limit_reached { brands_used, brands_allowed, upgrade }
curl Node Python
curl Copy
curl -X POST "https://postwire.io/api/brands" \
-H "Authorization: Bearer $POSTWIRE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Corner Café"
}'Node Copy
const res = await fetch("https://postwire.io/api/brands", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.POSTWIRE_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"name": "Corner Café"
}),
});
console.log(res.status, await res.json());Python Copy
import os, requests
r = requests.post(
"https://postwire.io/api/brands",
headers={"Authorization": f"Bearer {os.environ['POSTWIRE_API_KEY']}"},
json={
"name": "Corner Café",
},
)
print(r.status_code, r.json())
GET /api/brands/{id}
Needs an API key: Authorization: Bearer pw_live_….
Parameters Field Type Description id required path, string
Responses Status Means 200{ brand: { id, name, platforms[], accounts[] } } 404brand_not_found
curl Node Python
curl Copy
curl "https://postwire.io/api/brands/b3f1c2d4-8a9e-4f6b-a1c2-3d4e5f6a7b8c" \
-H "Authorization: Bearer $POSTWIRE_API_KEY"Node Copy
const res = await fetch("https://postwire.io/api/brands/b3f1c2d4-8a9e-4f6b-a1c2-3d4e5f6a7b8c", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.POSTWIRE_API_KEY}` },
});
console.log(res.status, await res.json());Python Copy
import os, requests
r = requests.get(
"https://postwire.io/api/brands/b3f1c2d4-8a9e-4f6b-a1c2-3d4e5f6a7b8c",
headers={"Authorization": f"Bearer {os.environ['POSTWIRE_API_KEY']}"},
)
print(r.status_code, r.json())
PATCH /api/brands/{id}
Needs an API key: Authorization: Bearer pw_live_….
Parameters Field Type Description id required path, string
Body (JSON) Field Type Description name required string
Responses Status Means 200{ ok, brand } 404brand not found
curl Node Python
curl Copy
curl -X PATCH "https://postwire.io/api/brands/b3f1c2d4-8a9e-4f6b-a1c2-3d4e5f6a7b8c" \
-H "Authorization: Bearer $POSTWIRE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Corner Café Miraflores"
}'Node Copy
const res = await fetch("https://postwire.io/api/brands/b3f1c2d4-8a9e-4f6b-a1c2-3d4e5f6a7b8c", {
method: "PATCH",
headers: { Authorization: `Bearer ${process.env.POSTWIRE_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"name": "Corner Café Miraflores"
}),
});
console.log(res.status, await res.json());Python Copy
import os, requests
r = requests.patch(
"https://postwire.io/api/brands/b3f1c2d4-8a9e-4f6b-a1c2-3d4e5f6a7b8c",
headers={"Authorization": f"Bearer {os.environ['POSTWIRE_API_KEY']}"},
json={
"name": "Corner Café Miraflores",
},
)
print(r.status_code, r.json())
DELETE /api/brands/{id}
Needs an API key: Authorization: Bearer pw_live_….
Parameters Field Type Description id required path, string
Responses Status Means 200{ ok } 400the last brand 404brand not found
curl Node Python
curl Copy
curl -X DELETE "https://postwire.io/api/brands/b3f1c2d4-8a9e-4f6b-a1c2-3d4e5f6a7b8c" \
-H "Authorization: Bearer $POSTWIRE_API_KEY"Node Copy
const res = await fetch("https://postwire.io/api/brands/b3f1c2d4-8a9e-4f6b-a1c2-3d4e5f6a7b8c", {
method: "DELETE",
headers: { Authorization: `Bearer ${process.env.POSTWIRE_API_KEY}` },
});
console.log(res.status, await res.json());Python Copy
import os, requests
r = requests.delete(
"https://postwire.io/api/brands/b3f1c2d4-8a9e-4f6b-a1c2-3d4e5f6a7b8c",
headers={"Authorization": f"Bearer {os.environ['POSTWIRE_API_KEY']}"},
)
print(r.status_code, r.json())