PUT /v1/custom-fields/{id}

Update Custom Field

Path parameters

  • id string Required

    CustomField id

application/json

Body

Update custom field request

  • title string Required

    Title

  • entity string Required

    Values are staff, student, or family.

  • options array[string] | null

    Options

Responses

  • 200 application/json

    successful operation

    Hide response attributes Show response attributes object
    • id string Required

      id

    • companyId string Required

      Company ID

    • type string Required

      Values are text, textarea, number, select, multiselect, date, or bool.

    • title string Required

      Title

    • entity string Required

      Values are staff, student, or family.

    • options array[string] | null Required

      Options

  • 403 application/json

    Not authorized

    Hide response attributes Show response attributes object

    Error schema

    • statusCode number Required

      Status Code

    • messages array[string] Required

      List of error messages

    • exception object

      Exception

  • 404 application/json

    Not found

    Hide response attributes Show response attributes object

    Error schema

    • statusCode number Required

      Status Code

    • messages array[string] Required

      List of error messages

    • exception object

      Exception

PUT /v1/custom-fields/{id}
curl \
 --request PUT 'https://api.classmanager.io/v1/custom-fields/cf_xxxxxxxx' \
 --header "Content-Type: application/json" \
 --data '{"title":"Photo Consent","entity":"staff","options":["answer1","answer2"]}'
Request examples
{
  "title": "Photo Consent",
  "entity": "staff",
  "options": [
    "answer1",
    "answer2"
  ]
}
Response examples (200)
{
  "id": "cf_123123123123",
  "companyId": "co_123123123123",
  "type": "text",
  "title": "Custom Field Title",
  "entity": "staff",
  "options": [
    "answer1",
    "answer2"
  ]
}
Response examples (403)
{
  "statusCode": 42.0,
  "messages": [
    "string"
  ],
  "exception": {}
}
Response examples (404)
{
  "statusCode": 42.0,
  "messages": [
    "string"
  ],
  "exception": {}
}