POST /v1/custom-fields/

Create Custom Field

application/json

Body

Create custom field request

  • title string Required

    Title

  • type string Required

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

  • 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

  • 422 application/json

    Validation error

    Hide response attributes Show response attributes object
    • statusCode number Required

      Status Code

    • messages array[string] Required

      List of error messages

    • exception object

      Exception

POST /v1/custom-fields/
curl \
 --request POST 'https://api-dev.classmanager.io/v1/custom-fields/' \
 --header "Content-Type: application/json" \
 --data '{"title":"Photo Consent","type":"text","entity":"staff","options":["answer1","answer2"]}'
Request examples
{
  "title": "Photo Consent",
  "type": "text",
  "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 (422)
{
  "statusCode": 42.0,
  "messages": [
    "string"
  ],
  "exception": {}
}