Skip to content

Profile Groups API Reference

Profile Groups are organizational containers that group related social media profiles together. For example, you might have separate profile groups for different brands, clients, or projects.

MethodEndpointDescription
GET/api/profile_groupsList all profile groups
GET/api/profile_groups/:idGet a single profile group
POST/api/profile_groupsCreate a new profile group
DELETE/api/profile_groups/:idDelete a profile group
POST/api/profile_groups/:id/initialize_connectionGet OAuth URL to connect a profile

FieldTypeDescription
idstringUnique profile group identifier (hashid)
namestringDisplay name of the profile group
profiles_countintegerNumber of connected profiles in this group

GET /api/profile_groups

Retrieves all profile groups accessible with your API key.

API Key TypeReturns
Full account accessAll profile groups in the account
Profile group scopedOnly the scoped profile group
Terminal window
curl -X GET "https://api.postproxy.dev/api/profile_groups" \
-H "Authorization: Bearer YOUR_API_KEY"

Response:

{
"data": [
{
"id": "grp123abc",
"name": "Main Brand",
"profiles_count": 5
},
{
"id": "grp456def",
"name": "Client Project",
"profiles_count": 3
},
{
"id": "grp789ghi",
"name": "Personal",
"profiles_count": 2
}
]
}

GET /api/profile_groups/:id

Retrieves a single profile group by its ID.

NameTypeRequiredDescription
idstringYesProfile group hashid
Terminal window
curl -X GET "https://api.postproxy.dev/api/profile_groups/grp123abc" \
-H "Authorization: Bearer YOUR_API_KEY"

Response:

{
"id": "grp123abc",
"name": "Main Brand",
"profiles_count": 5
}

POST /api/profile_groups

Creates a new profile group.

NameTypeRequiredDescription
profile_group[name]stringYesName for the new profile group
Terminal window
curl -X POST "https://api.postproxy.dev/api/profile_groups" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"profile_group": {
"name": "New Client Project"
}
}'

Response (201 Created):

{
"id": "grp999xyz",
"name": "New Client Project",
"profiles_count": 0
}

Permission denied (scoped API key) (422):

{
"error": "Your API key has no such permission"
}

DELETE /api/profile_groups/:id

Deletes a profile group and all its associated profiles.

NameTypeRequiredDescription
idstringYesProfile group hashid
Terminal window
curl -X DELETE "https://api.postproxy.dev/api/profile_groups/grp123abc" \
-H "Authorization: Bearer YOUR_API_KEY"

Response:

{
"deleted": true
}

POST /api/profile_groups/:id/initialize_connection

Generates a URL to connect a new social media profile to a profile group. This is used to initiate the OAuth flow for connecting social accounts as if it was inside your service.

NameTypeRequiredDescription
idstringYesProfile group hashid
NameTypeRequiredDescription
platformstringYesPlatform to connect
redirect_urlstringYesURL to redirect to after OAuth completes
PlatformAccount type
facebookFacebook Page
instagramInstagram Business/Creator Account
tiktokTikTok Account
linkedinLinkedIn Profile
youtubeYouTube Channel
twitterX (Twitter) Account
threadsThreads Account
Terminal window
curl -X POST "https://api.postproxy.dev/api/profile_groups/grp123abc/initialize_connection" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"platform": "instagram",
"redirect_url": "https://myapp.com/oauth/callback"
}'

Response:

{
"url": "https://postproxy.com/partner_connect/inv789xyz",
"success": true
}
FieldTypeDescription
urlstringURL to redirect the user to for OAuth authentication
successbooleanWhether the invitation was created successfully
  1. Call this endpoint to get the connection URL
  2. Redirect the user to the returned url
  3. User authenticates with the social platform
  4. User is redirected to your redirect_url after completion
  5. A new profile is created in the specified profile group

Missing redirect_url (422):

{
"error": "Missing redirect_url"
}

Missing platform (422):

{
"error": "Missing platform"
}

Platform already connected (422):

{
"error": "Platform already connected"
}