Set a user's profile information, including custom status.


Method access

Bolt for Java
Powered by Bolt
Bolt for Python
Powered by Bolt
Bolt for JavaScript
Powered by Bolt

Content types

  • Rate limits

    Tier 3
  • Arguments

    Required arguments

    Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.

    Optional arguments

    Name of a single key to set. Usable only if profile is not passed.


    Collection of key:value pairs presented as a URL-encoded JSON hash. At most 50 fields may be set. Each field name is limited to 255 characters.

    { first_name: "John", ... }

    ID of user to change. This argument may only be specified by team admins on paid teams.


    Value to set a single key to. Usable only if profile is not passed.


    Usage info

    Use this method to set a user's profile information, including name, email, current status, and other attributes.

    Update individual fields by passing the pair of arguments name and value; or multiple fields can be updated at once by passing the argument profile.

    We strongly recommend using application/json POSTs when using this method. If you choose to use application/x-www-form-urlencoded, you must URL-encode the JSON provided to the profile field. See below

    The first_name and last_name fields can be up to 35 characters each. The name slackbot cannot be used for either of these fields.

    The email field must be a valid email address. It cannot have spaces, and it must have an @ and a domain. It cannot be in use by another member of the same team. Changing a user's email address will send an email to both the old and new addresses, and also post a slackbot to the user informing them of the change. This field can only be changed by admins for users on paid teams.

    After March 20, 2017 the skype field will always be an empty string and cannot be set otherwise. For more detail, please read this changelog entry.

    To set a user's profile image, use users.setPhoto. To clear them, call users.deletePhoto.

    The fields key is an array of key:value pairs holding the values for the user's custom profile fields. The key is the ID of the definition for that field, which is per-team. This ID can also be used in the name field of this method. The value of a field is what should be displayed, unless the alt key is also present, in which case that is displayed instead. The value can be up to 256 characters for fields of type text and link. For fields of type options_list, the value must be one of the possible_values in the field definition. For fields of type date, the value must be a valid date. The alt field can be up to 256 characters for all field types. The profile argument must be used in order to set the alt field.

    Use team.profile.get to retrieve the profile fields used by a team.

    Building your HTTP request

    This example demonstrates setting some basic profile fields and one extended field:

        "profile": {
            "first_name": "John",
            "last_name": "Smith",
            "email": "",
            "fields": {
                "Xf06054BBB": {
                    "value": "Barista",
                    "alt": "I make the coffee & the tea!"

    To send that JSON to users.profile.set, build an HTTP request like this, setting your content type, authorization credentials, and, for workspace tokens only, an X-Slack-User header indicating the user you're acting on behalf of:

    POST /users/profile.set
    Authorization: Bearer xoxp-secret-token
    Content-type: application/json; charset=utf-8
        "profile": {
            "first_name": "John",
            "last_name": "Smith",
            "email": "",
            "fields": {
                "Xf06054BBB": {
                    "value": "Barista",
                    "alt": "I make the coffee & the tea!"

    Updating a user's current status

    This method is also used to set a user's current status.

    To set status, both the status_text and status_emoji profile fields must be provided. Optionally, you can also provide a status_expiration field to set a time in the future when the status will clear.

    • status_text allows up to 100 characters, though we strongly encourage brevity.
    • status_emoji is a string referencing an emoji enabled for the Slack team, such as :mountain_railway:.
    • status_expiration is an integer specifying seconds since the epoch, more commonly known as "UNIX time". Providing 0 or omitting this field results in a custom status that will not expire.

    For example, to set a custom status of 🚞 riding a train and have it expire on July 26th, 2018 at 17:51:46 UTC, construct this JSON payload:

    	"status_text": "riding a train",
    	"status_emoji": ":mountain_railway:",
    	"status_expiration": 1532627506

    Next, place the custom status fields within the user's profile and use users.profile.set:

    POST /api/users.profile.set
    Content-type: application/json; charset=utf-8
    Authorization: Bearer xoxp_secret_token
        "profile": {
            "status_text": "riding a train",
            "status_emoji": ":mountain_railway:",
            "status_expiration": 1532627506

    To manually unset a user's custom status, provide empty strings to both the status_text and status_emoji attributes: "".

    Profile update rate limits

    Update a user's profile, including custom status, sparingly. Special rate limit rules apply when updating profile data with users.profile.set. A token may update a single user's profile no more than 10 times per minute. And a single token may only set 30 user profiles per minute. Some burst behavior is allowed.

    After making this call, the complete user's profile will be returned in the same format as above.

    This method will generate a user_change event on success, containing the complete user.

    Example responses

    Common successful response

    Typical success response

        "ok": true,
        "profile": {
            "avatar_hash": "ge3b51ca72de",
            "status_text": "Print is dead",
            "status_emoji": ":books:",
            "status_expiration": 0,
            "real_name": "Egon Spengler",
            "display_name": "spengler",
            "real_name_normalized": "Egon Spengler",
            "display_name_normalized": "spengler",
            "email": "",
            "image_24": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
            "image_32": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
            "image_48": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
            "image_72": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
            "image_192": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
            "image_512": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
            "team": "T012AB3C4"

    Common error response

    Typical error response

        "ok": false,
        "error": "invalid_profile"


    This table lists the expected errors that this method could return. However, other errors can be returned in the case where the service is down or other unexpected factors affect processing. Callers should always check the value of the ok params in the response.


    First or last name are reserved.


    Profile object passed in is not valid JSON (make sure it is URL encoded!).


    Failed to set user profile.


    Failed to set user profile.


    Only admins can update the profile of another user. Some fields, like email may only be updated by an admin.


    Only team owners and selected members can update the profile of a bot user.


    Only a primary owner can update the profile of an admin.


    You attempted to set a custom status but it was longer than the maximum allowed, 100.


    Clearing the status requires setting both status_text and status_emoji to ''.


    email taken


    No authentication token provided.


    Some aspect of authentication cannot be validated. Either the provided token is invalid or the request originates from an IP address disallowed from making the request.


    Access to a resource specified in the request is denied.


    Authentication token is for a deleted user or workspace when using a bot token.


    Authentication token is for a deleted user or workspace or the app has been removed when using a user token.


    Authentication token has expired


    The workspace token used in this request does not have the permissions necessary to complete the request. Make sure your app is a member of the conversation it's attempting to post a message to.


    The workspace is undergoing an enterprise migration and will not be available until migration is complete.


    Administrators have suspended the ability to post a message.


    The token used is not granted the specific scope permissions required to complete this request.


    The token type used in this request is not allowed.


    The method has been deprecated.


    The endpoint has been deprecated.


    Two factor setup is required.


    The method cannot be called from an Enterprise.


    This method cannot be called by a bot user.


    The method was either called with invalid arguments or some detail about the arguments passed are invalid, which is more likely when using complex arguments like blocks or attachments.


    The method was passed an argument whose name falls outside the bounds of accepted or expected values. This includes very long names and names with non-alphanumeric characters other than _. If you get this error, it is typically an indication that you have made a very malformed API call.


    The method was passed an array as an argument. Please only input valid strings.


    The method was called via a POST request, but the charset specified in the Content-Type header was invalid. Valid charset names are: utf-8 iso-8859-1.


    The method was called via a POST request with Content-Type application/x-www-form-urlencoded or multipart/form-data, but the form data was either missing or syntactically invalid.


    The method was called via a POST request, but the specified Content-Type was invalid. Valid types are: application/json application/x-www-form-urlencoded multipart/form-data text/plain.


    The method was called via a POST request and included a data payload, but the request did not include a Content-Type header.


    The workspace associated with your request is currently undergoing migration to an Enterprise Organization. Web API and other platform operations will be intermittently unavailable until the transition is complete.


    The request has been ratelimited. Refer to the Retry-After header for when to retry the request.


    Access to this method is limited on the current network


    The method was called via a POST request, but the POST data was either missing or truncated.


    The service is temporarily unavailable


    The server could not complete your operation(s) without encountering a catastrophic error. It's possible some aspect of the operation succeeded before the error was raised.


    The server could not complete your operation(s) without encountering an error, likely due to a transient issue on our end. It's possible some aspect of the operation succeeded before the error was raised.


    This table lists the expected warnings that this method will return. However, other warnings can be returned in the case where the service is experiencing unexpected trouble.


    The method was called via a POST request, and recommended practice for the specified Content-Type is to include a charset parameter. However, no charset was present. Specifically, non-form-data content types (e.g. text/plain) are the ones for which charset is recommended.


    The method was called via a POST request, and the specified Content-Type is not defined to understand the charset parameter. However, charset was in fact present. Specifically, form-data content types (e.g. multipart/form-data) are the ones for which charset is superfluous.


    Need a token? Create and install a Slack app to begin.
    This will make a real API request. Beware of using it with live workspaces.

    API response

    Submit your arguments to see the API response

    Was this page helpful?