Skip to main content
PUT
/
sessions
/
field
/
{field_id}
Update Field
curl --request PUT \
  --url https://api.swoogo.com/api/v1/sessions/field/{field_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "choices": [
    {
      "delete": true,
      "id": 149
    },
    {
      "name": "new choice"
    },
    {
      "id": "152",
      "name": "updated choice"
    }
  ],
  "name": "updated name"
}
'
{
  "allow_html": false,
  "attribute": "c_104",
  "choices": [
    {
      "id": 150,
      "name": "second",
      "sort": 1
    },
    {
      "id": 151,
      "name": "third",
      "sort": 2
    },
    {
      "id": 152,
      "name": "updated choice",
      "sort": 3
    },
    {
      "id": 153,
      "name": "new choice",
      "sort": 4
    }
  ],
  "id": 104,
  "name": "updated name",
  "required": false,
  "settings": null,
  "sort": 28,
  "type": "dropDownList",
  "visible": true
}

Authorizations

Authorization
string
header
required

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

field_id
integer
required

integer - required - The ID of the field you want to update

Example:

1

Body

choices
object[]
Example:
[
{ "delete": true, "id": 149 },
{ "name": "new choice" },
{ "id": "152", "name": "updated choice" }
]
name
string
Example:

"updated name"

Response

Update An Existing Session Field

allow_html
boolean
Example:

false

attribute
string
Example:

"c_104"

choices
object[]
Example:
[
{ "id": 150, "name": "second", "sort": 1 },
{ "id": 151, "name": "third", "sort": 2 },
{
"id": 152,
"name": "updated choice",
"sort": 3
},
{
"id": 153,
"name": "new choice",
"sort": 4
}
]
id
number
Example:

104

name
string
Example:

"updated name"

required
boolean
Example:

false

settings
unknown
sort
number
Example:

28

type
string
Example:

"dropDownList"

visible
boolean
Example:

true