# Destroy Member

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v3/{loyalty_club_slug}/members/me:
    delete:
      summary: Destroy Member
      deprecated: false
      description: >-
        Permanently removes member.


        It is possible to trigger optout message by setting
        `send_unsubscribe_message=true` query string parameter.

        Same as welcome messages, optout messages sending also depends on
        Loyalty Club and Product configuration.


        ## URL Parameters


        Parameter | Description | Type

        -----------|-------------|---------

        id        | Member's ID | integer


        ## Query Parameters


        Parameter                      | Required? | Default |
        Description                            | Type

        --------------------------------|-----------|---------|----------------------------------------|---------

        send_sms_unsubscribe_message   | no        | true    | Should optout SMS
        be sent to member?   | Boolean

        send_email_unsubscribe_message | no        | true    | Should optout
        email be sent to member? | Boolean


        ## Response Body


        Properties of member that has been destroyed - see: [Member
        model](doc-342131#member)


        ## Error Responses


        Status | Reason

        --------|---------------------------------------------------------- 
         `404`  | Member could not be found                                
         `422`  | [validation errors](doc-342131#validation-on-members) JSON object.

        ## Example


        ```shell

        curl -X DELETE \
            "https://api.mpc.placewise.com/v3/infinity-mall/members/:id" \
            -H 'content-type: application/json' \
            -H 'x-client-authorization: B7t9U9tsoWsGhrv2ouUoSqpM' \
            -H 'x-product-name: default' \
            -H 'x-user-agent: CURL manual test' \
            -H 'authorization: Bearer 8433d608645345a45ce5a0f5ba1225e57546e86ac49e5fec842159dc82218522'
        ```


        When successful, returns JSON structured like this:


        ```json

        {
          "id": 42,
          "properties": {
            "first_name": "Ola",
            "last_name": "Nordmann",
            "birthday": "1990-10-23",
            "interests": [
              "bikes_and_cars",
              "sportwear"
            ],
            "child_birth_years": [
              2010,
              2011,
              2011
            ],
            "language": "no"
          },
          "consents": {
            "consent1": { "status": true, "updated_at": "2018-12-14T21:57:20.063Z" },
            "consent2": { "status": false, "updated_at": "2018-10-25T21:57:43.738Z" }
          },
          "sms_status": "enabled",
          "email_status": "hard_bounced",
          "push_status": "disabled",
          "optin_channel": "webforms",
          "optin_subchannel": "campaign-10-2017",
          "created_at": "2017-01-19T10:07:08.336+01:00",
          "updated_at": "2017-04-03T09:35:19.313+02:00",
          "banned_until": "2137-04-03T09:35:19.313+02:00",
          "person_id": 99,
          "has_password": false,
          "subunit_ids": [1, 2],
          "has_push_token": false,
          "social_logins": [],
          "favorite_stores": [],
          "registration_medium": "other"
        }

        ```
      tags:
        - API Reference/Public API/Member/Profile
      parameters:
        - name: loyalty_club_slug
          in: path
          description: ''
          required: true
          example: infinity-mall
          schema:
            type: string
        - name: Content-Type
          in: header
          description: '[Details](doc-341635)'
          required: true
          example: application/json
          schema:
            type: string
            default: application/json
            const: application/json
        - name: X-User-Agent
          in: header
          description: Arbitrary identifier of your client. [Details](doc-341635)
          required: true
          example: '{{X_USER_AGENT}}'
          schema:
            type: string
            default: '{{X_USER_AGENT}}'
        - name: X-Product-Name
          in: header
          description: API Product for API context. [Details](doc-341635)
          required: true
          example: '{{PRODUCT_NAME}}'
          schema:
            type: string
            default: '{{PRODUCT_NAME}}'
        - name: X-Loyalty-Club-Slug
          in: header
          description: LoyaltyClub for API context. [Details](doc-342138)
          required: false
          example: '{{LOYALTY_CLUB_SLUG}}'
          schema:
            type: string
            default: '{{LOYALTY_CLUB_SLUG}}'
        - name: X-Customer
          in: header
          description: Customer for API context.  [Details](doc-342139)
          required: false
          example: '{{CUSTOMER_ID}}'
          schema:
            type: string
            default: '{{CUSTOMER_ID}}'
        - name: Authorization
          in: header
          description: '[Member](doc-342129) or [User](doc-342130) Authorization.'
          required: false
          example: Bearer {{_OAUTH_TOKEN}}
          schema:
            type: string
            default: Bearer {{_OAUTH_TOKEN}}
        - name: X-Client-Authorization
          in: header
          description: '[Token](doc-342128) Authorization.'
          example: '{{API_TOKEN}}'
          schema:
            type: string
            default: '{{API_TOKEN}}'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
          headers: {}
          x-apidog-name: Success
      security: []
      x-apidog-folder: API Reference/Public API/Member/Profile
      x-apidog-status: pending
      x-run-in-apidog: https://app.eu.apidog.com/web/project/346351/apis/api-3510824-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api.mpc.dev.placewise.com
    description: Staging
security: []

```