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

# Change Password

> Change the signed-in user's password.

Requires the current password. `new_password` must be at least 8
characters. On success returns a new access + refresh pair and signs out
every other session: refresh tokens issued before the change stop working
immediately, and access tokens expire on their normal short schedule.
Store the returned pair in place of the old one. Sets an HttpOnly refresh
cookie when the request originates from a configured platform origin.

An incorrect current password returns 422 with code `incorrect_password`.
API keys cannot change a password.



## OpenAPI

````yaml /openapi/mio-openapi.json post /api/v1/auth/me/password/change
openapi: 3.1.0
info:
  description: >-
    Production API reference for Membership.io. Use the authored guides for
    workflows and the generated endpoint pages for exact parameters and schemas.
  title: Membership.io API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.member.dev
security:
  - bearerAuth: []
paths:
  /api/v1/auth/me/password/change:
    post:
      tags:
        - auth
      summary: Change Password
      description: >-
        Change the signed-in user's password.


        Requires the current password. `new_password` must be at least 8

        characters. On success returns a new access + refresh pair and signs out

        every other session: refresh tokens issued before the change stop
        working

        immediately, and access tokens expire on their normal short schedule.

        Store the returned pair in place of the old one. Sets an HttpOnly
        refresh

        cookie when the request originates from a configured platform origin.


        An incorrect current password returns 422 with code
        `incorrect_password`.

        API keys cannot change a password.
      operationId: auth.post_auth_post_auth_me_password_change
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/ChangePasswordRequest'
        required: true
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
          description: Successful Response
        '401':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Missing or invalid bearer token
        '403':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Called with an API key; a signed-in user session is required
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Current password incorrect or new password too short
        '429':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Rate limited
      security:
        - HTTPBearer: []
components:
  schemas:
    ChangePasswordRequest:
      additionalProperties: false
      properties:
        current_password:
          maxLength: 4096
          minLength: 1
          title: Current Password
          type: string
        new_password:
          maxLength: 4096
          minLength: 8
          title: New Password
          type: string
      required:
        - current_password
        - new_password
      title: ChangePasswordRequest
      type: object
    TokenResponse:
      properties:
        access_token:
          title: Access Token
          type: string
        expires_in:
          title: Expires In
          type: integer
        refresh_token:
          title: Refresh Token
          type: string
        token_type:
          default: Bearer
          title: Token Type
          type: string
      required:
        - access_token
        - refresh_token
        - expires_in
      title: TokenResponse
      type: object
    JsonApiErrorResponse:
      description: Error JSON:API response.
      properties:
        errors:
          items:
            $ref: '#/components/schemas/JsonApiError'
          title: Errors
          type: array
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
      required:
        - errors
      title: JsonApiErrorResponse
      type: object
    JsonApiError:
      properties:
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
        source:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Source
        status:
          title: Status
          type: string
        title:
          title: Title
          type: string
      required:
        - status
        - title
      title: JsonApiError
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT or mio_sk API key
      description: >-
        Send platform JWTs, contact JWTs, or team API keys as `Authorization:
        Bearer <token>`.
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.