# Connections

In Make, you need to create a connection for most apps. Make then uses this connection to communicate with the third-party service and to authenticate your requests to the third-party service. The following endpoints allow you to create and manage connections.

## List connections

> Retrieves a collection of all connections for a team with a given ID. Returned connections are sorted by name in ascending order.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Connections","description":"In Make, you need to create a connection for most apps. Make then uses this connection to communicate with the third-party service and to authenticate your requests to the third-party service. The following endpoints allow you to create and manage connections."}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["connections:read"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/connections":{"get":{"tags":["Connections"],"summary":"List connections","description":"Retrieves a collection of all connections for a team with a given ID. Returned connections are sorted by name in ascending order.","parameters":[{"name":"teamId","in":"query","schema":{"type":"integer"},"required":true,"description":"The unique ID of the team whose connections will be retrieved."},{"name":"type[]","in":"query","schema":{"type":"array","items":{"type":"string"}},"description":"Specifies the type of the connections to return details for. The connection type is defined in the `accountName` property and you can get it from the [Get connection details](./get--connections--connectionid.md) endpoint."},{"name":"<connectionType>[]","in":"query","schema":{"type":"array","items":{"type":"string"}},"description":"Allows utilizing the scopes check. The particular connection type (`<connectionType>`) should be one of the types specified in the `type[]` parameter. The values are the scopes to check for the given connection type. You can send multiple `<connectionType>` values with corresponding arrays to check multiple connection types scopes at once. The result of the check is reflected in the `scoped` property of the returned connection object."},{"name":"cols[]","in":"query","schema":{"type":"array","items":{"type":"string","enum":["id","name","accountName","accountLabel","packageName","expire","metadata","teamId","theme","upgradeable","scopesCnt","scoped","accountType","editable","uid","connectedSystemId","organizationId"]}},"description":"Specifies the group of values to return. For example, you may want to check which returned connections can be upgraded."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"accountName":{"type":"string"},"accountLabel":{"type":"string"},"packageName":{"type":"string"},"expire":{"type":"string","format":"date-time"},"metadata":{"type":"object","properties":{"value":{"type":"string"},"type":{"type":"string","enum":["string","email"]}}},"teamId":{"type":"integer"},"theme":{"type":"string","format":"color"},"upgradeable":{"type":"boolean"},"scopesCnt":{"type":"integer"},"scoped":{"type":"boolean"},"accountType":{"type":"string"},"editable":{"type":"boolean"},"uid":{"type":"string"},"connectedSystemId":{"type":"string"},"organizationId":{"type":"integer"}}}}}}}}}}}}}}
```

## Create connection

> Creates a new connection with data passed in the request body. In the response, it returns all details of the created connection.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Connections","description":"In Make, you need to create a connection for most apps. Make then uses this connection to communicate with the third-party service and to authenticate your requests to the third-party service. The following endpoints allow you to create and manage connections."}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["connections:write"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/connections":{"post":{"tags":["Connections"],"summary":"Create connection","description":"Creates a new connection with data passed in the request body. In the response, it returns all details of the created connection.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"accountName":{"type":"string","description":"The connection name. The name must be at most 128 characters long and does not need to be unique."},"accountType":{"type":"string","description":"The connection type corresponding to the connected app. For some connection types, this property may require providing additional properties in the request body,  such as `clientId` and `clientSecret`, in order to authorize the connection and make it functional."},"scopes":{"type":"array","description":"The connection scope determining the module use. The format and number of available scopes vary depending on the `accountType` parameter.","items":{"type":"string"}}},"additionalProperties":{}}}}},"parameters":[{"name":"teamId","in":"query","schema":{"type":"integer"},"required":true,"description":"The unique ID of the team whose connections will be retrieved."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"connection":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"accountName":{"type":"string"},"accountLabel":{"type":"string"},"packageName":{"type":"string"},"expire":{"type":"string","format":"date-time"},"metadata":{"type":"object","properties":{"value":{"type":"string"},"type":{"type":"string","enum":["string","email"]}}},"teamId":{"type":"integer"},"theme":{"type":"string","format":"color"},"upgradeable":{"type":"boolean"},"scopesCnt":{"type":"integer"},"scoped":{"type":"boolean"},"accountType":{"type":"string"},"editable":{"type":"boolean"},"uid":{"type":"string"},"connectedSystemId":{"type":"string"},"organizationId":{"type":"integer"}}}}}}}}}}}}}
```

## List updatable connection parameters

