> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opsmatic.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Connection

> Create a new n8n, Make.com or OpenClaw connection

## Create Connection

Creates a connection. New connections start as `inactive` until their first successful check.

```
POST https://api.opsmatic.com/v1/connections
```

Requires an API key with `connections: write`.

### Headers

<ParamField header="Authorization" type="string" required>
  `Bearer ops_your_api_key`
</ParamField>

### Body

<ParamField body="service_type" type="string" required>
  `n8n`, `make` or `openclaw`.
</ParamField>

<ParamField body="service_name" type="string" required>
  A friendly label for the connection.
</ParamField>

<ParamField body="base_url" type="string">
  Required for `n8n` — the instance URL.
</ParamField>

<ParamField body="api_key" type="string">
  Required for `n8n` — the n8n API key.
</ParamField>

<ParamField body="api_token" type="string">
  Required for `make` — the Make.com API token.
</ParamField>

<ParamField body="organization_id" type="string">
  Assign to an organization you belong to. Omit or use `"personal"` for a personal connection.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.opsmatic.com/v1/connections \
    -H "Authorization: Bearer ops_your_api_key" \
    -H "Content-Type: application/json" \
    -d '{
      "service_type": "n8n",
      "service_name": "Production n8n",
      "base_url": "https://n8n.example.com",
      "api_key": "n8n_api_key_here"
    }'
  ```

  ```json OpenClaw theme={null}
  {
    "service_type": "openclaw",
    "service_name": "Gateway US-East"
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "message": "Connection created successfully",
    "connection": {
      "id": "conn_new456",
      "service_type": "n8n",
      "service_name": "Production n8n",
      "status": "inactive"
    },
    "ingest_api_key": null
  }
  ```

  ```json 400 theme={null}
  { "error": "base_url and api_key are required for n8n connections" }
  ```
</ResponseExample>

<Warning>
  For `openclaw` connections the `201` response includes a one-time `ingest_api_key` — save it immediately. For n8n and Make it is `null`.
</Warning>
