> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cloud/network-services/cross-connect/api-how-tos/create-cross-connect-api.md).

# Create Cross Connect

IONOS CLOUD Cross Connect: create a cross connect between VDCs using the API

{% hint style="info" %}
**Prerequisite:** Only contract administrators, owners, and users with **createPcc** privilege can create and manage Cross Connects using 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 using 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://docs.ionos.com/cloud/api-reference/cloud-api-v6/cross-connects/create-a-cross-connect).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
