{"openapi":"3.0.3","info":{"title":"PostMyIsh API","version":"1.0.0","description":"Publish, schedule, and measure social posts across twelve networks with a single REST API. Authenticate with a Bearer API key created in the PostMyIsh dashboard.","contact":{"name":"PostMyIsh","url":"https://postmyish.com/docs"}},"servers":[{"url":"https://postmyish.com/api/v1","description":"Production"}],"tags":[{"name":"Account","description":"Your account, plan, and usage."},{"name":"Posts","description":"Create, list, fetch, and cancel posts."},{"name":"Accounts","description":"Connected social profiles."},{"name":"Analytics","description":"Reach and engagement summaries."}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A `pmi_live_` API key from Settings → API keys."}}},"security":[{"bearerAuth":[]}],"paths":{"/me":{"get":{"operationId":"me","summary":"Get current user","description":"Returns the account behind the API key, along with the plan's limits and the current month's API usage. This is the simplest way to confirm a key works.","tags":["Account"],"responses":{"200":{"description":"OK","content":{"application/json":{"examples":{"ok":{"summary":"OK","value":{"id":"usr_9f2c8b1e","email":"you@studio.com","name":"Ada Lovelace","studio":"Analytical Engines","plan":"creator","limits":{"profiles":5,"posts_per_month":null,"api_calls_per_month":10000},"usage":{"api_calls_this_month":42}}}}}}},"401":{"description":"The API key is missing, malformed, or revoked.","content":{"application/json":{"examples":{"unauthorized":{"summary":"Unauthorized","value":{"error":"Invalid or revoked API key."}}}}}}},"security":[{"bearerAuth":[]}]}},"/posts":{"post":{"operationId":"create_post","summary":"Create a post","description":"Creates a post and fans it out to the connected networks you name. Omit schedule_at to publish immediately; include it to queue the post for later. Only networks you've connected are targeted — unknown or unconnected ids are dropped.","tags":["Posts"],"responses":{"201":{"description":"Published immediately (no `schedule_at`). / Queued for a future `schedule_at`.","content":{"application/json":{"examples":{"published":{"summary":"Published","value":{"id":"post_7d1a9c8b","caption":"We just shipped v2 🚀","platforms":["x","linkedin","bluesky"],"status":"published","has_media":false,"scheduled_at":null,"published_at":1752566400000,"reach":0,"engagement_rate":0}},"scheduled":{"summary":"Scheduled","value":{"id":"post_7d1a9c8b","caption":"Morning, every feed 👋","platforms":["x","linkedin","threads","bluesky"],"status":"scheduled","has_media":false,"scheduled_at":1785535200000,"published_at":null,"reach":0,"engagement_rate":0}}}}}},"400":{"description":"Validation failed — no connected network resolved, the post was empty, `schedule_at` was unparseable or in the past, or a plan limit was hit.","content":{"application/json":{"examples":{"bad_request":{"summary":"Bad Request","value":{"error":"Select at least one connected network."}}}}}},"401":{"description":"The API key is missing, malformed, or revoked.","content":{"application/json":{"examples":{"unauthorized":{"summary":"Unauthorized","value":{"error":"Invalid or revoked API key."}}}}}}},"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"caption":{"type":"string","description":"The post text, adapted per network (for example, truncated to 280 characters on X). Defaults to an empty string, but a post with neither a caption nor media is rejected."},"platforms":{"type":"array","items":{"type":"string"},"description":"Network ids to publish to: tiktok, instagram, youtube, x, linkedin, facebook, threads, pinterest, reddit, bluesky, discord, telegram. Unknown ids are ignored; at least one must resolve to a connected account."},"schedule_at":{"oneOf":[{"type":"integer"},{"type":"string"}],"description":"When to publish. Omit to publish now. Accepts a Unix timestamp in seconds or milliseconds, or an ISO 8601 string. Must be in the future (60 seconds of clock skew is tolerated)."},"media":{"type":"string","description":"A publicly reachable URL to an image or video. Required by networks that can't post text alone (Instagram, Pinterest, TikTok, YouTube). See the Media guide."}},"required":["platforms"]}}}}},"get":{"operationId":"list_posts","summary":"List posts","description":"Returns your posts, most recent first, each with its status and metrics. Filter by one or more statuses, and cap the result count with limit.","tags":["Posts"],"parameters":[{"name":"status","in":"query","required":false,"description":"Comma-separated statuses to include: draft, scheduled, publishing, published. Unknown values are ignored; omit to return all.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of posts to return.","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"examples":{"ok":{"summary":"OK","value":{"data":[{"id":"post_7d1a9c8b","caption":"We just shipped v2 🚀","platforms":["x","linkedin","bluesky"],"status":"published","has_media":false,"scheduled_at":null,"published_at":1752566400000,"reach":0,"engagement_rate":0}]}}}}}},"401":{"description":"The API key is missing, malformed, or revoked.","content":{"application/json":{"examples":{"unauthorized":{"summary":"Unauthorized","value":{"error":"Invalid or revoked API key."}}}}}}},"security":[{"bearerAuth":[]}]}},"/posts/{id}":{"get":{"operationId":"get_post","summary":"Get a post","description":"Returns one post by id, including its current status and any reach and engagement reported so far. Poll this after publishing to watch a scheduled post flip to published.","tags":["Posts"],"parameters":[{"name":"id","in":"path","required":true,"description":"The post id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"examples":{"ok":{"summary":"OK","value":{"id":"post_7d1a9c8b","caption":"We just shipped v2 🚀","platforms":["x","linkedin","bluesky"],"status":"published","has_media":false,"scheduled_at":null,"published_at":1752566400000,"reach":0,"engagement_rate":0}}}}}},"401":{"description":"The API key is missing, malformed, or revoked.","content":{"application/json":{"examples":{"unauthorized":{"summary":"Unauthorized","value":{"error":"Invalid or revoked API key."}}}}}},"404":{"description":"No post with that id belongs to your account.","content":{"application/json":{"examples":{"not_found":{"summary":"Not Found","value":{"error":"Post not found."}}}}}}},"security":[{"bearerAuth":[]}]},"delete":{"operationId":"delete_post","summary":"Delete or cancel a post","description":"Deletes a draft, or cancels a scheduled post so it never publishes. Already-published posts remain on the networks — deleting here only removes the PostMyIsh record.","tags":["Posts"],"parameters":[{"name":"id","in":"path","required":true,"description":"The post id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"examples":{"ok":{"summary":"OK","value":{"deleted":true,"id":"post_7d1a9c8b"}}}}}},"401":{"description":"The API key is missing, malformed, or revoked.","content":{"application/json":{"examples":{"unauthorized":{"summary":"Unauthorized","value":{"error":"Invalid or revoked API key."}}}}}},"404":{"description":"No post with that id belongs to your account.","content":{"application/json":{"examples":{"not_found":{"summary":"Not Found","value":{"error":"Post not found."}}}}}}},"security":[{"bearerAuth":[]}]}},"/accounts":{"get":{"operationId":"list_accounts","summary":"List accounts","description":"Returns the social profiles you've connected — the exact set of platforms ids you can publish to. Networks you haven't connected are omitted.","tags":["Accounts"],"responses":{"200":{"description":"OK","content":{"application/json":{"examples":{"ok":{"summary":"OK","value":{"data":[{"platform":"x","handle":"@you","followers":0,"health":"good"},{"platform":"linkedin","handle":"you","followers":0,"health":"good"}]}}}}}},"401":{"description":"The API key is missing, malformed, or revoked.","content":{"application/json":{"examples":{"unauthorized":{"summary":"Unauthorized","value":{"error":"Invalid or revoked API key."}}}}}}},"security":[{"bearerAuth":[]}]}},"/analytics":{"get":{"operationId":"analytics","summary":"Get analytics","description":"Returns an aggregate summary across your published posts, plus a per-network breakdown. All figures reflect what the networks have actually reported — they are 0 until then, never fabricated.","tags":["Analytics"],"responses":{"200":{"description":"OK","content":{"application/json":{"examples":{"ok":{"summary":"OK","value":{"totalReach":0,"engagementRate":0,"postsPublished":3,"followers":0,"perPlatform":[{"platform":"x","reach":0,"engagementRate":0}]}}}}}},"401":{"description":"The API key is missing, malformed, or revoked.","content":{"application/json":{"examples":{"unauthorized":{"summary":"Unauthorized","value":{"error":"Invalid or revoked API key."}}}}}}},"security":[{"bearerAuth":[]}]}}}}