> Gets a list of connection parameters that can be updated. You can update a connection with the API call \`POST /connections/{connectionId}/set-data\`.\
> \
> If the connection cannot be updated then the API call returns the error message "Cannot edit this connection." When this happens, create a new connection instead.<br>

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Connections","description":"In Make, you need to create a connection for most apps. Make then uses this connection to communicate with the third-party service and to authenticate your requests to the third-party service. The following endpoints allow you to create and manage connections."}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["connections:read"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/connections/{connectionId}/editable-data-schema":{"get":{"tags":["Connections"],"summary":"List updatable connection parameters","description":"Gets a list of connection parameters that can be updated. You can update a connection with the API call `POST /connections/{connectionId}/set-data`.\n\nIf the connection cannot be updated then the API call returns the error message \"Cannot edit this connection.\" When this happens, create a new connection instead.\n","parameters":[{"name":"connectionId","in":"path","schema":{"type":"integer"},"required":true,"description":"The ID of the connection. You can get connection ID's of all your connections with the the [List connections](./get--connections.md) endpoint."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"editableParameters":{"type":"array","items":{"type":"string"}}}}}}}}}}}}
```

## Update a connection

> Updates the specified connection with data in the request body. Check which data you need to send to update the connection with the API call \`GET /connections/{connectionId}/editable-data-schema\`. The data might be different for each app and connection type.\
> \
> The new connection data replace the original connection data. Make sure to provide all relevant data. If a field is missing in the request body, Make replaces the field in the new connection with an empty value.\
> \
> For OAuth connections, you need to log in to Make and confirm the changes with the \*\*Reauthorize\*\* button. For the rest of the connection types, Make starts using the new connection data immediately.\
> \
> If the connection cannot be updated then the API call returns the error message "Cannot edit this connection." When this happens, create a new connection instead.<br>

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Connections","description":"In Make, you need to create a connection for most apps. Make then uses this connection to communicate with the third-party service and to authenticate your requests to the third-party service. The following endpoints allow you to create and manage connections."}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["connections:write"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/connections/{connectionId}/set-data":{"post":{"tags":["Connections"],"summary":"Update a connection","description":"Updates the specified connection with data in the request body. Check which data you need to send to update the connection with the API call `GET /connections/{connectionId}/editable-data-schema`. The data might be different for each app and connection type.\n\nThe new connection data replace the original connection data. Make sure to provide all relevant data. If a field is missing in the request body, Make replaces the field in the new connection with an empty value.\n\nFor OAuth connections, you need to log in to Make and confirm the changes with the **Reauthorize** button. For the rest of the connection types, Make starts using the new connection data immediately.\n\nIf the connection cannot be updated then the API call returns the error message \"Cannot edit this connection.\" When this happens, create a new connection instead.\n","parameters":[{"name":"connectionId","in":"path","schema":{"type":"integer"},"required":true,"description":"The ID of the connection. You can get connection ID's of all your connections with the the [List connections](./get--connections.md) endpoint."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The request body has to contain the parameters listed in the response from the API call `GET /connections/{connectionId}/editable-data-schema` and the new values associated with them.\n","additionalProperties":{}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"changed":{"type":"boolean"}}}}}}}}}}}
```

## Get connection details

