Users
Last updated
Last updated
This endpoint makes an HTTP GET request to retrieve a list of users from the team.
Request Body This request does not require a request body.
Method: GET
Endpoint: https://api.creatopy.com/v1/users
Query Parameters:
keyword
(string, optional): The keyword to search for users (it will search in name and email too).
limit
(integer, optional): The maximum number of users to be returned.
cursor
(string, optional): A cursor for pagination.
orderBy
(enum, optional): option to order the response results by next fields:
ID
NAME
CREATED_AT
UPDATED_AT
orderDirection
(enum, optional): option to order the response by direction:
ASC
DESC
curl --location 'https://api.creatopy.local/v1/users?keyword=userName&limit=10&cursor=eyJsaW1pdCI6MSwibGFzdElkIjozOTE3M' \
--header 'Authorization: Bearer eyJ...'
Response Body
response
(object)
totalCount
(number): The total count of users.
nodes
(array): An array of user objects.
id
(number): The unique identifier of the user.
name
(string): The name of the user.
email
(string): The email address of the user.
role
(object): The role object of the user.
id
(number): The unique identifier of the role.
name
(string): The name of the role.
description
(string): The description of the role.
profilePicture
(string): The URL of the user's profile picture.
pageInfo
(object): Information about the page.
hasNextPage
(boolean): Indicates whether there is a next page.
endCursor
(string): The cursor for the end of the page.
This endpoint allows you to create a new team user.
Method: POST
Endpoint: https://api.creatopy.com/v1/users
Body:
name
(string, required): The name of the user.
email
(string, required): The email of the user.
role
(string, required): The role of the user.
The response will be in JSON format with the following structure:
name
(string) - The name of the user.
id
(int) - The id of the user.
email
(string) - The email of the user.
{
"response": {
"name": "User Name",
"id": 1111111,
"email": "[email protected]"
}
}
This endpoint allows you to delete a team user.
Method: DEL
Endpoint: https://api.creatopy.com/v1/users
Body:
email
(string, required): The email of the user.
The response will be in JSON format:
{
"response": true
}
This endpoint allows you to update the role in a team for a team user.
Method: PUT
Endpoint: https://api.creatopy.com/v1/users/updateTeamUserRole
Body:
userId
(integer, required): The id of the user.
roleId
(integer, required): The role id.
The response will be in JSON format with the following structure:
id
(int) - The id of the user.
name
(string) - The name of the user.
email
(string) - The email of the user.
profilePicture
(string) - The profilePicture url of the user.
role
(object) - The role of the user in the team.
id
(int) - the id of the role
name
(string) - the name of the role
description
(string) - the description of the role
{
"response": {
"id": 11111,
"name": "User Name",
"email": "[email protected]",
"profilePicture": null,
"role": {
"id: 3,
"name": "Viewer",
"description": null
},
}
}