### Fetch Media Files using cURL Source: https://www.outstand.so/docs/list-media-files Illustrates how to fetch a list of media files from the Outstand.so API using the cURL command-line tool. This example makes a GET request to the /v1/media endpoint with limit and offset parameters. It's useful for testing API endpoints directly from the terminal. ```bash curl "https://api.outstand.so/v1/media?limit=50&offset=0" -X GET ``` -------------------------------- ### Fetch Media URL - Python Source: https://www.outstand.so/docs/get-media-file Illustrates how to fetch a media URL using the requests library in Python. This example shows a simple GET request to the Outstand.so media API endpoint. ```python import requests response = requests.get("https://api.outstand.so/v1/media/string") print(response.json()) ``` -------------------------------- ### Python: Full Workflow Example Source: https://www.outstand.so/docs/getting-started Demonstrates a complete workflow for interacting with the Outstand.so API using Python. This example utilizes the 'requests' library for making HTTP requests. It covers setting up the API client and performing operations similar to the JavaScript examples. ```python from urllib.parse import urljoin import requests class OutstandAPI: def __init__(self, api_key: str, base_url: str = "https://api.outstand.so"): self.api_key = api_key self.base_url = base_url def _request(self, method: str, endpoint: str, **kwargs): headers = { "Authorization": f"Bearer {self.api_key}", "Content-Type": "application/json", } kwargs.setdefault("headers", headers) url = urljoin(self.base_url, endpoint) response = requests.request(method, url, **kwargs) response.raise_for_status() return response.json() def list_social_accounts(self): return self._request("get", "/v1/social-accounts") if __name__ == "__main__": # Replace with your actual API key api_key = "YOUR_API_KEY" client = OutstandAPI(api_key=api_key) # List connected social accounts accounts = client.list_social_accounts() print("Connected Social Accounts:") for account in accounts: print(f"- {account['platform']}: {account['username']}") ``` -------------------------------- ### API Request Examples Source: https://www.outstand.so/docs/finalize-pending-connection Examples of how to make API requests in different programming languages. These snippets demonstrate the basic structure for initiating a request. ```js const requestData = { // ... request parameters }; fetch('/api/endpoint', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(requestData) }); ``` ```go jsonData := []byte(`{\"key\":\"value\"}`) resp, err := http.Post("/api/endpoint", "application/json", bytes.NewBuffer(jsonData)) if err != nil { // Handle error } ``` ```java HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("/api/endpoint")) .POST(BodyPublishers.ofString("{\"key\":\"value\"}")) .header("Content-Type", "application/json") .build(); client.sendAsync(request, HttpResponse.BodyHandlers.ofString()); ``` ```csharp var client = new HttpClient(); var json = "{\"key\":\"value\"}"; var data = new StringContent(json, Encoding.UTF8, "application/json"); var response = await client.PostAsync("/api/endpoint", data); ``` ```bash curl -X POST \ /api/endpoint \ -H 'Content-Type: application/json' \ -d '{\"key\":\"value\"}' ``` ```ts const requestData = { // ... request parameters }; fetch('/api/endpoint', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(requestData) }); ``` ```python import requests data = {'key': 'value'} response = requests.post('/api/endpoint', json=data) ``` ```swift let url = URL(string: "/api/endpoint")! var request = URLRequest(url: url) request.httpMethod = "POST" let body = ["key": "value"] request.httpBody = try? JSONSerialization.data(withJSONObject: body) request.setValue("application/json", forHTTPHeaderField: "Content-Type") URLSession.shared.dataTask(with: request).resume() ``` -------------------------------- ### mcp.json Configuration Structure Example Source: https://www.outstand.so/docs/mcp/setup An example illustrating the structure of the `mcp.json` file. It defines an `mcpServers` object which contains configurations for different servers, including the `outstand` server. It also shows how to specify a command to run, its arguments, and an optional header. ```json { "mcpServers": { "outstand": { "command": "npx", "args": [ "mcp-remote", "https://mcp.outstand.so/mcp", "--header" ] } } } ``` -------------------------------- ### OpenAPI Request Examples (JavaScript, Go, Java, C#, cURL, TypeScript, Python, Swift) Source: https://www.outstand.so/docs/update-a-social-network Provides code examples for making OpenAPI requests in multiple programming languages. These examples demonstrate how to structure requests and handle responses. Dependencies include standard libraries for each language. ```js const example = () => { // JavaScript example code console.log('JavaScript example'); } ``` ```go func example() { // Go example code fmt.Println("Go example") } ``` ```java public class Example { public void example() { // Java example code System.out.println("Java example"); } } ``` ```csharp public class Example { public void ExampleMethod() { // C# example code Console.WriteLine("C# example"); } } ``` ```bash # cURL example code curl -X GET "http://example.com/api" ``` ```ts const example = (): void => { // TypeScript example code console.log('TypeScript example'); }; ``` ```python def example(): # Python example code print("Python example") ``` ```swift func example() { // Swift example code print("Swift example") } ``` -------------------------------- ### Fetch Post Data using JavaScript Source: https://www.outstand.so/docs/get-post-details Demonstrates how to fetch post data from the Outstand.so API using the JavaScript fetch API. This example shows a GET request to retrieve a specific post. ```javascript fetch("https://api.outstand.so/v1/posts/string", { method: "GET"}) ``` -------------------------------- ### API Response Examples (Go, Java, C#, cURL, TypeScript, Python, Swift) Source: https://www.outstand.so/docs/list-connected-social-accounts Examples of API responses for successful requests, demonstrating the structure of returned data. These examples are provided in multiple programming languages to facilitate integration. ```go package main import "fmt" func main() { // Example Go response structure fmt.Println("Go response example") } ``` ```java public class ApiResponse { public static void main(String[] args) { // Example Java response structure System.out.println("Java response example"); } } ``` ```csharp using System; public class ApiResponse { public static void Main(string[] args) { // Example C# response structure Console.WriteLine("C# response example"); } } ``` ```bash # Example cURL request and response curl -X GET "https://api.example.com/data" ``` ```typescript interface ApiResponse { // Example TypeScript response structure } console.log("TypeScript response example"); ``` ```python # Example Python response structure print("Python response example") ``` ```swift struct ApiResponse { // Example Swift response structure } print("Swift response example") ``` -------------------------------- ### Install mcp-remote Bridge Source: https://www.outstand.so/docs/mcp/setup Installs the necessary bridge utility globally via npm to facilitate streamable HTTP transport for MCP clients. ```bash npm install -g mcp-remote ``` -------------------------------- ### API Endpoint Examples Source: https://www.outstand.so/docs/finalize-pending-connection Provides code examples for interacting with the API in various programming languages. ```APIDOC ## API Endpoint Examples ### Description This section provides code examples for making requests to the API endpoints in different programming languages. ### Code Examples #### JavaScript ```javascript // Example for JavaScript fetch('/api/connect', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ pageIds: ['page1', 'page2'] }) }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error)); ``` #### Go ```go // Example for Go package main import ( "bytes" "encoding/json" "fmt" "net/http" ) func main() { requestBody, err := json.Marshal(map[string][]string{ "pageIds": {"page1", "page2"} }) if err != nil { fmt.Println("Error marshalling request body:", err) return } resp, err := http.Post("/api/connect", "application/json", bytes.NewBuffer(requestBody)) if err != nil { fmt.Println("Error sending request:", err) return } defer resp.Body.Close() // Handle response fmt.Println("Status Code:", resp.StatusCode) } ``` #### Java ```java // Example for Java // Note: This is a conceptual example. Actual implementation may require libraries like Apache HttpClient. /* import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.util.Arrays; public class ApiClient { public static void main(String[] args) throws Exception { HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("/api/connect")) .header("Content-Type", "application/json") .POST(HttpRequest.BodyPublishers.ofString("{\"pageIds\": [\"page1\", \"page2\"]}")) .build(); HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println("Status Code: " + response.statusCode()); System.out.println("Response Body: " + response.body()); } } */ ``` #### C# ```csharp // Example for C# /* using System; using System.Net.Http; using System.Text; using System.Threading.Tasks; public class ApiClient { public static async Task ConnectAsync() { using (HttpClient client = new HttpClient()) { var json = "{\"pageIds\": [\"page1\", \"page2\"]}"; var data = new StringContent(json, Encoding.UTF8, "application/json"); HttpResponseMessage response = await client.PostAsync("/api/connect", data); string result = await response.Content.ReadAsStringAsync(); Console.WriteLine($"Status Code: {response.StatusCode}"); Console.WriteLine($"Response Body: {result}"); } } } */ ``` #### cURL ```bash # Example for cURL curl -X POST \ /api/connect \ -H 'Content-Type: application/json' \ -d '{ "pageIds": ["page1", "page2"] }' ``` #### TypeScript ```typescript // Example for TypeScript async function connectApi(): Promise { try { const response = await fetch('/api/connect', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ pageIds: ['page1', 'page2'] }) }); const data = await response.json(); console.log(data); } catch (error) { console.error('Error:', error); } } ``` #### Python ```python # Example for Python import requests import json url = "/api/connect" headers = {'Content-Type': 'application/json'} payload = {"pageIds": ["page1", "page2"]} response = requests.post(url, headers=headers, data=json.dumps(payload)) print(f"Status Code: {response.status_code}") print(f"Response Body: {response.json()}") ``` #### Swift ```swift // Example for Swift /* import Foundation func connectApi() { guard let url = URL(string: "/api/connect") else { print("Invalid URL") return } var request = URLRequest(url: url) request.httpMethod = "POST" request.setValue("application/json", forHTTPHeaderField: "Content-Type") let body = ["pageIds": ["page1", "page2"]] guard let httpBody = try? JSONSerialization.data(withJSONObject: body, options: []) else { print("Failed to serialize body") return } request.httpBody = httpBody let session = URLSession.shared let task = session.dataTask(with: request) { data, response, error in if let error = error { print("Error: \(error)") return } if let httpResponse = response as? HTTPURLResponse { print("Status Code: \(httpResponse.statusCode)") if let data = data, let responseString = String(data: data, encoding: .utf8) { print("Response Body: \(responseString)") } } } task.resume() } */ ``` ``` -------------------------------- ### Example JSON Configuration for Outstand LLM Source: https://www.outstand.so/docs/configurations/facebook A JSON configuration snippet demonstrating how to structure data for Outstand LLM, including a 'containers' and 'content' field. This example shows basic JSON formatting. ```json { "containers": [ ], "content": "Check out our latest update!", } ``` -------------------------------- ### Language Code Examples Source: https://www.outstand.so/docs/get-upload-url Provides code examples for interacting with the API in various programming languages. ```APIDOC ## Language Code Examples ### Description Code snippets demonstrating how to use the API with different programming languages. ### JavaScript ```javascript // JavaScript example console.log('JavaScript'); ``` ### Go ```go // Go example fmt.Println("Go") ``` ### Java ```java // Java example System.out.println("Java"); ``` ### C# ```csharp // C# example Console.WriteLine("C#"); ``` ### cURL ```bash # cURL example echo "cURL" ``` ### TypeScript ```typescript // TypeScript example console.log('TypeScript'); ``` ### Python ```python # Python example print('Python') ``` ### Swift ```swift // Swift example print("Swift") ``` ``` -------------------------------- ### GET /api/some-route Source: https://www.outstand.so/docs/configurations/tiktok Example of a Next.js API route handler for GET requests. It demonstrates how to parse URL parameters and construct a response. ```APIDOC ## GET /api/some-route ### Description This endpoint handles GET requests, allowing you to retrieve data or perform actions based on the request URL. ### Method GET ### Endpoint /api/some-route ### Parameters #### Query Parameters - **paramName** (string) - Optional - Description of the query parameter. ### Request Example ```json { "example": "No request body for GET requests" } ``` ### Response #### Success Response (200) - **message** (string) - A success message. - **data** (object) - The data returned by the API. #### Response Example ```json { "message": "Successfully retrieved data", "data": { "exampleField": "exampleValue" } } ``` ### Error Handling - **400** - Bad Request: If the request is malformed or missing required parameters. - **500** - Internal Server Error: If an unexpected error occurs on the server. ``` -------------------------------- ### Database Connection String Example (JSON) Source: https://www.outstand.so/docs/create-a-post This snippet demonstrates a typical JSON structure for a database connection string. It includes parameters like network, username, and container details. Ensure these values are correctly configured for successful database access. ```json { "network": "x", "username": "mycompany", "containers": [ { "id": "8xKmL", "content": "Check out our new product launch! #excited" } ] } ``` -------------------------------- ### GET /posts Source: https://www.outstand.so/docs/configurations/bluesky Retrieve a list of social media posts. ```APIDOC ## GET /posts ### Description Fetches a list of existing posts. ### Method GET ### Endpoint /posts ### Response #### Success Response (200) - **posts** (array) - List of post objects. #### Response Example { "posts": [] } ``` -------------------------------- ### GET /posts/{id}/analytics Source: https://www.outstand.so/docs/configurations/bluesky Retrieve analytics data for a specific post. ```APIDOC ## GET /posts/{id}/analytics ### Description Fetches performance metrics for a specific post. ### Method GET ### Endpoint /posts/{id}/analytics ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the post. ### Response #### Success Response (200) - **views** (number) - Total views. - **engagement** (number) - Total engagement count. #### Response Example { "views": 100, "engagement": 10 } ``` -------------------------------- ### Example Authenticated API Request (cURL) Source: https://www.outstand.so/docs/authentication An example of a successful authenticated GET request to the Outstand API using cURL. This snippet shows how to pass the API key in the Authorization header to retrieve social account data. The response indicates success and provides the requested data. ```bash curl -X GET https://api.outstand.so/v1/social-accounts \ -H "Authorization: Bearer sk_live_abc123def456" ``` -------------------------------- ### API Request Examples (JavaScript, Go, Java, C#, cURL, TypeScript, Python, Swift) Source: https://www.outstand.so/docs/get-media-file Examples of how to make API requests using different programming languages and cURL. These snippets demonstrate common request patterns and how to handle responses. They are useful for integrating with the API from various client applications. ```js const response = await fetch('/api/media'); const data = await response.json(); ``` ```go resp, err := http.Get("/api/media") if err != nil { // handle error } defer resp.Body.Close() var data map[string]interface{} json.NewDecoder(resp.Body).Decode(&data) ``` ```java HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("/api/media")) .build(); HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString()); String responseBody = response.body(); ``` ```csharp using var client = new HttpClient(); var response = await client.GetAsync("/api/media"); response.EnsureSuccessStatusCode(); var responseBody = await response.Content.ReadAsStringAsync(); ``` ```bash curl "/api/media" ``` ```ts const response = await fetch('/api/media'); const data: any = await response.json(); ``` ```python import requests response = requests.get('/api/media') data = response.json() ``` ```swift guard let url = URL(string: "/api/media") else { return } URLSession.shared.dataTask(with: url) { data, response, error in guard let data = data else { return } let responseData = try? JSONSerialization.jsonObject(with: data, options: []) }.resume() ``` -------------------------------- ### Code Block Tabs Source: https://www.outstand.so/docs/get-post-repliescomments This section details the functionality related to code block tabs, allowing users to switch between different programming language examples. ```APIDOC ## GET /api/docs/[[...slug]]/page ### Description This endpoint likely serves dynamic documentation content based on a slug, potentially including code examples in various languages. ### Method GET ### Endpoint /api/docs/[[...slug]]/page ### Parameters #### Path Parameters - **slug** (string) - Required - The dynamic path segment for the documentation page. ### Request Example ```json { "example": "No request body for GET requests" } ``` ### Response #### Success Response (200) - **content** (object) - The documentation content, potentially including code snippets. - **tabs** (array) - A list of available programming language tabs for code examples. #### Response Example ```json { "content": { "title": "Example Endpoint", "description": "This is an example endpoint.", "codeExamples": [ { "language": "javascript", "code": "console.log('Hello, world!');" } ] }, "tabs": ["JavaScript", "Python", "cURL"] } ``` ``` -------------------------------- ### Full Post Creation Flow (Python) Source: https://www.outstand.so/docs/getting-started An example demonstrating the complete workflow of listing connected social accounts and creating a post to all of them using Python and the `requests` library. It requires your API key to be provided. ```python import requests API_KEY = "YOUR_API_KEY" BASE_URL = "https://api.outstand.so" headers = {"Authorization": f"Bearer {API_KEY}"} # List connected accounts accounts = requests.get(f"{BASE_URL}/v1/social-accounts", headers=headers).json()["data"] # Create a post post = requests.post(f"{BASE_URL}/v1/posts", headers=headers, json={ "containers": [{"content": "Hello from Outstand!"}], "socialAccountIds": [a["id"] for a in accounts] }).json()["data"] print(f"Post created: {post['id']}") ``` -------------------------------- ### Code Block and Tab Components Source: https://www.outstand.so/docs/get-post-repliescomments This snippet relates to UI components for displaying code, specifically code blocks and tabbed interfaces for code examples. It references internal Next.js chunk files. ```javascript self.__next_f.push([1,"3218\",\"static/chunks/3218-fa8c1d5925716a5c.js\",\"1475\",\"static/chunks/1475-1b42420d6132068e.js\",\"7922\",\"static/chunks/7922-5657a74f7dac078d.js\",\"7870\",\"static/chunks/app/docs/%5B%5B...slug%5D%5D/page-0b2b5341db3a500b.js\"]) ``` -------------------------------- ### Initialize Outstand API Client in TypeScript Source: https://www.outstand.so/docs/getting-started Demonstrates how to initialize the API client by retrieving the API key from environment variables. This is the prerequisite step for all subsequent API requests. ```typescript const API_KEY = process.env.OUTSTAND_API_KEY; ``` -------------------------------- ### Retrieve Post Status via API Source: https://www.outstand.so/docs/post-lifecycle Example of a JSON response from the GET /v1/posts/{id} endpoint. This structure demonstrates how to inspect the status, error messages, and platform-specific IDs for individual social accounts associated with a post. ```json { "success": true, "post": { "id": "9dyJS", "publishedAt": "2025-01-15T10:30:00Z", "socialAccounts": [ { "id": "abc123", "network": "facebook", "username": "MyPage", "status": "failed", "error": "Failed to upload Facebook photo from buffer: 400 - (#100) Invalid image", "platformPostId": null, "publishedAt": null }, { "id": "def456", "network": "x", "username": "@myaccount", "status": "published", "error": null, "platformPostId": "1234567890123456789", "publishedAt": "2025-01-15T10:30:02Z" } ] } } ``` -------------------------------- ### Code Generator Components Source: https://www.outstand.so/docs/get-post-repliescomments This snippet indicates the presence of code generators for various languages, including cURL, TypeScript, Python, and Swift. These generators are likely used to produce code examples or API client code. ```javascript self.__next_f.push([1,"62282,[[\"3218\",\"static/chunks/3218-fa8c1d5925716a5c.js\",\"1475\",\"static/chunks/1475-1b42420d6132068e.js\",\"7922\",\"static/chunks/7922-5657a74f7dac078d.js\",\"7870\",\"static/chunks/app/docs/%5B%5B...slug%5D%5D/page-0b2b5341db3a500b.js\"]],\"generator\"]) ``` -------------------------------- ### POST /media/upload Source: https://www.outstand.so/docs/mcp/setup Initiate a media file upload process. ```APIDOC ## POST /get-upload-url ### Description Requests a secure URL to upload media files for posts. ### Method POST ### Endpoint /docs/get-upload-url ### Request Body - **file_name** (string) - Required - Name of the file. - **file_type** (string) - Required - MIME type of the file. ### Response #### Success Response (200) - **upload_url** (string) - The URL to perform the PUT request for the file upload. ### Response Example { "upload_url": "https://storage.provider.com/upload/xyz" } ``` -------------------------------- ### GET /api/media Source: https://www.outstand.so/docs/configurations/x Lists all media files. ```APIDOC ## GET /api/media ### Description Lists all media files. ### Method GET ### Endpoint /api/media ### Response #### Success Response (200) - **mediaFiles** (array) - A list of media files. - **mediaId** (string) - The ID of the media file. - **filename** (string) - The name of the media file. - **contentType** (string) - The content type of the media file. #### Response Example ```json { "mediaFiles": [ { "mediaId": "media_abcde", "filename": "image.jpg", "contentType": "image/jpeg" } ] } ``` ``` -------------------------------- ### GET /api/media/{mediaId} Source: https://www.outstand.so/docs/configurations/x Gets a specific media file. ```APIDOC ## GET /api/media/{mediaId} ### Description Gets a specific media file. ### Method GET ### Endpoint /api/media/{mediaId} ### Parameters #### Path Parameters - **mediaId** (string) - Required - The ID of the media file to retrieve. ### Response #### Success Response (200) - **mediaData** (blob) - The binary data of the media file. #### Response Example (Binary data of the media file) ``` -------------------------------- ### Webhook Configuration Example (JSON) Source: https://www.outstand.so/docs/post-lifecycle This JSON snippet illustrates a basic webhook configuration, likely used for receiving real-time notifications. It shows a structure that might be sent or received by a system handling these events. ```json { "username": "MyPage", "status": "failed" } ``` -------------------------------- ### GET /api/media Source: https://www.outstand.so/docs/configurations/pinterest Lists all media files associated with the current project or user. ```APIDOC ## GET /api/media ### Description Lists all media files associated with the current project or user. Supports pagination. ### Method GET ### Endpoint /api/media ### Parameters #### Query Parameters - **page** (integer) - Optional - The page number for pagination (default: 1). - **limit** (integer) - Optional - The number of items per page (default: 20). ### Response #### Success Response (200) - **mediaFiles** (array[object]) - A list of media files. - **mediaId** (string) - The ID of the media file. - **fileName** (string) - The original name of the file. - **uploadedAt** (string) - The timestamp when the file was uploaded. - **totalPages** (integer) - The total number of pages available. - **currentPage** (integer) - The current page number. #### Response Example ```json { "mediaFiles": [ { "mediaId": "media123", "fileName": "my_image.jpg", "uploadedAt": "2023-10-27T09:30:00Z" }, { "mediaId": "media456", "fileName": "document.pdf", "uploadedAt": "2023-10-26T15:00:00Z" } ], "totalPages": 5, "currentPage": 1 } ``` ``` -------------------------------- ### API Endpoint: Get Post Analytics Source: https://www.outstand.so/docs/mcp/setup Defines an API endpoint for retrieving analytics data related to posts. This endpoint employs the HTTP GET method for data retrieval. The endpoint is labeled as 'GET'. ```text 23:["Get post analytics"," ",["$","span",null,{"className":"font-mono font-medium text-green-600 dark:text-green-400 ms-auto text-xs text-nowrap","children":"GET"}] ``` -------------------------------- ### Full Post Creation Flow (TypeScript) Source: https://www.outstand.so/docs/getting-started A comprehensive example demonstrating how to list connected social accounts and then create a post to all of them using TypeScript and the Fetch API. It assumes the API key is stored in an environment variable. ```typescript const API_KEY = process.env.OUTSTAND_API_KEY; const BASE_URL = 'https://api.outstand.so'; // 1. List connected social accounts const accountsRes = await fetch(`${BASE_URL}/v1/social-accounts`, { headers: { 'Authorization': `Bearer ${API_KEY}` } }); const { data: accounts } = await accountsRes.json(); // 2. Create a post to all accounts const postRes = await fetch(`${BASE_URL}/v1/posts`, { method: 'POST', headers: { 'Authorization': `Bearer ${API_KEY}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ containers: [{ content: 'Hello from Outstand!' }], socialAccountIds: accounts.map((a: any) => a.id) }) }); const { data: post } = await postRes.json(); console.log('Post created:', post.id); ``` -------------------------------- ### GET /api/social/pending-connection Source: https://www.outstand.so/docs/configurations/x Gets details of a pending social network connection. ```APIDOC ## GET /api/social/pending-connection ### Description Gets details of a pending social network connection. ### Method GET ### Endpoint /api/social/pending-connection ### Parameters #### Query Parameters - **connectionId** (string) - Required - The ID of the pending connection. ### Response #### Success Response (200) - **provider** (string) - The social network provider. - **status** (string) - The status of the connection (e.g., 'pending', 'authorized'). #### Response Example ```json { "provider": "twitter", "status": "pending" } ``` ``` -------------------------------- ### POST /v1/posts Source: https://www.outstand.so/docs/configurations/pinterest Creates a new post on Pinterest by specifying the target board and pin details. ```APIDOC ## POST /v1/posts ### Description Publishes a pin to a specific Pinterest board using the provided media and metadata. ### Method POST ### Endpoint /v1/posts ### Request Body - **content** (string) - Required - Post caption - **accounts** (array) - Required - List containing "pinterest" - **pinterest** (object) - Required - Configuration including board_id, title, link, and alt_text ### Request Example { "content": "Check out our latest collection!", "accounts": ["pinterest"], "pinterest": { "board_id": "123456789", "title": "Summer Dresses", "link": "https://example.com", "alt_text": "Dress description" } } ``` -------------------------------- ### API Endpoint: Get Post Details Source: https://www.outstand.so/docs/mcp/setup Defines an API endpoint for fetching the details of a specific post. This endpoint uses the HTTP GET method, suitable for retrieving individual resources. The endpoint is identified by the label 'GET'. ```text 22:["Get post details"," ",["$","span",null,{"className":"font-mono font-medium text-green-600 dark:text-green-400 ms-auto text-xs text-nowrap","children":"GET"}]] ``` -------------------------------- ### GET /credentials/{network} Source: https://www.outstand.so/docs/mcp/tools Get configuration details of a specific platform. ```APIDOC ## GET /credentials/{network} ### Description Get configuration details of a specific platform. ### Method GET ### Endpoint /credentials/{network} ### Parameters #### Path Parameters - **network** (string) - Required - The platform identifier ### Response #### Success Response (200) - **network** (string) - Platform name - **client_key** (string) - The stored client key #### Response Example { "network": "x", "client_key": "your_client_id" } ``` -------------------------------- ### Python: Outstand LLM API Request Setup Source: https://www.outstand.so/docs/getting-started This Python snippet demonstrates how to set up the necessary components for making requests to the Outstand LLM API. It includes importing the 'requests' library, defining API key and base URL constants, and constructing the request headers with authentication. ```python import requests API_KEY = "YOUR_API_KEY" BASE_URL = "https://api.outstand.so" headers = { "Authorization": f"Bearer {API_KEY}" } # List connected accounts ``` -------------------------------- ### GET /api/social/connection/pending Source: https://www.outstand.so/docs/delete-media-file Gets pending connection details. Retrieves information about a social media connection that is in a pending state. ```APIDOC ## GET /api/social/connection/pending ### Description Gets pending connection details. Retrieves information about a social media connection that is in a pending state. ### Method GET ### Endpoint /api/social/connection/pending ### Parameters #### Path Parameters None #### Query Parameters - **state** (string) - Required - The state parameter received during the authentication URL generation. #### Request Body None ### Request Example (No request body for GET requests, parameter is in query string) ### Response #### Success Response (200) - **platform** (string) - The social media platform. - **username** (string) - The username associated with the pending connection. - **status** (string) - The current status of the connection (e.g., 'pending_verification'). #### Response Example ```json { "platform": "Twitter", "username": "@pendinguser", "status": "pending_verification" } ``` ``` -------------------------------- ### POST /posts Source: https://www.outstand.so/docs/mcp/setup Create a new post within the Outstand.so platform. ```APIDOC ## POST /create-a-post ### Description Creates a new post to be managed or published through the Outstand.so platform. ### Method POST ### Endpoint /docs/create-a-post ### Request Body - **content** (string) - Required - The text content of the post. - **scheduled_at** (string) - Optional - ISO 8601 timestamp for scheduling. ### Response #### Success Response (200) - **id** (string) - The unique identifier of the created post. - **status** (string) - Current status of the post. ### Response Example { "id": "post_12345", "status": "draft" } ``` -------------------------------- ### GET /api/media/{fileId} Source: https://www.outstand.so/docs/delete-media-file Gets a media file. Retrieves a specific media file using its unique identifier. ```APIDOC ## GET /api/media/{fileId} ### Description Gets a media file. Retrieves a specific media file using its unique identifier. ### Method GET ### Endpoint /api/media/{fileId} ### Parameters #### Path Parameters - **fileId** (string) - Required - The unique identifier of the media file to retrieve. #### Query Parameters None #### Request Body None ### Request Example (No request body for GET requests) ### Response #### Success Response (200) - The response body will contain the raw media file content (e.g., image data, video data). #### Response Example (Response will be the raw file content, e.g., binary data for an image) ``` -------------------------------- ### GET /api/social/accounts/{accountId}/metrics Source: https://www.outstand.so/docs/configurations/x Gets metrics for a specific social account. ```APIDOC ## GET /api/social/accounts/{accountId}/metrics ### Description Gets metrics for a specific social account. ### Method GET ### Endpoint /api/social/accounts/{accountId}/metrics ### Parameters #### Path Parameters - **accountId** (string) - Required - The ID of the social account. ### Response #### Success Response (200) - **metrics** (object) - An object containing various metrics for the account. - **followers** (integer) - Number of followers. - **following** (integer) - Number of accounts followed. - **posts** (integer) - Number of posts. #### Response Example ```json { "metrics": { "followers": 1000, "following": 500, "posts": 200 } } ``` ``` -------------------------------- ### SDK - React UI Components Source: https://www.outstand.so/docs/get-post-repliescomments Documentation for React UI Components within the SDK. ```APIDOC ## React UI Components ### Description Documentation for React UI Components. ### Endpoint /docs/sdk/ui ``` -------------------------------- ### GET /api/account/metrics Source: https://www.outstand.so/docs/delete-media-file Gets account metrics. Retrieves key performance indicators and usage statistics for the user's account. ```APIDOC ## GET /api/account/metrics ### Description Gets account metrics. Retrieves key performance indicators and usage statistics for the user's account. ### Method GET ### Endpoint /api/account/metrics ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example (No request body for GET requests) ### Response #### Success Response (200) - **totalPosts** (integer) - The total number of posts created. - **totalComments** (integer) - The total number of comments made. - **totalMedia** (integer) - The total number of media files uploaded. - **connectedSocialAccounts** (integer) - The number of social media accounts connected. #### Response Example ```json { "totalPosts": 150, "totalComments": 500, "totalMedia": 25, "connectedSocialAccounts": 3 } ``` ``` -------------------------------- ### POST /api/accounts/youtube/connect Source: https://www.outstand.so/docs/configurations/youtube Establishes a connection between the Outstand platform and a YouTube account using client credentials. ```APIDOC ## POST /api/accounts/youtube/connect ### Description Connects a YouTube account to the Outstand platform by providing the necessary network credentials and client authentication details. ### Method POST ### Endpoint /api/accounts/youtube/connect ### Request Body - **network** (string) - Required - The network identifier, set to "youtube". - **client_key** (string) - Required - The client ID provided by your YouTube API console. - **client_secret** (string) - Required - The client secret associated with your YouTube API credentials. ### Request Example { "network": "youtube", "client_key": "YOUR_CLIENT_ID_HERE", "client_secret": "YOUR_CLIENT_SECRET_HERE" } ### Response #### Success Response (200) - **status** (string) - Confirmation of the connection initiation. #### Response Example { "status": "success", "message": "YouTube account connection initiated. Please complete OAuth flow." } ``` -------------------------------- ### GET /api/posts/{postId}/analytics Source: https://www.outstand.so/docs/delete-media-file Retrieves analytics for a specific post. Get insights into post performance, such as views and engagement. ```APIDOC ## GET /api/posts/{postId}/analytics ### Description Retrieves analytics for a specific post. Get insights into post performance, such as views and engagement. ### Method GET ### Endpoint /api/posts/{postId}/analytics ### Parameters #### Path Parameters - **postId** (string) - Required - The unique identifier of the post for which to retrieve analytics. #### Query Parameters None #### Request Body None ### Request Example (No request body for GET requests) ### Response #### Success Response (200) - **postId** (string) - The unique identifier of the post. - **views** (integer) - The total number of views for the post. - **likes** (integer) - The number of likes the post has received. - **comments** (integer) - The number of comments on the post. #### Response Example ```json { "postId": "post_12345", "views": 1500, "likes": 75, "comments": 15 } ``` ``` -------------------------------- ### Full Flow in TypeScript Source: https://www.outstand.so/docs/getting-started A comprehensive TypeScript example demonstrating a full workflow: connecting a social account, creating a post, and scheduling it. This showcases multiple API functionalities in sequence. ```typescript import { OutstandClient } from "@outstand/sdk"; async function fullFlowExample(apiKey: string, socialPlatform: string, socialAccountHandle: string) { const client = new OutstandClient(apiKey); try { // 1. Connect a social account (example for Twitter) console.log(`Connecting ${socialPlatform} account...`); const connectedAccount = await client.socialAccounts.connect({ platform: socialPlatform as any, // Cast to platform type if needed handle: socialAccountHandle, }); console.log("Social account connected:", connectedAccount); const accountId = connectedAccount.id; // 2. Create and publish a post console.log("Creating and publishing a post..."); const publishedPost = await client.posts.create({ accountId: accountId, content: "Hello World from the full TypeScript flow!", }); console.log("Post published:", publishedPost); // 3. Schedule a post console.log("Scheduling a post..."); const publishTime = new Date(); publishTime.setDate(publishTime.getDate() + 2); // Schedule for 2 days from now const scheduledPost = await client.posts.schedule({ accountId: accountId, content: "This is a scheduled post from the full flow.", publishAt: publishTime.toISOString(), }); console.log("Post scheduled:", scheduledPost); return { connectedAccount, publishedPost, scheduledPost }; } catch (error) { console.error("Full flow example failed:", error); throw error; } } // Example usage: // const apiKey = "YOUR_API_KEY"; // fullFlowExample(apiKey, "twitter", "@your_twitter_handle"); ``` -------------------------------- ### Discover Available Pinterest Boards Source: https://www.outstand.so/docs/configurations/pinterest After a user connects their Pinterest account, list their available boards to obtain `board_id` values for further operations. ```APIDOC ## Discover Available Boards ### Description After connecting an account, list the user's boards to find available `board_id` values. ### Method GET ### Endpoint `https://app.outstand.so/api/socials/pinterest/{orgId}/boards` ### Parameters #### Path Parameters - **orgId** (string) - Required - The organization ID. #### Query Parameters - **cursor** (string) - Optional - Cursor for pagination. ### Request Example ``` GET https://app.outstand.so/api/socials/pinterest/YOUR_ORG_ID/boards ``` ### Response #### Success Response (200) - **boards** (array) - A list of available Pinterest boards. - **id** (string) - The unique identifier for the board. - **name** (string) - The name of the board. #### Response Example ```json { "boards": [ { "id": "1234567890", "name": "My Awesome Board" }, { "id": "0987654321", "name": "Another Board" } ] } ``` ``` -------------------------------- ### Create YouTube Short Post via API Source: https://www.outstand.so/docs/configurations/youtube This example illustrates how to create a post that will be published as a YouTube Short using the Outstand API. It includes the video content, media URL, social account ID, and specific YouTube configuration to mark it as a Short with custom tags. ```json { "containers": [ { "content": "Check out this amazing tutorial!", "media": [ { "url": "https://example.com/video.mp4", "filename": "video.mp4" } ] } ], "social_account_ids": [123], "networkOverrideConfiguration": { "youtubeConfiguration": { "isShort": true, "privacyStatus": "public", "tags": ["tutorial", "shorts"] } } } ``` -------------------------------- ### Get Media Source: https://www.outstand.so/docs/mcp/tools Get details of a specific media file including metadata and URLs. ```APIDOC ## GET /get_media/{media_id} ### Description Get details of a specific media file including metadata and URLs. ### Method GET ### Endpoint /get_media/{media_id} ### Parameters #### Path Parameters - **media_id** (string) - Required - The ID of the media file to retrieve. ### Request Example ``` GET /get_media/unique_media_id_string ``` ### Response #### Success Response (200) - **media_id** (string) - The ID of the media file. - **url** (string) - The public URL of the media file. - **created_at** (string) - The timestamp when the media was uploaded. #### Response Example ```json { "media_id": "unique_media_id_string", "url": "https://example.com/media/unique_media_id_string.jpg", "created_at": "2023-10-27T10:00:00Z" } ``` ``` -------------------------------- ### Promptwatch Client Initialization Source: https://www.outstand.so/docs/list-posts This JavaScript code initializes the Promptwatch client. It injects a script tag into the document and configures it with a project ID. This is used for tracking and analytics. ```javascript (self.__next_s = self.__next_s || []).push(["https://ingest.promptwatch.com/js/client.min.js", {"data-project-id": "9ce3c48e-4884-4c81-a9c6-1d93c8b5865b", "id": "promptwatch"}])((a, b, c, d, e, f, g, h) => { let i = document.documentElement, j = ["light", "dark"]; function k(b) { var c; (Array.isArray(a) ? a : [a]).forEach(a => { let c = "class" === a, d = c && f ? e.map(a => f[a] || a) : e; c ? (i.classList.remove(...d), i.classList.add(f && f[b] ? f[b] : b)) : i.setAttribute(a, b) }), c = b, h && j.includes(c) && (i.style.colorScheme = c) } if (d) k(d); else try { let a = localStorage.getItem(b) || c, d = g && "system" === a ? window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : a; k(d) } catch (a) { } })("class", "theme", "system", null, ["light", "dark"], null, true, true); ```