{"openapi":"3.1.0","info":{"title":"FlockPush REST API","version":"1.0.0","description":"FlockPush is a hosted service for publishing one Post to many social Networks (Bluesky, LinkedIn, X, Threads, Facebook, Instagram, Pinterest, YouTube, TikTok) with per-network overrides, transactional fan-out, queue reflow, and audit trails.","termsOfService":"https://flockpush.com/legal/terms","contact":{"name":"FlockPush Developer Support","url":"https://flockpush.com/docs","email":"support@flockpush.com"},"license":{"name":"Proprietary","url":"https://flockpush.com/legal/terms"}},"servers":[{"url":"https://api.flockpush.com","description":"Production Cloud Run API"},{"url":"http://localhost:3012","description":"Local Development Server"}],"tags":[{"name":"Posts","description":"Publishing engine, multi-network drafts, approvals, scheduling, and validation"},{"name":"Deliveries","description":"Per-channel delivery tracking and automated/manual retry workflows"},{"name":"Channels","description":"Connected social network accounts, health monitoring, posting slots, and queue management"},{"name":"API Keys","description":"Organization API key provisioning with live and test mode scopes"},{"name":"Webhooks","description":"Standard Webhooks management with HMAC signing and delivery tracking"},{"name":"JSON Imports","description":"Staged bulk post ingestion and transactional commit pipeline"},{"name":"Audit Events","description":"Append-only security and activity audit trails with cursor pagination"},{"name":"System","description":"Service health, network specifications catalog, and workspace queries"}],"security":[{"ApiKeyAuth":[]}],"paths":{"/v1/health":{"get":{"tags":["System"],"summary":"System Health Status","description":"Returns service uptime, version, and dependency connectivity status.","operationId":"getHealth","security":[],"responses":{"200":{"description":"Health status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X GET \"https://api.flockpush.com/v1/health\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\""},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/health\", {\n  method: \"GET\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n  },\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/health\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n}\n\nresponse = requests.get(url, headers=headers)\nprint(response.status_code, response.json())"}]}},"/v1/networks":{"get":{"tags":["System"],"summary":"List Supported Networks","description":"Returns the social network catalog including character limits, media specs, and supported post types.","operationId":"listNetworks","security":[],"responses":{"200":{"description":"Network specifications catalog","content":{"application/json":{"schema":{"type":"object","properties":{"networks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"bluesky"},"name":{"type":"string","example":"Bluesky"},"characterLimit":{"type":"integer","example":300}}}}}}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X GET \"https://api.flockpush.com/v1/networks\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\""},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/networks\", {\n  method: \"GET\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n  },\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/networks\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n}\n\nresponse = requests.get(url, headers=headers)\nprint(response.status_code, response.json())"}]}},"/v1/workspaces":{"get":{"tags":["System"],"summary":"List Accessible Workspaces","description":"Retrieve all workspaces the authenticated actor has access to within the organization.","operationId":"listWorkspaces","responses":{"200":{"description":"List of workspaces","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"ws_01J9K8L7M6N5P4Q3R2S1T0U9V"},"name":{"type":"string","example":"Marketing Team"},"timezone":{"type":"string","example":"America/New_York"}}}}}}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X GET \"https://api.flockpush.com/v1/workspaces\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\""},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/workspaces\", {\n  method: \"GET\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n  },\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/workspaces\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n}\n\nresponse = requests.get(url, headers=headers)\nprint(response.status_code, response.json())"}]}},"/v1/posts":{"get":{"tags":["Posts"],"summary":"List Posts","description":"List posts with cursor-based pagination and filters for workspace, status, channel, and mode.","operationId":"listPosts","parameters":[{"name":"workspaceId","in":"query","schema":{"type":"string"},"description":"Filter by workspace ID"},{"name":"status","in":"query","schema":{"type":"string"},"description":"Filter by post status"},{"name":"channelId","in":"query","schema":{"type":"string"},"description":"Filter by channel ID"},{"name":"mode","in":"query","schema":{"type":"string"},"description":"Filter by publish mode"},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Pagination cursor"},{"name":"limit","in":"query","schema":{"type":"integer","default":30},"description":"Items per page (max 100)"}],"responses":{"200":{"description":"List of posts retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Post"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X GET \"https://api.flockpush.com/v1/posts?limit=10\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\""},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/posts?limit=10\", {\n  method: \"GET\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n  },\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/posts?limit=10\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n}\n\nresponse = requests.get(url, headers=headers)\nprint(response.status_code, response.json())"}]},"post":{"tags":["Posts"],"summary":"Create Post","description":"Publish or schedule a single post across one or more social channels. Supports per-network text and media overrides.","operationId":"createPost","parameters":[{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePostRequest"}}}},"responses":{"201":{"description":"Post created and queued/published successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"400":{"description":"Invalid request payload or channel validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Idempotency key conflict or duplicate post within 24h","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X POST \"https://api.flockpush.com/v1/posts\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\" \\\n  -H \"Idempotency-Key: 7b31057e-399d-40ba-85b4-d533ba17f09a\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"channels\": [\n    \"ch_bluesky_01\",\n    \"ch_linkedin_02\"\n  ],\n  \"text\": \"Broadcasting across Bluesky & LinkedIn with one API call! 🪶\",\n  \"mode\": \"now\"\n}'"},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/posts\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"channels\": [\n        \"ch_bluesky_01\",\n        \"ch_linkedin_02\"\n    ],\n    \"text\": \"Broadcasting across Bluesky & LinkedIn with one API call! 🪶\",\n    \"mode\": \"now\"\n}),\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/posts\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n    \"Content-Type\": \"application/json\",\n}\npayload = {\n    \"channels\": [\n        \"ch_bluesky_01\",\n        \"ch_linkedin_02\"\n    ],\n    \"text\": \"Broadcasting across Bluesky & LinkedIn with one API call! 🪶\",\n    \"mode\": \"now\"\n}\n\nresponse = requests.post(url, headers=headers, json=payload)\nprint(response.status_code, response.json())"}]}},"/v1/posts/validate":{"post":{"tags":["Posts"],"summary":"Validate Post (Dry Run)","description":"Dry-run validation checks limits, media formats, and channel health without creating any post or delivery records.","operationId":"validatePost","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePostRequest"}}}},"responses":{"200":{"description":"Validation results","content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean"},"violations":{"type":"array","items":{"type":"object"}}}}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X POST \"https://api.flockpush.com/v1/posts/validate\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"channels\": [\n    \"ch_bluesky_01\"\n  ],\n  \"text\": \"Testing validation without posting.\"\n}'"},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/posts/validate\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"channels\": [\n        \"ch_bluesky_01\"\n    ],\n    \"text\": \"Testing validation without posting.\"\n}),\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/posts/validate\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Content-Type\": \"application/json\",\n}\npayload = {\n    \"channels\": [\n        \"ch_bluesky_01\"\n    ],\n    \"text\": \"Testing validation without posting.\"\n}\n\nresponse = requests.post(url, headers=headers, json=payload)\nprint(response.status_code, response.json())"}]}},"/v1/posts/{id}":{"get":{"tags":["Posts"],"summary":"Get Post Detail","description":"Fetch complete post record including all deliveries, external network IDs, URLs, and attempt timeline.","operationId":"getPost","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Post detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"404":{"description":"Post not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X GET \"https://api.flockpush.com/v1/posts/post_01J9K8L7M6N5P4Q3R2S1T0U9V\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\""},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/posts/post_01J9K8L7M6N5P4Q3R2S1T0U9V\", {\n  method: \"GET\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n  },\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/posts/post_01J9K8L7M6N5P4Q3R2S1T0U9V\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n}\n\nresponse = requests.get(url, headers=headers)\nprint(response.status_code, response.json())"}]},"patch":{"tags":["Posts"],"summary":"Update Draft Post","description":"Update content, title, link, or media for a draft post prior to approval or publication.","operationId":"updatePost","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"title":{"type":"string"},"link":{"type":"string","format":"uri"},"firstComment":{"type":"string"}}}}}},"responses":{"200":{"description":"Post updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X PATCH \"https://api.flockpush.com/v1/posts/post_01J9K8L7M6N5P4Q3R2S1T0U9V\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"text\": \"Updated draft copy with polished tone.\"\n}'"},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/posts/post_01J9K8L7M6N5P4Q3R2S1T0U9V\", {\n  method: \"PATCH\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"text\": \"Updated draft copy with polished tone.\"\n}),\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/posts/post_01J9K8L7M6N5P4Q3R2S1T0U9V\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Content-Type\": \"application/json\",\n}\npayload = {\n    \"text\": \"Updated draft copy with polished tone.\"\n}\n\nresponse = requests.patch(url, headers=headers, json=payload)\nprint(response.status_code, response.json())"}]},"delete":{"tags":["Posts"],"summary":"Cancel or Delete Post","description":"Cancel a scheduled post or delete a draft. Note that already-published network posts are preserved.","operationId":"deletePost","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Post deleted or canceled successfully"}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X DELETE \"https://api.flockpush.com/v1/posts/post_01J9K8L7M6N5P4Q3R2S1T0U9V\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\""},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/posts/post_01J9K8L7M6N5P4Q3R2S1T0U9V\", {\n  method: \"DELETE\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n  },\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/posts/post_01J9K8L7M6N5P4Q3R2S1T0U9V\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n}\n\nresponse = requests.delete(url, headers=headers)\nprint(response.status_code, response.json())"}]}},"/v1/posts/{id}/approve":{"post":{"tags":["Posts"],"summary":"Approve Post","description":"Approve a draft post submitted by a contributor, scheduling or dispatching its deliveries.","operationId":"approvePost","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"responses":{"200":{"description":"Post approved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X POST \"https://api.flockpush.com/v1/posts/post_01J9K8L7M6N5P4Q3R2S1T0U9V/approve\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\" \\\n  -H \"Idempotency-Key: 7b31057e-399d-40ba-85b4-d533ba17f09a\""},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/posts/post_01J9K8L7M6N5P4Q3R2S1T0U9V/approve\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n  },\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/posts/post_01J9K8L7M6N5P4Q3R2S1T0U9V/approve\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n}\n\nresponse = requests.post(url, headers=headers)\nprint(response.status_code, response.json())"}]}},"/v1/posts/{id}/reject":{"post":{"tags":["Posts"],"summary":"Reject Post","description":"Reject a draft post with an optional feedback note explaining required revisions.","operationId":"rejectPost","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","example":"Needs alt text on images."}}}}}},"responses":{"200":{"description":"Post rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X POST \"https://api.flockpush.com/v1/posts/post_01J9K8L7M6N5P4Q3R2S1T0U9V/reject\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\" \\\n  -H \"Idempotency-Key: 7b31057e-399d-40ba-85b4-d533ba17f09a\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"reason\": \"Needs image alt text before publishing.\"\n}'"},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/posts/post_01J9K8L7M6N5P4Q3R2S1T0U9V/reject\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"reason\": \"Needs image alt text before publishing.\"\n}),\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/posts/post_01J9K8L7M6N5P4Q3R2S1T0U9V/reject\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n    \"Content-Type\": \"application/json\",\n}\npayload = {\n    \"reason\": \"Needs image alt text before publishing.\"\n}\n\nresponse = requests.post(url, headers=headers, json=payload)\nprint(response.status_code, response.json())"}]}},"/v1/posts/{id}/reschedule":{"post":{"tags":["Posts"],"summary":"Reschedule Post","description":"Update the scheduled publish time for a pending scheduled post.","operationId":"reschedulePost","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["scheduledAt"],"properties":{"scheduledAt":{"type":"string","format":"date-time","example":"2026-10-18T14:00:00Z"}}}}}},"responses":{"200":{"description":"Post rescheduled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X POST \"https://api.flockpush.com/v1/posts/post_01J9K8L7M6N5P4Q3R2S1T0U9V/reschedule\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\" \\\n  -H \"Idempotency-Key: 7b31057e-399d-40ba-85b4-d533ba17f09a\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"scheduledAt\": \"2026-10-18T14:00:00Z\"\n}'"},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/posts/post_01J9K8L7M6N5P4Q3R2S1T0U9V/reschedule\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"scheduledAt\": \"2026-10-18T14:00:00Z\"\n}),\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/posts/post_01J9K8L7M6N5P4Q3R2S1T0U9V/reschedule\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n    \"Content-Type\": \"application/json\",\n}\npayload = {\n    \"scheduledAt\": \"2026-10-18T14:00:00Z\"\n}\n\nresponse = requests.post(url, headers=headers, json=payload)\nprint(response.status_code, response.json())"}]}},"/v1/posts/{id}/cancel":{"post":{"tags":["Posts"],"summary":"Cancel Scheduled Post","description":"Cancel a scheduled post or revert it back to draft status.","operationId":"cancelPost","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"toDraft":{"type":"boolean","default":false}}}}}},"responses":{"200":{"description":"Post canceled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X POST \"https://api.flockpush.com/v1/posts/post_01J9K8L7M6N5P4Q3R2S1T0U9V/cancel\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\" \\\n  -H \"Idempotency-Key: 7b31057e-399d-40ba-85b4-d533ba17f09a\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"toDraft\": true\n}'"},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/posts/post_01J9K8L7M6N5P4Q3R2S1T0U9V/cancel\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"toDraft\": true\n}),\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/posts/post_01J9K8L7M6N5P4Q3R2S1T0U9V/cancel\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n    \"Content-Type\": \"application/json\",\n}\npayload = {\n    \"toDraft\": True\n}\n\nresponse = requests.post(url, headers=headers, json=payload)\nprint(response.status_code, response.json())"}]}},"/v1/deliveries/{id}/retry":{"post":{"tags":["Deliveries"],"summary":"Retry Failed Delivery","description":"Retry a delivery that encountered a transient or permanent error. Set force to bypass uncertainty guards.","operationId":"retryDelivery","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Delivery ID"},{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"force":{"type":"boolean","default":false,"description":"Bypass duplicate/uncertainty guard"},"confirmed":{"type":"boolean","default":false}}}}}},"responses":{"200":{"description":"Delivery retry dispatched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"deliveryId":{"type":"string"},"status":{"type":"string","example":"queued"},"attempt":{"type":"integer","example":2}}}}}},"404":{"description":"Delivery not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Delivery is already in progress or already succeeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X POST \"https://api.flockpush.com/v1/deliveries/del_01J9K8L7M6N5P4Q3R2S1T0U9V/retry\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\" \\\n  -H \"Idempotency-Key: 7b31057e-399d-40ba-85b4-d533ba17f09a\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"force\": true\n}'"},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/deliveries/del_01J9K8L7M6N5P4Q3R2S1T0U9V/retry\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"force\": true\n}),\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/deliveries/del_01J9K8L7M6N5P4Q3R2S1T0U9V/retry\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n    \"Content-Type\": \"application/json\",\n}\npayload = {\n    \"force\": True\n}\n\nresponse = requests.post(url, headers=headers, json=payload)\nprint(response.status_code, response.json())"}]}},"/v1/channels":{"get":{"tags":["Channels"],"summary":"List Connected Channels","description":"Retrieve all connected social media channels in the active workspace with current health status.","operationId":"listChannels","parameters":[{"name":"workspaceId","in":"query","schema":{"type":"string"},"description":"Filter by workspace ID"}],"responses":{"200":{"description":"Channels retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Channel"}}}}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X GET \"https://api.flockpush.com/v1/channels\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\""},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/channels\", {\n  method: \"GET\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n  },\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/channels\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n}\n\nresponse = requests.get(url, headers=headers)\nprint(response.status_code, response.json())"}]}},"/v1/channels/bluesky":{"post":{"tags":["Channels"],"summary":"Connect Bluesky Account","description":"Connect a Bluesky handle using an App Password.","operationId":"connectBluesky","parameters":[{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["workspaceId","handle","appPassword"],"properties":{"workspaceId":{"type":"string"},"handle":{"type":"string","example":"user.bsky.social"},"appPassword":{"type":"string","example":"xxxx-xxxx-xxxx-xxxx"},"serviceUrl":{"type":"string","format":"uri","example":"https://bsky.social"}}}}}},"responses":{"201":{"description":"Channel connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Channel"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X POST \"https://api.flockpush.com/v1/channels/bluesky\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\" \\\n  -H \"Idempotency-Key: 7b31057e-399d-40ba-85b4-d533ba17f09a\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"workspaceId\": \"ws_01J9K8L7M6N5P4Q3R2S1T0U9V\",\n  \"handle\": \"user.bsky.social\",\n  \"appPassword\": \"xxxx-xxxx-xxxx-xxxx\"\n}'"},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/channels/bluesky\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"workspaceId\": \"ws_01J9K8L7M6N5P4Q3R2S1T0U9V\",\n    \"handle\": \"user.bsky.social\",\n    \"appPassword\": \"xxxx-xxxx-xxxx-xxxx\"\n}),\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/channels/bluesky\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n    \"Content-Type\": \"application/json\",\n}\npayload = {\n    \"workspaceId\": \"ws_01J9K8L7M6N5P4Q3R2S1T0U9V\",\n    \"handle\": \"user.bsky.social\",\n    \"appPassword\": \"xxxx-xxxx-xxxx-xxxx\"\n}\n\nresponse = requests.post(url, headers=headers, json=payload)\nprint(response.status_code, response.json())"}]}},"/v1/channels/oauth":{"post":{"tags":["Channels"],"summary":"Initiate OAuth Connection","description":"Generate OAuth authorization URL for connecting LinkedIn, X, Facebook, Instagram, Pinterest, YouTube, or TikTok.","operationId":"initiateOAuth","parameters":[{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["workspaceId","connector"],"properties":{"workspaceId":{"type":"string"},"connector":{"type":"string","enum":["linkedin","x","facebook","instagram","pinterest","youtube","tiktok"]},"redirectUri":{"type":"string","format":"uri","description":"Deprecated and ignored. The server always uses its registered callback URI."}}}}}},"responses":{"200":{"description":"OAuth authorize URL generated","content":{"application/json":{"schema":{"type":"object","properties":{"authorizeUrl":{"type":"string","format":"uri"},"state":{"type":"string"}}}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X POST \"https://api.flockpush.com/v1/channels/oauth\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\" \\\n  -H \"Idempotency-Key: 7b31057e-399d-40ba-85b4-d533ba17f09a\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"workspaceId\": \"ws_01J9K8L7M6N5P4Q3R2S1T0U9V\",\n  \"connector\": \"linkedin\"\n}'"},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/channels/oauth\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"workspaceId\": \"ws_01J9K8L7M6N5P4Q3R2S1T0U9V\",\n    \"connector\": \"linkedin\"\n}),\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/channels/oauth\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n    \"Content-Type\": \"application/json\",\n}\npayload = {\n    \"workspaceId\": \"ws_01J9K8L7M6N5P4Q3R2S1T0U9V\",\n    \"connector\": \"linkedin\"\n}\n\nresponse = requests.post(url, headers=headers, json=payload)\nprint(response.status_code, response.json())"}]}},"/v1/channels/{id}/slots":{"get":{"tags":["Channels"],"summary":"Get Channel Posting Slots","description":"Retrieve weekly publishing schedule time slots and queue pause state for a channel.","operationId":"getChannelSlots","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Channel slots retrieved","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ChannelSlot"}},"queuePaused":{"type":"boolean"}}}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X GET \"https://api.flockpush.com/v1/channels/ch_01J9K8L7M6N5P4Q3R2S1T0U9V/slots\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\""},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/channels/ch_01J9K8L7M6N5P4Q3R2S1T0U9V/slots\", {\n  method: \"GET\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n  },\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/channels/ch_01J9K8L7M6N5P4Q3R2S1T0U9V/slots\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n}\n\nresponse = requests.get(url, headers=headers)\nprint(response.status_code, response.json())"}]},"put":{"tags":["Channels"],"summary":"Update Channel Posting Slots","description":"Replace the recurring weekly publishing schedule time slots for a channel.","operationId":"updateChannelSlots","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["slots"],"properties":{"slots":{"type":"array","items":{"$ref":"#/components/schemas/ChannelSlot"}},"queuePaused":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Slots updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ChannelSlot"}},"queuePaused":{"type":"boolean"}}}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X PUT \"https://api.flockpush.com/v1/channels/ch_01J9K8L7M6N5P4Q3R2S1T0U9V/slots\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"slots\": [\n    {\n      \"dayOfWeek\": 1,\n      \"timeSlot\": \"09:00\",\n      \"timezone\": \"America/New_York\",\n      \"enabled\": true\n    },\n    {\n      \"dayOfWeek\": 3,\n      \"timeSlot\": \"14:00\",\n      \"timezone\": \"America/New_York\",\n      \"enabled\": true\n    }\n  ]\n}'"},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/channels/ch_01J9K8L7M6N5P4Q3R2S1T0U9V/slots\", {\n  method: \"PUT\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"slots\": [\n        {\n            \"dayOfWeek\": 1,\n            \"timeSlot\": \"09:00\",\n            \"timezone\": \"America/New_York\",\n            \"enabled\": true\n        },\n        {\n            \"dayOfWeek\": 3,\n            \"timeSlot\": \"14:00\",\n            \"timezone\": \"America/New_York\",\n            \"enabled\": true\n        }\n    ]\n}),\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/channels/ch_01J9K8L7M6N5P4Q3R2S1T0U9V/slots\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Content-Type\": \"application/json\",\n}\npayload = {\n    \"slots\": [\n        {\n            \"dayOfWeek\": 1,\n            \"timeSlot\": \"09:00\",\n            \"timezone\": \"America/New_York\",\n            \"enabled\": True\n        },\n        {\n            \"dayOfWeek\": 3,\n            \"timeSlot\": \"14:00\",\n            \"timezone\": \"America/New_York\",\n            \"enabled\": True\n        }\n    ]\n}\n\nresponse = requests.put(url, headers=headers, json=payload)\nprint(response.status_code, response.json())"}]}},"/v1/channels/{id}/queue/reorder":{"post":{"tags":["Channels"],"summary":"Reorder Channel Queue","description":"Reorder scheduled queue deliveries in a channel's posting queue.","operationId":"reorderChannelQueue","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["deliveryIds"],"properties":{"deliveryIds":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Queue reordered successfully"}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X POST \"https://api.flockpush.com/v1/channels/ch_01J9K8L7M6N5P4Q3R2S1T0U9V/queue/reorder\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\" \\\n  -H \"Idempotency-Key: 7b31057e-399d-40ba-85b4-d533ba17f09a\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"deliveryIds\": [\n    \"del_01\",\n    \"del_02\"\n  ]\n}'"},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/channels/ch_01J9K8L7M6N5P4Q3R2S1T0U9V/queue/reorder\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"deliveryIds\": [\n        \"del_01\",\n        \"del_02\"\n    ]\n}),\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/channels/ch_01J9K8L7M6N5P4Q3R2S1T0U9V/queue/reorder\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n    \"Content-Type\": \"application/json\",\n}\npayload = {\n    \"deliveryIds\": [\n        \"del_01\",\n        \"del_02\"\n    ]\n}\n\nresponse = requests.post(url, headers=headers, json=payload)\nprint(response.status_code, response.json())"}]}},"/v1/channels/{id}/queue/share-next":{"post":{"tags":["Channels"],"summary":"Share Next Queued Post","description":"Immediately dispatch the next post in the queue or a designated delivery without waiting for the next slot.","operationId":"shareNextQueuedPost","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"deliveryId":{"type":"string"}}}}}},"responses":{"200":{"description":"Delivery dispatched immediately"}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X POST \"https://api.flockpush.com/v1/channels/ch_01J9K8L7M6N5P4Q3R2S1T0U9V/queue/share-next\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\" \\\n  -H \"Idempotency-Key: 7b31057e-399d-40ba-85b4-d533ba17f09a\""},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/channels/ch_01J9K8L7M6N5P4Q3R2S1T0U9V/queue/share-next\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n  },\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/channels/ch_01J9K8L7M6N5P4Q3R2S1T0U9V/queue/share-next\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n}\n\nresponse = requests.post(url, headers=headers)\nprint(response.status_code, response.json())"}]}},"/v1/channels/{id}/optimal-slots":{"get":{"tags":["Channels"],"summary":"Get Channel Optimal Posting Times","description":"Analyze historical post publishing engagement and channel audience activity heatmaps to calculate and recommend optimal weekly time slots per channel.","operationId":"getChannelOptimalSlots","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"targetSlotCount","in":"query","schema":{"type":"integer","default":7}}],"responses":{"200":{"description":"Optimal slots and 7x24 heatmap calculated"}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X GET \"https://api.flockpush.com/v1/channels/ch_01J9K8L7M6N5P4Q3R2S1T0U9V/optimal-slots\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\""},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/channels/ch_01J9K8L7M6N5P4Q3R2S1T0U9V/optimal-slots\", {\n  method: \"GET\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n  },\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/channels/ch_01J9K8L7M6N5P4Q3R2S1T0U9V/optimal-slots\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n}\n\nresponse = requests.get(url, headers=headers)\nprint(response.status_code, response.json())"}]}},"/v1/channels/{id}/apply-optimal-slots":{"post":{"tags":["Channels"],"summary":"Apply Optimal Posting Slots","description":"Applies the calculated optimal weekly time slots directly to the channel schedule and reflows queue deliveries.","operationId":"applyChannelOptimalSlots","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"targetSlotCount":{"type":"integer","default":7}}}}}},"responses":{"200":{"description":"Optimal slots applied and queue reflowed"}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X POST \"https://api.flockpush.com/v1/channels/ch_01J9K8L7M6N5P4Q3R2S1T0U9V/apply-optimal-slots\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\""},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/channels/ch_01J9K8L7M6N5P4Q3R2S1T0U9V/apply-optimal-slots\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n  },\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/channels/ch_01J9K8L7M6N5P4Q3R2S1T0U9V/apply-optimal-slots\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n}\n\nresponse = requests.post(url, headers=headers)\nprint(response.status_code, response.json())"}]}},"/v1/api-keys":{"get":{"tags":["API Keys"],"summary":"List API Keys","description":"List active API keys in the organization with their prefixes, scopes, and expiration details.","operationId":"listApiKeys","responses":{"200":{"description":"List of API keys","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X GET \"https://api.flockpush.com/v1/api-keys\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\""},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/api-keys\", {\n  method: \"GET\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n  },\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/api-keys\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n}\n\nresponse = requests.get(url, headers=headers)\nprint(response.status_code, response.json())"}]},"post":{"tags":["API Keys"],"summary":"Create API Key","description":"Provision a new API key in live (`fp_live_...`) or test (`fp_test_...`) mode with granular scopes.","operationId":"createApiKey","parameters":[{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","scopes"],"properties":{"name":{"type":"string","example":"Make.com Automation Key"},"mode":{"type":"string","enum":["live","test"],"default":"live"},"scopes":{"type":"array","items":{"type":"string"},"example":["posts:write","posts:read","channels:read"]},"workspaceIds":{"type":"array","items":{"type":"string"}},"expiresAt":{"type":"string","format":"date-time"}}}}}},"responses":{"201":{"description":"API Key created. The plaintext key is only returned once upon creation.","content":{"application/json":{"schema":{"type":"object","required":["key","apiKey"],"properties":{"key":{"type":"string","example":"fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim"},"apiKey":{"$ref":"#/components/schemas/ApiKey"}}}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X POST \"https://api.flockpush.com/v1/api-keys\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\" \\\n  -H \"Idempotency-Key: 7b31057e-399d-40ba-85b4-d533ba17f09a\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"name\": \"Test Mode Simulator Key\",\n  \"mode\": \"test\",\n  \"scopes\": [\n    \"posts:write\",\n    \"posts:read\",\n    \"channels:read\"\n  ]\n}'"},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/api-keys\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"name\": \"Test Mode Simulator Key\",\n    \"mode\": \"test\",\n    \"scopes\": [\n        \"posts:write\",\n        \"posts:read\",\n        \"channels:read\"\n    ]\n}),\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/api-keys\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n    \"Content-Type\": \"application/json\",\n}\npayload = {\n    \"name\": \"Test Mode Simulator Key\",\n    \"mode\": \"test\",\n    \"scopes\": [\n        \"posts:write\",\n        \"posts:read\",\n        \"channels:read\"\n    ]\n}\n\nresponse = requests.post(url, headers=headers, json=payload)\nprint(response.status_code, response.json())"}]}},"/v1/api-keys/{id}":{"delete":{"tags":["API Keys"],"summary":"Revoke API Key","description":"Immediately revoke an API key, invalidating all subsequent API requests using it.","operationId":"revokeApiKey","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"API key revoked successfully"}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X DELETE \"https://api.flockpush.com/v1/api-keys/key_01J9K8L7M6N5P4Q3R2S1T0U9V\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\""},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/api-keys/key_01J9K8L7M6N5P4Q3R2S1T0U9V\", {\n  method: \"DELETE\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n  },\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/api-keys/key_01J9K8L7M6N5P4Q3R2S1T0U9V\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n}\n\nresponse = requests.delete(url, headers=headers)\nprint(response.status_code, response.json())"}]}},"/v1/webhooks":{"get":{"tags":["Webhooks"],"summary":"List Webhook Endpoints","description":"List configured Standard Webhooks destinations for outbound publishing events.","operationId":"listWebhooks","parameters":[{"name":"workspaceId","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"List of webhook endpoints","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}}}}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X GET \"https://api.flockpush.com/v1/webhooks\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\""},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/webhooks\", {\n  method: \"GET\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n  },\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/webhooks\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n}\n\nresponse = requests.get(url, headers=headers)\nprint(response.status_code, response.json())"}]},"post":{"tags":["Webhooks"],"summary":"Create Webhook Endpoint","description":"Register a new HTTPS endpoint to receive signed Standard Webhooks events (`webhook-signature`).","operationId":"createWebhook","parameters":[{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["workspaceId","url","eventTypes"],"properties":{"workspaceId":{"type":"string"},"url":{"type":"string","format":"uri","example":"https://mysite.com/api/flockpush-webhook"},"eventTypes":{"type":"array","items":{"type":"string"},"example":["post.published","post.failed","delivery.failed"]},"secret":{"type":"string","description":"Optional custom signing secret prefix (sec_...)"}}}}}},"responses":{"201":{"description":"Webhook registered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X POST \"https://api.flockpush.com/v1/webhooks\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\" \\\n  -H \"Idempotency-Key: 7b31057e-399d-40ba-85b4-d533ba17f09a\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"workspaceId\": \"ws_01J9K8L7M6N5P4Q3R2S1T0U9V\",\n  \"url\": \"https://mysite.com/api/flockpush-webhook\",\n  \"eventTypes\": [\n    \"post.published\",\n    \"delivery.failed\"\n  ]\n}'"},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/webhooks\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"workspaceId\": \"ws_01J9K8L7M6N5P4Q3R2S1T0U9V\",\n    \"url\": \"https://mysite.com/api/flockpush-webhook\",\n    \"eventTypes\": [\n        \"post.published\",\n        \"delivery.failed\"\n    ]\n}),\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/webhooks\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n    \"Content-Type\": \"application/json\",\n}\npayload = {\n    \"workspaceId\": \"ws_01J9K8L7M6N5P4Q3R2S1T0U9V\",\n    \"url\": \"https://mysite.com/api/flockpush-webhook\",\n    \"eventTypes\": [\n        \"post.published\",\n        \"delivery.failed\"\n    ]\n}\n\nresponse = requests.post(url, headers=headers, json=payload)\nprint(response.status_code, response.json())"}]}},"/v1/webhooks/{id}":{"get":{"tags":["Webhooks"],"summary":"Get Webhook Endpoint","operationId":"getWebhook","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Webhook endpoint retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X GET \"https://api.flockpush.com/v1/webhooks/wh_01J9K8L7M6N5P4Q3R2S1T0U9V\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\""},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/webhooks/wh_01J9K8L7M6N5P4Q3R2S1T0U9V\", {\n  method: \"GET\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n  },\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/webhooks/wh_01J9K8L7M6N5P4Q3R2S1T0U9V\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n}\n\nresponse = requests.get(url, headers=headers)\nprint(response.status_code, response.json())"}]},"patch":{"tags":["Webhooks"],"summary":"Update Webhook Endpoint","operationId":"updateWebhook","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"eventTypes":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","disabled"]}}}}}},"responses":{"200":{"description":"Webhook endpoint updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X PATCH \"https://api.flockpush.com/v1/webhooks/wh_01J9K8L7M6N5P4Q3R2S1T0U9V\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"status\": \"active\"\n}'"},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/webhooks/wh_01J9K8L7M6N5P4Q3R2S1T0U9V\", {\n  method: \"PATCH\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"status\": \"active\"\n}),\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/webhooks/wh_01J9K8L7M6N5P4Q3R2S1T0U9V\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Content-Type\": \"application/json\",\n}\npayload = {\n    \"status\": \"active\"\n}\n\nresponse = requests.patch(url, headers=headers, json=payload)\nprint(response.status_code, response.json())"}]},"delete":{"tags":["Webhooks"],"summary":"Delete Webhook Endpoint","operationId":"deleteWebhook","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Webhook deleted successfully"}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X DELETE \"https://api.flockpush.com/v1/webhooks/wh_01J9K8L7M6N5P4Q3R2S1T0U9V\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\""},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/webhooks/wh_01J9K8L7M6N5P4Q3R2S1T0U9V\", {\n  method: \"DELETE\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n  },\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/webhooks/wh_01J9K8L7M6N5P4Q3R2S1T0U9V\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n}\n\nresponse = requests.delete(url, headers=headers)\nprint(response.status_code, response.json())"}]}},"/v1/webhooks/{id}/test":{"post":{"tags":["Webhooks"],"summary":"Send Test Ping Webhook","description":"Dispatches a synthetic `test.ping` Standard Webhooks event to verify receiver signature checking and latency.","operationId":"testWebhook","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"responses":{"200":{"description":"Ping event dispatched","content":{"application/json":{"schema":{"type":"object","properties":{"dispatched":{"type":"boolean"}}}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X POST \"https://api.flockpush.com/v1/webhooks/wh_01J9K8L7M6N5P4Q3R2S1T0U9V/test\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\" \\\n  -H \"Idempotency-Key: 7b31057e-399d-40ba-85b4-d533ba17f09a\""},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/webhooks/wh_01J9K8L7M6N5P4Q3R2S1T0U9V/test\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n  },\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/webhooks/wh_01J9K8L7M6N5P4Q3R2S1T0U9V/test\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n}\n\nresponse = requests.post(url, headers=headers)\nprint(response.status_code, response.json())"}]}},"/v1/webhooks/{id}/deliveries":{"get":{"tags":["Webhooks"],"summary":"List Webhook Deliveries","description":"List recent HTTP delivery attempts, payloads, and response status codes for this endpoint.","operationId":"listWebhookDeliveries","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Recent webhook dispatch deliveries","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object"}}}}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X GET \"https://api.flockpush.com/v1/webhooks/wh_01J9K8L7M6N5P4Q3R2S1T0U9V/deliveries\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\""},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/webhooks/wh_01J9K8L7M6N5P4Q3R2S1T0U9V/deliveries\", {\n  method: \"GET\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n  },\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/webhooks/wh_01J9K8L7M6N5P4Q3R2S1T0U9V/deliveries\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n}\n\nresponse = requests.get(url, headers=headers)\nprint(response.status_code, response.json())"}]}},"/v1/webhooks/{id}/rotate-secret":{"post":{"tags":["Webhooks"],"summary":"Rotate Webhook Secret","description":"Rotate the HMAC signing secret. The previous secret remains valid for 24h during migration.","operationId":"rotateWebhookSecret","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"responses":{"200":{"description":"Secret rotated","content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string","example":"whsec_..."}}}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X POST \"https://api.flockpush.com/v1/webhooks/wh_01J9K8L7M6N5P4Q3R2S1T0U9V/rotate-secret\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\" \\\n  -H \"Idempotency-Key: 7b31057e-399d-40ba-85b4-d533ba17f09a\""},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/webhooks/wh_01J9K8L7M6N5P4Q3R2S1T0U9V/rotate-secret\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n  },\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/webhooks/wh_01J9K8L7M6N5P4Q3R2S1T0U9V/rotate-secret\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n}\n\nresponse = requests.post(url, headers=headers)\nprint(response.status_code, response.json())"}]}},"/v1/imports":{"post":{"tags":["JSON Imports"],"summary":"Upload JSON Import Batch","description":"Upload an array or batch object of posts (≤ 500 rows) for validation and staged import.","operationId":"uploadImport","parameters":[{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["posts"],"properties":{"version":{"type":"integer","default":1},"workspaceId":{"type":"string"},"posts":{"type":"array","items":{"$ref":"#/components/schemas/CreatePostRequest"}}}}}}},"responses":{"201":{"description":"Import validated and prepared for commit","content":{"application/json":{"schema":{"type":"object","properties":{"importId":{"type":"string","example":"imp_01J9K8L7M6N5P4Q3R2S1T0U9V"},"status":{"type":"string","example":"validated"},"total":{"type":"integer","example":10},"validCount":{"type":"integer","example":10},"invalidCount":{"type":"integer","example":0},"errors":{"type":"array","items":{"type":"object"}}}}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X POST \"https://api.flockpush.com/v1/imports\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\" \\\n  -H \"Idempotency-Key: 7b31057e-399d-40ba-85b4-d533ba17f09a\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"version\": 1,\n  \"workspaceId\": \"ws_01J9K8L7M6N5P4Q3R2S1T0U9V\",\n  \"posts\": [\n    {\n      \"channels\": [\n        \"ch_bluesky_01\"\n      ],\n      \"text\": \"Imported batch post #1 via FlockPush API\",\n      \"mode\": \"draft\"\n    }\n  ]\n}'"},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/imports\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"version\": 1,\n    \"workspaceId\": \"ws_01J9K8L7M6N5P4Q3R2S1T0U9V\",\n    \"posts\": [\n        {\n            \"channels\": [\n                \"ch_bluesky_01\"\n            ],\n            \"text\": \"Imported batch post #1 via FlockPush API\",\n            \"mode\": \"draft\"\n        }\n    ]\n}),\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/imports\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n    \"Content-Type\": \"application/json\",\n}\npayload = {\n    \"version\": 1,\n    \"workspaceId\": \"ws_01J9K8L7M6N5P4Q3R2S1T0U9V\",\n    \"posts\": [\n        {\n            \"channels\": [\n                \"ch_bluesky_01\"\n            ],\n            \"text\": \"Imported batch post #1 via FlockPush API\",\n            \"mode\": \"draft\"\n        }\n    ]\n}\n\nresponse = requests.post(url, headers=headers, json=payload)\nprint(response.status_code, response.json())"}]}},"/v1/imports/validate":{"post":{"tags":["JSON Imports"],"summary":"Validate JSON Import File","description":"Dry-run validation of a bulk JSON posts payload reporting character limits and media URL health.","operationId":"validateImport","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["posts"],"properties":{"version":{"type":"integer"},"posts":{"type":"array","items":{"$ref":"#/components/schemas/CreatePostRequest"}}}}}}},"responses":{"200":{"description":"Validation report","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer"},"validCount":{"type":"integer"},"invalidCount":{"type":"integer"},"errors":{"type":"array","items":{"type":"object"}}}}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X POST \"https://api.flockpush.com/v1/imports/validate\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"posts\": [\n    {\n      \"channels\": [\n        \"ch_bluesky_01\"\n      ],\n      \"text\": \"Validating row before committing.\"\n    }\n  ]\n}'"},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/imports/validate\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"posts\": [\n        {\n            \"channels\": [\n                \"ch_bluesky_01\"\n            ],\n            \"text\": \"Validating row before committing.\"\n        }\n    ]\n}),\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/imports/validate\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Content-Type\": \"application/json\",\n}\npayload = {\n    \"posts\": [\n        {\n            \"channels\": [\n                \"ch_bluesky_01\"\n            ],\n            \"text\": \"Validating row before committing.\"\n        }\n    ]\n}\n\nresponse = requests.post(url, headers=headers, json=payload)\nprint(response.status_code, response.json())"}]}},"/v1/imports/{id}/commit":{"post":{"tags":["JSON Imports"],"summary":"Commit Validated Import","description":"Persists validated posts in transactions (100 rows per batch) and emits `import.completed` webhook.","operationId":"commitImport","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Import ID"},{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"skipInvalid":{"type":"boolean","default":true}}}}}},"responses":{"200":{"description":"Import committed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"committed"},"importId":{"type":"string"},"total":{"type":"integer"},"importedCount":{"type":"integer"},"skippedCount":{"type":"integer"},"postIds":{"type":"array","items":{"type":"string"}}}}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X POST \"https://api.flockpush.com/v1/imports/imp_01J9K8L7M6N5P4Q3R2S1T0U9V/commit\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\" \\\n  -H \"Idempotency-Key: 7b31057e-399d-40ba-85b4-d533ba17f09a\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"skipInvalid\": true\n}'"},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/imports/imp_01J9K8L7M6N5P4Q3R2S1T0U9V/commit\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"skipInvalid\": true\n}),\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/imports/imp_01J9K8L7M6N5P4Q3R2S1T0U9V/commit\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n    \"Idempotency-Key\": \"7b31057e-399d-40ba-85b4-d533ba17f09a\",\n    \"Content-Type\": \"application/json\",\n}\npayload = {\n    \"skipInvalid\": True\n}\n\nresponse = requests.post(url, headers=headers, json=payload)\nprint(response.status_code, response.json())"}]}},"/v1/audit-events":{"get":{"tags":["Audit Events"],"summary":"Query Audit Events","description":"Search and filter append-only security and activity audit logs with cursor pagination and CSV export.","operationId":"listAuditEvents","parameters":[{"name":"workspaceId","in":"query","schema":{"type":"string"},"description":"Filter by workspace"},{"name":"actorType","in":"query","schema":{"type":"string","enum":["user","api_key"]}},{"name":"action","in":"query","schema":{"type":"string"},"description":"e.g. post.create, channel.connect"},{"name":"targetType","in":"query","schema":{"type":"string"}},{"name":"startDate","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"endDate","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":50}},{"name":"format","in":"query","schema":{"type":"string","enum":["json","csv"],"default":"json"}}],"responses":{"200":{"description":"Audit log events","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AuditEvent"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}},"text/csv":{"schema":{"type":"string","description":"CSV export stream"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl -X GET \"https://api.flockpush.com/v1/audit-events?limit=20\" \\\n  -H \"Authorization: Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\""},{"lang":"TypeScript","label":"TypeScript","source":"const response = await fetch(\"https://api.flockpush.com/v1/audit-events?limit=20\", {\n  method: \"GET\",\n  headers: {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n  },\n});\n\nconst data = await response.json();\nconsole.log(data);"},{"lang":"Python","label":"Python","source":"import requests\n\nurl = \"https://api.flockpush.com/v1/audit-events?limit=20\"\nheaders = {\n    \"Authorization\": \"Bearer fp_test_9k8j7h6g5f4e3d2c1b0a_live_sim\",\n}\n\nresponse = requests.get(url, headers=headers)\nprint(response.status_code, response.json())"}]}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"http","scheme":"bearer","bearerFormat":"fp_live_ or fp_test_ API Key","description":"Authenticate with an API Key generated in your FlockPush dashboard. Use test mode keys (`fp_test_...`) to simulate deliveries without posting to external networks."}},"parameters":{"IdempotencyKeyHeader":{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Unique idempotency key (UUIDv4) to guarantee exactly-once execution for mutating requests (valid for 24h).","example":"7b31057e-399d-40ba-85b4-d533ba17f09a"}},"schemas":{"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"type":{"type":"string","example":"invalid_request"},"code":{"type":"string","example":"text_too_long"},"message":{"type":"string","example":"Text is 312 characters; Bluesky allows 300."},"param":{"type":"string","example":"text"},"channelId":{"type":"string","example":"ch_01J9K8L7M6N5P4Q3R2S1T0U9V"},"docUrl":{"type":"string","example":"https://flockpush.com/docs/errors#text_too_long"},"requestId":{"type":"string","example":"req_01J9K8L7M6N5P4Q3R2S1T0U9V"}}}}},"Pagination":{"type":"object","required":["nextCursor","hasMore"],"properties":{"nextCursor":{"type":["string","null"],"example":"eyJsYXN0SWQiOiJwb3N0XzAxSiJ9"},"hasMore":{"type":"boolean","example":false}}},"Delivery":{"type":"object","required":["id","channelId","status","runAt","attempt"],"properties":{"id":{"type":"string","example":"del_01J9K8L7M6N5P4Q3R2S1T0U9V"},"channelId":{"type":"string","example":"ch_bluesky_01"},"status":{"type":"string","enum":["scheduled","queued","publishing","published","failed","canceled"],"example":"published"},"livemode":{"type":"boolean","example":false},"runAt":{"type":"string","format":"date-time","example":"2026-10-15T15:00:00Z"},"queuePosition":{"type":["integer","null"],"example":1},"attempt":{"type":"integer","example":1},"networkPostId":{"type":["string","null"],"example":"at://did:plc:123/app.bsky.feed.post/456"},"postUrl":{"type":["string","null"],"example":"https://bsky.app/profile/user.bsky.social/post/456"},"publishedAt":{"type":["string","null"],"format":"date-time","example":"2026-10-15T15:00:04Z"},"errorMessage":{"type":["string","null"],"example":null}}},"DeliveryAttempt":{"type":"object","required":["id","deliveryId","attempt","startedAt","outcome","createdAt"],"properties":{"id":{"type":"string","example":"att_01J9K8L7M6N5P4Q3R2S1T0U9V"},"deliveryId":{"type":"string","example":"del_01J9K8L7M6N5P4Q3R2S1T0U9V"},"attempt":{"type":"integer","example":1},"startedAt":{"type":"string","format":"date-time","example":"2026-10-15T15:00:01Z"},"finishedAt":{"type":["string","null"],"format":"date-time","example":"2026-10-15T15:00:04Z"},"outcome":{"type":"string","enum":["success","transient_failure","permanent_failure"],"example":"success"},"httpStatus":{"type":["integer","null"],"example":200},"errorRaw":{"type":"object","additionalProperties":true},"createdAt":{"type":"string","format":"date-time"}}},"Post":{"type":"object","required":["id","workspaceId","status","text","mode","createdAt","deliveries"],"properties":{"id":{"type":"string","example":"post_01J9K8L7M6N5P4Q3R2S1T0U9V"},"workspaceId":{"type":"string","example":"ws_01J9K8L7M6N5P4Q3R2S1T0U9V"},"status":{"type":"string","enum":["draft","scheduled","queued","published","failed","canceled"],"example":"published"},"livemode":{"type":"boolean","example":false},"text":{"type":"string","example":"Launching our new multi-network engine on FlockPush! 🚀"},"title":{"type":["string","null"],"example":"Product Update"},"link":{"type":["string","null"],"example":"https://flockpush.com"},"firstComment":{"type":["string","null"],"example":"Read more at flockpush.com/blog"},"mode":{"type":"string","enum":["now","scheduled","queue","draft"],"example":"now"},"rejectionNote":{"type":["string","null"],"example":null},"createdAt":{"type":"string","format":"date-time","example":"2026-10-15T14:59:58Z"},"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/Delivery"}}}},"CreatePostRequest":{"type":"object","required":["channels"],"properties":{"workspaceId":{"type":"string","description":"Target workspace ID","example":"ws_01J9K8L7M6N5P4Q3R2S1T0U9V"},"channels":{"type":"array","items":{"type":"string"},"description":"Array of Channel IDs to publish to","example":["ch_bsky_01","ch_x_02"]},"text":{"type":"string","maxLength":10000,"description":"Default caption text","example":"Excited to launch FlockPush v1! 🪶"},"title":{"type":"string","maxLength":300,"description":"Post title (for YouTube / Pinterest / LinkedIn)","example":"Launch Announcement"},"hashtags":{"type":"array","items":{"type":"string"},"example":["#saas","#socialmedia"]},"link":{"type":"string","format":"uri","example":"https://flockpush.com"},"media":{"type":"array","maxItems":10,"items":{"type":"object","properties":{"id":{"type":"string","description":"Uploaded Media ID"},"url":{"type":"string","format":"uri","description":"Remote media URL (synchronously ingested ≤25MB)"},"alt":{"type":"string","description":"Accessible alt text description"}}}},"firstComment":{"type":"string","maxLength":2200,"example":"Links in comments!"},"overrides":{"type":"object","description":"Per-channel text, link, and media overrides","additionalProperties":{"type":"object","properties":{"text":{"type":"string"},"title":{"type":"string"},"hashtags":{"type":"array","items":{"type":"string"}},"firstComment":{"type":"string"}}}},"mode":{"type":"string","enum":["now","scheduled","queue","draft"],"default":"now"},"scheduledAt":{"type":"string","format":"date-time","example":"2026-10-16T18:00:00Z"},"externalRef":{"type":"string","maxLength":200,"example":"cms_article_9874"},"force":{"type":"boolean","default":false,"description":"Bypass duplicate post guard within 24h"}}},"Channel":{"type":"object","required":["id","workspaceId","connector","network","externalId","name","health","createdAt"],"properties":{"id":{"type":"string","example":"ch_01J9K8L7M6N5P4Q3R2S1T0U9V"},"workspaceId":{"type":"string","example":"ws_01J9K8L7M6N5P4Q3R2S1T0U9V"},"connector":{"type":"string","example":"bluesky"},"network":{"type":"string","example":"bluesky"},"externalId":{"type":"string","example":"flockpush.bsky.social"},"name":{"type":"string","example":"FlockPush Official"},"handle":{"type":["string","null"],"example":"@flockpush.bsky.social"},"avatarUrl":{"type":["string","null"],"format":"uri"},"health":{"type":"string","enum":["healthy","expiring","needs_reconnect"],"example":"healthy"},"healthReason":{"type":["string","null"],"example":null},"tokenExpiresAt":{"type":["string","null"],"format":"date-time"},"queuePaused":{"type":"boolean","example":false},"createdAt":{"type":"string","format":"date-time"}}},"ChannelSlot":{"type":"object","required":["dayOfWeek","timeSlot","timezone","enabled"],"properties":{"id":{"type":"string"},"channelId":{"type":"string"},"dayOfWeek":{"type":"integer","minimum":0,"maximum":6,"description":"0=Sun, 1=Mon, ..., 6=Sat","example":1},"timeSlot":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","example":"09:00"},"timezone":{"type":"string","example":"America/New_York"},"enabled":{"type":"boolean","example":true}}},"ApiKey":{"type":"object","required":["id","organizationId","name","prefix","mode","scopes","createdAt"],"properties":{"id":{"type":"string","example":"key_01J9K8L7M6N5P4Q3R2S1T0U9V"},"organizationId":{"type":"string","example":"org_01J9K8L7M6N5P4Q3R2S1T0U9V"},"name":{"type":"string","example":"Zapier Automated Publishing"},"prefix":{"type":"string","example":"fp_test_9k8j"},"mode":{"type":"string","enum":["live","test"],"example":"test"},"scopes":{"type":"array","items":{"type":"string","enum":["posts:write","posts:read","channels:read","channels:write","media:write","activity:read","webhooks:manage","imports:write"]},"example":["posts:write","posts:read"]},"workspaceIds":{"type":"array","items":{"type":"string"}},"lastUsedAt":{"type":["string","null"],"format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"}}},"WebhookEndpoint":{"type":"object","required":["id","organizationId","workspaceId","url","eventTypes","status","failedAttempts","createdAt"],"properties":{"id":{"type":"string","example":"wh_01J9K8L7M6N5P4Q3R2S1T0U9V"},"organizationId":{"type":"string","example":"org_01J9K8L7M6N5P4Q3R2S1T0U9V"},"workspaceId":{"type":"string","example":"ws_01J9K8L7M6N5P4Q3R2S1T0U9V"},"url":{"type":"string","format":"uri","example":"https://your-domain.com/webhooks/flockpush"},"eventTypes":{"type":"array","items":{"type":"string"},"example":["post.published","delivery.failed"]},"status":{"type":"string","enum":["active","disabled"],"example":"active"},"failedAttempts":{"type":"integer","example":0},"createdAt":{"type":"string","format":"date-time"}}},"AuditEvent":{"type":"object","required":["id","organizationId","actorId","actorType","action","targetType","targetId","createdAt"],"properties":{"id":{"type":"string","example":"aud_01J9K8L7M6N5P4Q3R2S1T0U9V"},"organizationId":{"type":"string"},"workspaceId":{"type":["string","null"]},"actorId":{"type":"string","example":"usr_01J9K8L7M6N5P4Q3R2S1T0U9V"},"actorType":{"type":"string","enum":["user","api_key"],"example":"user"},"action":{"type":"string","example":"post.create"},"targetType":{"type":"string","example":"post"},"targetId":{"type":"string","example":"post_01J9K8L7M6N5P4Q3R2S1T0U9V"},"ipAddress":{"type":["string","null"]},"userAgent":{"type":["string","null"]},"metadata":{"type":["object","null"]},"createdAt":{"type":"string","format":"date-time"}}},"Health":{"type":"object","required":["status","timestamp","version","uptime","service"],"properties":{"status":{"type":"string","enum":["ok","degraded","down"],"example":"ok"},"timestamp":{"type":"string","format":"date-time"},"version":{"type":"string","example":"0.1.0"},"uptime":{"type":"number","example":1243.52},"service":{"type":"string","example":"api"}}}}}}