curl --request POST \
--url https://fleet-api.flatpeak.com/connect-sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"oem_id": "oem_6a3a8dada72cd0a249ff9528",
"callback_url": "myapp://superenergy/flatpeak/complete",
"program_id": "vpr_6a1f8e375db9de605baadd46",
"signup_reference": "sur_6a7c0e2f9b4d1a3c5e8f7b6d"
}
'import requests
url = "https://fleet-api.flatpeak.com/connect-sessions"
payload = {
"oem_id": "oem_6a3a8dada72cd0a249ff9528",
"callback_url": "myapp://superenergy/flatpeak/complete",
"program_id": "vpr_6a1f8e375db9de605baadd46",
"signup_reference": "sur_6a7c0e2f9b4d1a3c5e8f7b6d"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
oem_id: 'oem_6a3a8dada72cd0a249ff9528',
callback_url: 'myapp://superenergy/flatpeak/complete',
program_id: 'vpr_6a1f8e375db9de605baadd46',
signup_reference: 'sur_6a7c0e2f9b4d1a3c5e8f7b6d'
})
};
fetch('https://fleet-api.flatpeak.com/connect-sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://fleet-api.flatpeak.com/connect-sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'oem_id' => 'oem_6a3a8dada72cd0a249ff9528',
'callback_url' => 'myapp://superenergy/flatpeak/complete',
'program_id' => 'vpr_6a1f8e375db9de605baadd46',
'signup_reference' => 'sur_6a7c0e2f9b4d1a3c5e8f7b6d'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://fleet-api.flatpeak.com/connect-sessions"
payload := strings.NewReader("{\n \"oem_id\": \"oem_6a3a8dada72cd0a249ff9528\",\n \"callback_url\": \"myapp://superenergy/flatpeak/complete\",\n \"program_id\": \"vpr_6a1f8e375db9de605baadd46\",\n \"signup_reference\": \"sur_6a7c0e2f9b4d1a3c5e8f7b6d\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://fleet-api.flatpeak.com/connect-sessions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"oem_id\": \"oem_6a3a8dada72cd0a249ff9528\",\n \"callback_url\": \"myapp://superenergy/flatpeak/complete\",\n \"program_id\": \"vpr_6a1f8e375db9de605baadd46\",\n \"signup_reference\": \"sur_6a7c0e2f9b4d1a3c5e8f7b6d\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://fleet-api.flatpeak.com/connect-sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"oem_id\": \"oem_6a3a8dada72cd0a249ff9528\",\n \"callback_url\": \"myapp://superenergy/flatpeak/complete\",\n \"program_id\": \"vpr_6a1f8e375db9de605baadd46\",\n \"signup_reference\": \"sur_6a7c0e2f9b4d1a3c5e8f7b6d\"\n}"
response = http.request(request)
puts response.read_body{
"id": "cos_6a3196d6e61a44f33f7307ed",
"object": "connect_session",
"live_mode": false,
"oem_id": "oem_6a3a8dada72cd0a249ff9528",
"program_id": "vpr_5c8d1f2a7b3e4d6c9a0f1b2c",
"device_id": null,
"target_url": "https://universal.flatpeak.com",
"callback_url": "myapp://superenergy/flatpeak/complete",
"time_created": "2026-05-05T18:37:27Z",
"time_expiry": "2026-05-07T18:37:27Z",
"account_id": "acc_6a5e504c3b98d0d6739b5f72"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}Create a Connect session
Creates a Connect session, opened through Universal Links. A session is single-use and expires 48 hours after creation.
A signup_reference that is unknown, already used, expired, or issued for another oem_id or program_id returns 422 signup_reference_invalid. Create the session without it, and the customer picks the device in the OEM app.
curl --request POST \
--url https://fleet-api.flatpeak.com/connect-sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"oem_id": "oem_6a3a8dada72cd0a249ff9528",
"callback_url": "myapp://superenergy/flatpeak/complete",
"program_id": "vpr_6a1f8e375db9de605baadd46",
"signup_reference": "sur_6a7c0e2f9b4d1a3c5e8f7b6d"
}
'import requests
url = "https://fleet-api.flatpeak.com/connect-sessions"
payload = {
"oem_id": "oem_6a3a8dada72cd0a249ff9528",
"callback_url": "myapp://superenergy/flatpeak/complete",
"program_id": "vpr_6a1f8e375db9de605baadd46",
"signup_reference": "sur_6a7c0e2f9b4d1a3c5e8f7b6d"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
oem_id: 'oem_6a3a8dada72cd0a249ff9528',
callback_url: 'myapp://superenergy/flatpeak/complete',
program_id: 'vpr_6a1f8e375db9de605baadd46',
signup_reference: 'sur_6a7c0e2f9b4d1a3c5e8f7b6d'
})
};
fetch('https://fleet-api.flatpeak.com/connect-sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://fleet-api.flatpeak.com/connect-sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'oem_id' => 'oem_6a3a8dada72cd0a249ff9528',
'callback_url' => 'myapp://superenergy/flatpeak/complete',
'program_id' => 'vpr_6a1f8e375db9de605baadd46',
'signup_reference' => 'sur_6a7c0e2f9b4d1a3c5e8f7b6d'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://fleet-api.flatpeak.com/connect-sessions"
payload := strings.NewReader("{\n \"oem_id\": \"oem_6a3a8dada72cd0a249ff9528\",\n \"callback_url\": \"myapp://superenergy/flatpeak/complete\",\n \"program_id\": \"vpr_6a1f8e375db9de605baadd46\",\n \"signup_reference\": \"sur_6a7c0e2f9b4d1a3c5e8f7b6d\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://fleet-api.flatpeak.com/connect-sessions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"oem_id\": \"oem_6a3a8dada72cd0a249ff9528\",\n \"callback_url\": \"myapp://superenergy/flatpeak/complete\",\n \"program_id\": \"vpr_6a1f8e375db9de605baadd46\",\n \"signup_reference\": \"sur_6a7c0e2f9b4d1a3c5e8f7b6d\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://fleet-api.flatpeak.com/connect-sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"oem_id\": \"oem_6a3a8dada72cd0a249ff9528\",\n \"callback_url\": \"myapp://superenergy/flatpeak/complete\",\n \"program_id\": \"vpr_6a1f8e375db9de605baadd46\",\n \"signup_reference\": \"sur_6a7c0e2f9b4d1a3c5e8f7b6d\"\n}"
response = http.request(request)
puts response.read_body{
"id": "cos_6a3196d6e61a44f33f7307ed",
"object": "connect_session",
"live_mode": false,
"oem_id": "oem_6a3a8dada72cd0a249ff9528",
"program_id": "vpr_5c8d1f2a7b3e4d6c9a0f1b2c",
"device_id": null,
"target_url": "https://universal.flatpeak.com",
"callback_url": "myapp://superenergy/flatpeak/complete",
"time_created": "2026-05-05T18:37:27Z",
"time_expiry": "2026-05-07T18:37:27Z",
"account_id": "acc_6a5e504c3b98d0d6739b5f72"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}Authorizations
Authenticate with the bearer_token obtained from the authentication endpoint.
Body
Parameters to create a Connect session.
The signup_reference your program's enrollment.signup_url received, when the customer came from an OEM app. Connect then opens on the device the customer started from, so they do not pick it again. Optional. A reference works once, within 30 days of issue, and only with the oem_id and program_id it arrived with.
"sur_6a7c0e2f9b4d1a3c5e8f7b6d"
Response
Connect session created.
A Connect session. Returned on creation and on retrieval; device_id is populated once the customer completes Connect.
Was this page helpful?

