Skip to main content
PUT
/
v1
/
users
/
{id}
Update a user
curl --request PUT \
  --url https://dev.flextell.ai/api/v1/users/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "email": "jsmith@example.com",
  "password": "<string>",
  "password_confirmation": "<string>",
  "phone": "<string>",
  "title": "<string>",
  "emergency_contact_name": "<string>",
  "emergency_contact_surname": "<string>",
  "emergency_contact_phone_number": "<string>",
  "blood_group": "<string>",
  "avatar_url": "<string>",
  "is_active": true,
  "bio": "<string>",
  "language": [
    "Turkish"
  ],
  "role_ids": [
    123
  ]
}
'
{
  "success": "<string>",
  "data": {
    "id": 123,
    "name": "<string>",
    "email": "<string>",
    "title": "<string>",
    "phone": "<string>",
    "emergency_contact_name": "<string>",
    "emergency_contact_surname": "<string>",
    "emergency_contact_phone_number": "<string>",
    "blood_group": "<string>",
    "language": [
      "<unknown>"
    ],
    "avatar_url": "<string>",
    "is_active": true,
    "bio": "<string>",
    "last_login_at": "2023-11-07T05:31:56Z",
    "last_login_ip": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "deleted_at": "2023-11-07T05:31:56Z",
    "roles": [
      {
        "id": 123,
        "name": "<string>"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

X-Tenant
number

Tenant identifier. Send the Tenant ID in the X-Tenant header to scope API requests to a specific tenant.

Path Parameters

id
integer
required

The user identifier

Body

application/json
name
string

User's name.

Maximum string length: 255
email
string<email>

User's email address.

Maximum string length: 255
password
string

User's password.

Minimum string length: 8
password_confirmation
string

User's password confirmation. Must match the password field.

Minimum string length: 8
phone
string | null

User's phone number.

Maximum string length: 20
title
string | null

User's title.

Maximum string length: 255
emergency_contact_name
string | null

User's emergency contact name.

Maximum string length: 255
emergency_contact_surname
string | null

User's emergency contact surname.

Maximum string length: 255
emergency_contact_phone_number
string | null

User's emergency contact phone number.

Maximum string length: 20
blood_group
string | null

User's blood group.

Maximum string length: 10
avatar_url
string | null

User's avatar URL.

Maximum string length: 1000
is_active
boolean | null

User's active status.

bio
string | null

User's bio.

Maximum string length: 1000
language
enum<string>[] | null

User's language preferences.

Available options:
Turkish,
English,
Other
role_ids
integer[] | null

Role identifiers to assign to user.

Response

success
string
required
data
UserResource · object
required