Users
List team users
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.
Request
Method: GET
Endpoint:
https://api.creatopy.com/v1/usersQuery 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_ATorderDirection(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.
Create team user
This endpoint allows you to create a new team user.
Request
Method: POST
Endpoint:
https://api.creatopy.com/v1/usersBody:
name(string, required): The name of the user.email(string, required): The email of the user.role(string, required): The role of the user.
Response
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]"
}
}Delete team user
This endpoint allows you to delete a team user.
Request
Method: DEL
Endpoint:
https://api.creatopy.com/v1/usersBody:
email(string, required): The email of the user.
Response
The response will be in JSON format:
{
"response": true
}Update team user role
This endpoint allows you to update the role in a team for a team user.
Request
Method: PUT
Endpoint:
https://api.creatopy.com/v1/users/updateTeamUserRoleBody:
userId(integer, required): The id of the user.roleId(integer, required): The role id.
Response
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 rolename(string) - the name of the roledescription(string) - the description of the role
{
"response": {
"id": 11111,
"name": "User Name",
"email": "[email protected]",
"profilePicture": null,
"role": {
"id: 3,
"name": "Viewer",
"description": null
},
}
}Last updated