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

# Remove customer from group

> Remove customer from a customer group



## OpenAPI

````yaml PUT /api/v1/customer-groups/{customerGroupId}/remove-customer
openapi: 3.0.1
info:
  title: Meadow Open API
  description: The API to connect to the Meadow platform
  version: 1.0.0
servers:
  - url: https://api-staging.getmeadow.com
  - url: https://api.getmeadow.com
security:
  - meadowConsumer: []
    meadowClient: []
paths:
  /api/v1/customer-groups/{customerGroupId}/remove-customer:
    put:
      description: Remove customer from a customer group
      parameters:
        - name: customerGroupId
          in: path
          description: ID of the customer group to remove this customer from
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - emailOrPhone
              properties:
                emailOrPhone:
                  type: string
                  description: >-
                    Either an email address or a phone number of the customer to
                    remove from the group
            example:
              emailOrPhone: 650-555-1234
      responses:
        '200':
          description: Remove customer from group response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
              example:
                data:
                  id: 2987
                  hashId: b6a97e
                  firstName: Perrin
                  lastName: Aybara
                  email: perrin@getmeadow.com
                  phone: null
                  joinedAt: '2022-09-22T00:13:41.824Z'
                  updatedAt: '2022-09-22T00:13:41.841Z'
                  birthday: '1990-11-08'
                  sex: male
                  zip: '96150'
                  licenseExpiry: null
                  marketingOptIn: false
                  marketingOptInAt: null
                  customerGroups: []
                  loyalty:
                    pointsAmount: 0
                  mostRecentAddress:
                    street1: 123 Main St
                    street2: null
                    city: San Francisco
                    state: California
                    postalCode: '94103'
                  medicalExpiration: null
        4XX:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
components:
  schemas:
    Customer:
      type: object
      properties:
        id:
          type: number
          description: The id for the customer
        hashId:
          type: string
          description: >-
            An ID used to display to the customer and dispensary instead of the
            `id` number
        firstName:
          type: string
          description: The first name of the customer
        lastName:
          type: string
          description: The last name of the customer
        email:
          type: string
          description: The email of the customer
          nullable: true
        phone:
          type: string
          description: The phone of the customer
          nullable: true
        joinedAt:
          type: string
          description: The date the customer joined the dispensary
        updatedAt:
          type: string
          description: The date this customer was last updated
        birthday:
          type: string
          description: The birthday of the customer in `YYYY-MM-DD`
          nullable: true
        sex:
          type: string
          description: One of `male`, `female`, `tertiary`
          nullable: true
        zip:
          type: string
          description: The postal code of the customer
          nullable: true
        licenseExpiry:
          type: string
          description: >-
            The expiration date of this customer’s drivers license or `null` if
            it is not recorded.
          nullable: true
        marketingOptIn:
          type: boolean
          description: Whether this customer is opted in to receive marketing
        marketingOptInAt:
          type: string
          description: When this customer opted in to marketing or `null`
          nullable: true
        customerGroups:
          type: array
          description: >-
            An array of Strings for the names of the customer groups this
            customer is a part of (Example: Veterans, Seniors, etc.)
          items:
            type: string
        loyalty:
          type: object
          description: Information about the loyalty of the customer
          properties:
            pointsAmount:
              type: number
              description: The amount of loyalty points the customer has accrued
        mostRecentAddress:
          type: object
          description: >-
            The most recent address used for a delivery order or `null` if one
            does not exist
          nullable: true
          properties:
            street1:
              type: string
            street2:
              type: string
            city:
              type: string
            state:
              type: string
            postalCode:
              type: string
        medicalExpiration:
          type: string
          description: >-
            The expiration date of this customer’s medical recommendation or
            `null` if they are an adult use customer
          nullable: true
    APIError:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: A description of the error code
            code:
              type: string
              example: CODE_OF_ERROR_WILL_BE_HERE
  securitySchemes:
    meadowConsumer:
      type: apiKey
      name: X-Consumer-Key
      description: The key assigned to your company and provided via Meadow
      in: header
    meadowClient:
      type: apiKey
      name: X-Client-Key
      description: The key generated and provided by our mutual client
      in: header

````