Upload a new profile avatar for one of your connected X accounts
cURL
curl --request PATCH \ --url https://api.example.com/x/profile/avatar \ --header 'Content-Type: <content-type>' \ --header 'x-api-key: <x-api-key>' \ --data ' { "account": "<string>", "file": {} } '
curl -X PATCH https://xquik.com/api/v1/x/profile/avatar \ -H "x-api-key: xq_YOUR_KEY_HERE" \ -F "account=myxaccount" \ -F "file=@avatar.png" | jq
multipart/form-data
true
{ "success": true }
{ "error": "invalid_input", "message": "Invalid file format or size exceeded" }
{ "error": "unauthenticated", "message": "Missing or invalid API key" }
{ "error": "no_subscription", "message": "No active subscription" }
{ "error": "usage_limit_reached", "message": "Monthly usage limit reached" }
{ "error": "x_write_failed", "message": "Failed to complete the action" }
Was this page helpful?