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

# Update a User Profile

> एक मौजूदा प्रोफ़ाइल को अपडेट करें।

export const PlansAvailable = ({plans = [], maxPackRequired}) => {
  let displayPlans = plans;
  if (plans && plans.length === 1) {
    const lowerCasePlan = plans[0].toLowerCase();
    if (lowerCasePlan === "business") {
      displayPlans = ["Launch", "Business", "Enterprise"];
    } else if (lowerCasePlan === "premium") {
      displayPlans = ["Premium", "Launch", "Business", "Enterprise"];
    }
  }
  return <Note>
Available on {displayPlans.length === 1 ? "the " : ""}
{displayPlans.join(", ").replace(/\b\w/g, l => l.toUpperCase())}{" "}
{displayPlans.length > 1 ? "plans" : "plan"}.

{maxPackRequired && <span onClick={() => window.open('https://www.ayrshare.com/docs/additional/maxpack', '_self')} className="flex items-center mt-2 cursor-pointer">
 <span className="px-1.5 py-0.5 rounded text-sm" style={{
    backgroundColor: '#C264B6',
    color: 'white',
    fontSize: '12px'
  }}>
   Max Pack required
 </span>
</span>}
</Note>;
};

export const HeaderAPI = ({noProfileKey, profileKeyRequired}) => <>
    <ParamField header="Authorization" type="string" required>
      <a href="/apis/overview#authorization">API Key</a> of the Primary Profile.
      <br />
      <br />
      Format: <code>Authorization: Bearer API_KEY</code>
    </ParamField>
    {!noProfileKey && (profileKeyRequired ? <ParamField header="Profile-Key" type="string" required>
          <a href="/apis/overview#profile-key-format">Profile Key</a> of a User Profile.
          <br />
          <br />
          Format: <code>Profile-Key: PROFILE_KEY</code>
        </ParamField> : <ParamField header="Profile-Key" type="string">
          <a href="/apis/overview#profile-key-format">Profile Key</a> of a User Profile.
          <br />
          <br />
          Format: <code>Profile-Key: PROFILE_KEY</code>
        </ParamField>)}
  </>;

<PlansAvailable plans={["business"]} maxPackRequired={false} />

एक मौजूदा प्रोफ़ाइल का title, hide title, अक्षम सोशल प्लेटफ़ॉर्म्स की सूची, या title प्रदर्शन अपडेट करें।
Header पैरामीटर में Profile Key वह User Profile है जिसे अपडेट किया जाना है।

## Header Parameters

<HeaderAPI profileKeyRequired={true} />

## Body Parameters

