POST
/
connect_sessions
curl --request POST \
  --url https://api.stackone.com/connect_sessions \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "categories": [
    "ats",
    "hris",
    "hrisLegacy",
    "crm",
    "iam",
    "marketing",
    "lms",
    "stackOne",
    "documents"
  ],
  "provider": "<string>",
  "origin_owner_id": "<string>",
  "origin_owner_name": "<string>",
  "origin_username": "<string>",
  "account_id": "<string>",
  "expires_in": 1800,
  "metadata": {},
  "multiple": false,
  "label": "<string>"
}'
{
  "id": 123,
  "organization_id": 123,
  "project_id": "<string>",
  "categories": [
    "ats",
    "hris",
    "hrisLegacy",
    "crm",
    "iam",
    "marketing",
    "lms",
    "stackOne",
    "documents"
  ],
  "provider": "<string>",
  "origin_owner_id": "<string>",
  "origin_owner_name": "<string>",
  "origin_username": "<string>",
  "account_id": "<string>",
  "label": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "token": "<string>",
  "auth_link_url": "<string>"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
origin_owner_id
string
required

The origin owner identifier

origin_owner_name
string
required

The origin owner name

categories
enum<string>[] | null

The categories of the provider to connect to

Available options:
ats,
hris,
hris-legacy,
crm,
iam,
marketing,
lms,
stackone,
documents
Example:
[
  "ats",
  "hris",
  "hrisLegacy",
  "crm",
  "iam",
  "marketing",
  "lms",
  "stackOne",
  "documents"
]
provider
string | null

The provider to connect to

origin_username
string | null

The origin username

account_id
string | null

The unique identifier for the account associated with this connect session. When this field is present, the hub will launch in edit mode using the retrieved token.

expires_in
number | null
default:1800

How long the session should be valid for in seconds

metadata
object | null

The metadata for the connection

multiple
boolean | null
default:false

If set, this connect session will allow creation of multiple accounts with the same origin owner id and provider. Has no effect if account_id is set.

label
string | null

The label to be applied to the account associated with this connect session.

Response

201
application/json
The details of the connect session created with token and auth link
id
number
required
organization_id
number
required
project_id
string
required
origin_owner_id
string
required
origin_owner_name
string
required
created_at
string
required
token
string
required
categories
enum<string>[] | null
Available options:
ats,
hris,
hris-legacy,
crm,
iam,
marketing,
lms,
stackone,
documents
Example:
[
  "ats",
  "hris",
  "hrisLegacy",
  "crm",
  "iam",
  "marketing",
  "lms",
  "stackOne",
  "documents"
]
provider
string | null
origin_username
string | null
account_id
string | null
label
string | null