---
title: "PATCH /v1/users/{user_id}"
method: PATCH
path: "/v1/users/{user_id}"
tags: ["Users"]
---

# PATCH /v1/users/{user_id}

`PATCH /v1/users/{user_id}`

Update the name or src of a user.

## Path parameters

- `user_id` integer, required

## Request body

- UpdateUserRequest
  - `name` string — The name of the user.
  - `src` string — The signup source of the user, which is displayed on the Information tab of the user profile. .

## Response `200`

200 response

- UserResponse
  - `name` string, nullable, required — The name of the user.
  - `email` string, required — The email address of the user.
  - `role` string, required — The role of the user (e.g., student, owner, affiliate, author, custom, etc.). All newly created users will have the student role by default.
  - `last_sign_in_ip` string, nullable, required — The last signin IP address of the user. If the user has not yet signed in to their account, the return value is null.
  - `id` integer, required — The unique ID of the user.
  - `courses` UserCourse[], required — A list of courses the user is or has been enrolled in. (Note: If the user is newly created, they will not be enrolled in any courses. If you attempt to create a user with the email address of an existing user, any enrollments of that existing user will be listed here.)
    - `course_id` integer, required — The unique ID of the course.
    - `enrolled_at` string, date-time, required — The date and time of enrollment. Formatted in ISO8601.
    - `is_active_enrollment` boolean, required — If the user is currently enrolled in the course, response value is true. If the user is no longer enrolled in the course, response value is false.
    - `completed_at` string, date-time, nullable, required — The date and time the course was completed. Formatted in ISO8601. If the course has not been completed, return value is null.
    - `course_name` string, required — The name of the course..
    - `percent_complete` number, double, required — The percentage of the course that has been marked complete by the student.
  - `tags` UserTag[], required — Tags related to the user
    - `name` string, required — Name of the tag

## Other responses

- `404` — 404 response

---

[API](https://skmtc.net/teachable/apis/teachable-public-api.md) · [All operations](https://skmtc.net/teachable/apis/teachable-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/teachable/teachable-public-api/revisions/e03f4f4f7957/schema)
