# Create Member

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v3/{loyalty_club_slug}/members:
    post:
      summary: Create Member
      deprecated: false
      description: "Create member with given properties.\n\nAvailable properties and their validation rules are defined by Loyalty Club schema\n(see: [here](api-3510800)).\n\nActual welcome messages sending depends on Loyalty Club and Product configuration.\nFor example, even if send_email_welcome_message:true param is provided, message may not be sent because either Product\nor Loyalty has disabled welcome messages or Loyalty Club has no e-mails configured at all.\n\nThere is also a possibility to have multiple SMS welcome messages sent. The one that matches Product or default one will be sent.\n\n## Headers\n\nHeader name       | Required? | Description\n-------------------|-----------|---------------------------------------------\nX-Subproduct-Name | no        | Additional source/optin channel information\n\n## Body Parameters\n\n| Parameter                  | Type      | Required?   | Default                        | Description                                                                                                                                                                   |\n| ---------------------------|-----------|-------------|--------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| properties                 | object    | **yes**     | none                           | JSON with properties for member                                                                                                                                               |\n| properties\\['language'\\]   | string    | no          | \"default_language\" from schema | Language used by user                                                                                                                                                         |\n| properties\\['msisdn'\\]     | string    | yes*     | none                           | Unique member's msisdn as defined [here](doc-341641#msisdn)) Example: `4740769126`.                                                                   |\n| properties\\['email'\\]      | string    | yes*    | none                           | Member's email                                                                                                                                                                |\n| consents                   | object    | no          | {}                             | Member's consents (similar to [Member's consents JSON model](doc-342131#members-consents-json-model))                                                   |\n| send_sms_welcome_message   | boolean   | no          | true                           | Should SMS welcome message be sent to member?                                                                                                                                 |\n| send_email_welcome_message | boolean   | no          | true                           | Should email welcome be sent to member                                                                                                                                        |\n| password                   | string    | depends** | none                           | Member's password. See: [Member Password](api-3510819#member-password)                                                                                                                   |\n| registration_password      | string    | depends** | none                           | Password for registration for member MSISDN verification, see [above](api-3510817)  |\n| ignore_required_properties | boolean   | no          | false                          | When `true`, it allows to create a member without required properties (client must have `BL:Api:Members:Create` permit to use this parameter)                                 |\n| external_token             | string    | depends     | none                           | External token send by provider of social authentication                                                                                                                      |\n| external_token_type        | string    | depends     | none                           | Type of external token values: apple, google                                                                                                                                  |\n| favorite_stores            | integer[] | no          | []                             | IDs of member favorite stores. See [Stores](doc-341692)                                                                       |\n| ~~sms_enabled~~***                | boolean   | no          | true                           | Should SMS channel be enabled for member?                                                                                                                                     |\n| ~~email_enabled~~***              | boolean   | no          | true                           | Should email channel be enabled for member?                                                                                                                                   |\n| ~~push_enabled~~***               | boolean   | no          | true                           | Should push channel be enabled for member?                                                                                                                                    |\n| registration_medium | string   | no   | other   | Medium through member was registered - `import`, `email`, `msisdn`, social login types, `other` |\n\n\\* At least one of those properties must be provided.\n** At least one type of password is required. See below.\n*** This field is deprecated. We advise not to use it.\n\n### Passwords\n\nWe require either **Member Password** or **Registration Password** (see below)\nfor member to be able to sign in future using [OAuth flow](doc-341646).\n\n#### Member Password\n\nMember Passwords should be used only in setups where Member is not authenticated with\n[OTP](api-3510813).\n\n#### Registration Password\n\nIn setups with [OTP](api-3510813),\nwe require `registration_password` param that verifies specific member channel.\n\nIs sent to user with [Members > Send registration password](api-3510817)\n\n## Response Body\n\nCreated member properties - see: [Member model](doc-342131#member)\n\n## Error Responses\n\nStatus | Description\n--------|----------------------------------------------------------\n`422`  | [validation errors](doc-342131#validation-on-members) JSON object.\n`465`  | `registration_password` or `password` param is missing\n`466`  | `registration_password` param is invalid\n`468`  | `external_token` param is invalid\n\n## Example\n\n```shell\n\ncurl -X POST \\\n  https://api.mpc.placewise.com/v3/infinity-mall/members \\\n  -H 'content-type: application/json' \\\n  -H 'x-client-authorization: B7t9U9tsoWsGhrv2ouUoSqpM' \\\n  -H 'x-product-name: facebook' \\\n  -H 'X-Subproduct-Name: campaign-10-2017' \\\n  -H 'x-user-agent: CURL manual test' \\\n  -d '{\n\t\"properties\": {\n\t\t\"email\": \"dev+6@example.com\",\n\t\t\"msisdn\": \"4740769126\",\n\t\t\"first_name\": \"The\",\n\t\t\"last_name\": \"Doge\"\n\t},\n\t\"consents\": {\n\t    \"consent1\": { \"status\": true },\n\t    \"consent2\": { \"status\": false }\n\t},\n\t\"send_sms_welcome_message\": false\n}'\n```\n\nWhen successful, returns JSON structured like this:\n\n```json\n{\n  \"id\": 42,\n  \"properties\": {\n    \"first_name\": \"Ola\",\n    \"last_name\": \"Nordmann\",\n    \"birthday\": \"1990-10-23\",\n    \"interests\": [\n      \"bikes_and_cars\",\n      \"sportwear\"\n    ],\n    \"child_birth_years\": [\n      2010,\n      2011,\n      2011\n    ],\n    \"language\": \"no\"\n  },\n  \"consents\": {\n    \"consent1\": { \"status\": true, \"updated_at\": \"2018-12-14T21:57:20.063Z\" },\n    \"consent2\": { \"status\": false, \"updated_at\": \"2018-10-25T21:57:43.738Z\" }\n  },\n  \"sms_status\": \"enabled\",\n  \"email_status\": \"hard_bounced\",\n  \"push_status\": \"disabled\",\n  \"optin_channel\": \"webforms\",\n  \"optin_subchannel\": \"campaign-10-2017\",\n  \"created_at\": \"2017-01-19T10:07:08.336+01:00\",\n  \"updated_at\": \"2017-04-03T09:35:19.313+02:00\",\n  \"banned_until\": \"2137-04-03T09:35:19.313+02:00\",\n  \"person_id\": 99,\n  \"has_password\": false,\n  \"subunit_ids\": [1, 2],\n  \"has_push_token\": false,\n  \"social_logins\": [],\n  \"favorite_stores\": [],\n  \"registration_medium\": \"other\"\n}\n```\n\nWhen payload is invalid, validation errors like this are returned:\n\n```json\n{\n    \"email\": [\n        {\n            \"property\": \"email\",\n            \"error\": \"duplicated_email_in_community\"\n        }\n    ]\n}\n```"
      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-3510819-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api.mpc.dev.placewise.com
    description: Staging
security: []

```