---
title: "Starts new connection"
method: PUT
path: "/connection"
tags: ["Connection"]
---

# Starts new connection

`PUT /connection`

Consumer opens connection to provider

## Request body

- ConnectionCreateRequestDTO
  - `connect_options` ConnectOptionsDTO — ConnectOptions holds tequilapi connect options
    - `dns` string — DNSOption defines DNS server selection strategy for consumer
    - `kill_switch` boolean — kill switch option restricting communication only through VPN
    - `proxy_port` integer
  - `consumer_id` string, required — consumer identity
  - `filter` ConnectionCreateFilter — ConnectionCreateFilter describes filter for the connection request to lookup for a requested proposals based on specified params.
    - `country_code` string
    - `include_monitoring_failed` boolean
    - `ip_type` string
    - `providers` string[]
    - `sort_by` string
  - `hermes_id` string — hermes identity
  - `provider_id` string, required — provider identity
  - `service_type` string — service type. Possible values are "openvpn", "wireguard" and "noop"

## Response `201`

Connection started

- ConnectionInfoDTO
  - `consumer_id` string
  - `hermes_id` string
  - `proposal` ProposalDTO
    - `access_policies` AccessPolicy[] — AccessPolicies
      - `id` string
      - `source` string
    - `compatibility` integer — Compatibility level.
    - `format` string — Proposal format.
    - `location` ServiceLocationDTO
      - `asn` integer — Autonomous System Number
      - `city` string
      - `continent` string
      - `country` string
      - `ip_type` string
      - `isp` string
    - `price` Price
      - `currency` string
      - `per_gib` integer
      - `per_gib_tokens` Tokens — Tokens a common response for ethereum blockchain monetary amount
        - `ether` string
        - `human` string
        - `wei` string
      - `per_hour` integer
      - `per_hour_tokens` Tokens — Tokens a common response for ethereum blockchain monetary amount
        - `ether` string
        - `human` string
        - `wei` string
    - `provider_id` string — provider who offers service
    - `quality` Quality
      - `bandwidth` number, double
      - `latency` number, double
      - `quality` number, double
      - `uptime` number, double
    - `service_type` string — type of service provider offers
  - `provider_tunnel_ip` string — ProviderTunnelIP is the provider address inside this connection's tunnel.
  - `session_id` string
  - `status` string

## Other responses

- `400` — Failed to parse or request validation failed
- `422` — Unable to process the request at this point
- `500` — Internal server error

---

[API](https://skmtc.net/mysteriumnetwork/apis/tequila-api.md) · [All operations](https://skmtc.net/mysteriumnetwork/apis/tequila-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mysteriumnetwork/tequila-api/revisions/cb1439736b63/schema)
