# How to Manage Social Media Agents Safely (2026) · PostLake > Markdown version of https://postlake.dev/guides/manage-social-media-agents . The canonical page for humans. > PostLake is the social media API for AI agents: https://postlake.dev/llms.txt Let your agent run socials. Keep *control.* The right operating model is not an agent that needs a human beside it all day. It is a person who sets the boundary once, then lets the agent plan, draft, connect accounts with human approval, publish within a cap, and learn from results. PostLake puts that boundary on the agent connection itself, not only in a prompt. **In short:** Connect an agent over MCP OAuth, fence it to the profiles and networks it needs, set a daily cap, then begin with drafts. The agent can ask for a signed connection link when a human needs to approve a social account. ## When this guide is for you You want an agent to run social operations without making the human live in a social dashboard or handing the agent unrestricted account credentials. ## Before you start Same setup the [docs quickstart](https://docs.postlake.dev/quickstart.md) uses. Do this once: - Sign up at [app.postlake.dev](https://app.postlake.dev) and verify your email (unlocks free credits). - On **Channels**, create a **profile** (e.g. `my-brand`) and connect at least one account. **Bluesky is the fastest first channel**: no app review. Instagram/TikTok/Facebook need each platform's review before API posting. - Connect the hosted MCP server at `https://api.postlake.dev/mcp` in your agent host. It signs in through OAuth, so do not paste an API key into the agent. ## A safe first instruction After the MCP connection is authorised, give the agent one clear operating policy. It can request a signed connection link, but only a person completes social-network approval: ``` Set up my PostLake account safely. First call whoami and list_social_accounts. If no channels are connected, call get_connect_link and send me the signed link. Wait for me to approve access on the social network, then confirm the channel exists. Before writing, call get_platform_capabilities and validate_post. Save the first posts as drafts for my approval. Do not publish until I explicitly approve it. ``` ## Step by step 1. Connect the agent through hosted MCP OAuth. It receives its own connection, not your account-level API key. 1. Open **Agents** in PostLake and give the connection a name you will recognise, such as `Claude content agent` or `Launch crew`. 1. Set the profiles it may use, the networks it may publish to, a daily post limit, and whether it may spend purchased credit packs. These limits are enforced on every publish, not merely suggested in the prompt. 1. Have the agent call `whoami` before planning work. It sees its own profiles, platforms, remaining daily capacity, and credit rules, so it can adapt instead of discovering a boundary through a failed post. 1. When the agent needs a new channel, it calls `get_connect_link`. Send that signed link to the human who owns the account. They complete the platform's OAuth approval, then the agent confirms the connection and continues. 1. Turn on **Require my approval before publishing**. Review the calendar when it suits you, then publish approved drafts without asking the agent to police itself. 1. Review activity from the Agents page and revoke any connection instantly. A revoked agent must complete OAuth again before it can act. ## Read the response (don't skip this) You get one `Post` with an overall `state` and a `targets[]` array. One entry per account. **Always check each target**; partial success is normal. ``` { "id": "post_a1b2c3", "state": "partial", "targets": [ { "platform": "bluesky", "state": "published", "url": "https://bsky.app/…" }, { "platform": "linkedin", "state": "failed", "error": { "type": "invalid_request", "message": "…", "retryable": false } } ] } ``` - `published`: every target succeeded. `partial`: some published, some failed. `failed`: none published. `processing`: still going (async networks like TikTok). - **You're only charged for targets that actually publish.** Failed targets cost nothing. - Send an `Idempotency-Key` header on writes so a retry never double-posts. - Full detail: [Publishing](https://docs.postlake.dev/publishing) · [Errors & retries](https://docs.postlake.dev/errors) ## Where the post goes Same rules as the docs. Pick one addressing style: - **By profile**: `"profile": "my-brand"` posts to every account under that profile (the name on Channels). - **Filter networks**: `"platforms": ["bluesky", "linkedin"]` narrows that set. It is a **filter, not a selector**: if you have two Pinterest boards, both match `pinterest`. - **By account id**: `"accounts": ["acc_…"]` for exact channels (copy an id on Channels, or `GET /v1/social-accounts`). - One profile and you omit `profile`? PostLake uses that profile. Multiple profiles and you omit it? You'll get an error that names them. See [Publishing: where to post](https://docs.postlake.dev/publishing). ## Do more (same API) - **Schedule**: add `scheduledAt` as UTC (trailing `Z`), or a naive local time plus `timezone` (IANA, e.g. `Europe/London`). Credits charge when it fires. [Scheduling docs](https://docs.postlake.dev/scheduling) · [scheduling guide](/guides/schedule-posts-api). - **Media**: `POST /v1/media`, then pass the `med_…` id in `media`. [Media docs](https://docs.postlake.dev/media). - **Per-network caption**: `textOverrides` (e.g. shorter text for X). **Per-network options**: `platformOptions` (Pinterest `boardId`, TikTok privacy, …). Live option lists: `GET /v1/platforms/{platform}`. - **Validate first**: `POST /v1/posts/validate` runs the same checks without publishing (free). - Use a separate profile for each brand or client. This makes both destinations and agent restrictions readable. - Use a separate MCP connection for each agent role. A research agent can require approval while a trusted publishing agent has a narrow, capped production scope. - For unattended infrastructure you operate yourself, use a server-side API key. It is account-wide, so it is not the right credential for an agent you want to fence in. ## Pitfalls specific to this path - A prompt that says 'only post to LinkedIn' is not a security boundary. Set the platform restriction in Agents as well. - Do not send a long-lived API key through chat. OAuth gives the MCP client a revocable connection without exposing that secret. - Social-network approval cannot be automated away. The agent can create the signed handoff link, but the account owner must approve access on the provider's screen. Want zero wrapper code? Connect the hosted [MCP server](https://docs.postlake.dev/mcp) (`https://api.postlake.dev/mcp`) over OAuth. Same accounts and responses as this API path. [Agents overview](/agents/). ## Common questions ### Can I let an AI agent manage my social media without sharing my API key? Yes. Connect it to PostLake over MCP OAuth. It receives a separate, revocable connection. Set its permitted profiles, networks, daily post limit, purchased-credit access, and approval policy in Agents. ### Can an AI agent connect my social accounts for me? It can generate a signed connection link and send it to the right person. That person still approves access on the social network's own screen. Once they finish, the agent can confirm the channel and continue its workflow. ### How do I stop a social media agent from posting too much? Set a daily post limit on that MCP connection and restrict the profiles and platforms it can use. Turn on Require my approval if a person should approve every post. These controls are enforced by the API. ### Can I revoke an agent's access? Yes. Revoke the connection from Agents in the PostLake dashboard. The client must complete OAuth again before it can use the account. ## Go deeper in the docs These guides stay short on purpose. Canonical behaviour lives here: [Docs ### Quickstart Account, first channel, first post, MCP or API.](https://docs.postlake.dev/quickstart) [Docs ### Publishing Request body, addressing. Partial success, lifecycle.](https://docs.postlake.dev/publishing) [Docs ### Scheduling UTC or local time plus timezone, edit/cancel, fire-time credits.](https://docs.postlake.dev/scheduling) [Docs ### Platforms Limits, media rules, live platformOptions.](https://docs.postlake.dev/platforms) Also: [Media](https://docs.postlake.dev/media) · [Errors](https://docs.postlake.dev/errors) · [MCP](https://docs.postlake.dev/mcp) · [Analytics](https://docs.postlake.dev/analytics) ## Related guides - [Build an AI social agent](https://postlake.dev/guides/ai-social-media-agent.md) - [Human approval (drafts)](https://postlake.dev/guides/human-approval-drafts.md) - [Agent content calendar](https://postlake.dev/guides/ai-content-calendar.md) - [Social media API for AI agents](https://postlake.dev/guides/social-media-api-for-ai-agents.md) [All guides](https://postlake.dev/guides/index.md) · [Full docs](https://docs.postlake.dev/) · [llms.txt](https://postlake.dev/llms.txt) Plain markdown for agents: https://postlake.dev/guides/manage-social-media-agents.md · https://postlake.dev/llms.txt