POST
/
o
/
{organisation_id}
/
connections
Create a new connection.
curl --request POST \
  --url https://platform.versori.com/api/v2/o/{organisation_id}/connections \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "connectionTemplateId": "<string>",
  "connection": {
    "name": "<string>",
    "credentials": [
      {
        "id": "<string>",
        "authSchemeConfig": {
          "type": "none",
          "none": {
            "id": "<string>",
            "description": "<string>",
            "validationMessages": [
              {
                "text": "<any>",
                "severity": "<any>",
                "detail": "<any>"
              }
            ]
          },
          "apiKey": {
            "id": "<string>",
            "description": "<string>",
            "validationMessages": [
              {
                "text": "<any>",
                "severity": "<any>",
                "detail": "<any>"
              }
            ],
            "name": "<string>",
            "in": "query"
          },
          "basicAuth": {
            "id": "<string>",
            "description": "<string>",
            "validationMessages": [
              {
                "text": "<any>",
                "severity": "<any>",
                "detail": "<any>"
              }
            ]
          },
          "oauth2": {
            "id": "<string>",
            "description": "<string>",
            "validationMessages": [
              {
                "text": "<any>",
                "severity": "<any>",
                "detail": "<any>"
              }
            ],
            "authorizeUrl": "<string>",
            "tokenUrl": "<string>",
            "scopes": [
              {
                "name": "<string>",
                "description": "<string>"
              }
            ],
            "defaultScopes": [
              "<string>"
            ],
            "additionalAuthorizeParams": "<string>",
            "additionalTokenParams": "<string>",
            "mtlsEnabled": true,
            "mtlsCredentialId": "<string>",
            "pkce": true,
            "grant": {
              "authorizationCode": {
                "credentialId": "<string>",
                "organisationId": "<string>",
                "clientId": "<string>",
                "clientSecret": "<string>"
              },
              "clientCredentials": {},
              "password": {
                "credentialId": "<string>",
                "organisationId": "<string>",
                "clientId": "<string>",
                "clientSecret": "<string>"
              },
              "type": "authorizationCode"
            }
          },
          "oauth1": {
            "id": "<string>",
            "description": "<string>",
            "validationMessages": [
              {
                "text": "<any>",
                "severity": "<any>",
                "detail": "<any>"
              }
            ],
            "consumerKey": "<string>",
            "consumerSecret": "<string>",
            "tempCredentialEndpoint": {
              "url": "<string>",
              "additionalParamConfigs": [
                {}
              ],
              "parameterTransmission": "AUTH_STYLE_AUTHORIZATION_HEADER"
            },
            "resourceOwnerAuthorizationEndpoint": {
              "url": "<string>",
              "additionalParamConfigs": [
                {}
              ],
              "parameterTransmission": "AUTH_STYLE_AUTHORIZATION_HEADER"
            },
            "tokenEndpoint": {
              "url": "<string>",
              "additionalParamConfigs": [
                {}
              ],
              "parameterTransmission": "AUTH_STYLE_AUTHORIZATION_HEADER"
            },
            "signatureMethod": "<string>",
            "credentialId": "<string>"
          },
          "hmac": {
            "id": "<string>",
            "description": "<string>",
            "validationMessages": [
              {
                "text": "<any>",
                "severity": "<any>",
                "detail": "<any>"
              }
            ],
            "name": "<string>",
            "in": "query",
            "algorithm": "sha1",
            "digestInputs": [
              "body"
            ]
          },
          "certificate": {
            "id": "<string>",
            "description": "<string>",
            "validationMessages": [
              {
                "text": "<any>",
                "severity": "<any>",
                "detail": "<any>"
              }
            ]
          }
        },
        "credential": {
          "id": "<string>",
          "organisationId": "<string>",
          "type": "none",
          "name": "<string>",
          "errors": [
            "<string>"
          ],
          "data": {
            "binary": {
              "valueBase64": "<string>"
            },
            "none": {},
            "string": {
              "value": "<string>"
            },
            "basicAuth": {
              "username": "<string>",
              "password": "<string>"
            },
            "oauth2Client": {
              "clientId": "<string>",
              "clientSecret": "<string>",
              "tokenUrl": "<string>",
              "scopes": [
                "<string>"
              ],
              "additionalParams": "<string>",
              "mTLSEnabled": true,
              "mTLSCredentialId": "<string>"
            },
            "oauth2Token": {
              "scopes": [
                "<string>"
              ],
              "accessToken": "<string>",
              "tokenType": "Bearer",
              "expiresAt": "2023-11-07T05:31:56Z",
              "refreshToken": "<string>"
            },
            "oauth2Code": {
              "code": "<string>",
              "state": "<string>"
            },
            "oauth2Password": {
              "username": "<string>",
              "password": "<string>"
            },
            "certificate": {
              "certificate": "<string>",
              "key": "<string>",
              "ca": "<string>"
            },
            "oauth1": {
              "state": "<string>",
              "oauthToken": "<string>",
              "oauthVerifier": "<string>"
            }
          },
          "expiresAt": "2023-11-07T05:31:56Z"
        }
      }
    ],
    "baseUrl": "<string>"
  }
}'
{
  "id": "<string>",
  "name": "<string>",
  "credentials": [
    {
      "id": "<string>",
      "authSchemeConfig": {
        "type": "none",
        "none": {
          "id": "<string>",
          "description": "<string>",
          "validationMessages": [
            {
              "text": "<string>",
              "severity": "info",
              "detail": [
                "<any>"
              ]
            }
          ]
        },
        "apiKey": {
          "id": "<string>",
          "description": "<string>",
          "validationMessages": [
            {
              "text": "<string>",
              "severity": "info",
              "detail": [
                "<any>"
              ]
            }
          ],
          "name": "<string>",
          "in": "query"
        },
        "basicAuth": {
          "id": "<string>",
          "description": "<string>",
          "validationMessages": [
            {
              "text": "<string>",
              "severity": "info",
              "detail": [
                "<any>"
              ]
            }
          ]
        },
        "oauth2": {
          "id": "<string>",
          "description": "<string>",
          "validationMessages": [
            {
              "text": "<string>",
              "severity": "info",
              "detail": [
                "<any>"
              ]
            }
          ],
          "authorizeUrl": "<string>",
          "tokenUrl": "<string>",
          "scopes": [
            {
              "name": "<string>",
              "description": "<string>"
            }
          ],
          "defaultScopes": [
            "<string>"
          ],
          "additionalAuthorizeParams": "<string>",
          "additionalTokenParams": "<string>",
          "mtlsEnabled": true,
          "mtlsCredentialId": "<string>",
          "pkce": true,
          "grant": {
            "authorizationCode": {
              "credentialId": "<string>",
              "organisationId": "<string>",
              "clientId": "<string>",
              "clientSecret": "<string>"
            },
            "clientCredentials": {},
            "password": {
              "credentialId": "<string>",
              "organisationId": "<string>",
              "clientId": "<string>",
              "clientSecret": "<string>"
            },
            "type": "authorizationCode"
          }
        },
        "oauth1": {
          "id": "<string>",
          "description": "<string>",
          "validationMessages": [
            {
              "text": "<string>",
              "severity": "info",
              "detail": [
                "<any>"
              ]
            }
          ],
          "consumerKey": "<string>",
          "consumerSecret": "<string>",
          "tempCredentialEndpoint": {
            "url": "<string>",
            "additionalParamConfigs": [
              {
                "parameterName": "<any>",
                "targetName": "<any>",
                "location": "<any>",
                "usages": "<any>",
                "required": "<any>",
                "modifiable": "<any>"
              }
            ],
            "parameterTransmission": "AUTH_STYLE_AUTHORIZATION_HEADER"
          },
          "resourceOwnerAuthorizationEndpoint": {
            "url": "<string>",
            "additionalParamConfigs": [
              {
                "parameterName": "<any>",
                "targetName": "<any>",
                "location": "<any>",
                "usages": "<any>",
                "required": "<any>",
                "modifiable": "<any>"
              }
            ],
            "parameterTransmission": "AUTH_STYLE_AUTHORIZATION_HEADER"
          },
          "tokenEndpoint": {
            "url": "<string>",
            "additionalParamConfigs": [
              {
                "parameterName": "<any>",
                "targetName": "<any>",
                "location": "<any>",
                "usages": "<any>",
                "required": "<any>",
                "modifiable": "<any>"
              }
            ],
            "parameterTransmission": "AUTH_STYLE_AUTHORIZATION_HEADER"
          },
          "signatureMethod": "<string>",
          "credentialId": "<string>"
        },
        "hmac": {
          "id": "<string>",
          "description": "<string>",
          "validationMessages": [
            {
              "text": "<string>",
              "severity": "info",
              "detail": [
                "<any>"
              ]
            }
          ],
          "name": "<string>",
          "in": "query",
          "algorithm": "sha1",
          "digestInputs": [
            "body"
          ]
        },
        "certificate": {
          "id": "<string>",
          "description": "<string>",
          "validationMessages": [
            {
              "text": "<string>",
              "severity": "info",
              "detail": [
                "<any>"
              ]
            }
          ]
        }
      },
      "credential": {
        "id": "<string>",
        "organisationId": "<string>",
        "type": "none",
        "name": "<string>",
        "errors": [
          "<string>"
        ],
        "data": {
          "binary": {
            "valueBase64": "<string>"
          },
          "none": {},
          "string": {
            "value": "<string>"
          },
          "basicAuth": {
            "username": "<string>",
            "password": "<string>"
          },
          "oauth2Client": {
            "clientId": "<string>",
            "clientSecret": "<string>",
            "tokenUrl": "<string>",
            "scopes": [
              "<string>"
            ],
            "additionalParams": "<string>",
            "mTLSEnabled": true,
            "mTLSCredentialId": "<string>"
          },
          "oauth2Token": {
            "scopes": [
              "<string>"
            ],
            "accessToken": "<string>",
            "tokenType": "Bearer",
            "expiresAt": "2023-11-07T05:31:56Z",
            "refreshToken": "<string>"
          },
          "oauth2Code": {
            "code": "<string>",
            "state": "<string>"
          },
          "oauth2Password": {
            "username": "<string>",
            "password": "<string>"
          },
          "certificate": {
            "certificate": "<string>",
            "key": "<string>",
            "ca": "<string>"
          },
          "oauth1": {
            "state": "<string>",
            "oauthToken": "<string>",
            "oauthVerifier": "<string>"
          }
        },
        "expiresAt": "2023-11-07T05:31:56Z"
      }
    }
  ],
  "baseUrl": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "systemId": "<string>",
  "connectionTemplateId": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer token authentication used by the Versori Platform. External consumers must provide an API key, however internal consumers must provide a JWT id_token issued by our IdP.

Path Parameters

organisation_id
string<ulid>
required

Body

application/json
connectionTemplateId
string<ulid>
required

This is the ID of the template that the connection is created against.

connection
object
required

ConnectionCreate defines the connection to create.

Response

Created

Connection defines the credentials for the owning Connector, and additional variables which can be used to customize the Connector in a particular connection.

id
string<ulid>
required

ID is the unique identifier of the Connection. Typically this is only used internally and most (if not all) public-facing APIs will use the name in combination with the Connector's id instead.

name
string
required

Name is the name of the Connection. This must be unique within the owning Connector.

credentials
object[]
required

ConnectionCredentials defines the credentials for the owning Connector. If multiple credentials are defined for each type, they are applied to the request in the order they are defined. This is to enable Connectors which require both a user session token and an API key to be provided in the request.

createdAt
string<date-time>
required

CreatedAt is the time the Connection was created.

updatedAt
string<date-time>
required

UpdatedAt is the time the Connection was last updated.

baseUrl
string<uri>

The baseUrl on the connection allows a dynamic user to override the base URL of the connection. This is useful when users have their own instance of a service and want to connect to it.

For example, a user may have their own instance of shopify and their url is https://myshopify.com. They can override the base url of the connection to https://myshopify.com and all requests will be made to this url. If it is left as an empty string, it will be ignored.

systemId
string<ulid>

ID of the system to add the project environment.

connectionTemplateId
string<ulid>

This is the ID of the template that the connection is created against.