Skip to main content
POST
/
connect
Create a Connect session
curl --request POST \
  --url https://api.flatpeak.com/connect \
  --header 'Content-Type: application/json' \
  --data '
{
  "oem_id": "oem_6a3a8dada72cd0a249ff9528",
  "callback_url": "myapp://superenergy/flatpeak/complete"
}
'
{
  "id": "cse_6a3196d6e61a44f33f7307ed",
  "object": "connect_session",
  "callback_url": "myapp://superenergy/flatpeak/complete",
  "time_created": "2023-05-05T18:37:27Z",
  "time_expiry": "2023-12-28T03:00:00Z",
  "target_url": "https://universal.flatpeak.com"
}

Body

application/json

Connect init session data.

oem_id
string
required

Flatpeak identifier for the device OEM.

Example:

"oem_6a3a8dada72cd0a249ff9528"

callback_url
string
required

URL where the customer is redirected after they complete or exit their Connect session.

Example:

"myapp://superenergy/flatpeak/complete"

Response

Response example

id
string
required

Flatpeak Connect Session ID.

Example:

"cse_6a3196d6e61a44f33f7307ed"

object
enum<string>
required

Object type.

Available options:
connect_session
Example:

"connect_session"

callback_url
string
required

URL where the customer is redirected after they complete or exit their Connect session.

Example:

"myapp://superenergy/flatpeak/complete"

time_created
string
required

Time when the object was created, in UTC.

Example:

"2023-05-05T18:37:27Z"

time_expiry
string
required

Time when the object expires, in UTC.

Example:

"2023-12-28T03:00:00Z"

target_url
string

URL where the customer should be redirected. Your application should append the Connect Session ID as the connect_session query parameter, for example https://universal.flatpeak.com/?connect_session=cse_6a3196d6e61a44f33f7307ed. Additional query parameters may also be appended as required by your application.

Example:

"https://universal.flatpeak.com"