Create a custom field (desk:admin)
POST /api/desk/v1/fields
Module: Desk · operationId: createField · Tag: Configuration · Auth: access token (Authorization: Bearer <accessToken>)
Request body
application/json (required)
key(string, required): Key of the field; item values are cf.kind(string, required): Value kind of the field (one oftext,longtext,number,date,datetime,bool,select,multiselect,user,url)label(string, required): Display labelaiFill(boolean): The AI may fill the field of new tickets (triage); only select and short text (text) fields. Text is only ever proposed, never applied without a personarchived(boolean): Archived: kept on items, no longer offereddescription(string): Help text of the fieldid(string, read-only): Id of the custom fieldkbRole(string): Field holds the cause (one of ``,cause,solution,workaround)options(array of object): Choices of a select or multiselect fieldcolor(string): Display color of the choicelabel(string): Display label of the choicevalue(string): Stored value of the choice
Example:
{
"aiFill": true,
"description": "Seriennummer des betroffenen Geräts",
"key": "seriennummer",
"kind": "text",
"label": "Seriennummer"
}
Responses
- 201 Created (
application/json)
Fields of the 201 answer:
key(string, required): Key of the field; item values are cf.kind(string, required): Value kind of the field (one oftext,longtext,number,date,datetime,bool,select,multiselect,user,url)label(string, required): Display labelaiFill(boolean): The AI may fill the field of new tickets (triage); only select and short text (text) fields. Text is only ever proposed, never applied without a personarchived(boolean): Archived: kept on items, no longer offereddescription(string): Help text of the fieldid(string, read-only): Id of the custom fieldkbRole(string): Field holds the cause (one of ``,cause,solution,workaround)options(array of object): Choices of a select or multiselect fieldcolor(string): Display color of the choicelabel(string): Display label of the choicevalue(string): Stored value of the choice
Example 201 answer:
{
"aiFill": false,
"archived": false,
"description": "Warum das Ticket geschlossen wurde",
"id": "7f4a5b6c-8d9e-4f0a-9b2c-4d5e6f7a8b04",
"kbRole": "",
"key": "abschlussgrund",
"kind": "select",
"label": "Abschlussgrund",
"options": [
{
"label": "Behoben",
"value": "behoben"
},
{
"label": "Workaround",
"value": "workaround"
},
{
"label": "Kein Fehler",
"value": "kein_fehler"
},
{
"label": "Duplikat",
"value": "duplikat"
},
{
"label": "Vom Kunden zurückgezogen",
"value": "zurueckgezogen"
}
]
}
Example request
curl -X POST 'https://api.mbcom.cloud/api/desk/v1/fields' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
--data '{"aiFill":true,"description":"Seriennummer des betroffenen Geräts","key":"seriennummer","kind":"text","label":"Seriennummer"}'