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

# Update a service account

> Update a service account's mutable metadata. Only `name` is supported as a mutable field; fields that are omitted are left unchanged.
Role bindings cannot be updated here; use the role binding endpoints to create or delete bindings.


<RequestExample>
  ```bash curl theme={null}
  PINECONE_ACCESS_TOKEN="YOUR_ACCESS_TOKEN"
  PINECONE_SERVICE_ACCOUNT_ID="YOUR_SERVICE_ACCOUNT_ID"

  curl -X PATCH "https://api.pinecone.io/admin/service-accounts/$PINECONE_SERVICE_ACCOUNT_ID" \
  	-H "X-Pinecone-Api-Version: 2026-04" \
  	-H "Authorization: Bearer $PINECONE_ACCESS_TOKEN" \
  	-d '{
  		"name": "ci-prod-renamed"
  	}'
  ```
</RequestExample>

<ResponseExample>
  ```json curl theme={null}
  {
    "id": "f8a3b2c1-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
    "name": "ci-prod-renamed",
    "client_id": "l3Ow0CmFyc4jOONcwiKUCRqQKN0tiCAn",
    "created_at": "2026-04-10T15:23:00Z",
    "updated_at": "2026-04-12T09:11:00Z"
  }
  ```
</ResponseExample>


## OpenAPI

````yaml https://raw.githubusercontent.com/pinecone-io/pinecone-api/refs/heads/main/2026-04/admin_2026-04.oas.yaml patch /admin/service-accounts/{service_account_id}
openapi: 3.0.3
info:
  title: Pinecone Admin API
  description: >
    Provides an API for managing a Pinecone organization and its resources,
    including projects, API keys, organization users and invites, service
    accounts, and role bindings.
  contact:
    name: Pinecone Support
    url: https://support.pinecone.io
    email: support@pinecone.io
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: 2026-04
servers:
  - url: https://api.pinecone.io
    description: Production API endpoints
security:
  - BearerAuth: []
tags:
  - name: API Keys
    description: Actions that manage API Keys.
  - name: Organizations
    description: Actions that manage organizations.
  - name: Projects
    description: Actions that manage projects.
  - name: Users
    description: Actions that manage users.
  - name: Invites
    description: Actions that manage invites.
  - name: Service Accounts
    description: Actions that manage service accounts.
  - name: Role Bindings
    description: Actions that manage role bindings.
