# Create Cross Connect

{% hint style="info" %}
**Prerequisite:** Only contract administrators, owners, and users with **createPcc** privilege can create and manage Cross Connects via the API. You can also set User privileges in the DCD. For more information, see [<mark style="color:blue;">Set User Privileges for Cross Connect</mark>](/cloud/network-services/cross-connect/how-tos/set-privileges-cross-connect.md).
{% endhint %}

{% hint style="info" %}
**Note:** To connect a LAN to a Cross Connect, you must use the `/lan` endpoint. For more information about how to create LANs and associate them with a Cross Connect, see [<mark style="color:blue;">Associate Cross Connect with the VDC</mark>](/cloud/network-services/cross-connect/api-how-tos/connect-lan-api.md).
{% endhint %}

To create a Cross Connect via the API, perform a `POST` request with the **name** and **description** of the Cross Connect.

## Request

```bash
   curl --location \
   --request POST 'https://api.ionos.com/cloudapi/v6/pccs' \
   --header 'Content-Type: application/json' \
   --header 'Authorization: Basic <auth-token>' \
   --data '{
            "properties": 
            {
             "name": "CrossConnect-Berlin",
             "description": "Cross Connect between datacenter '\''Berlin-W1'\'' and datacenter '\''Berlin-W2'\'' "
            }
           }'
```

## Response

**202 Successful operation**

```json
{
    "id": "f7a9c1-815a-486f-bb7b-3d0f2",
    "type": "pcc",
    "href": "https://api.ionos.com/cloudapi/v6/pccs/f7a9c1-815a-486f-bb7b-3d0f2",
    "metadata": {
        "createdDate": "2023-09-18T12:02:16Z",
        "createdBy": "xyz@ionos.com",
        "etag": "5409657baffecf",
        "lastModifiedDate": "2023-09-18T12:02:16Z",
        "lastModifiedBy": "xyz@ionos.com",
        "state": "BUSY"
    },
    "properties": {
        "name": "CrossConnect-Berlin",
        "description": "Cross Connect between datacenter 'Berlin-W1' and datacenter 'Berlin-W2' ",
        "peers": [],
        "connectableDatacenters": []
    }
}
```

For more information about the request and response fields, see [<mark style="color:blue;">Create a Cross Connect</mark>](https://api.ionos.com/docs/cloud/v6/#tag/Cross-Connects/operation/pccsPost).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ionos.com/cloud/network-services/cross-connect/api-how-tos/create-cross-connect-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
