POST
/
hubs
/
{hub_id}
/
users
/
{user_id}
/
connections
curl --request POST \
  --url https://platform.versori.com/api/embedded/v1/hubs/{hub_id}/users/{user_id}/connections \
  --header 'Content-Type: application/json' \
  --data '{
  "connectorId": "<string>",
  "connection": {
    "name": "<string>",
    "credentials": {
      "action": [
        {
          "authSchemeConfig": {
            "id": "<string>",
            "description": "<string>",
            "validationMessages": [
              {
                "text": "<string>",
                "severity": "info",
                "detail": [
                  "<string>"
                ]
              }
            ],
            "schemeType": "<string>"
          },
          "credential": {
            "name": "<string>",
            "type": "none",
            "data": {}
          }
        }
      ],
      "trigger": [
        {
          "authSchemeConfig": {
            "id": "<string>",
            "description": "<string>",
            "validationMessages": [
              {
                "text": "<string>",
                "severity": "info",
                "detail": [
                  "<string>"
                ]
              }
            ],
            "schemeType": "<string>"
          },
          "credential": {
            "name": "<string>",
            "type": "none",
            "data": {}
          }
        }
      ]
    },
    "variables": [
      {
        "name": "<string>",
        "value": "<string>"
      }
    ]
  }
}'
{
  "id": "<string>",
  "name": "<string>",
  "credentials": {
    "action": [
      {
        "id": "<string>",
        "authSchemeConfig": {
          "id": "<string>",
          "description": "<string>",
          "validationMessages": [
            {
              "text": "<string>",
              "severity": "info",
              "detail": [
                "<string>"
              ]
            }
          ],
          "schemeType": "<string>"
        },
        "credential": {
          "id": "<string>",
          "organisationId": "<string>",
          "type": "none",
          "name": "<string>",
          "usages": [
            {
              "connection": {
                "id": "<string>",
                "name": "<string>",
                "connector": {
                  "id": "<string>",
                  "organisationId": "<string>",
                  "name": "<string>",
                  "protocol": "http",
                  "createdAt": "2023-11-07T05:31:56Z",
                  "updatedAt": "2023-11-07T05:31:56Z"
                },
                "createdAt": "2023-11-07T05:31:56Z",
                "updatedAt": "2023-11-07T05:31:56Z"
              }
            }
          ],
          "errors": [
            "<string>"
          ],
          "data": {},
          "expiresAt": "2023-11-07T05:31:56Z"
        }
      }
    ],
    "trigger": [
      {
        "id": "<string>",
        "authSchemeConfig": {
          "id": "<string>",
          "description": "<string>",
          "validationMessages": [
            {
              "text": "<string>",
              "severity": "info",
              "detail": [
                "<string>"
              ]
            }
          ],
          "schemeType": "<string>"
        },
        "credential": {
          "id": "<string>",
          "organisationId": "<string>",
          "type": "none",
          "name": "<string>",
          "usages": [
            {
              "connection": {
                "id": "<string>",
                "name": "<string>",
                "connector": {
                  "id": "<string>",
                  "organisationId": "<string>",
                  "name": "<string>",
                  "protocol": "http",
                  "createdAt": "2023-11-07T05:31:56Z",
                  "updatedAt": "2023-11-07T05:31:56Z"
                },
                "createdAt": "2023-11-07T05:31:56Z",
                "updatedAt": "2023-11-07T05:31:56Z"
              }
            }
          ],
          "errors": [
            "<string>"
          ],
          "data": {},
          "expiresAt": "2023-11-07T05:31:56Z"
        }
      }
    ]
  },
  "variables": [
    {
      "name": "<string>",
      "value": "<string>"
    }
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Path Parameters

hub_id
string
required
user_id
string
required

UserID references an End User in the Hub.

Most APIs support setting this value to either the internal Versori identifier or their external ID as determined by the organisation. The identifier_type query parameter is used to indicate which type of ID is being used.

Query Parameters

identifier_type
enum<string>
default:
external

IdentifierType indicates whether the user_id path parameter is a internal identifier created by Versori, or an external identifier. If the value is external, some endpoints also require the hub query parameter to identify the correct Hub.

Available options:
internal,
external

Body

application/json
connectorId
string
required
connection
object
required

ConnectionCreate defines the connection to create against a Connector.

Response

201
application/json
Created

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

id
string
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 Action and Trigger 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.

variables
object[]
required
createdAt
string
required

CreatedAt is the time the Connection was created.

updatedAt
string
required

UpdatedAt is the time the Connection was last updated.