# Create Hub

## Create a new hub

<mark style="color:green;">`POST`</mark> `/api/hubs`

**Access Permissions**

<table data-header-hidden><thead><tr><th width="348">Role<select><option value="2rSBGCjaXeFt" label="COMPANY" color="blue"></option><option value="ozSCTBKJPNgy" label="HUB_MANAGER" color="blue"></option><option value="Mfl8c1CRYAaD" label="MASTER" color="blue"></option><option value="bviBPLZFY8t3" label="SHIPPER" color="blue"></option></select></th><th>Description</th></tr></thead><tbody><tr><td><span data-option="Mfl8c1CRYAaD">MASTER</span></td><td>마스터</td></tr></tbody></table>

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Body**

<table><thead><tr><th width="192">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>hubName</code></td><td>String</td><td>Name of the hub</td></tr><tr><td><code>address</code></td><td>String</td><td>Address of the user</td></tr><tr><td><code>latitude</code></td><td>Double</td><td>latitude of the hub</td></tr><tr><td><code>longitude</code></td><td>Double</td><td>longitude of the hub</td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "id": 1,
  "hubName": "서울특별시 센터",
  "address": "서울특별시 송파구 송파대로 55",
  "latitude": 11.111,
  "longitude": 11.111
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}