> Retrieves details of a connection with a given ID.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Connections","description":"In Make, you need to create a connection for most apps. Make then uses this connection to communicate with the third-party service and to authenticate your requests to the third-party service. The following endpoints allow you to create and manage connections."}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["connections:read"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/connections/{connectionId}":{"get":{"tags":["Connections"],"summary":"Get connection details","description":"Retrieves details of a connection with a given ID.","parameters":[{"name":"connectionId","in":"path","schema":{"type":"integer"},"required":true,"description":"The ID of the connection. You can get connection ID's of all your connections with the the [List connections](./get--connections.md) endpoint."},{"name":"cols[]","in":"query","schema":{"type":"array","items":{"type":"string","enum":["id","name","accountName","accountLabel","packageName","expire","metadata","teamId","theme","upgradeable","scopesCnt","scoped","accountType","editable","uid","scopes","connectedSystemId","organizationId"]}},"description":"Specifies the group of values to return. For example, you may want to retrieve only the name and scope for a given connection."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"connection":{"allOf":[{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"accountName":{"type":"string"},"accountLabel":{"type":"string"},"packageName":{"type":"string"},"expire":{"type":"string","format":"date-time"},"metadata":{"type":"object","properties":{"value":{"type":"string"},"type":{"type":"string","enum":["string","email"]}}},"teamId":{"type":"integer"},"theme":{"type":"string","format":"color"},"upgradeable":{"type":"boolean"},"scopesCnt":{"type":"integer"},"scoped":{"type":"boolean"},"accountType":{"type":"string"},"editable":{"type":"boolean"},"uid":{"type":"string"},"connectedSystemId":{"type":"string"},"organizationId":{"type":"integer"}}},{"type":"object","properties":{"scopes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"account":{"type":"string"}}}}}}]}}}}}}}}}}}
```

## Delete connection

> Deletes a connection with a given ID and returns the ID in the response.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Connections","description":"In Make, you need to create a connection for most apps. Make then uses this connection to communicate with the third-party service and to authenticate your requests to the third-party service. The following endpoints allow you to create and manage connections."}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["connections:write"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/connections/{connectionId}":{"delete":{"tags":["Connections"],"summary":"Delete connection","description":"Deletes a connection with a given ID and returns the ID in the response.","parameters":[{"name":"connectionId","in":"path","schema":{"type":"integer"},"required":true,"description":"The ID of the connection. You can get connection ID's of all your connections with the the [List connections](./get--connections.md) endpoint."},{"name":"confirmed","in":"query","schema":{"type":"boolean"},"description":"Confirms the deletion if the connection is included in at least one scenario. Confirmation is required because the scenario will stop working without the connection. If the parameter is missing or it is set to `false` an error code is returned and the resource is not deleted."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"connection":{"type":"integer"}}}}}}}}}}}
```

## Rename a connection

> Updates the specified connection's name. The response contains all information about the updated connection.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Connections","description":"In Make, you need to create a connection for most apps. Make then uses this connection to communicate with the third-party service and to authenticate your requests to the third-party service. The following endpoints allow you to create and manage connections."}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["connections:write"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/connections/{connectionId}":{"patch":{"tags":["Connections"],"summary":"Rename a connection","description":"Updates the specified connection's name. The response contains all information about the updated connection.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The updated connection name. The name must be at most 128 characters long and does not need to be unique."}},"additionalProperties":false}}}},"parameters":[{"name":"connectionId","in":"path","schema":{"type":"integer"},"required":true,"description":"The ID of the connection. You can get connection ID's of all your connections with the the [List connections](./get--connections.md) endpoint."},{"name":"cols[]","in":"query","schema":{"type":"array","items":{"type":"string","enum":["id","name","accountName","accountLabel","packageName","expire","metadata","teamId","theme","upgradeable","scopesCnt","scoped","accountType","editable","uid"]}},"description":"Specifies the group of values to return. For example, you may want to retrieve only the expiration of the updated connection."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"connection":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"accountName":{"type":"string"},"accountLabel":{"type":"string"},"packageName":{"type":"string"},"expire":{"type":"string","format":"date-time"},"metadata":{"type":"object","properties":{"value":{"type":"string"},"type":{"type":"string","enum":["string","email"]}}},"teamId":{"type":"integer"},"theme":{"type":"string","format":"color"},"upgradeable":{"type":"boolean"},"scopesCnt":{"type":"integer"},"scoped":{"type":"boolean"},"accountType":{"type":"string"},"editable":{"type":"boolean"},"uid":{"type":"string"},"connectedSystemId":{"type":"string"},"organizationId":{"type":"integer"}}}}}}}}}}}}}
```

## Verify connection

> Verifies the connection status. This endpoint usually communicates with the API of the app that includes the given connection and verifies if credentials saved in Make are still valid. It returns the confirmation if the connection is verified (\`true\`) or not (\`false\`).

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Connections","description":"In Make, you need to create a connection for most apps. Make then uses this connection to communicate with the third-party service and to authenticate your requests to the third-party service. The following endpoints allow you to create and manage connections."}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["connections:write"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/connections/{connectionId}/test":{"post":{"tags":["Connections"],"summary":"Verify connection","description":"Verifies the connection status. This endpoint usually communicates with the API of the app that includes the given connection and verifies if credentials saved in Make are still valid. It returns the confirmation if the connection is verified (`true`) or not (`false`).","parameters":[{"name":"connectionId","in":"path","schema":{"type":"integer"},"required":true,"description":"The ID of the connection. You can get connection ID's of all your connections with the the [List connections](./get--connections.md) endpoint."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"verified":{"type":"boolean"}}}}}}}}}}}
```

## Verify if connection is scoped

> Verifies if a scope for a given connection is set. This endpoint returns the information if the connection is scoped (\`true\`) or not (\`false\`).

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Connections","description":"In Make, you need to create a connection for most apps. Make then uses this connection to communicate with the third-party service and to authenticate your requests to the third-party service. The following endpoints allow you to create and manage connections."}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["connections:write"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/connections/{connectionId}/scoped":{"post":{"tags":["Connections"],"summary":"Verify if connection is scoped","description":"Verifies if a scope for a given connection is set. This endpoint returns the information if the connection is scoped (`true`) or not (`false`).","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"array","description":"The array with IDs of the scopes for a given connection. The scope ID of a specific connection can be retrieved from the [Get connection details](./get--connections--connectionid.md) endpoint.","items":{"type":"string"},"required":["items"]}}}}}},"parameters":[{"name":"connectionId","in":"path","schema":{"type":"integer"},"required":true,"description":"The ID of the connection. You can get connection ID's of all your connections with the the [List connections](./get--connections.md) endpoint."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"connection":{"type":"object","properties":{"scoped":{"type":"boolean"}}}}}}}}}}}}}
```
