Get One Field
curl --request GET \
--url https://api.swoogo.com/api/v1/sessions/field/{field_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.swoogo.com/api/v1/sessions/field/{field_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.swoogo.com/api/v1/sessions/field/{field_id}', 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://api.swoogo.com/api/v1/sessions/field/{field_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.swoogo.com/api/v1/sessions/field/{field_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.swoogo.com/api/v1/sessions/field/{field_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.swoogo.com/api/v1/sessions/field/{field_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"allow_html": false,
"attribute": "c_57",
"choices": [
{
"id": 109,
"name": "Basic: 0-1 years of experience with the topic/product; looking for a basic introduction",
"sort": 0
},
{
"id": 110,
"name": "Intermediate: 1-3 years of experience with the topic/product: comfortable with basic functions; looking to dive deeper",
"sort": 1
},
{
"id": 111,
"name": "Advanced: 3+ years of experience with the topic/product; well-versed in all functions‚ looking to learn complexities and new trends",
"sort": 2
}
],
"id": 57,
"name": "dropdown list",
"required": false,
"settings": null,
"sort": 11,
"type": "dropDownList",
"visible": true
}{
"name": "Unauthorized",
"message": "Your request was made with invalid credentials.",
"code": 0,
"status": 401
}{
"name": "Forbidden",
"message": "You do not have access to that resource.",
"code": 0,
"status": 403
}{
"name": "Not Found",
"message": "The requested resource does not exist.",
"code": 0,
"status": 404
}{
"name": "Internal Server Error",
"message": "An error occurred while processing your request.",
"code": 0,
"status": 500
}Session Fields
Get One Field
Retrieves a single custom session field definition by its ID, including the attribute name, field type, visibility settings, validation rules, and available choices (for dropdown/radio fields).
GET
/
sessions
/
field
/
{field_id}
Get One Field
curl --request GET \
--url https://api.swoogo.com/api/v1/sessions/field/{field_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.swoogo.com/api/v1/sessions/field/{field_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.swoogo.com/api/v1/sessions/field/{field_id}', 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://api.swoogo.com/api/v1/sessions/field/{field_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.swoogo.com/api/v1/sessions/field/{field_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.swoogo.com/api/v1/sessions/field/{field_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.swoogo.com/api/v1/sessions/field/{field_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"allow_html": false,
"attribute": "c_57",
"choices": [
{
"id": 109,
"name": "Basic: 0-1 years of experience with the topic/product; looking for a basic introduction",
"sort": 0
},
{
"id": 110,
"name": "Intermediate: 1-3 years of experience with the topic/product: comfortable with basic functions; looking to dive deeper",
"sort": 1
},
{
"id": 111,
"name": "Advanced: 3+ years of experience with the topic/product; well-versed in all functions‚ looking to learn complexities and new trends",
"sort": 2
}
],
"id": 57,
"name": "dropdown list",
"required": false,
"settings": null,
"sort": 11,
"type": "dropDownList",
"visible": true
}{
"name": "Unauthorized",
"message": "Your request was made with invalid credentials.",
"code": 0,
"status": 401
}{
"name": "Forbidden",
"message": "You do not have access to that resource.",
"code": 0,
"status": 403
}{
"name": "Not Found",
"message": "The requested resource does not exist.",
"code": 0,
"status": 404
}{
"name": "Internal Server Error",
"message": "An error occurred while processing your request.",
"code": 0,
"status": 500
}Authorizations
OAuth 2.0 bearer token obtained from POST /oauth2/token. Tokens expire after 30 minutes. Include in the Authorization header as Bearer {access_token}.
Path Parameters
integer - required - The ID of the field you want to get
Example:
1
Query Parameters
string - optional - Comma separated list of fields you want to return
Example:
"id,attribute,name,s_hint,type,visible,required,sort,allow_html,s_url_display_format,s_button_text,s_url_image_id,s_max_links,s_link_collection_fields"
Response
Get Session Field
Example:
false
Example:
"c_57"
Show child attributes
Show child attributes
Example:
[
{
"id": 109,
"name": "Basic: 0-1 years of experience with the topic/product; looking for a basic introduction",
"sort": 0
},
{
"id": 110,
"name": "Intermediate: 1-3 years of experience with the topic/product: comfortable with basic functions; looking to dive deeper",
"sort": 1
},
{
"id": 111,
"name": "Advanced: 3+ years of experience with the topic/product; well-versed in all functions‚ looking to learn complexities and new trends",
"sort": 2
}
]
Example:
57
Example:
"dropdown list"
Example:
false
Example:
11
Example:
"dropDownList"
Example:
true
⌘I