# Create company member

`POST /public/api/v1/Outlets/{outletId}/Companies/{companyId}/Members`

User API · Companies · base URL `https://user-api.ancon.io` · auth: `Access-Token` header · docs: https://ancon.dev/api/user/companies/create-company-member

**Deprecated.**

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `outletId` | string (uuid) | yes |  |
| `companyId` | string (uuid) | yes |  |

## Header parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `correlationId` | string | no | Correlation Id for the request |

## Request body

Content type: `application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `firstName` | string or null | no |  |
| `lastName` | string or null | no |  |
| `email` | string or null | no |  |
| `phoneNumber` | string or null | no |  |
| `department` | string or null | no |  |

### Example

```json
{
  "firstName": "John",
  "lastName": "Doe",
  "email": "johnjoe@ancon.io",
  "phoneNumber": "123456789",
  "department": "IT"
}
```

## Responses

| Status | Description |
| --- | --- |
| 201 | Created |
| 400 | Bad Request |

### 201 response (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `companyMember` | object or null | no |  |
| `companyMember.id` | string (uuid) | no |  |
| `companyMember.fullName` | string or null | no |  |
| `companyMember.name` | object or null | no |  |
| `companyMember.name.firstName` | string or null | no |  |
| `companyMember.name.lastName` | string or null | no |  |
| `companyMember.email` | string or null | no |  |
| `companyMember.phoneNumber` | string or null | no |  |
| `companyMember.department` | string or null | no |  |

#### Example

```json
{
  "companyMember": {
    "id": "3de27068-3be5-49ae-b938-5633108e77f9",
    "fullName": "John Doe",
    "name": {
      "firstName": "John",
      "lastName": "Doe"
    },
    "email": "johnjoe@ancon.io",
    "phoneNumber": "123456789",
    "department": "IT"
  }
}
```

### 400 response (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | string or null | no |  |
| `errorCode` | string (uuid) | no |  |
| `additionalData` | any or null | no |  |

#### Example (from schema)

```json
{
  "message": "string",
  "errorCode": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "additionalData": null
}
```

## Example request

```bash
curl -X POST "https://user-api.ancon.io/public/api/v1/Outlets/{outletId}/Companies/{companyId}/Members" \
  -H "Access-Token: $ANCON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "firstName": "John",
  "lastName": "Doe",
  "email": "johnjoe@ancon.io",
  "phoneNumber": "123456789",
  "department": "IT"
}'
```
