> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ugc.inc/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Account Info

> Update account metadata for one or more accounts (tag, groups, keywords, profiles, description, warmup version)

## Endpoint

```
POST https://api.ugc.inc/accounts/update-info
```

## Overview

Update account metadata including tag, organization group, user group, keywords, profiles, description, and warmup version for one or more accounts. This endpoint updates the internal categorization and grouping of accounts without modifying the social media profile itself.

## Request Body

<ParamField body="updates" type="array" required>
  Array of account updates to apply. Each update object contains:

  <Expandable title="Update object properties">
    <ParamField body="accountId" type="string" required>
      Account ID to update
    </ParamField>

    <ParamField body="tag" type="string">
      New tag value for categorization
    </ParamField>

    <ParamField body="org_group" type="string">
      New organization group identifier
    </ParamField>

    <ParamField body="user_group" type="string">
      New user group identifier
    </ParamField>

    <ParamField body="keywords" type="string">
      Comma-separated list of keywords for warmup activities (e.g., "fitness,health,workout")
    </ParamField>

    <ParamField body="profiles" type="string">
      Comma-separated list of profile usernames for warmup activities (e.g., "@fitinfluencer1,@healthguru2")
    </ParamField>

    <ParamField body="description" type="string">
      Description/interest area for the account. Used by v1\_smart warmup for browse tasks (e.g., "health and wellness content")
    </ParamField>

    <ParamField body="warmupVersion" type="'original' | 'v1_smart'">
      Warmup scheduling algorithm version. `'original'` uses standard scheduling (20-30 min durations), `'v1_smart'` uses optimized algorithm with custom flows (5-10 min after day 4)
    </ParamField>

    <ParamField body="postVersion" type="'original' | 'v1_custom' | 'manual_posting'">
      Post flow version. `'original'` uses standard posting flow, `'v1_custom'` uses customized posting flow, `'manual_posting'` skips automated posting
    </ParamField>

    <ParamField body="approved" type="boolean">
      Whether the account follows recommended best practices. Set to `false` to flag accounts with user-overridden guidelines.
    </ParamField>
  </Expandable>
</ParamField>

<Note>
  Each update in the array must include at least one field to update (tag, org\_group, user\_group, keywords, profiles, description, warmupVersion, postVersion, or approved).
</Note>

## Response

