Ploi Core
Ploi Core

Update user

Update user

Update a specific user

PATCH api/users/{user}


Parameter Type Status Description
name string optional Maximum length: 255 characters
email email optional Maximum length: 255 characters, must be unique.
package_id null or int optional Must be the id of an existing package.
blocked null or string optional Unsuspend a user by passing null or "". Suspend a user by passing a string message, which is shown to the user.

Example request:

curl -X PATCH "" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
   --data '{"name": "Jane Doe", "email": "", "package_id": 2, "blocked": "You are now blocked."}'

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

    "data": {
        "id": 1,
        "avatar": "",
        "name": "Jane Doe",
        "email": "",
        "package_id": 2,
        "blocked": "You are now blocked.",
        "created_at": "2022-07-23T13:35:51.000000Z"