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

# Update or terminate a member

> Updates member fields. Terminate with `{ "status": "terminated", "terminationDate": "...", "cobra": true }`. After enrollment, changes propagate to the live company census; `cobra: true` keeps the member covered under COBRA continuation.



## OpenAPI

````yaml /api-reference/openapi.json patch /groups/{groupId}/members/{memberId}
openapi: 3.1.0
info:
  title: Prescience Partner API
  version: 1.1.0
  description: >-
    Create employer groups, submit census records, generate indicative quotes,
    create enrollments, and read aggregate account data.


    Money is always integer cents. Dates are `YYYY-MM-DD`; timestamps are ISO
    8601 UTC. Quotes are indicative pending underwriting confirmation. A BAA and
    data processing agreement are executed before live mode is enabled.
  contact:
    name: Prescience partner engineering
    email: partners@getprescience.com
servers:
  - url: https://www.getprescience.com/api/partner/v1
    description: >-
      Production. Test and live traffic share this host; mode comes from your
      API key.
security:
  - bearerAuth: []
tags:
  - name: Health
    description: Connectivity and key checks.
  - name: Plans
    description: Static plan metadata.
  - name: Groups
    description: 'Employer groups: the root resource of every integration.'
  - name: Census
    description: Pre-enrollment census intake and ongoing member sync.
  - name: Quotes
    description: Deterministic, synchronous quotes. Indicative pending underwriting.
  - name: Enrollments
    description: Plan selection and employer provisioning.
  - name: Account
    description: Aggregate, de-identified employer account data.
  - name: Webhooks
    description: Signed event delivery (standard-webhooks scheme).