<ResponseField name="data" type="object">
  Response object containing success summary and results

  <Expandable title="Response properties">
    <ResponseField name="message" type="string">
      Summary message indicating how many accounts were updated
    </ResponseField>

    <ResponseField name="successful" type="number">
      Number of accounts successfully updated
    </ResponseField>

    <ResponseField name="failed" type="number">
      Number of accounts that failed to update
    </ResponseField>

    <ResponseField name="results" type="array">
      Array of individual update results

      <Expandable title="Result object properties">
        <ResponseField name="accountId" type="string">
          Account ID
        </ResponseField>

        <ResponseField name="success" type="boolean">
          Whether the update succeeded
        </ResponseField>

        <ResponseField name="account" type="Account">
          Updated account object (only present on success)
        </ResponseField>

        <ResponseField name="error" type="string">
          Error message (only present on failure)
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.ugc.inc/accounts/update-info \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "updates": [
        {
          "accountId": "acc_123456",
          "tag": "premium",
          "org_group": "marketing",
          "user_group": "team_alpha",
          "keywords": "fitness,health,workout",
          "profiles": "@fitinfluencer1,@healthguru2",
          "description": "health and wellness content",
          "warmupVersion": "v1_smart"
        },
        {
          "accountId": "acc_789012",
          "tag": "standard",
          "warmupVersion": "original"
        }
      ]
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://api.ugc.inc/accounts/update-info',
      headers={
          'Authorization': 'Bearer YOUR_API_KEY',
          'Content-Type': 'application/json'
      },
      json={
          'updates': [
              {
                  'accountId': 'acc_123456',
                  'tag': 'premium',
                  'org_group': 'marketing',
                  'user_group': 'team_alpha',
                  'keywords': 'fitness,health,workout',
                  'profiles': '@fitinfluencer1,@healthguru2',
                  'description': 'health and wellness content',
                  'warmupVersion': 'v1_smart'
              },
              {
                  'accountId': 'acc_789012',
                  'tag': 'standard',
                  'warmupVersion': 'original'
              }
          ]
      }
  )

  data = response.json()

  if data['ok']:
      print(f"Updated {data['data']['successful']} account(s)")
      if data['data']['failed'] > 0:
          for result in data['data']['results']:
              if not result['success']:
                  print(f"Failed: {result['accountId']} - {result['error']}")
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.ugc.inc/accounts/update-info', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      updates: [
        {
          accountId: 'acc_123456',
          tag: 'premium',
          org_group: 'marketing',
          user_group: 'team_alpha',
          keywords: 'fitness,health,workout',
          profiles: '@fitinfluencer1,@healthguru2',
          description: 'health and wellness content',
          warmupVersion: 'v1_smart'
        },
        {
          accountId: 'acc_789012',
          tag: 'standard',
          warmupVersion: 'original'
        }
      ]
    })
  });

  const data = await response.json();

  if (data.ok) {
    console.log(`Updated ${data.data.successful} account(s)`);
    if (data.data.failed > 0) {
      data.data.results.filter(r => !r.success).forEach(r => {
        console.log(`Failed: ${r.accountId} - ${r.error}`);
      });
    }
  }
  ```

  ```typescript React theme={null}
  import { UGCClient } from 'ugcinc';

  const client = new UGCClient({
    apiKey: 'YOUR_API_KEY'
  });

  const response = await client.accounts.updateInfo({
    updates: [
      {
        accountId: 'acc_123456',
        tag: 'premium',
        org_group: 'marketing',
        user_group: 'team_alpha',
        keywords: 'fitness,health,workout',
        profiles: '@fitinfluencer1,@healthguru2',
        description: 'health and wellness content',
        warmupVersion: 'v1_smart'
      },
      {
        accountId: 'acc_789012',
        tag: 'standard',
        warmupVersion: 'original'
      }
    ]
  });

  if (response.ok) {
    console.log(`Updated ${response.data.successful} account(s)`);
    response.data.results.forEach(result => {
      if (result.success) {
        console.log(`Account ${result.accountId}: tag = ${result.account?.tag}`);
      } else {
        console.log(`Account ${result.accountId} failed: ${result.error}`);
      }
    });
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "ok": true,
    "code": 200,
    "message": "Updated 2 account(s)",
    "data": {
      "message": "Updated 2 account(s)",
      "successful": 2,
      "failed": 0,
      "results": [
        {
          "accountId": "acc_123456",
          "success": true,
          "account": {
            "id": "acc_123456",
            "type": "tiktok",
            "tag": "premium",
            "org_group": "marketing",
            "user_group": "team_alpha",
            "keywords": "fitness,health,workout",
            "profiles": "@fitinfluencer1,@healthguru2",
            "description": "health and wellness content",
            "warmup_version": "v1_smart",
            "username": "coolcreator",
            "nick_name": "Cool Creator",
            "pfp_url": "https://storage.example.com/avatar.jpg"
          }
        },
        {
          "accountId": "acc_789012",
          "success": true,
          "account": {
            "id": "acc_789012",
            "type": "tiktok",
            "tag": "standard",
            "warmup_version": "original",
            "username": "anothercreator",
            "nick_name": "Another Creator"
          }
        }
      ]
    }
  }
  ```

  ```json Partial Success Response theme={null}
  {
    "ok": true,
    "code": 200,
    "message": "Updated 1 account(s), 1 failed",
    "data": {
      "message": "Updated 1 account(s), 1 failed",
      "successful": 1,
      "failed": 1,
      "results": [
        {
          "accountId": "acc_123456",
          "success": true,
          "account": {
            "id": "acc_123456",
            "type": "tiktok",
            "tag": "premium"
          }
        },
        {
          "accountId": "acc_invalid",
          "success": false,
          "error": "Account not found"
        }
      ]
    }
  }
  ```
</ResponseExample>
