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/users

  • Query Parameters:

    • keyword: The keyword to search for users (it will search in name and email too).

    • limit: The maximum number of users to be returned.

    • cursor: A cursor for pagination.

    • orderBy: option to order the response results by next fields:

      ID
      NAME
      CREATED_AT
      UPDATED_AT
    • orderDirection: option to order the response by direction: ID

      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/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.

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": "user.email@email.com"
    }
}

Delete team user

This endpoint allows you to delete a team user.

Request

  • Method: DEL

  • Endpoint: https://api.creatopy.com/v1/users

  • Body:

    • email (string, required): The email of the user.

Response

The response will be in JSON format:

{
    "response": true
}

Last updated