Listed below are the fields of the request body to be added as part of the HTTP PUT request.
name
optional
string | null
Full user name
email
optional
string | null
Email address
shortName
optional
string | null
Short user name. In most cases, this will be preferred over name when set.
status
optional
"active" | "deleted"
profilePictureURL
optional
string | null
This must be a valid URL, which means it needs to follow the usual URL formatting and encoding rules. For example, any space character will need to be encoded as %20. We recommend using your programming language's standard URL encoding function, such as encodeURI in Javascript.
metadata
optional
EntityMetadata
Arbitrary key-value pairs that can be used to store additional information.
addGroups
optional
string[]
A list of group IDs this user should be made a member of. It is an error to specify a group that doesn't exist or one that is also being removed in the same call. It is not an error to add a user to a group they're already a member of.
removeGroups
optional
string[]
A list of group IDs this user should stop being a member of. It is an error to specify a group that doesn't exist or one that is also being added in the same call. It is not an error to remove a user from a group they are not a member of.
# you can install @cord-sdk/cli for a simpler experience
cord user create 123
--name="Leela Turanga"
--profile-picture-url=https://cord.com/favicon-32x32.png
The endpoint supports the following query request parameters:
limit
optional
number
Number of users to return. The default limit is set to 1000.
token
optional
string
Pagination token. This is returned in the pagination object of a previous response.
filter
optional
Pick<FilterParameters, "metadata">
This is a JSON object with one optional entry. Users will be matched against the filter specified. This is a partial match, which means any keys other than the ones you specify are ignored when checking for a match. Please note that because this is a query parameter in a REST API, this JSON object must be URI encoded before being sent.
This is an object with the following fields:
metadata
optional
EntityMetadata
Return only objects containing these metadata keys and values. (Metadata is arbitrary key-value pairs of data that you can associate with an object.)
The response is a JSON object with the following fields:
users
ServerListUser[]
This is an array of objects, each of which has the following fields:
email
string | null
name
string | null
Full user name
id
string | number
Provided ID for the user
createdTimestamp
Date | null
Creation timestamp
shortName
string | null
Short user name. In most cases, this will be preferred over name when set.
status
"active" | "deleted"
profilePictureURL
string | null
This must be a valid URL, which means it needs to follow the usual URL formatting and encoding rules. For example, any space character will need to be encoded as %20. We recommend using your programming language's standard URL encoding function, such as encodeURI in Javascript.
metadata
EntityMetadata
Arbitrary key-value pairs that can be used to store additional information.
pagination
PaginationDetails
This is an object with the following fields:
token
string | null
The token to use to get the next page of results. If empty, there are no more results.
total
number
Total number of results. Might be bigger than the number of results returned on the query. Useful to display a "total" counter.
This endpoint fetches the information about a user that has been stored in Cord's backend. The data you retrieve here contains the same values that would be displayed in Cord's UI components when that user loads your application.
The response is a JSON Object with the following fields:
groups
(string | number)[]
List of groups the user is a member of.
groupIDsWithLinkedSlackProfile
string[]
A list containing all the groups the user has explicity linked their Slack profile to. This list excludes groups connected to a Slack workspace where the user has not linked their Slack profile.
email
string | null
name
string | null
Full user name
id
string | number
Provided ID for the user
createdTimestamp
Date | null
Creation timestamp
shortName
string | null
Short user name. In most cases, this will be preferred over name when set.
status
"active" | "deleted"
profilePictureURL
string | null
This must be a valid URL, which means it needs to follow the usual URL formatting and encoding rules. For example, any space character will need to be encoded as %20. We recommend using your programming language's standard URL encoding function, such as encodeURI in Javascript.
metadata
EntityMetadata
Arbitrary key-value pairs that can be used to store additional information.
If the request is successful and the user is now deleted, the response payload will be of the form:
JSON:
{
"success": true,
"message": "User deleted.",
"userID": "123",
// failedDeletionIDs is a list of any files we were unable
// to delete that the user created.
// Please reach out to us if it is crucial they be deleted.
"failedDeletionIDs": [],
}
{"success":true,"message":"User deleted.","userID":"123",// failedDeletionIDs is a list of any files we were unable// to delete that the user created.// Please reach out to us if it is crucial they be deleted."failedDeletionIDs":[],}