> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baseten.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a machine user

> Updates the machine user fields you send, such as its name.



## OpenAPI

````yaml patch /v1/grid/machine_users/{machine_user_id}
openapi: 3.1.0
info:
  description: REST API for management of Baseten resources
  title: Baseten management API
  version: 1.0.0
servers:
  - url: https://api.baseten.co
security:
  - BearerAuth: []
paths:
  /v1/grid/machine_users/{machine_user_id}:
    parameters:
      - $ref: '#/components/parameters/machine_user_id'
    patch:
      summary: Updates a machine user
      description: >-
        Changes only the fields in the request. Requires team admin for the
        machine user's team.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateGridMachineUserRequestV1'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GridMachineUserV1'
      x-codeSamples:
        - lang: bash
          source: >-
            curl --request PATCH \

            --url https://api.baseten.co/v1/grid/machine_users/{machine_user_id}
            \

            --header "Authorization: Bearer $BASETEN_API_KEY" \

            --data '{
              "name": null
            }'
        - lang: python
          source: >-
            import requests

            import os

            API_KEY = os.environ.get("BASETEN_API_KEY", "<YOUR_API_KEY>")

            url =
            "https://api.baseten.co/v1/grid/machine_users/{machine_user_id}"


            headers = {"Authorization": f"Bearer {API_KEY}"}


            response = requests.request(
                "PATCH",
                url,
                headers=headers,
                json={'name': None}
            )


            print(response.text)
components:
  parameters:
    machine_user_id:
      schema:
        type: string
      name: machine_user_id
      in: path
      required: true
  schemas:
    UpdateGridMachineUserRequestV1:
      additionalProperties: false
      properties:
        name:
          anyOf:
            - maxLength: 255
              minLength: 1
              type: string
            - type: 'null'
          default: null
          description: >-
            Name of the machine user, unique within its team. At most 255
            characters. Omit to keep it.
          title: Name
      title: UpdateGridMachineUserRequestV1
      type: object
    GridMachineUserV1:
      properties:
        id:
          description: >-
            Stable machine user identifier. Grid usage and settings identify the
            machine user by this ID as its `user_id`.
          title: Id
          type: string
        name:
          description: Name of the machine user, unique within its team.
          title: Name
          type: string
        team_id:
          description: Identifier of the team that owns the machine user.
          title: Team Id
          type: string
        team_name:
          description: Name of the team that owns the machine user.
          title: Team Name
          type: string
        created_by:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: ID of the user who created the machine user. Null when unknown.
          title: Created By
        created_at:
          description: Creation time, ISO 8601.
          format: date-time
          title: Created At
          type: string
      required:
        - id
        - name
        - team_id
        - team_name
        - created_at
      title: GridMachineUserV1
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Send `Authorization: Bearer <api_key>`. The legacy `Authorization:
        Api-Key <api_key>` scheme is also accepted.

````