---
title: "Assign profile to group"
method: PATCH
path: "/api/profiles/{id}/assign_to_group"
tags: ["Profiles"]
---

# Assign profile to group

`PATCH /api/profiles/{id}/assign_to_group`

## Request

- Base URL: `https://api.postproxy.dev`
- URL: `https://api.postproxy.dev/api/profiles/{id}/assign_to_group`
- Auth: HTTP bearer

Moves a profile (the connection itself) into a different profile group without disconnecting it. The connection keeps its ID, tokens, and post history. Placements in its current home group move with it; placements already assigned to another group stay where they are. Requires an account-wide API key for cross-group moves.

## Path parameters

- `id` string, required

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `target_profile_group_id` string, required: ID of the profile group to move the profile into. Must be in the same environment (live/sandbox) as your API key.

## Response `200`

The moved profile, with profile_group_id set to the new group. Moving a profile into the group it is already in is a no-op and returns 200.

- Profile: A connected social media account.
  - `id` string: Unique profile identifier (id).
  - `name` string: Display name of the connected account.
  - `username` string, nullable: Handle on the platform (without @). null when the platform does not expose one.
  - `platform_id` string: The account's ID on the platform.
  - `status` 'active' | 'expired' | 'inactive': Platform connection status. inactive might mean disconnected or suspended on a platform, or waiting for a group that can take it - see inactive_reason.
  - `inactive_reason` 'network_taken' | 'null', nullable: Why an inactive profile is inactive. network_taken: the account arrived with a Facebook login that granted several Instagram accounts, but its group already holds an active Instagram profile - move it to a group without one to activate it. null otherwise, including when the connection was lost and needs reconnecting.
  - `platform` 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'youtube' | 'twitter' | 'threads' | 'pinterest' | 'bluesky' | 'telegram' | 'google_business': Platform identifier.
  - `profile_group_id` string: ID of the profile group this belongs to.
  - `expires_at` string, nullable: ISO 8601 timestamp when the connection expires (if applicable). null when the token does not expire or has a refresh token.
  - `post_count` integer: Number of posts made through this profile.
  - `avatar_url` string, nullable: Stable Postproxy storage URL of the account's profile picture, resized to 256x256. null until it has been mirrored. For facebook this is the connecting user's picture; each Page's picture is avatar_url on its placement.
  - `platform_url` string, nullable: Public URL of the account on the platform. null when the platform has no stable public profile URL (e.g. linkedin, google_business).
  - `placements_sync_status` 'syncing' | 'synced' | 'failed' | 'null', nullable: State of the latest pull of this profile's placements. The pull runs in the background right after connecting and can take several minutes on profiles with many pages/locations. null for platforms without placements and for telegram, whose channels arrive via webhook.

## Other responses

- `400`: Missing required parameters.
- `401`: Invalid, missing, or insufficient API key permissions.
- `404`: Resource does not exist or is not accessible.
- `422`: Validation failed.

---

[API](https://skmtc.dev/postproxy/apis/postproxy-social-media-api.md) - [All operations](https://skmtc.dev/postproxy/apis/postproxy-social-media-api/llms.txt) - [OpenAPI document](https://skmtc.dev/postproxy/apis/postproxy-social-media-api/revisions/d54482ac4ce7?raw)