<ParamField body="disableSocial" type="array">
  इस उपयोगकर्ता की प्रोफ़ाइल के लिए अक्षम सोशल नेटवर्क्स की array। Primary Profile की अक्षम सोशल नेटवर्क्स की सूची को प्राथमिकता दी जाती है।

  उपलब्ध नेटवर्क्स: `bluesky`, `facebook`, `gmb`, `instagram`, `linkedin`, `pinterest`, `reddit`, `snapchat`, `telegram`, `threads`, `tiktok`, `twitter`, और `youtube`।

  अधिक जानकारी के लिए [यहाँ](/apis/profiles/overview#enable-or-disable-social-networks) देखें।
</ParamField>

<ParamField body="title" type="string" required>
  प्रोफ़ाइल का title। अद्वितीय होना चाहिए। यह title सोशल अकाउंट लिंकिंग पेज पर प्रदर्शित किया जाएगा।
</ParamField>

<ParamField body="messagingActive" type="boolean" default={false}>
  इस User Profile के लिए messaging सक्रिय करने के लिए true पर सेट करें। आपके Ayrshare अकाउंट के लिए messaging पहले सक्षम होना चाहिए।
</ParamField>

<ParamField body="hideTopHeader" type="boolean" default={false}>
  सोशल अकाउंट्स लिंकेज पेज पर top header छिपाएं।
</ParamField>

<ParamField body="hideLogo" type="boolean" default={false}>
  केवल इस User Profile के लिए सोशल अकाउंट्स लिंकेज पेज पर कंपनी लोगो छिपाएं। अन्य प्रोफ़ाइलों पर अकाउंट-वाइड लोगो प्रभावित नहीं होता। व्यक्तिगत पार्टनर प्रोफ़ाइलों को व्हाइट-लेबल करने के लिए उपयोगी है जबकि बाकी पर ब्रांडिंग बनाए रखी जाती है।
</ParamField>

<ParamField body="topHeader" type="string">
  सोशल अकाउंट्स लिंकेज पेज पर header बदलें। यदि सेट नहीं है, तो प्रदर्शित करता है: "Social Accounts for "title" जहाँ "title" प्रोफ़ाइल title है।
</ParamField>

<ParamField body="tags" type="array">
  स्ट्रिंग्स की एक array का उपयोग करके user profiles को tag करें। ये tags आपके user profiles को प्रभावी ढंग से categorize और मैनेज करने के लिए एक आंतरिक संगठनात्मक उपकरण के रूप में कार्य करते हैं।
</ParamField>

<RequestExample>
  ```javascript cURL theme={"system"}
  curl \
  -H "Authorization: Bearer API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"profileKey": "Jokdf-903Js-j9sd0-Pow02-QS9n3", "title": "ACME Profile"}' \
  -X PATCH https://api.ayrshare.com/api/profiles
  ```

  ```javascript JavaScript theme={"system"}
  const API_KEY = "API_KEY";

  fetch("https://api.ayrshare.com/api/profiles", {
        method: "PATCH",
        headers: {
          "Content-Type": "application/json",
          "Authorization": `Bearer ${API_KEY}`
          "Profile-Key": "PROFILE_KEY";
        },
        body: JSON.stringify({
          title: "ACME Profile"
        }),
      })
        .then((res) => res.json())
        .then((json) => console.log(json))
        .catch(console.error);
  ```

  ```python Python theme={"system"}
  import requests

  payload = {'title': 'ACME Profile'}
  headers = {'Content-Type': 'application/json',
          'Authorization': 'Bearer API_KEY',
          'Profile-Key': 'PROFILE_KEY'}

  r = requests.patch('https://api.ayrshare.com/api/profiles',
      json=payload,
      headers=headers)

  print(r.json())
  ```

  ```php PHP theme={"system"}
  <?php

  $url = 'https://api.ayrshare.com/api/profiles';
  $apiKey = 'API_KEY';        // Replace with your actual API key
  $profileKey = 'PROFILE_KEY'; // Replace with your actual Profile key
  $data = ['title' => 'ACME Profile']; // Your data to be sent

  $curl = curl_init();

  curl_setopt_array($curl, [
      CURLOPT_URL => $url,
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_CUSTOMREQUEST => 'PATCH',
      CURLOPT_POSTFIELDS => json_encode($data),
      CURLOPT_HTTPHEADER => [
          'Content-Type: application/json',
          'Authorization: Bearer ' . $apiKey,
          'Profile-Key: ' . $profileKey
      ],
  ]);

  $response = curl_exec($curl);

  if (curl_errno($curl)) {
      echo 'Error:' . curl_error($curl);
  } else {
      echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
  }

  curl_close($curl);

  ```

  ```csharp C# theme={"system"}
  using System;
  using System.Net.Http;
  using System.Text;
  using System.Threading.Tasks;

  namespace UpdateProfilePOSTRequest_csharp
  {
    class UpdateProfile
    {
        static async Task Main(string[] args)
        {
            string API_KEY = "API_KEY";
            string PROFILE_KEY = "PROFILE_KEY"; // Make sure this is defined
            string url = "https://api.ayrshare.com/api/profiles";
            string json = "{\"title\": \"ACME Profile\"}";

            using (var client = new HttpClient())
            {
                client.DefaultRequestHeaders.Add("Authorization", "Bearer " + API_KEY);
                client.DefaultRequestHeaders.Add("Profile-Key", PROFILE_KEY);

                try
                {
                    var content = new StringContent(json, Encoding.UTF8, "application/json");
                    var request = new HttpRequestMessage
                    {
                        Method = new HttpMethod("PATCH"),
                        RequestUri = new Uri(url),
                        Content = content
                    };

                    HttpResponseMessage response = await client.SendAsync(request);
                    response.EnsureSuccessStatusCode();
                    string responseBody = await response.Content.ReadAsStringAsync();
                    Console.WriteLine(responseBody);
                }
                catch (HttpRequestException e)
                {
                    Console.WriteLine($"Error: {e.Message}");
                }
            }
        }
    }
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 200: Success theme={"system"}
  {
      "status": "success",
      "refId": "b1eb30ce50607a40000b220c01c20a88a49fe76f"
  }
  ```

  ```json 400: Profile Key not found theme={"system"}
  {
    "action": "post",
    "status": "error",
    "code": 144,
    "message": "Some profiles not found. Please verify the Profile Keys."
  }
  ```
</ResponseExample>