paths:
  /admin/service-accounts/{service_account_id}:
    patch:
      tags:
        - Service Accounts
      summary: Update a service account
      description: >
        Update a service account's mutable metadata. Only `name` is supported as
        a mutable field; fields that are omitted are left unchanged.

        Role bindings cannot be updated here; use the role binding endpoints to
        create or delete bindings.
      operationId: update_service_account
      parameters:
        - in: header
          name: X-Pinecone-Api-Version
          description: Required date-based version header
          required: true
          schema:
            default: 2026-04
            type: string
          style: simple
        - in: path
          name: service_account_id
          description: The unique identifier of the service account.
          required: true
          schema:
            type: string
            format: uuid
          style: simple
      requestBody:
        description: Updated metadata for the service account.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateServiceAccountRequest'
        required: true
      responses:
        '200':
          description: Service account updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceAccount'
        '400':
          description: Bad request. The request body included invalid request parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                index-metric-validation-error:
                  summary: Validation error
                  value:
                    error:
                      code: INVALID_ARGUMENT
                      message: >-
                        Bad request. The request body included invalid request
                        parameters.
                    status: 400
        '401':
          description: 'Unauthorized. Possible causes: Invalid API key.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unauthorized:
                  summary: Unauthorized
                  value:
                    error:
                      code: UNAUTHENTICATED
                      message: Invalid API key.
                    status: 401
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                internal-server-error:
                  summary: Internal server error
                  value:
                    error:
                      code: UNKNOWN
                      message: Internal server error
                    status: 500
        4XX:
          description: Unexpected error on request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    UpdateServiceAccountRequest:
      type: object
      properties:
        name:
          example: ci-prod-renamed
          description: >-
            A new name for the service account. If omitted, the name is
            unchanged.
          type: string
          minLength: 1
          maxLength: 80
    ServiceAccount:
      example:
        client_id: l3Ow0CmFyc4jOONcwiKUCRqQKN0tiCAn
        created_at: '2026-04-10T15:23:00.000Z'
        id: f8a3b2c1-4d5e-6f7a-8b9c-0d1e2f3a4b5c
        name: My Service Account
        updated_at: '2026-04-12T09:11:00.000Z'
      description: A service account. The OAuth `client_secret` is not included.
      type: object
      properties:
        id:
          description: >-
            The unique identifier for the service account. Use this as the path
            parameter on `/admin/service-accounts/{service_account_id}`
            endpoints and as the `principal_id` when querying or creating role
            bindings.
          type: string
          format: uuid
        name:
          description: A short human-readable label, set by the caller at creation time.
          type: string
          minLength: 1
          maxLength: 80
        client_id:
          description: >-
            The OAuth client ID used by the service account to obtain access
            tokens. Used only for OAuth token exchange.
          type: string
        created_at:
          description: The date and time the service account was created.
          type: string
          format: date-time
        updated_at:
          description: >-
            The date and time of the service account's most recent metadata
            update.
          type: string
          format: date-time
      required:
        - id
        - name
        - client_id
        - created_at
        - updated_at
    ErrorResponse:
      example:
        error:
          code: QUOTA_EXCEEDED
          message: >-
            The index exceeds the project quota of 5 pods by 2 pods. Upgrade
            your account or change the project settings to increase the quota.
        status: 429
      description: The response shape used for all error responses.
      type: object
      properties:
        status:
          example: 500
          description: The HTTP status code of the error.
          type: integer
        error:
          example:
            code: INVALID_ARGUMENT
            message: >-
              Index name must contain only lowercase alphanumeric characters or
              hyphens, and must not begin or end with a hyphen.
          description: Detailed information about the error that occurred.
          type: object
          properties:
            code:
              description: >-
                The error code.

                Possible values: `OK`, `UNKNOWN`, `INVALID_ARGUMENT`,
                `DEADLINE_EXCEEDED`, `QUOTA_EXCEEDED`, `NOT_FOUND`,
                `ALREADY_EXISTS`, `PERMISSION_DENIED`, `UNAUTHENTICATED`,
                `RESOURCE_EXHAUSTED`, `FAILED_PRECONDITION`, `ABORTED`,
                `OUT_OF_RANGE`, `UNIMPLEMENTED`, `INTERNAL`, `UNAVAILABLE`,
                `DATA_LOSS`, `FORBIDDEN`, or `UNPROCESSABLE_ENTITY`.        
              x-enum:
                - OK
                - UNKNOWN
                - INVALID_ARGUMENT
                - DEADLINE_EXCEEDED
                - QUOTA_EXCEEDED
                - NOT_FOUND
                - ALREADY_EXISTS
                - PERMISSION_DENIED
                - UNAUTHENTICATED
                - RESOURCE_EXHAUSTED
                - FAILED_PRECONDITION
                - ABORTED
                - OUT_OF_RANGE
                - UNIMPLEMENTED
                - INTERNAL
                - UNAVAILABLE
                - DATA_LOSS
                - FORBIDDEN
                - UNPROCESSABLE_ENTITY
              type: string
            message:
              example: >-
                Index name must contain only lowercase alphanumeric characters
                or hyphens, and must not begin or end with a hyphen.
              type: string
            details:
              description: >-
                Additional information about the error. This field is not
                guaranteed to be present.
              type: object
          required:
            - code
            - message
      required:
        - status
        - error
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >
        An [access
        token](https://docs.pinecone.io/guides/organizations/manage-service-accounts#retrieve-an-access-token)
        must be provided in the `Authorization` header using the `Bearer`
        scheme.

````