Quickstart
Postproxy creates your first profile group automatically when you sign up. Connect your social media accounts through the dashboard, then you’re ready to make API calls.
Step 1: Get your profiles
Section titled “Step 1: Get your profiles”First, retrieve your connected profiles to get their IDs.
curl -X GET "https://api.postproxy.dev/api/profiles" \ -H "Authorization: Bearer YOUR_API_KEY"import PostProxy from "postproxy-sdk";
const client = new PostProxy("YOUR_API_KEY");const profiles = await client.profiles.list();console.log(profiles);from postproxy import PostProxy
client = PostProxy("YOUR_API_KEY")profiles = await client.profiles.list()print(profiles)package main
import ( "fmt" postproxy "github.com/postproxy/postproxy-go")
func main() { client := postproxy.New("YOUR_API_KEY") profiles, _ := client.Profiles.List() fmt.Println(profiles)}require "postproxy"
client = PostProxy::Client.new("YOUR_API_KEY")profiles = client.profiles.listputs profilesuse PostProxy\PostProxy;
$client = new PostProxy("YOUR_API_KEY");$profiles = $client->profiles->list();print_r($profiles);import dev.postproxy.PostProxy;
PostProxy client = new PostProxy("YOUR_API_KEY");var profiles = client.profiles().list();System.out.println(profiles);using PostProxy;
var client = new PostProxyClient("YOUR_API_KEY");var profiles = await client.Profiles.ListAsync();Console.WriteLine(profiles);Response:
{ "data": [ { "id": "prof123abc", "name": "My Company Page", "platform": "facebook", "status": "active", "profile_group_id": "grp456xyz", "expires_at": null, "post_count": 42 }, { "id": "prof789def", "name": "@mycompany", "platform": "instagram", "status": "active", "profile_group_id": "grp456xyz", "expires_at": null, "post_count": 38 } ]}Note the profile IDs and platform types - you’ll use these when creating posts.
Step 2: Create a post
Section titled “Step 2: Create a post”Post content to one or more profiles. You can specify profiles by their ID or by platform name (uses the first profile for that platform).
curl -X POST "https://api.postproxy.dev/api/posts" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "post": { "body": "Hello World!", "draft": true }, "profiles": ["facebook", "instagram"], "media": ["https://example.com/image.jpg"] }'import PostProxy from "postproxy-sdk";
const client = new PostProxy("YOUR_API_KEY");const post = await client.posts.create("Hello World!", ["facebook", "instagram"], { media: ["https://example.com/image.jpg"], draft: true,});console.log(post);from postproxy import PostProxy
client = PostProxy("YOUR_API_KEY")post = await client.posts.create( "Hello World!", ["facebook", "instagram"], media=["https://example.com/image.jpg"], draft=True,)print(post)package main
import ( "fmt" postproxy "github.com/postproxy/postproxy-go")
func main() { client := postproxy.New("YOUR_API_KEY") post, _ := client.Posts.Create("Hello World!", []string{"facebook", "instagram"}, &postproxy.CreatePostOptions{ Media: []string{"https://example.com/image.jpg"}, Draft: true, }) fmt.Println(post)}require "postproxy"
client = PostProxy::Client.new("YOUR_API_KEY")post = client.posts.create( "Hello World!", profiles: ["facebook", "instagram"], media: ["https://example.com/image.jpg"], draft: true)puts postuse PostProxy\PostProxy;
$client = new PostProxy("YOUR_API_KEY");$post = $client->posts->create("Hello World!", ["facebook", "instagram"], [ "media" => ["https://example.com/image.jpg"], "draft" => true,]);print_r($post);import dev.postproxy.PostProxy;import java.util.List;
PostProxy client = new PostProxy("YOUR_API_KEY");var post = client.posts().create( "Hello World!", List.of("facebook", "instagram"), new CreatePostOptions() .media(List.of("https://example.com/image.jpg")) .draft(true));System.out.println(post);using PostProxy;
var client = new PostProxyClient("YOUR_API_KEY");var post = await client.Posts.CreateAsync("Hello World!", ["facebook", "instagram"], new CreatePostOptions{ Media = ["https://example.com/image.jpg"], Draft = true,});Console.WriteLine(post);Response:
{ "id": "xyz789abc", "body": "Hello World!", "status": "draft", "scheduled_at": null, "created_at": "2024-01-15T10:30:00.000Z", "platforms": [ { "platform": "facebook", "status": "published", "error": null, "params": null, "attempted_at": "2024-01-15T10:30:01.000Z" }, { "platform": "instagram", "status": "published", "error": null, "params": { "format": "post" }, "attempted_at": "2024-01-15T10:30:02.000Z" } ]}Your post will be published to the specified platforms almost immediately.
Step 3: Schedule a post (optional)
Section titled “Step 3: Schedule a post (optional)”To schedule a post for later, add scheduled_at with an ISO 8601 timestamp.
curl -X POST "https://api.postproxy.dev/api/posts" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "post": { "body": "Hello World!", "scheduled_at": "2024-01-20T12:00:00Z" }, "profiles": ["facebook", "instagram"], "media": ["https://example.com/image.jpg"] }'import PostProxy from "postproxy-sdk";
const client = new PostProxy("YOUR_API_KEY");const post = await client.posts.create("Hello World!", ["facebook", "instagram"], { media: ["https://example.com/image.jpg"], scheduledAt: "2024-01-20T12:00:00Z",});console.log(post);from postproxy import PostProxy
client = PostProxy("YOUR_API_KEY")post = await client.posts.create( "Hello World!", ["facebook", "instagram"], media=["https://example.com/image.jpg"], scheduled_at="2024-01-20T12:00:00Z",)print(post)package main
import ( "fmt" postproxy "github.com/postproxy/postproxy-go")
func main() { client := postproxy.New("YOUR_API_KEY") post, _ := client.Posts.Create("Hello World!", []string{"facebook", "instagram"}, &postproxy.CreatePostOptions{ Media: []string{"https://example.com/image.jpg"}, ScheduledAt: "2024-01-20T12:00:00Z", }) fmt.Println(post)}require "postproxy"
client = PostProxy::Client.new("YOUR_API_KEY")post = client.posts.create( "Hello World!", profiles: ["facebook", "instagram"], media: ["https://example.com/image.jpg"], scheduled_at: "2024-01-20T12:00:00Z")puts postuse PostProxy\PostProxy;
$client = new PostProxy("YOUR_API_KEY");$post = $client->posts->create("Hello World!", ["facebook", "instagram"], [ "media" => ["https://example.com/image.jpg"], "scheduled_at" => "2024-01-20T12:00:00Z",]);print_r($post);import dev.postproxy.PostProxy;import java.util.List;
PostProxy client = new PostProxy("YOUR_API_KEY");var post = client.posts().create( "Hello World!", List.of("facebook", "instagram"), new CreatePostOptions() .media(List.of("https://example.com/image.jpg")) .scheduledAt("2024-01-20T12:00:00Z"));System.out.println(post);using PostProxy;
var client = new PostProxyClient("YOUR_API_KEY");var post = await client.Posts.CreateAsync("Hello World!", ["facebook", "instagram"], new CreatePostOptions{ Media = ["https://example.com/image.jpg"], ScheduledAt = "2024-01-20T12:00:00Z",});Console.WriteLine(post);Response:
{ "id": "xyz789abc", "body": "Hello World!", "status": "scheduled", "scheduled_at": "2024-01-20T12:00:00.000Z", "created_at": "2024-01-15T10:30:00.000Z", "platforms": [ { "platform": "facebook", "status": "processing", "error": null, "params": null, "attempted_at": null }, { "platform": "instagram", "status": "processing", "error": null, "params": { "format": "post" }, "attempted_at": null } ]}Postproxy handles the scheduling - your post will be published at the specified time.
Next steps
Section titled “Next steps”- Posts API Reference - Full documentation for creating and managing posts
- Platform Parameters - Platform-specific options and media constraints
- Profiles API Reference - Managing connected profiles