---
updatedAt: 2026-09-16T16:13:13.000Z
agentTools:
  projectIndex: https://docs.onfleet.com/llms.txt
---

# Create Hub

This end point allows the user to quickly create hubs and assign them to the teams upon creation.

| Name    | Type            | Description                                                                                                                                    |
| :------ | :-------------- | :--------------------------------------------------------------------------------------------------------------------------------------------- |
| name    | string          | Required. A name to identify the Hub.                                                                                                          |
| address | object          | Required. The hub’s street address information. The address data object fields are located under the [Destinations](https://docs.onfleet.com/reference/destinations) section. |
| team    | array of string | Optional. This is the team ID(s) that this Hub will be assigned to.                                                                            |
| phone   | string          | Optional. Phone number associated with the Hub.                                                                                                |

```shell Request
curl -X POST "https://onfleet.com/api/v2/hubs" \
       -u "<your_onfleet_api_key>:" \
       -d '{"name": "VIP customer","address": {"apartment": "","state": "California","postalCode": "92806","number": "2695","street": "East Katella Avenue","city": "Anaheim","country": "United States","name": "VIP customer"},"teams": ["kq5MFBzYNWhp1rumJEfGUTqS"],"phone":"+19095551234"}'
```
```python
onfleet.destinations.create(body={
  "name": "VIP customer",
  "address": {
    "apartment": "",
    "state": "California",
    "postalCode": "92806",
    "number": "2695",
    "street": "East Katella Avenue",
    "city": "Anaheim",
    "country": "United States",
    "name": "VIP customer"
  },
  "teams": ["kq5MFBzYNWhp1rumJEfGUTqS"],
  "phone":"+19095551234"
})
```
```javascript
onfleet.hubs.create({"name": "VIP customer",
                     "address": {
                       "apartment": "",
                       "state": "California",
                       "postalCode": "92806",
                       "number": "2695",
                       "street": "East Katella Avenue",
                       "city": "Anaheim",
                       "country": "United States",
                       "name": "VIP customer"
                     },
                     "teams": ["kq5MFBzYNWhp1rumJEfGUTqS"],
										 "phone":"+19095551234"
                    });
```
```php
$onfleet->hubs->create(["name"=>"VIP customer",
                        "address"=>["apartment" =>  "",
                                       "state" =>  "California",
                                       "postalCode" => "92806",
                                    "number" => "2695",
                                    "street" =>  "East Katella Avenue",
                                    "city" =>  "Anaheim",
                                    "country" =>  "United States",
                                    "name" =>  "VIP customer"
                                   ],
                        "teams" =>  ["kq5MFBzYNWhp1rumJEfGUTqS"],
    										"phone" => "+19095551234"
                       ])
```

```json Response
{
    "id": "i4FoP*dTVrdnGqvIVvvA69aB",
    "name": "VIP customer",
    "location": [
        -117.8767457,
        33.8079071
    ],
    "address": {
        "number": "2695",
        "street": "East Katella Avenue",
        "city": "Anaheim",
        "county": "Orange County",
        "state": "California",
        "country": "United States",
        "postalCode": "92806",
        "apartment": "",
        "name": "VIP customer"
    },
    "teams": [
        "kq5MFBzYNWhp1rumJEfGUTqS"
    ],
    "phone":"+19095551234"
}
```