### Run Quickstart Setup Source: https://unipost.dev/docs/cli/reference Guides the setup process by summarizing workspace, profile, account, and draft readiness. ```bash unipost quickstart --name "Studio" --json ``` -------------------------------- ### unipost quickstart Source: https://unipost.dev/docs/cli/reference Guides the setup process by summarizing workspace, profile, account, and draft readiness. ```APIDOC ## unipost quickstart ### Description Guides the next setup step by summarizing workspace, profile, account, and draft readiness. ### Command `unipost quickstart --name "Studio" --json` ``` -------------------------------- ### Install agent instructions Source: https://unipost.dev/docs/cli/reference Retrieves instruction package paths for local agent setup. ```bash unipost agent install --client codex --json ``` -------------------------------- ### CLI installation and management Source: https://unipost.dev/docs/cli Commands for installing, initializing, and updating the UniPost CLI. ```bash npm install -g @unipost/cli ``` ```bash unipost init ``` ```bash unipost ``` ```bash unipost upgrade ``` -------------------------------- ### Install the UniPost CLI Source: https://unipost.dev/docs/cli Global installation command for the UniPost CLI via npm. ```bash npm install -g @unipost/cli ``` -------------------------------- ### Authenticate with Setup Token Source: https://unipost.dev/docs/cli/reference Exchanges a setup token for a local CLI credential. Use --replace-key, --reauth, or --yes to overwrite existing bindings. ```bash unipost auth login --setup-token ust_... --client terminal --base-url https://api.unipost.dev --json ``` -------------------------------- ### Generate post creation example Source: https://unipost.dev/docs/cli/reference Generates a cURL or native Node fetch example for creating a post. ```bash unipost examples posts.create --lang node --account sa_1 --caption "Hello" --json ``` -------------------------------- ### Verify CLI Installation Source: https://unipost.dev/docs/cli Commands to verify the CLI is installed and check the current version. ```bash unipost --help ``` ```bash npm bin -g ``` ```bash unipost upgrade ``` ```bash unipost --version ``` -------------------------------- ### Generate MCP setup command Source: https://unipost.dev/docs/cli/reference Prints the Claude Code MCP setup command and authentication test command. ```bash unipost examples mcp.claude-code --json ``` -------------------------------- ### unipost --version Source: https://unipost.dev/docs/cli/reference Prints the currently installed version of the CLI. ```APIDOC ## unipost --version ### Description Prints the installed CLI version. ``` -------------------------------- ### Manage Profiles and Accounts Source: https://unipost.dev/docs/cli Commands to list profiles, initialize quickstarts, and manage account connections. ```bash unipost profiles list --json ``` ```bash unipost quickstart --name "Brand" --json ``` ```bash unipost connect create --json ``` ```bash unipost accounts list --json ``` -------------------------------- ### Display CLI Help Source: https://unipost.dev/docs/cli/reference Shows top-level usage, commands, flags, and installation notes. ```bash unipost --help ``` -------------------------------- ### Get agent prompt guidance Source: https://unipost.dev/docs/cli/reference Retrieves client-specific instructions for CLI and MCP operation. ```bash unipost agent guide --client codex --json ``` -------------------------------- ### Display Self-management Help Source: https://unipost.dev/docs/cli/reference Lists commands related to installation, updates, versioning, and diagnostics. ```bash unipost self help ``` -------------------------------- ### GET /v1/api-keys Source: https://unipost.dev/docs/api/api-keys/list Lists all API keys for the authenticated workspace. ```APIDOC ## GET /v1/api-keys ### Description Lists API keys for the authenticated workspace. ### Method GET ### Endpoint /v1/api-keys ### Authorization - **Authorization** (Header) - Required - Bearer ### Response #### Success Response (200) - **data** (array) - API keys for the authenticated workspace. - **id** (string) - API key record ID. - **name** (string) - Human-readable label. - **prefix** (string) - Safe key prefix such as up_live_abcd. - **environment** (string) - "production" or "test". - **created_at** (string) - Creation timestamp. - **last_used_at** (string | null) - Last request timestamp, if used. - **expires_at** (string | null) - Optional expiration timestamp. - **meta.total** (number) - Total API keys returned. - **meta.limit** (number) - Applied list limit. - **request_id** (string) - Request identifier for debugging and support. #### Error Response (401, 500) - **error.code** (string) - Usually "UNAUTHORIZED" or "INTERNAL_ERROR". - **error.normalized_code** (string) - Lowercase alias such as "unauthorized". - **error.message** (string) - Human-readable error message. - **request_id** (string) - Request identifier for debugging and support. ``` -------------------------------- ### unipost --help Source: https://unipost.dev/docs/cli/reference Displays top-level usage, supported commands, global flags, and installation notes. ```APIDOC ## unipost --help ### Description Prints top-level usage, supported commands, global flags, install, and upgrade notes. ``` -------------------------------- ### GET /v1/posts Source: https://unipost.dev/docs/api List posts in a workspace. ```APIDOC ## GET /v1/posts ### Description List posts in a workspace. ### Method GET ### Endpoint /v1/posts ``` -------------------------------- ### GET /v1/accounts/{id}/capabilities Source: https://unipost.dev/docs/api Inspect publish and media support. ```APIDOC ## GET /v1/accounts/{id}/capabilities ### Description Inspect publish and media support. ### Method GET ### Endpoint /v1/accounts/{id}/capabilities ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the account. ``` -------------------------------- ### GET /v1/workspace Source: https://unipost.dev/docs/api Fetch metadata for the current workspace. ```APIDOC ## GET /v1/workspace ### Description Fetch workspace metadata. ### Method GET ### Endpoint /v1/workspace ``` -------------------------------- ### unipost auth login Source: https://unipost.dev/docs/cli/reference Authenticates the CLI using a setup token or an API key. ```APIDOC ## unipost auth login ### Description Exchanges a setup token or validates an API key to store a local CLI credential. ### Commands `unipost auth login --setup-token ust_... --client terminal --base-url https://api.unipost.dev --json` `unipost auth login --api-key up_live_... --json` ``` -------------------------------- ### GET /v1/workspace Source: https://unipost.dev/docs/api/workspace/get Returns the workspace bound to the authenticated caller. API-key callers get the workspace the key belongs to; dashboard (Clerk) callers get the user's workspace. ```APIDOC ## GET /v1/workspace ### Description Returns the workspace bound to the authenticated caller. There is one workspace per account. ### Method GET ### Endpoint /v1/workspace ### Authorization - **Authorization** (Header) - Required - Bearer (Workspace API key or Clerk session JWT) ### Response #### Success Response (200) - **id** (string) - Workspace ID. - **name** (string) - Human-readable workspace name. - **per_account_monthly_limit** (number | null) - Optional per-account monthly publish quota. - **usage_modes** (string[]) - Active usage modes selected during onboarding (publishing, agentic). - **custom_platform_slot** (string | null) - Shared Basic custom platform slot. - **created_at** (string) - Creation timestamp. - **updated_at** (string) - Last update timestamp. #### Error Response (401, 500) - **error.code** (string) - Error code. - **error.normalized_code** (string) - Lowercase alias for the error. - **error.message** (string) - Human-readable error message. - **request_id** (string) - Request identifier for debugging. ``` -------------------------------- ### Check CLI Version Source: https://unipost.dev/docs/cli/reference Displays the currently installed version of the CLI. ```bash unipost --version ``` -------------------------------- ### GET /v1/webhooks Source: https://unipost.dev/docs/api List all webhook subscriptions. ```APIDOC ## GET /v1/webhooks ### Description List webhook subscriptions. ### Method GET ### Endpoint /v1/webhooks ``` -------------------------------- ### unipost connect get Source: https://unipost.dev/docs/cli/reference Retrieves the status of a connection session. ```APIDOC ## unipost connect get ### Description Reads the current status of a connect session. ### Command `unipost connect get [session_id] --json` ``` -------------------------------- ### GET /v1/users Source: https://unipost.dev/docs/api List all managed users in the workspace. ```APIDOC ## GET /v1/users ### Description List managed users. ### Method GET ### Endpoint /v1/users ``` -------------------------------- ### Get post details via CLI Source: https://unipost.dev/docs/cli/reference Fetches a single post and its associated platform result state. ```bash unipost posts get post_1 --json ``` -------------------------------- ### GET /v1/analytics/summary Source: https://unipost.dev/docs/api Read workspace-level analytics cards. ```APIDOC ## GET /v1/analytics/summary ### Description Read workspace-level analytics cards. ### Method GET ### Endpoint /v1/analytics/summary ``` -------------------------------- ### GET /v1/profiles/{id} Source: https://unipost.dev/docs/api Fetch one profile by ID. ```APIDOC ## GET /v1/profiles/{id} ### Description Fetch one profile by ID. ### Method GET ### Endpoint /v1/profiles/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the profile. ``` -------------------------------- ### GET /v1/media/{id} Source: https://unipost.dev/docs/api Fetch uploaded media metadata. ```APIDOC ## GET /v1/media/{id} ### Description Fetch uploaded media metadata. ### Method GET ### Endpoint /v1/media/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the media. ``` -------------------------------- ### GET /v1/media/audio-overlays/{id} Source: https://unipost.dev/docs/guides/video-audio-overlay Poll the status of an audio overlay job. ```APIDOC ## GET /v1/media/audio-overlays/{id} ### Description Poll this endpoint to check the status of an audio overlay job. When status is 'succeeded', the output_media_id is available. ### Method GET ### Endpoint /v1/media/audio-overlays/{id} ``` -------------------------------- ### Get agent context Source: https://unipost.dev/docs/cli/reference Returns workspace, profile, and account data for agent grounding. ```bash unipost agent context --json ``` -------------------------------- ### Get Config Path Source: https://unipost.dev/docs/cli/reference Prints the file system path of the local CLI configuration. ```bash unipost config path --json ``` -------------------------------- ### GET /v1/posts/{id} Source: https://unipost.dev/docs/api Fetch a post and delivery results. ```APIDOC ## GET /v1/posts/{id} ### Description Fetch a post and delivery results. ### Method GET ### Endpoint /v1/posts/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the post. ``` -------------------------------- ### POST /v1/oauth/connect Source: https://unipost.dev/docs/api/accounts/oauth-connect Starts an OAuth account connection flow by returning an auth_url to be opened in the browser. ```APIDOC ## POST /v1/oauth/connect ### Description Starts an OAuth account connection flow by returning an auth_url you open in the browser. Use this for workspace-owned accounts. ### Method POST ### Endpoint /v1/oauth/connect ### Parameters #### Request Body - **profile_id** (string) - Optional - Profile that should own the connected account. Required when the workspace has multiple profiles. - **platform** (string) - Required - OAuth platform key. Values: twitter, linkedin, instagram, threads, youtube, tiktok, pinterest, facebook. - **redirect_url** (string) - Optional - Optional app URL where the browser should land after OAuth completes. ### Response #### Success Response (200) - **auth_url** (string) - Browser URL to open for the OAuth authorization flow. #### Error Response (401, 403, 422, 500) - **error.code** (string) - Error code. - **error.normalized_code** (string) - Lowercase alias of the error code. - **error.message** (string) - Human-readable error message. - **request_id** (string) - Request identifier for debugging and support. ``` -------------------------------- ### GET /v1/accounts Source: https://unipost.dev/docs/api List connected social accounts. ```APIDOC ## GET /v1/accounts ### Description List connected social accounts. ### Method GET ### Endpoint /v1/accounts ``` -------------------------------- ### GET /v1/api-metrics/summary Source: https://unipost.dev/docs/api List per-endpoint API latency and error rows. ```APIDOC ## GET /v1/api-metrics/summary ### Description List per-endpoint API latency and error rows. ### Method GET ### Endpoint /v1/api-metrics/summary ``` -------------------------------- ### unipost profiles get Source: https://unipost.dev/docs/cli/reference Fetches a specific workspace profile by its ID. ```APIDOC ## unipost profiles get ### Description Fetches one profile by ID. ### Command `unipost profiles get [profile_id] --json` ``` -------------------------------- ### GET /v1/accounts/{id}/metrics Source: https://unipost.dev/docs/api Read platform account metrics. ```APIDOC ## GET /v1/accounts/{id}/metrics ### Description Read platform account metrics. ### Method GET ### Endpoint /v1/accounts/{id}/metrics ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the account. ``` -------------------------------- ### Configure AI Agent Integration Source: https://unipost.dev/docs/cli Commands to install the UniPost client for Codex or Claude Code agents. ```bash unipost agent install --client codex --json ``` ```bash unipost agent install --client claude-code --json ``` -------------------------------- ### GET /v1/logs Source: https://unipost.dev/docs/api Cursor-paginated log search and backfill for workspace integration activity. ```APIDOC ## GET /v1/logs ### Description Cursor-paginated log search and backfill. ### Method GET ### Endpoint /v1/logs ``` -------------------------------- ### Get media item by ID Source: https://unipost.dev/docs/cli/reference Fetches a single media item using its unique identifier. ```bash unipost media get med_1 --json ``` -------------------------------- ### unipost accounts get Source: https://unipost.dev/docs/cli/reference Retrieves details for a specific connected account. ```APIDOC ## unipost accounts get ### Description Finds one account from the workspace account list. ### Command `unipost accounts get [account_id] --json` ``` -------------------------------- ### GET /v1/billing/x-credits Source: https://unipost.dev/docs/api/posts/create Retrieves the remaining X credit capacity for the workspace. ```APIDOC ## GET /v1/billing/x-credits ### Description Inspects the remaining X credit capacity for the workspace. ### Method GET ### Endpoint /v1/billing/x-credits ``` -------------------------------- ### unipost upgrade Source: https://unipost.dev/docs/cli/reference Updates the globally installed CLI package via npm. ```APIDOC ## unipost upgrade ### Description Updates the globally installed CLI package with npm. ``` -------------------------------- ### Get account details Source: https://unipost.dev/docs/cli/reference Retrieves information for a specific connected social account. ```bash unipost accounts get sa_1 --json ``` -------------------------------- ### Initialize UniPost CLI Source: https://unipost.dev/docs/cli/reference Initializes local configuration and creates the first workspace context. ```bash unipost init --json ``` -------------------------------- ### GET /v1/webhooks Source: https://unipost.dev/docs/api/webhooks/list Returns every developer webhook subscription configured for the current workspace. ```APIDOC ## GET /v1/webhooks ### Description Returns every developer webhook subscription configured for the current workspace. Plaintext secrets are never returned from list reads. ### Method GET ### Endpoint /v1/webhooks ### Parameters #### Query Parameters - **limit** (integer) - Optional - Maximum number of webhook subscriptions to return. Default is all, max 100. ### Response #### Success Response (200) - **data** (array) - Webhook subscriptions for the current workspace. - **data[].id** (string) - Webhook subscription ID. - **data[].name** (string) - Human-readable webhook label. - **data[].url** (string) - Destination URL. - **data[].events** (string[]) - Subscribed event names. - **data[].active** (boolean) - Whether delivery is enabled. - **data[].secret_preview** (string) - Short preview of the active signing secret. - **meta.total** (number) - Total webhook count in the response. - **meta.limit** (number) - Applied list limit for this response. - **request_id** (string) - Request identifier for debugging and support. #### Error Response (401/500) - **error.code** (string) - Error code. - **error.normalized_code** (string) - Lowercase alias for the error. - **error.message** (string) - Human-readable error message. - **request_id** (string) - Request identifier for debugging and support. ``` -------------------------------- ### Update CLI Package Source: https://unipost.dev/docs/cli/reference Updates the global CLI installation using npm. ```bash unipost upgrade --json ``` -------------------------------- ### GET /v1/platform-credentials Source: https://unipost.dev/docs/api/platform-credentials/list Retrieves a list of platform OAuth apps configured for the authenticated workspace. ```APIDOC ## GET /v1/platform-credentials ### Description List the platform OAuth apps configured for the authenticated workspace. Use this endpoint to audit which platforms have workspace-owned credentials before creating new Connect Sessions. ### Method GET ### Endpoint /v1/platform-credentials ### Authorization - **Authorization** (Header) - Required - Bearer (Workspace API key, or a Clerk session JWT) ### Response #### Success Response (200) - **data** (array) - Configured platform credential rows - **platform** (string) - Platform key for this credential row - **client_id** (string) - Public client ID - **created_at** (string) - Timestamp for when the credentials were uploaded or replaced - **meta** (object) - **total** (number) - Total configured platform credential rows - **limit** (number) - Applied list limit - **request_id** (string) - Request identifier for debugging and support #### Error Response (401, 500) - **error** (object) - **code** (string) - Error code (e.g., "UNAUTHORIZED", "INTERNAL_ERROR") - **normalized_code** (string) - Lowercase alias of the error - **message** (string) - Human-readable error message - **request_id** (string) - Request identifier for debugging and support ``` -------------------------------- ### GET /v1/inbox/ws Source: https://unipost.dev/docs/api/inbox Subscribe to events for one explicit Inbox scope. ```APIDOC ## GET /v1/inbox/ws ### Description Subscribe to events for one explicit Inbox scope. ### Method GET ### Endpoint /v1/inbox/ws ``` -------------------------------- ### unipost init Source: https://unipost.dev/docs/cli/reference Initializes the local configuration and workspace context. ```APIDOC ## unipost init ### Description Checks authentication, loads workspace/profile context, and writes safe local defaults. ### Command `unipost init --json` ``` -------------------------------- ### GET /v1/inbox/ws Source: https://unipost.dev/docs/guides/inbox-integration Initiates a WebSocket connection for real-time events from a trusted backend process. ```APIDOC ## GET /v1/inbox/ws ### Description Opens a WebSocket connection to receive real-time events. This should be called from a trusted backend process to avoid exposing API keys in the browser. ### Method GET ### Endpoint /v1/inbox/ws ``` -------------------------------- ### GET /v1/connect/sessions/:session_id Source: https://unipost.dev/docs/api/connect/sessions/get Returns the current status of a hosted Connect session. ```APIDOC ## GET /v1/connect/sessions/:session_id ### Description Returns the current status of a hosted Connect session. Subscribe to the `account.connected` webhook for production completion handling; use this endpoint for local development, CLI demos, or fallback polling. ### Method GET ### Endpoint /v1/connect/sessions/:session_id ### Parameters #### Path Parameters - **session_id** (string) - Required - Connect session ID such as cs_abc123. ### Response #### Success Response (200) - **id** (string) - Connect session ID. - **status** (string) - Session lifecycle state (pending, completed, expired, cancelled). - **managed_account_id** (string | null) - Resulting UniPost account when the flow completes. - **completed_social_account_id** (string | null) - Alias of managed_account_id for completed sessions. - **external_user_id** (string) - Your user identifier associated with the flow. - **expires_at** (string) - Expiration timestamp for the hosted session. #### Error Response (401, 404, 500) - **error.code** (string) - Error code. - **error.normalized_code** (string) - Lowercase alias of the error code. - **error.message** (string) - Human-readable error message. - **request_id** (string) - Request identifier for debugging and support. ``` -------------------------------- ### GET /v1/logs/stream Source: https://unipost.dev/docs/api/logs Establishes a Server-Sent Events (SSE) stream for near real-time log ingestion. ```APIDOC ## GET /v1/logs/stream ### Description Server-Sent Events stream for near real-time ingestion, with replay. ### Method GET ### Endpoint /v1/logs/stream ``` -------------------------------- ### GET /v1/api-metrics/overall Source: https://unipost.dev/docs/api/api-metrics/overall Returns aggregate API-key traffic totals, latency percentiles, and error counters for a workspace. ```APIDOC ## GET /v1/api-metrics/overall ### Description Returns aggregate API-key traffic totals, latency percentiles, and error counters for a workspace. Metrics include API-key-authenticated Developer API traffic only. ### Method GET ### Endpoint /v1/api-metrics/overall ### Parameters #### Query Parameters - **from** (string) - Optional - Start timestamp in RFC3339 format. Defaults to 7 days before now. - **to** (string) - Optional - End timestamp in RFC3339 format. Defaults to now. The maximum raw range is 90 days. - **method** (string) - Optional - Filter by HTTP method (GET, POST, PUT, PATCH, DELETE). - **path** (string) - Optional - Filter by normalized endpoint path. - **status_class** (string) - Optional - Filter by HTTP status class (2xx, 3xx, 4xx, 5xx). ### Response #### Success Response (200) - **total_calls** (number) - Number of matching API requests. - **success_count** (number) - Responses with status below 400. - **client_error_count** (number) - Responses from 400 through 499, including 429. - **server_error_count** (number) - Responses with status 500 or higher. - **rate_limited_count** (number) - Responses with status 429. - **error_rate_pct** (number) - All 4xx and 5xx responses divided by total calls. - **server_failure_rate_pct** (number) - 5xx responses divided by total calls. - **reliability_pct** (number) - Requests that did not return 5xx, divided by total calls. - **p50_ms** (number) - Median latency in milliseconds. - **p95_ms** (number) - 95th percentile latency in milliseconds. - **p99_ms** (number) - 99th percentile latency in milliseconds. - **avg_ms** (number) - Average latency in milliseconds. ``` -------------------------------- ### Bootstrap agent environment Source: https://unipost.dev/docs/cli Initialize an agent session with a specific client configuration. ```bash unipost agent bootstrap --client codex --json ``` -------------------------------- ### Check authentication status Source: https://unipost.dev/docs/cli/agent-debug Verify the current authentication state of the CLI to determine if setup or re-binding is required. ```bash unipost auth status --json ``` -------------------------------- ### POST /v1/connect/sessions Source: https://unipost.dev/docs/api/connect/sessions/create Creates a new hosted onboarding session for a social account. ```APIDOC ## POST /v1/connect/sessions ### Description Creates a hosted onboarding session for a customer-owned social account. Use the returned URL to send the end user into UniPost's managed Connect flow. ### Method POST ### Endpoint /v1/connect/sessions ### Parameters #### Request Body - **platform** (string) - Required - Destination platform for the hosted onboarding flow. Values: twitter, linkedin, bluesky, youtube, tiktok, instagram, threads, facebook, pinterest - **profile_id** (string) - Optional - Profile that should own the resulting connected account. Required when the workspace has multiple profiles. - **external_user_id** (string) - Required - Your stable end-user identifier. - **external_user_email** (string) - Optional - Optional email for reconciliation and support. - **return_url** (string) - Optional - Where UniPost redirects the user after completion, cancellation, or a handled OAuth failure. - **allow_quickstart_creds** (boolean) - Optional - Optional escape hatch for OAuth platforms. Defaults to false. ### Response #### Success Response (201) - **id** (string) - Connect session ID. - **url** (string) - Hosted onboarding URL to redirect the user to. - **allow_quickstart_creds** (boolean) - Whether this session is allowed to fall back to UniPost's shared Quickstart OAuth app. - **managed_account_id** (string) - Present after the session completes. - **status** (string) - Session lifecycle state (pending, completed, expired, cancelled). - **expires_at** (string) - Expiration timestamp for the hosted session. ``` -------------------------------- ### GET /v1/analytics/posts/export Source: https://unipost.dev/docs/api/analytics/posts/export Downloads normalized post-level analytics as a CSV file for specified criteria. ```APIDOC ## GET /v1/analytics/posts/export ### Description Downloads normalized post-level analytics as CSV across UniPost-published content. Use it for scheduled reports, BI imports, and one-off workspace exports. ### Method GET ### Endpoint /v1/analytics/posts/export ### Parameters #### Query Parameters - **from** (string) - Optional - Start date as YYYY-MM-DD. Defaults to the last 30 days. - **to** (string) - Optional - End date as YYYY-MM-DD. Inclusive by day. - **platform** (string) - Optional - Destination platform filter. Values: instagram, threads, pinterest, tiktok. - **profile_id** (string) - Optional - Limit exported rows to one UniPost profile. - **account_id** (string) - Optional - Limit exported rows to one connected social account. - **post_id** (string) - Optional - Limit exported rows to one UniPost post. - **status** (string) - Optional - Delivery result status. Values: published, failed, partial. - **sort** (string) - Optional - Sort key. Values: published_at, published_at_asc, impressions, likes, engagement_rate. ### Response #### Success Response (200) - **Content-Type** (text/csv) - CSV response encoded as UTF-8. - **Content-Disposition** (attachment) - Downloads as "unipost-analytics-posts.csv". - **Columns** (various) - Includes post_id, social_post_result_id, platform, social_account_id, profile_id, result_status, post_status, external_id, url, created_at, published_at, impressions, reach, likes, comments, shares, saves, clicks, video_views, engagement_rate, fetched_at, last_failure_reason. ``` -------------------------------- ### Upload media via CLI Source: https://unipost.dev/docs/cli/reference Reserves a media record, uploads the local file, and waits for readiness. ```bash unipost media upload ./video.mp4 --json ``` -------------------------------- ### GET /v1/media/:media_id Source: https://unipost.dev/docs/guides/video-audio-overlay Poll the status of a media upload. ```APIDOC ## GET /v1/media/:media_id ### Description Poll this endpoint to check the status of a media upload. ### Method GET ### Endpoint /v1/media/:media_id ``` -------------------------------- ### GET /v1/profiles Source: https://unipost.dev/docs/api/profiles/list Retrieves a list of profiles that belong to the workspace associated with the provided API key. ```APIDOC ## GET /v1/profiles ### Description Returns the profiles that belong to your workspace. Profiles are the brand containers that sit under one workspace and drive hosted Connect branding. ### Method GET ### Endpoint /v1/profiles ### Authorization - **Authorization** (Header) - Required - Bearer (Workspace API key) ### Response #### Success Response (200) - **data** (array) - Profiles that belong to the workspace. - **id** (string) - Profile ID. - **workspace_id** (string) - Workspace that owns the profile. - **name** (string) - Human-readable profile name. - **branding_logo_url** (string | null) - Optional hosted Connect logo URL. - **branding_display_name** (string | null) - Optional hosted Connect display name. - **branding_primary_color** (string | null) - Optional hosted Connect primary brand color. - **branding_hide_powered_by** (boolean) - Whether hosted Connect hides the footer attribution. - **account_count** (number) - Connected account count for that profile. - **meta** (object) - **total** (number) - Total number of profiles in the workspace. - **limit** (number) - Applied list size for this response. - **request_id** (string) - Request identifier for debugging and support. #### Error Response (401, 500) - **error** (object) - **code** (string) - Error code. - **normalized_code** (string) - Lowercase alias for the error. - **message** (string) - Human-readable error message. - **request_id** (string) - Request identifier for debugging and support. ``` -------------------------------- ### GET /v1/analytics/summary Source: https://unipost.dev/docs/api/analytics/summary Retrieves workspace-wide analytics totals and trend breakdowns for a selected period. ```APIDOC ## GET /v1/analytics/summary ### Description Returns workspace-wide analytics totals and trend breakdowns for a selected period. Use it to power overview dashboards and reporting views. ### Method GET ### Endpoint /v1/analytics/summary ### Parameters #### Query Parameters - **from** (string) - Optional - Period start in ISO-8601 format. - **to** (string) - Optional - Period end in ISO-8601 format. - **granularity** (string) - Optional - Time bucket for trend rows. Values: day, week, month. ### Response #### Success Response (200) - **totals** (object) - Workspace-wide totals across the selected period. - **totals.impressions** (number) - Normalized impressions total. - **trend** (array) - Time-series points for charting. - **by_platform** (array) - Breakdown by destination network. #### Error Response (401, 422, 500) - **error.code** (string) - Error code. - **error.normalized_code** (string) - Lowercase alias for the error. - **error.message** (string) - Human-readable error message. - **request_id** (string) - Request identifier for debugging and support. ``` -------------------------------- ### Connect an Account Source: https://unipost.dev/docs/platforms Use the bash command to initiate an account connection process. ```bash Loading... ``` -------------------------------- ### Get connect session status Source: https://unipost.dev/docs/cli/reference Checks the current status of an existing OAuth connect session. ```bash unipost connect get cs_1 --json ``` -------------------------------- ### List platform credentials via cURL Source: https://unipost.dev/docs/api/platform-credentials/list Retrieve the list of platform OAuth apps using a GET request with a Bearer token. ```bash curl https://api.unipost.dev/v1/platform-credentials \ -H "Authorization: Bearer " ``` -------------------------------- ### Create a workspace profile Source: https://unipost.dev/docs/cli/reference Initializes a new workspace profile with a specified name. ```bash unipost profiles create --name "Studio" --json ``` -------------------------------- ### GET /v1/analytics/platforms Source: https://unipost.dev/docs/api/analytics/platforms Retrieves platform availability, supported metrics, and account health for analytics-capable destinations. ```APIDOC ## GET /v1/analytics/platforms ### Description Returns the platform availability, supported metrics, and account health that power the unified UniPost Analytics API. ### Method GET ### Endpoint /v1/analytics/platforms ### Parameters #### Query Parameters - **from** (string) - Optional - Start date as YYYY-MM-DD. Defaults to the last 30 days. - **to** (string) - Optional - End date as YYYY-MM-DD. Inclusive by day. - **profile_id** (string) - Optional - Limit availability and metrics to one profile. ### Response #### Success Response (200) - **data** (array) - One platform availability row for every analytics-capable destination. - **data[].platform** (string) - Platform key. - **data[].supported_metrics** (array) - Normalized metrics that UniPost can return for this platform. - **data[].health** (string) - Current analytics state (not_connected, pending, ready, degraded, needs_reconnect). - **data[].account_count** (number) - Connected account count. - **data[].last_successful_fetch_at** (string) - Latest successful post analytics fetch, when present. - **data[].last_failure_reason** (string) - Most recent cached upstream failure, when present. #### Error Responses - **401/402/422** - **error.code** (string) - Error code (e.g., UNAUTHORIZED, PLAN_FEATURE_NOT_AVAILABLE, VALIDATION_ERROR). - **error.message** (string) - Human-readable error message. ``` -------------------------------- ### Check account health Source: https://unipost.dev/docs/cli/reference Inspects token status, scope permissions, and setup warnings for an account. ```bash unipost accounts health --account sa_1 --json ``` -------------------------------- ### GET /v1/inbox Source: https://unipost.dev/docs/api/inbox List inbox items for the selected scope. ```APIDOC ## GET /v1/inbox ### Description List inbox items for the selected scope. ### Method GET ### Endpoint /v1/inbox ``` -------------------------------- ### Create post via CLI Source: https://unipost.dev/docs/cli/reference Creates a post from a file. Use --dry-run for validation; live writes require --yes and an idempotency key. ```bash unipost posts create --from-file post.json --dry-run --json ``` -------------------------------- ### GET /v1/accounts/:account_id/capabilities Source: https://unipost.dev/docs/api/accounts/capabilities Returns the publishing capability map for the platform behind one connected account. ```APIDOC ## GET /v1/accounts/:account_id/capabilities ### Description Returns the publishing capability map for the platform behind one connected account. Use it to drive client-side validation or UI affordances before you call create post. ### Method GET ### Endpoint /v1/accounts/:account_id/capabilities ### Parameters #### Path Parameters - **account_id** (string) - Required - Connected account ID such as sa_x_123. ### Response #### Success Response (200) - **schema_version** (string) - Capability schema version. - **account_id** (string) - Resolved account ID. - **platform** (string) - Platform name for this account. - **capability.display_name** (string) - Human-friendly platform name. - **capability.text** (object) - Caption length and threading rules. - **capability.media** (object) - Image/video limits and file format rules. - **capability.thread** (object) - Whether reply-chain style threading is supported. - **capability.scheduling** (object) - Whether UniPost can schedule posts for this platform. - **capability.first_comment** (object) - Whether first comments are supported and any extra limits. - **x_inbox.comments_enabled** (boolean) - Whether this X account can receive and answer eligible public replies. - **x_inbox.reconnect_required** (boolean) - Whether the account must repeat X OAuth. - **x_inbox.delivery_status** (string) - pending, active, paused_cap, paused_allowance, paused_plan, or error. - **x_inbox.app_mode** (string) - unipost_managed_app, workspace_x_app, or legacy_unknown. - **x_inbox.missing_app_credentials** (string[]) - For workspace_x_app, any missing client_id, client_secret, app_bearer_token, or consumer_secret. ``` -------------------------------- ### GET /v1/analytics/platforms/{platform} Source: https://unipost.dev/docs/api/analytics/platforms/detail Returns one platform's normalized analytics availability, summary metrics, daily trend, connected-account health, and top posts. ```APIDOC ## GET /v1/analytics/platforms/{platform} ### Description Returns one platform's normalized analytics availability, summary metrics, daily trend, connected-account health, and top posts from the unified UniPost Analytics API. ### Method GET ### Endpoint /v1/analytics/platforms/{platform} ### Parameters #### Path Parameters - **platform** (string) - Required - Analytics-capable platform key (instagram, threads, pinterest, tiktok, facebook). #### Query Parameters - **from** (string) - Optional - Start date as YYYY-MM-DD. Defaults to the last 30 days. - **to** (string) - Optional - End date as YYYY-MM-DD. Inclusive by day. - **profile_id** (string) - Optional - Limit platform detail to one UniPost profile. ### Response #### Success Response (200) - **platform** (string) - Platform key requested in the path. - **period.start** (string) - Start date included in the response. - **period.end** (string) - End date included in the response. - **availability.platform** (string) - Platform key for the availability row. - **availability.supported_metrics** (array) - Normalized metrics that UniPost can return for this platform. - **availability.health** (string) - Current analytics state (not_connected, pending, ready, degraded, needs_reconnect). - **summary.posts** (number) - Published post count in the period. - **summary.impressions** (number) - Summed normalized impressions. - **summary.video_views** (number) - Summed normalized video views. - **summary.engagement_rate** (number) - Computed engagement rate for the period. - **trend[]** (array) - Daily metric buckets for the platform. - **accounts[]** (array) - Connected accounts with post counts and analytics health. - **top_posts[]** (array) - Top post-level analytics rows sorted by engagement rate. ``` -------------------------------- ### Create workspace-credential session Source: https://unipost.dev/docs/connect-sessions Requires pre-uploaded workspace Platform Credentials; set allow_quickstart_creds to false to ensure immediate failure if credentials are missing. ```cURL curl -X POST https://api.unipost.com/sessions \ -d 'allow_quickstart_creds=false' ``` ```Node.js const session = await unipost.sessions.create({ allow_quickstart_creds: false }); ``` -------------------------------- ### GET /v1/inbox/{id}/media-context Source: https://unipost.dev/docs/api/inbox Fetch scoped media context for a supported Inbox item. ```APIDOC ## GET /v1/inbox/{id}/media-context ### Description Fetch scoped media context for a supported Inbox item. ### Method GET ### Endpoint /v1/inbox/{id}/media-context ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the inbox item. ``` -------------------------------- ### GET /v1/accounts/{account_id}/metrics Source: https://unipost.dev/docs/api/analytics/youtube Retrieves basic account metrics including live subscriber count, public video count, and lifetime channel views. ```APIDOC ## GET /v1/accounts/{account_id}/metrics ### Description Retrieves basic account metrics including live subscriber count, public video count, and lifetime channel views. ### Method GET ### Endpoint /v1/accounts/{account_id}/metrics ### Parameters #### Path Parameters - **account_id** (string) - Required - The unique identifier for the account. ``` -------------------------------- ### GET /v1/users/{external_user_id} Source: https://unipost.dev/docs/api Fetch details for a specific managed user. ```APIDOC ## GET /v1/users/{external_user_id} ### Description Fetch one managed user. ### Method GET ### Endpoint /v1/users/{external_user_id} ### Parameters #### Path Parameters - **external_user_id** (string) - Required - The external user identifier. ``` -------------------------------- ### GET /v1/media/gif-conversions/{id} Source: https://unipost.dev/docs/api/media/gif-conversions Retrieves the status and details of a specific GIF conversion job by its ID. ```APIDOC ## GET /v1/media/gif-conversions/{id} ### Description Retrieves the status of a GIF conversion job. Clients should continue polling this endpoint if the job is still in progress, as server-side processing continues even if the client connection times out. ### Method GET ### Endpoint /v1/media/gif-conversions/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the GIF conversion job. ``` -------------------------------- ### Create shared-app fallback session Source: https://unipost.dev/docs/connect-sessions Use this configuration for hosted customer onboarding without requiring workspace-owned Platform Credentials. ```cURL curl -X POST https://api.unipost.com/sessions \ -d 'allow_quickstart_creds=true' ``` ```Node.js const session = await unipost.sessions.create({ allow_quickstart_creds: true }); ``` -------------------------------- ### Execute Local Connect Session Script Source: https://unipost.dev/docs/local-connect-test Run the Python script with required environment variables to generate a hosted OAuth URL. ```bash export UNIPOST_API_KEY="your_api_key" export PROFILE_ID="your_profile_id" export PLATFORM="youtube" python3 create_connect_session_url.py --allow-quickstart-creds ``` -------------------------------- ### GET /v1/logs Source: https://unipost.dev/docs/api/logs/list Returns workspace logs newest-first with cursor pagination. List rows never include raw request or response payloads. ```APIDOC ## GET /v1/logs ### Description Returns workspace logs newest-first with cursor pagination. List rows never include raw request or response payloads. Follow meta.next_cursor to backfill every retained log. ### Method GET ### Endpoint /v1/logs ### Parameters #### Query Parameters - **category** (string) - Optional - Filter by log category (publishing, api_request, oauth, webhook, system). - **action** (string) - Optional - Exact log action. - **source** (string) - Optional - Origin of the log (api, dashboard, worker, webhook, oauth). - **level** (string) - Optional - Severity level (debug, info, warn, error). - **status** (string) - Optional - Outcome status (success, warning, error). - **platform** (string) - Optional - Platform token (e.g., instagram, tiktok, youtube, linkedin). - **profile_id** (string) - Optional - Filter logs associated with one profile. - **social_account_id** (string) - Optional - Filter logs associated with one connected account. - **post_id** (string) - Optional - Filter logs associated with one post. - **request_id** (string) - Optional - Filter logs associated with one API request. - **error_code** (string) - Optional - Filter logs by normalized error code. - **q** (string) - Optional - Search message, action, request id, post id, and error code by substring. - **from** (string) - Optional - RFC3339 timestamp. Inclusive lower bound. - **to** (string) - Optional - RFC3339 timestamp. Inclusive upper bound. - **limit** (integer) - Optional - Page size. Default 100, maximum 500. - **cursor** (string) - Optional - Opaque cursor from the previous response's meta.next_cursor. ### Response #### Success Response (200) - **data** (array) - Log rows, newest first. - **meta.limit** (integer) - Echoed page size. - **meta.has_more** (boolean) - True when another page exists. - **meta.next_cursor** (string | null) - Cursor for the next page. #### Error Response (401, 422, 500) - **error.code** (string) - Error code. - **error.normalized_code** (string) - Lowercase alias. - **error.message** (string) - Human-readable error message. - **request_id** (string) - Request identifier for debugging. ``` -------------------------------- ### GET /v1/posts/:post_id Source: https://unipost.dev/docs/publishing Retrieve the status of an asynchronous publishing request. ```APIDOC ## GET /v1/posts/:post_id ### Description Retrieves the current status and final result of a post creation request. ### Method GET ### Endpoint /v1/posts/:post_id ### Parameters #### Path Parameters - **post_id** (string) - Required - The unique identifier of the post. ``` -------------------------------- ### Show Configuration Source: https://unipost.dev/docs/cli/reference Displays redacted local CLI configuration settings. ```bash unipost config show --json ``` -------------------------------- ### unipost connect create Source: https://unipost.dev/docs/cli/reference Initiates a hosted OAuth connection session. ```APIDOC ## unipost connect create ### Description Creates a hosted OAuth connect session for a platform and profile. ### Command `unipost connect create --platform [platform] --profile [profile_id] --json` ``` -------------------------------- ### GET /v1/accounts/{id}/tiktok/creator-info Source: https://unipost.dev/docs/api Fetch TikTok publishing limits. ```APIDOC ## GET /v1/accounts/{id}/tiktok/creator-info ### Description Fetch TikTok publishing limits. ### Method GET ### Endpoint /v1/accounts/{id}/tiktok/creator-info ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the account. ``` -------------------------------- ### List posts via CLI Source: https://unipost.dev/docs/cli/reference Lists posts with optional status filtering and pagination. ```bash unipost posts list --status failed --limit 10 --json ``` -------------------------------- ### Plan publish flow Source: https://unipost.dev/docs/cli/reference Creates a plan for publishing from a file without execution. ```bash unipost agent plan-publish --from-file post.json --json ``` -------------------------------- ### POST /v1/media/audio-overlays Source: https://unipost.dev/docs/api/media/audio-overlays Creates an asynchronous media-processing job that combines an uploaded video with an uploaded audio file. ```APIDOC ## POST /v1/media/audio-overlays ### Description Creates an async media-processing job that combines one uploaded video with one uploaded audio file. Poll the job until it returns status: "succeeded", then publish output_media_id with POST/v1/posts. ### Method POST ### Endpoint /v1/media/audio-overlays ### Parameters #### Request Body - **video_media_id** (string) - Required - Uploaded video media ID from POST/v1/media. Must reference a video in the same workspace. - **audio_media_id** (string) - Required - Uploaded audio media ID from POST/v1/media. - **mode** (string) - Optional - How UniPost combines audio. Values: mix, replace. Default: mix. - **video_volume** (number) - Optional - Original video audio volume from 0 to 100. Default: 100. - **audio_volume** (number) - Optional - Uploaded audio volume from 0 to 100. Default: 100. - **audio_start_ms** (number) - Optional - Offset into the uploaded audio before mixing. Default: 0. - **fit** (string) - Optional - How uploaded audio is fitted to the video duration. Values: trim_to_video, loop_to_video. Default: trim_to_video. ``` -------------------------------- ### GET /v1/posts/:post_id Source: https://unipost.dev/docs/api/posts/create Polls the final publishing result of a post. ```APIDOC ## GET /v1/posts/:post_id ### Description Polls the final publishing result for a specific post after it has been queued. ### Method GET ### Endpoint /v1/posts/:post_id ### Parameters #### Path Parameters - **post_id** (string) - Required - The unique identifier of the post. ```