paths:
  /groups/{groupId}/members/{memberId}:
    patch:
      tags:
        - Census
      summary: Update or terminate a member
      description: >-
        Updates member fields. Terminate with `{ "status": "terminated",
        "terminationDate": "...", "cobra": true }`. After enrollment, changes
        propagate to the live company census; `cobra: true` keeps the member
        covered under COBRA continuation.
      operationId: updateMember
      parameters:
        - $ref: '#/components/parameters/GroupId'
        - $ref: '#/components/parameters/MemberId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CensusMemberUpdate'
            example:
              status: terminated
              terminationDate: '2026-11-15'
              cobra: true
      responses:
        '200':
          description: Updated member.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StoredCensusMember'
              example:
                memberId: mem_92e4b7a1d0c6
                externalId: emp_0009
                firstName: Tom
                lastName: Becker
                email: tom@acme.com
                dob: '1974-02-27'
                zip: '94110'
                employmentType: full_time
                hireDate: '2022-01-10'
                status: terminated
                terminationDate: '2026-11-15'
                cobra: true
                dependents:
                  - relationship: spouse
                    dob: '1976-05-19'
                    name: Anja Becker
        '400':
          description: Validation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: invalid_request
                message: terminationDate must be YYYY-MM-DD.
                details:
                  - field: terminationDate
                    message: terminationDate must be YYYY-MM-DD
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  parameters:
    GroupId:
      name: groupId
      in: path
      required: true
      description: Group ID, e.g. `grp_8c2f41d09a3e`.
      schema:
        type: string
        pattern: ^grp_[0-9a-f]{12}$
      example: grp_8c2f41d09a3e
    MemberId:
      name: memberId
      in: path
      required: true
      description: Census member ID, e.g. `mem_92e4b7a1d0c6`.
      schema:
        type: string
        pattern: ^mem_[0-9a-f]{12}$
      example: mem_92e4b7a1d0c6
  schemas:
    CensusMemberUpdate:
      type: object
      description: >-
        Partial update: send only the fields you are changing. Terminate with
        `status: "terminated"` plus optional `terminationDate` and `cobra`.
      properties:
        externalId:
          type: string
          description: Your employee ID. Used as the upsert key when `email` is absent.
          example: emp_0001
        firstName:
          type: string
          example: Jordan
        lastName:
          type: string
          example: Reyes
        email:
          type: string
          format: email
          description: Upsert key when present.
          example: jordan@acme.com
        dob:
          type: string
          format: date
          example: '1992-03-14'
        age:
          type: integer
          description: Alternative to `dob`. One of the two is required.
          example: 34
        zip:
          type: string
          pattern: ^[0-9]{5}$
          description: 5-digit home ZIP. Drives the area factor in rating.
          example: '94110'
        sexAtBirth:
          type: string
          enum:
            - male
            - female
            - other
        employmentType:
          type: string
          enum:
            - full_time
            - part_time
            - contractor
        hireDate:
          type: string
          format: date
          example: '2024-03-01'
        status:
          type: string
          enum:
            - active
            - terminated
          default: active
        dependents:
          type: array
          maxItems: 6
          items:
            $ref: '#/components/schemas/Dependent'
        terminationDate:
          type: string
          format: date
          example: '2026-11-15'
        cobra:
          type: boolean
          description: Offer COBRA continuation on termination.
    StoredCensusMember:
      allOf:
        - $ref: '#/components/schemas/CensusMemberInput'
        - type: object
          required:
            - memberId
          properties:
            memberId:
              type: string
              description: >-
                Server-assigned ID. Use it for `PATCH
                /groups/{groupId}/members/{memberId}`.
              example: mem_c4a91f27e83d
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          enum:
            - unauthorized
            - live_mode_disabled
            - forbidden
            - not_found
            - invalid_request
            - conflict
            - quote_expired
            - census_required
            - rate_limited
            - server_error
            - not_configured
          description: Stable machine-readable error code.
        message:
          type: string
          description: >-
            Human-readable explanation. Wording may change; branch on `error`,
            not `message`.
        details:
          type: array
          description: Present on `invalid_request`. One entry per failed field.
          items:
            type: object
            required:
              - field
              - message
            properties:
              field:
                type: string
                example: zip
              message:
                type: string
                example: zip must be a 5-digit ZIP code
              index:
                type: integer
                description: >-
                  For array payloads (census rows), the zero-based index of the
                  failing row.
                example: 7
    Dependent:
      type: object
      required:
        - relationship
      properties:
        relationship:
          type: string
          enum:
            - spouse
            - domestic_partner
            - child
            - other
        dob:
          type: string
          format: date
          example: '2019-10-02'
        name:
          type: string
          example: Mia Fischer
    CensusMemberInput:
      type: object
      required:
        - zip
      anyOf:
        - required:
            - dob
        - required:
            - age
      description: >-
        One employee. `zip` plus one of `dob` | `age` is enough to quote.
        `firstName`, `lastName`, and `email` are additionally required (per
        active member) at enrollment time.
      properties:
        externalId:
          type: string
          description: Your employee ID. Used as the upsert key when `email` is absent.
          example: emp_0001
        firstName:
          type: string
          example: Jordan
        lastName:
          type: string
          example: Reyes
        email:
          type: string
          format: email
          description: Upsert key when present.
          example: jordan@acme.com
        dob:
          type: string
          format: date
          example: '1992-03-14'
        age:
          type: integer
          description: Alternative to `dob`. One of the two is required.
          example: 34
        zip:
          type: string
          pattern: ^[0-9]{5}$
          description: 5-digit home ZIP. Drives the area factor in rating.
          example: '94110'
        sexAtBirth:
          type: string
          enum:
            - male
            - female
            - other
        employmentType:
          type: string
          enum:
            - full_time
            - part_time
            - contractor
        hireDate:
          type: string
          format: date
          example: '2024-03-01'
        status:
          type: string
          enum:
            - active
            - terminated
          default: active
        dependents:
          type: array
          maxItems: 6
          items:
            $ref: '#/components/schemas/Dependent'
  responses:
    Unauthorized:
      description: Missing, malformed, or revoked API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: unauthorized
            message: >-
              Provide a valid partner API key as `Authorization: Bearer
              psk_...`.
    NotFound:
      description: >-
        No such resource in this mode. Test keys only see test resources; live
        keys only see live resources.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: not_found
            message: No group grp_8c2f41d09a3e found.
    RateLimited:
      description: Rate limit exceeded. Honor `Retry-After`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: rate_limited
            message: Rate limit exceeded. Retry after 12 seconds.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
          example: 12
    ServerError:
      description: >-
        Something failed on our side. Safe to retry with the same
        `Idempotency-Key`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: server_error
            message: Internal error. The request was not applied.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Partner API key. `psk_test_<32 hex>` for test mode, `psk_live_<32 hex>`
        for live mode. Keys are stored hashed and cannot be recovered; store
        them in your secrets manager on issue.

````