POST custom_profiles/new.json
new-profile

POST custom_profiles/new.json

Creates a new custom profile. The returned ID should be used with when publishing a new message with POST direct_messages/events/new.

Resource URL

https://api.x.com/1.1/custom_profiles/new.json

Resource Information

Response formats JSON
Requires authentication? Yes (user context only)
Rate limited? Yes
Requests / 24 hour window (user auth) Yes (1000 / 1 day)

Parameters

name (required) The string ID of of the custom profile. 48 characters max length.
avatar.media.id (required) The string ID of the media to associate with the profile. See Uploading Media for further details on generating a media ID.

Example Request

{
  "custom_profile": {
    "name": "Jon C, Partner Engineer",
    "avatar": {
        "media": {
           "id": "1234"
       }
    }
}

Example request using Twurl

twurl -A 'Content-type: application/json' /1.1/custom_profiles/new.json -d ' { "custom_profile": { "name": "Jon C, Partner Engineer", "avatar": { "media": { "id": "1234" } } }'

Example Response

{
  "custom_profile": {
    "id": "100001",
    "created_timestamp": "1479767168196",
    "name": "Jon C, Partner Engineer",
    "avatar": {
        "media": {
           "url": "https://pbs.twimg.com/media/Cr7HZpvVYAAYZIX.jpg"
       }
    }
}