Kinde Users API

The Users API from Kinde — 11 operation(s) for users.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

kinde-users-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  version: '1'
  title: Kinde Account API Keys Users API
  description: '

    Provides endpoints to operate on an authenticated user.


    ## Intro


    ## How to use


    1. Get a user access token - this can be obtained when a user signs in via the methods you''ve setup in Kinde (e.g. Google, passwordless, etc).


    2. Call one of the endpoints below using the user access token in the Authorization header as a Bearer token. Typically, you can use the `getToken` command in the relevant SDK.

    '
  termsOfService: https://docs.kinde.com/trust-center/agreements/terms-of-service/
  contact:
    name: Kinde Support Team
    email: support@kinde.com
    url: https://docs.kinde.com
tags:
- name: Users
  x-displayName: Users
paths:
  /api/v1/users:
    servers: []
    get:
      tags:
      - Users
      operationId: getUsers
      x-scope: read:users
      description: "The returned list can be sorted by full name or email address in ascending or descending order. The number of records to return at a time can also be controlled using the `page_size` query string parameter.\n\n<div>\n  <code>read:users</code>\n</div>\n"
      summary: Get users
      parameters:
      - name: page_size
        in: query
        description: Number of results per page. Defaults to 10 if parameter not sent.
        schema:
          type: integer
          nullable: true
      - name: user_id
        in: query
        description: Filter the results by User ID. The query string should be comma separated and url encoded.
        schema:
          type: string
          nullable: true
      - name: next_token
        in: query
        description: A string to get the next page of results if there are more results.
        schema:
          type: string
          nullable: true
      - name: email
        in: query
        description: Filter the results by email address. The query string should be comma separated and url encoded.
        schema:
          type: string
          nullable: true
      - name: username
        in: query
        description: Filter the results by username. The query string should be comma separated and url encoded.
        schema:
          type: string
          nullable: true
      - name: phone
        in: query
        description: Filter the results by phone. The query string should be comma separated and url encoded.
        schema:
          type: string
          nullable: true
      - name: expand
        in: query
        description: 'Additional data to include in the response. One or more of (comma-separated): "organizations", "identities", "billing".'
        required: false
        schema:
          type: string
          nullable: true
      - name: has_organization
        in: query
        description: Filter the results by if the user has at least one organization assigned.
        required: false
        schema:
          type: boolean
          nullable: true
      - name: active_since
        in: query
        description: Filter the results to only include users who have been active since this date. Date should be in ISO 8601 format.
        required: false
        schema:
          type: string
          format: date-time
          nullable: true
      responses:
        '200':
          description: Users successfully retrieved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/users_response'
        '400':
          $ref: '#/components/responses/bad_request'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/too_many_requests'
      security:
      - kindeBearerAuth: []
  /api/v1/users/{user_id}/refresh_claims:
    servers: []
    post:
      tags:
      - Users
      operationId: refreshUserClaims
      x-scope: update:user_refresh_claims
      description: "Refreshes the user's claims and invalidates the current cache.\n\n<div>\n  <code>update:user_refresh_claims</code>\n</div>\n"
      summary: Refresh User Claims and Invalidate Cache
      parameters:
      - in: path
        name: user_id
        schema:
          type: string
        required: true
        description: The id of the user whose claims needs to be updated.
      responses:
        '200':
          description: Claims successfully refreshed.
          content:
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/success_response'
            application/json:
              schema:
                $ref: '#/components/schemas/success_response'
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_response'
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/error_response'
        '403':
          description: Bad request.
          content:
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/error_response'
            application/json:
              schema:
                $ref: '#/components/schemas/error_response'
        '429':
          description: Request was throttled.
      security:
      - kindeBearerAuth: []
  /api/v1/user:
    servers: []
    get:
      tags:
      - Users
      operationId: getUserData
      x-scope: read:users
      description: "Retrieve a user record.\n\n<div>\n  <code>read:users</code>\n</div>\n"
      summary: Get user
      parameters:
      - name: id
        in: query
        description: The user's id.
        required: true
        schema:
          type: string
          nullable: false
      - name: expand
        in: query
        description: 'Additional data to include in the response. One or more of (comma-separated): "organizations", "identities", "billing".'
        required: false
        schema:
          type: string
          nullable: true
      responses:
        '200':
          description: User successfully retrieved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/user'
        '400':
          $ref: '#/components/responses/bad_request'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/too_many_requests'
      security:
      - kindeBearerAuth: []
    post:
      tags:
      - Users
      operationId: createUser
      description: "Creates a user record and optionally zero or more identities for the user. An example identity could be the email\naddress of the user.\n\n<div>\n  <code>create:users</code>\n</div>\n"
      summary: Create user
      requestBody:
        description: The details of the user to create.
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                profile:
                  description: Basic information required to create a user.
                  type: object
                  properties:
                    given_name:
                      type: string
                      description: User's first name.
                    family_name:
                      type: string
                      description: User's last name.
                    picture:
                      type: string
                      description: The user's profile picture.
                organization_code:
                  description: The unique code associated with the organization you want the user to join.
                  type: string
                provided_id:
                  description: An external id to reference the user.
                  type: string
                identities:
                  type: array
                  description: Array of identities to assign to the created user
                  items:
                    type: object
                    description: The result of the user creation operation.
                    properties:
                      type:
                        type: string
                        description: The type of identity to create, e.g. email, username, or phone.
                        enum:
                        - email
                        - phone
                        - username
                      is_verified:
                        type: boolean
                        description: Set whether an email or phone identity is verified or not.
                        example: true
                      details:
                        type: object
                        description: Additional details required to create the user.
                        properties:
                          email:
                            type: string
                            description: The email address of the user.
                            example: email@email.com
                          phone:
                            type: string
                            description: The phone number of the user.
                            example: '+61426148233'
                          phone_country_id:
                            type: string
                            description: The country code for the phone number.
                            example: au
                          username:
                            type: string
                            description: The username of the user.
                            example: myusername
                  example:
                  - type: email
                    is_verified: true
                    details:
                      email: email@email.com
                  - type: phone
                    is_verified: false
                    details:
                      phone: '+61426148233'
                      phone_country_id: au
                  - type: username
                    details:
                      username: myusername
      responses:
        '200':
          description: User successfully created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/create_user_response'
        '400':
          $ref: '#/components/responses/bad_request'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/too_many_requests'
      security:
      - kindeBearerAuth: []
    patch:
      tags:
      - Users
      operationId: updateUser
      description: "Update a user record.\n\n<div>\n  <code>update:users</code>\n</div>\n"
      summary: Update user
      parameters:
      - name: id
        in: query
        description: The user's id.
        required: true
        schema:
          type: string
          nullable: false
      requestBody:
        description: The user to update.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                given_name:
                  type: string
                  description: User's first name.
                family_name:
                  type: string
                  description: User's last name.
                picture:
                  type: string
                  description: The user's profile picture.
                is_suspended:
                  type: boolean
                  description: Whether the user is currently suspended or not.
                is_password_reset_requested:
                  type: boolean
                  description: Prompt the user to change their password on next sign in.
                provided_id:
                  description: An external id to reference the user.
                  type: string
      responses:
        '200':
          description: User successfully updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update_user_response'
        '400':
          $ref: '#/components/responses/bad_request'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/too_many_requests'
      security:
      - kindeBearerAuth: []
    delete:
      tags:
      - Users
      operationId: deleteUser
      description: "Delete a user record.\n\n<div>\n  <code>delete:users</code>\n</div>\n"
      summary: Delete user
      parameters:
      - name: id
        in: query
        description: The user's id.
        required: true
        schema:
          type: string
          nullable: false
          example: kp_c3143a4b50ad43c88e541d9077681782
      - name: is_delete_profile
        in: query
        description: Delete all data and remove the user's profile from all of Kinde, including the subscriber list
        schema:
          type: boolean
          nullable: false
          example: true
      responses:
        '200':
          description: User successfully deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/success_response'
        '400':
          $ref: '#/components/responses/bad_request'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/too_many_requests'
      security:
      - kindeBearerAuth: []
  /api/v1/users/{user_id}/feature_flags/{feature_flag_key}:
    servers: []
    patch:
      tags:
      - Users
      operationId: UpdateUserFeatureFlagOverride
      description: "Update user feature flag override.\n\n<div>\n  <code>update:user_feature_flags</code>\n</div>\n"
      summary: Update User Feature Flag Override
      parameters:
      - name: user_id
        in: path
        description: The identifier for the user
        required: true
        schema:
          type: string
      - name: feature_flag_key
        in: path
        description: The identifier for the feature flag
        required: true
        schema:
          type: string
      - name: value
        in: query
        description: Override value
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Feature flag override successfully updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/success_response'
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/success_response'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_response'
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/error_response'
        '403':
          description: Invalid credentials.
        '429':
          description: Request was throttled.
      security:
      - kindeBearerAuth: []
  /api/v1/users/{user_id}/properties/{property_key}:
    servers: []
    put:
      tags:
      - Users
      operationId: UpdateUserProperty
      description: "Update property value.\n\n<div>\n  <code>update:user_properties</code>\n</div>\n"
      summary: Update Property value
      parameters:
      - name: user_id
        in: path
        description: The identifier for the user
        required: true
        schema:
          type: string
      - name: property_key
        in: path
        description: The identifier for the property
        required: true
        schema:
          type: string
      - name: value
        in: query
        description: The new property value
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Property successfully updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/success_response'
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/success_response'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_response'
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/error_response'
        '403':
          description: Invalid credentials.
        '429':
          description: Request was throttled.
      security:
      - kindeBearerAuth: []
  /api/v1/users/{user_id}/properties:
    servers: []
    get:
      tags:
      - Users
      operationId: GetUserPropertyValues
      description: "Gets properties for an user by ID.\n\n<div>\n  <code>read:user_properties</code>\n</div>\n"
      summary: Get property values
      parameters:
      - name: user_id
        in: path
        description: The user's ID.
        required: true
        schema:
          type: string
          nullable: false
      responses:
        '200':
          description: Properties successfully retrieved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get_property_values_response'
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/get_property_values_response'
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_response'
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/error_response'
        '403':
          description: Invalid credentials.
        '429':
          description: Request was throttled.
      security:
      - kindeBearerAuth: []
    patch:
      tags:
      - Users
      operationId: UpdateUserProperties
      description: "Update property values.\n\n<div>\n  <code>update:user_properties</code>\n</div>\n"
      summary: Update Property values
      parameters:
      - name: user_id
        in: path
        description: The identifier for the user
        required: true
        schema:
          type: string
      requestBody:
        description: Properties to update.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                properties:
                  description: Property keys and values
                  type: object
                  nullable: false
              required:
              - properties
      responses:
        '200':
          description: Properties successfully updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/success_response'
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/success_response'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_response'
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/error_response'
        '403':
          description: Invalid credentials.
        '429':
          description: Request was throttled.
      security:
      - kindeBearerAuth: []
  /api/v1/users/{user_id}/password:
    servers: []
    put:
      tags:
      - Users
      operationId: SetUserPassword
      description: "Set user password.\n\n<div>\n  <code>update:user_passwords</code>\n</div>\n"
      summary: Set User password
      parameters:
      - name: user_id
        in: path
        description: The identifier for the user
        required: true
        schema:
          type: string
      requestBody:
        description: Password details.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                hashed_password:
                  description: The hashed password.
                  type: string
                hashing_method:
                  description: The hashing method or algorithm used to encrypt the user’s password. Default is bcrypt.
                  type: string
                  enum:
                  - bcrypt
                  - crypt
                  - md5
                  - wordpress
                salt:
                  type: string
                  description: Extra characters added to passwords to make them stronger. Not required for bcrypt.
                salt_position:
                  type: string
                  description: Position of salt in password string. Not required for bcrypt.
                  enum:
                  - prefix
                  - suffix
                is_temporary_password:
                  type: boolean
                  description: The user will be prompted to set a new password after entering this one.
              required:
              - hashed_password
      responses:
        '200':
          description: User successfully created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/success_response'
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/success_response'
        '400':
          description: Error creating user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_response'
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/error_response'
        '403':
          description: Invalid credentials.
        '429':
          description: Request was throttled.
      security:
      - kindeBearerAuth: []
  /api/v1/users/{user_id}/identities:
    servers: []
    get:
      tags:
      - Users
      operationId: GetUserIdentities
      x-scope: read:user_identities
      description: "Gets a list of identities for an user by ID.\n\n<div>\n  <code>read:user_identities</code>\n</div>\n"
      summary: Get identities
      parameters:
      - name: user_id
        in: path
        description: The user's ID.
        required: true
        schema:
          type: string
          nullable: false
      - name: starting_after
        in: query
        description: The ID of the identity to start after.
        schema:
          type: string
          nullable: true
      - name: ending_before
        in: query
        description: The ID of the identity to end before.
        schema:
          type: string
          nullable: true
      responses:
        '200':
          description: Identities successfully retrieved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get_identities_response'
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/get_identities_response'
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_response'
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/error_response'
        '403':
          description: Invalid credentials.
        '429':
          description: Request was throttled.
      security:
      - kindeBearerAuth: []
    post:
      tags:
      - Users
      operationId: CreateUserIdentity
      description: "Creates an identity for a user.\n\n<div>\n  <code>create:user_identities</code>\n</div>\n"
      summary: Create identity
      parameters:
      - name: user_id
        in: path
        description: The user's ID.
        required: true
        schema:
          type: string
          nullable: false
      requestBody:
        description: The identity details.
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                value:
                  type: string
                  description: The email address, social identity, or username of the user.
                  example: sally@example.com
                type:
                  type: string
                  description: The identity type
                  enum:
                  - email
                  - username
                  - phone
                  - enterprise
                  - social
                  example: email
                phone_country_id:
                  type: string
                  description: The country code for the phone number, only required when identity type is 'phone'.
                  example: au
                connection_id:
                  type: string
                  description: The social or enterprise connection ID, only required when identity type is 'social' or 'enterprise'.
                  example: conn_019289347f1193da6c0e4d49b97b4bd2
      responses:
        '201':
          description: Identity successfully created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/create_identity_response'
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/create_identity_response'
        '400':
          description: Error creating identity.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_response'
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/error_response'
        '403':
          description: Invalid credentials.
        '429':
          description: Request was throttled.
      security:
      - kindeBearerAuth: []
  /api/v1/users/{user_id}/sessions:
    servers: []
    get:
      tags:
      - Users
      operationId: GetUserSessions
      description: "Retrieve the list of active sessions for a specific user.\n\n<div>\n  <code>read:user_sessions</code>\n</div>\n"
      summary: Get user sessions
      parameters:
      - name: user_id
        in: path
        description: The identifier for the user
        required: true
        schema:
          type: string
          example: kp_c3143a4b50ad43c88e541d9077681782
      responses:
        '200':
          description: Successfully retrieved user sessions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get_user_sessions_response'
        '400':
          $ref: '#/components/responses/bad_request'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
        '429':
          $ref: '#/components/responses/too_many_requests'
      security:
      - kindeBearerAuth: []
    delete:
      tags:
      - Users
      operationId: DeleteUserSessions
      description: "Invalidate user sessions.\n\n<div>\n  <code>delete:user_sessions</code>\n</div>\n"
      summary: Delete user sessions
      parameters:
      - name: user_id
        in: path
        description: The identifier for the user
        required: true
        schema:
          type: string
          example: kp_c3143a4b50ad43c88e541d9077681782
      responses:
        '200':
          description: User sessions successfully invalidated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/success_response'
        '400':
          $ref: '#/components/responses/bad_request'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
        '429':
          $ref: '#/components/responses/too_many_requests'
      security:
      - kindeBearerAuth: []
  /api/v1/users/{user_id}/mfa:
    servers: []
    get:
      tags:
      - Users
      operationId: GetUsersMFA
      description: "Get a user’s MFA configuration.\n\n<div>\n  <code>read:user_mfa</code>\n</div>\n"
      summary: Get user's MFA configuration
      parameters:
      - name: user_id
        in: path
        description: The identifier for the user
        required: true
        schema:
          type: string
          example: kp_c3143a4b50ad43c88e541d9077681782
      responses:
        '200':
          description: Successfully retrieve user's MFA configuration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get_user_mfa_response'
        '400':
          $ref: '#/components/responses/bad_request'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
        '429':
          $ref: '#/components/responses/too_many_requests'
      security:
      - kindeBearerAuth: []
    delete:
      tags:
      - Users
      operationId: ResetUsersMFAAll
      description: "Reset all environment MFA factors for a user.\n\n<div>\n  <code>delete:user_mfa</code>\n</div>\n"
      summary: Reset all environment MFA for a user
      parameters:
      - name: user_id
        in: path
        description: The identifier for the user
        required: true
        schema:
          type: string
          example: kp_c3143a4b50ad43c88e541d9077681782
      responses:
        '200':
          description: User's MFA successfully reset.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/success_response'
        '400':
          $ref: '#/components/responses/bad_request'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
        '429':
          $ref: '#/components/responses/too_many_requests'
      security:
      - kindeBearerAuth: []
  /api/v1/users/{user_id}/mfa/{factor_id}:
    servers: []
    delete:
      tags:
      - Users
      operationId: ResetUsersMFA
      description: "Reset a specific environment MFA factor for a user.\n\n<div>\n  <code>delete:user_mfa</code>\n</div>\n"
      summary: Reset specific environment MFA for a user
      parameters:
      - name: user_id
        in: path
        description: The identifier for the user
        required: true
        schema:
          type: string
          example: kp_c3143a4b50ad43c88e541d9077681782
      - name: factor_id
        in: path
        description: The identifier for the MFA factor
        required: true
        schema:
          type: string
          example: mfa_0193278a00ac29b3f6d4e4d462d55c47
      responses:
        '200':
          description: User's MFA successfully reset.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/success_response'
        '400':
          $ref: '#/components/responses/bad_request'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
        '429':
          $ref: '#/components/responses/too_many_requests'
      security:
      - kindeBearerAuth: []
components:
  schemas:
    user:
      type: object
      properties:
        id:
          type: string
          description: Unique ID of the user in Kinde.
        provided_id:
          type: string
          description: External ID for user.
        preferred_email:
          type: string
          description: Default email address of the user in Kinde.
        phone:
          type: string
          description: User's primary phone number.
        username:
          type: string
          description: Primary username of the user in Kinde.
        last_name:
          type: string
          description: User's last name.
        first_name:
          type: string
          description: User's first name.
        is_suspended:
          type: boolean
          description: Whether the user is currently suspended or not.
        picture:
          type: string
          description: User's profile picture URL.
        total_sign_ins:
          type: integer
          description: Total number of user sign ins.
          nullable: true
        failed_sign_ins:
          type: integer
          description: Nu

# --- truncated at 32 KB (46 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/kinde/refs/heads/main/openapi/kinde-users-api-openapi.yml