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

# Update a resident

> Update a resident



## OpenAPI

````yaml openapi-loyalty.json POST /v1/loyalty/residents/{id}
openapi: 3.1.0
info:
  title: Yorlet Loyalty API
  description: APIs for managing loyalty programs, events, residents, and tiers.
  version: 1.0.0
servers:
  - url: https://api.yorlet.com
    description: Production
  - url: https://api.yorlet.io
    description: Sandbox
security: []
paths:
  /v1/loyalty/residents/{id}:
    post:
      tags:
        - Residents
      summary: Update a resident
      description: Update a resident
      operationId: residents_update
      parameters:
        - schema:
            type: string
            description: The id identifier.
          required: true
          description: The id identifier.
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                building:
                  type: string
                  description: The ID of the building to associate the resident with.
                inactive:
                  type: object
                  properties:
                    expire_points:
                      type: boolean
                      description: >-
                        Whether to expire the resident’s outstanding points when
                        marking them inactive.
                  required:
                    - expire_points
                  description: >-
                    Behaviour to apply when transitioning the resident to
                    inactive status.
                name:
                  type: string
                  description: The resident's full name.
                tier:
                  type:
                    - string
                    - 'null'
                  pattern: ^[a-zA-Z0-9_]+$
                  description: The ID of the loyalty tier to assign the resident to.
                status:
                  type: string
                  enum:
                    - active
                    - inactive
                  description: The status of the resident's membership.
      responses:
        '200':
          description: Returns the updated resident.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the object.
                  created:
                    type: number
                    description: >-
                      Time at which the object was created. Measured in seconds
                      since the Unix epoch.
                  account:
                    type: string
                    description: >-
                      The account that the object belongs to. Only returned if
                      the request is made with a valid Yorlet-Context header.
                  deleted:
                    type: boolean
                    default: false
                    description: Only returned if the object has been deleted.
                  object:
                    type: string
                    enum:
                      - resident
                  building:
                    anyOf:
                      - type: string
                      - type: object
                        additionalProperties: {}
                      - type: 'null'
                    description: The building the resident is associated with.
                  email:
                    type: string
                    description: The resident's email address.
                  name:
                    type:
                      - string
                      - 'null'
                    description: The resident's full name.
                  tier:
                    anyOf:
                      - type: string
                      - type: object
                        additionalProperties: {}
                      - type: 'null'
                    description: The loyalty tier the resident is assigned to.
                  status:
                    type: string
                    enum:
                      - active
                      - inactive
                    description: The status of the resident's membership.
                required:
                  - id
                  - created
                  - object
                  - building
                  - email
                  - name
                  - tier
                  - status
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: API Key authentication. Use "Bearer YOUR_API_KEY".

````