For the complete documentation index, see llms.txt. This page is also available as Markdown.

Update a user by its ID

Update a GitBook account's details.

patch
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
userIdstringRequired

The unique ID of the User

Body
displayNamestring · min: 1 · max: 64Optional

Full name for the user

photoURLstring · uri · max: 2048Optional
Responses
200

The user has been updated

application/json
objectstring · enumRequired

Type of Object, always equals to "user"

Possible values:
idstringRequired

Unique identifier for the user

displayNamestringRequired

Full name for the user

emailstringOptional

Email address of the user

photoURLstringOptional

URL of the user's profile picture

patch/users/{userId}
PATCH /v1/users/{userId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 55

{
  "displayName": "text",
  "photoURL": "https://example.com"
}
{
  "object": "user",
  "id": "text",
  "displayName": "text",
  "email": "text",
  "photoURL": "text",
  "urls": {
    "location": "https://example.com"
  }
}

Last updated

Was this helpful?