Skip to main content
POST
/
connect_sessions
Create Connect Session
curl --request POST \
  --url https://api.stackone.com/connect_sessions \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "origin_owner_id": "<string>",
  "origin_owner_name": "<string>",
  "categories": [
    "ats",
    "hris",
    "hrisLegacy",
    "crm",
    "iam",
    "marketing",
    "lms",
    "stackOne",
    "documents",
    "ticketing",
    "screening",
    "messaging",
    "accounting",
    "scheduling"
  ],
  "provider": "<string>",
  "provider_version": "<string>",
  "origin_username": "<string>",
  "account_id": "<string>",
  "expires_in": 1800,
  "metadata": {},
  "multiple": false,
  "label": "<string>",
  "type": [
    "PRODUCTION",
    "TEST"
  ],
  "integration_id": "<string>",
  "shared": true,
  "relink": true,
  "scopes": true
}
'
{
  "id": 123,
  "organization_id": "<string>",
  "project_id": "<string>",
  "origin_owner_id": "<string>",
  "origin_owner_name": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "token": "<string>",
  "auth_link_url": "<string>",
  "categories": [
    "ats",
    "hris",
    "hrisLegacy",
    "crm",
    "iam",
    "marketing",
    "lms",
    "stackOne",
    "documents",
    "ticketing",
    "screening",
    "messaging",
    "accounting",
    "scheduling"
  ],
  "provider": "<string>",
  "origin_username": "<string>",
  "account_id": "<string>",
  "label": "<string>",
  "metadata": {},
  "external_trigger_token": "f0bc3d88-2178-5423-8c81-b81d6c9da824",
  "type": [
    "PRODUCTION",
    "TEST"
  ],
  "integration_id": "<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,
ticketing,
screening,
messaging,
accounting,
scheduling,
null
Example:
[
"ats",
"hris",
"hrisLegacy",
"crm",
"iam",
"marketing",
"lms",
"stackOne",
"documents",
"ticketing",
"screening",
"messaging",
"accounting",
"scheduling"
]
provider
string | null

The provider to connect to

provider_version
string | null

The provider version 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

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.

type
enum<string> | null
default:production

The connect session account type

Available options:
production,
test,
null
Example:
["PRODUCTION", "TEST"]
integration_id
string | null

The integration ID associated with this connect session

shared
boolean | null
default:true

Whether the account created from this connect session should be shared or limited to just the calling end_user_id

Whether to relink to an existing account if one exists with the same tenant id and provider

scopes
object

The scopes restrictions, if any, for the token generated from this connect session

Response

The details of the connect session created with token and auth link

id
number
required
organization_id
string
required
project_id
string
required
origin_owner_id
string
required
origin_owner_name
string
required
created_at
string<date-time>
required
token
string
required
categories
enum<string>[] | null
Available options:
ats,
hris,
hris-legacy,
crm,
iam,
marketing,
lms,
stackone,
documents,
ticketing,
screening,
messaging,
accounting,
scheduling,
null
Example:
[
"ats",
"hris",
"hrisLegacy",
"crm",
"iam",
"marketing",
"lms",
"stackOne",
"documents",
"ticketing",
"screening",
"messaging",
"accounting",
"scheduling"
]
provider
string | null
origin_username
string | null
account_id
string | null
label
string | null
metadata
object

Arbitrary set of key and values defined during the session token creation. This can be used to tag an account (eg. based on their pricing plan)

external_trigger_token
string | null

External trigger token to be used to trigger actions on the account

Example:

"f0bc3d88-2178-5423-8c81-b81d6c9da824"

type
enum<string> | null

The connect session account type

Available options:
production,
test,
unmapped_value,
null
Example:
["PRODUCTION", "TEST"]
integration_id
string | null

The integration ID (UUID) associated with this connect session