Sample - Slack Web API
POST/users.profile.set

Update a user's profile

Updates profile information for the authenticated user or, when permitted, another user. Set one field with name and value, or submit multiple fields through the URL-encoded JSON in profile; an administrator on a paid team can target another user with user.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter · 4 body fields
tokenstringrequired
Authentication token with the `users.profile:write` scope.

Profile update fields submitted as form data; use name and value for one field or profile for multiple fields.

namestringoptional
Name of a single key to set. Usable only if `profile` is not passed.
profilestringoptional
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.
userstringoptional
ID of user to change. This argument may only be specified by team admins on paid teams.
valuestringoptional
Value to set a single key to. Usable only if `profile` is not passed.

2 status codes
200Returns `ok` set to true, the updated profile in `profile`, the username, and `email_pending` when an email change requires confirmation.
email_pendingstringoptional
okbooleanrequired
Allowed:true
profileobjectrequired
usernamestringrequired
defaultTypical error response
callstackstringoptional
Note: PHP callstack is only visible in dev/qa
errorstringrequired
Allowed:reserved_nameinvalid_profileprofile_set_failednot_adminnot_app_admincannot_update_admin_usernot_authedinvalid_authaccount_inactivetoken_revokedno_permissionorg_login_required
okbooleanrequired
Allowed:false

Error handling

token must carry the users.profile:write scope. Use either name with value or profile, not both approaches, and limit profile to 50 fields with field names no longer than 255 characters.