> ## Documentation Index
> Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Omnichannel Custom Field

> Create a new Omnichannel custom field or update an existing custom field. You can refer to the <a href='https://docs.rocket.chat/docs/omnichannel-custom-fields' target='_blank'>Omnichannel Custom Fields</a> user guide for details.

Permission required: `view-livechat-manager`

### Changelog
| Version      | Description |
| ---------------- | ------------|
|7.11.0            | Added       |

## OpenAPI

````json POST /api/v1/livechat/custom-fields.save
{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0.0",
    "title": "Omnichannel"
  },
  "servers": [
    {
      "url": "https://apiexplorer.support.rocket.chat"
    }
  ],
  "tags": [
    {
      "name": "Omnichannel Users"
    },
    {
      "name": "Omnichannel Agents"
    },
    {
      "name": "Omnichannel Monitors"
    },
    {
      "name": "Omnichannel Visitors"
    },
    {
      "name": "Omnichannel Contacts"
    },
    {
      "name": "Omnichannel Rooms"
    },
    {
      "name": "Omnichannel Departments"
    },
    {
      "name": "Omnichannel Custom Fields"
    },
    {
      "name": "Omnichannel Business Hours"
    },
    {
      "name": "Omnichannel Priorities"
    },
    {
      "name": "Omnichannel Tags"
    },
    {
      "name": "Omnichannel Units"
    },
    {
      "name": "SLA Policies"
    },
    {
      "name": "Canned Responses"
    },
    {
      "name": "Omnichannel Transcript"
    },
    {
      "name": "Omnichannel Statistics"
    },
    {
      "name": "Omnichannel Agent Stats"
    },
    {
      "name": "Omnichannel Dashboards"
    },
    {
      "name": "Reports"
    },
    {
      "name": "Omnichannel Inquiries"
    },
    {
      "name": "Omnichannel Webhooks"
    },
    {
      "name": "Livechat"
    },
    {
      "name": "Livechat Appearance"
    },
    {
      "name": "Livechat Triggers"
    },
    {
      "name": "Livechat Messages"
    },
    {
      "name": "Livechat Page Visited"
    }
  ],
  "paths": {
    "/api/v1/livechat/custom-fields.save": {
      "post": {
        "summary": "Create Omnichannel Custom Field",
        "tags": [
          "Omnichannel Custom Fields"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "customField": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string"
                        },
                        "scope": {
                          "type": "string"
                        },
                        "visibility": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "searchable": {
                          "type": "boolean"
                        },
                        "regexp": {
                          "type": "string"
                        },
                        "required": {
                          "type": "boolean"
                        },
                        "defaultValue": {
                          "type": "string"
                        },
                        "options": {
                          "type": "string"
                        },
                        "public": {
                          "type": "boolean"
                        },
                        "_updatedAt": {
                          "type": "string"
                        }
                      }
                    },
                    "success": {
                      "type": "boolean"
                    }
                  }
                },
                "examples": {
                  "Example": {
                    "value": {
                      "customField": {
                        "label": "address11",
                        "scope": "visitor",
                        "visibility": "hidden",
                        "type": "input",
                        "searchable": "true",
                        "regexp": "",
                        "required": "false",
                        "defaultValue": "",
                        "options": "",
                        "public": "true",
                        "_updatedAt": "2025-10-06T06:52:40.102Z"
                      },
                      "success": "true"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/authorizationError"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Example": {
                    "value": {
                      "success": "false",
                      "error": "User does not have the permissions required for this action [error-unauthorized]"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "post-api-v1-livechat-custom-fields.save",
        "description": "Create a new Omnichannel custom field or update an existing custom field. You can refer to the <a href='https://docs.rocket.chat/docs/omnichannel-custom-fields' target='_blank'>Omnichannel Custom Fields</a> user guide for details.\n\nPermission required: `view-livechat-manager`\n\n### Changelog\n| Version      | Description |\n| ---------------- | ------------|\n|7.11.0            | Added       |",
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthToken"
          },
          {
            "$ref": "#/components/parameters/UserId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "customFieldData"
                ],
                "properties": {
                  "customFieldId": {
                    "type": "string",
                    "description": "If you want to update an existing custom field, enter the `field` value.",
                    "example": "address"
                  },
                  "customFieldData": {
                    "type": "object",
                    "description": "In this object, provide the custom field data.",
                    "properties": {
                      "field": {
                        "type": "string",
                        "description": "Enter a value for the field.",
                        "example": "address"
                      },
                      "label": {
                        "type": "string",
                        "description": "Enter a label for the field.",
                        "example": "address-line"
                      },
                      "visibility": {
                        "type": "string",
                        "description": "The only options are `hidden` or `visible`. When visible, the custom field is displayed in the contact or room info for agents."
                      },
                      "scope": {
                        "type": "string",
                        "description": "Set the scope of the custom field. The options are: `visitor` and `room`.\r\nRefer to the user guide for details.",
                        "example": "visitor"
                      },
                      "type": {
                        "type": "string",
                        "description": "Set the input type of this field. The options are: `input` and `select`.",
                        "example": "input"
                      },
                      "searchable": {
                        "type": "boolean",
                        "description": "Set whether or not searching in the Omnichannel Contact Center can be done with the custom field."
                      },
                      "regexp": {
                        "type": "string",
                        "description": "Validate the values entered for the custom field using regular expressions. For example, [a-z]. This means that the custom field only accepts lowercase letters. Any other characters will display an error message.",
                        "example": "[a-z]"
                      },
                      "required": {
                        "type": "boolean",
                        "description": "Set whether or not this field should be mandatory."
                      },
                      "defaultValue": {
                        "type": "string",
                        "description": "Enter a default value for the field.",
                        "example": "default"
                      },
                      "options": {
                        "type": "string",
                        "description": "If the field `type` is `select`, enter the options that users can select. The values must be comma-separated.",
                        "example": "optionA, optionB"
                      },
                      "public": {
                        "type": "boolean",
                        "description": "If enabled, the custom field will be displayed in external applications, such as Livechat."
                      }
                    }
                  }
                }
              },
              "examples": {
                "Example 1": {
                  "value": {
                    "customFieldData": {
                      "field": "new1",
                      "label": "new11",
                      "visibility": "true",
                      "scope": "visitor",
                      "type": "select",
                      "searchable": "true",
                      "regexp": "",
                      "required": "false",
                      "defaultValue": "",
                      "options": "optionA, optionB",
                      "public": "true"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "responses": {
      "authorizationError": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            },
            "examples": {
              "Authorization Error": {
                "value": {
                  "status": "error",
                  "message": "You must be logged in to do this."
                }
              }
            }
          }
        }
      }
    },
    "parameters": {
      "AuthToken": {
        "name": "X-Auth-Token",
        "in": "header",
        "description": "The `authToken` of the authenticated user.",
        "required": "true",
        "schema": {
          "type": "string"
        },
        "example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f"
      },
      "UserId": {
        "name": "X-User-Id",
        "in": "header",
        "description": "The `userId` of the authenticated user.",
        "required": "true",
        "schema": {
          "type": "string"
        },
        "example": "rbAXPnMktTFbNpwtJ"
      }
    }
  }
}
````

