---
updatedAt: 2025-02-27T21:04:27.000Z
agentTools:
  projectIndex: https://developers.atlas.so/llms.txt
---

# Create custom field

Creates custom field

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Atlas API",
    "description": "Atlas API Documentation",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://api.atlas.so"
    }
  ],
  "paths": {
    "/v1/custom-fields": {
      "post": {
        "tags": [
          "Custom Fields"
        ],
        "summary": "Create custom field",
        "description": "Creates custom field",
        "operationId": "create_api_v1_custom_fields_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExternalCreateCustomField"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalCustomField"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CustomFieldCategory": {
        "type": "string",
        "enum": [
          "account",
          "customer",
          "ticket"
        ],
        "title": "CustomFieldCategory"
      },
      "CustomFieldRule": {
        "properties": {
          "conditions": {
            "additionalProperties": {
              "items": {
                "$ref": "#/components/schemas/CustomFieldRuleCondition"
              },
              "type": "array"
            },
            "propertyNames": {
              "$ref": "#/components/schemas/CustomFieldRuleConditionModeV1"
            },
            "type": "object",
            "title": "Conditions"
          },
          "actions": {
            "additionalProperties": {
              "items": {
                "$ref": "#/components/schemas/CustomFieldRuleCondition"
              },
              "type": "array"
            },
            "propertyNames": {
              "$ref": "#/components/schemas/CustomFieldRuleActionMode"
            },
            "type": "object",
            "title": "Actions"
          }
        },
        "type": "object",
        "required": [
          "conditions",
          "actions"
        ],
        "title": "CustomFieldRule"
      },
      "CustomFieldRuleActionMode": {
        "type": "string",
        "enum": [
          "filter"
        ],
        "title": "CustomFieldRuleActionMode"
      },
      "CustomFieldRuleCondition": {
        "properties": {
          "field": {
            "type": "string",
            "title": "Field"
          },
          "operator": {
            "type": "string",
            "title": "Operator"
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              {
                "items": {
                  "type": "string",
                  "format": "date-time"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          },
          "entity": {
            "type": "string",
            "title": "Entity"
          }
        },
        "type": "object",
        "required": [
          "field",
          "operator",
          "entity"
        ],
        "title": "CustomFieldRuleCondition"
      },
      "CustomFieldRuleConditionModeV1": {
        "type": "string",
        "enum": [
          "all"
        ],
        "title": "CustomFieldRuleConditionModeV1"
      },
      "CustomFieldTypes": {
        "type": "string",
        "enum": [
          "Text",
          "Number",
          "Decimal",
          "Boolean",
          "Date",
          "List",
          "MultiSelect",
          "Agent",
          "Customer",
          "Ticket",
          "Account",
          "URL",
          "Address",
          "DynamicList",
          "DynamicMultiSelect"
        ],
        "title": "CustomFieldTypes"
      },
      "EditableBy": {
        "type": "string",
        "enum": [
          "api",
          "admin",
          "agents"
        ],
        "title": "EditableBy"
      },
      "ExternalCreateCustomField": {
        "properties": {
          "key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Key"
          },
          "companyId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Companyid"
          },
          "displayName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Displayname"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "category": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomFieldCategory"
              },
              {
                "type": "null"
              }
            ],
            "default": "ticket"
          },
          "fieldMetadata": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fieldmetadata"
          },
          "dynamicFieldMetadata": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dynamicfieldmetadata",
            "default": {}
          },
          "type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomFieldTypes"
              },
              {
                "type": "null"
              }
            ],
            "default": "Text"
          },
          "required": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Required"
          },
          "editableBy": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/EditableBy"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Editableby",
            "default": [
              "api"
            ]
          },
          "active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active"
          },
          "rules": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/CustomFieldRule"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rules"
          },
          "dependsOn": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dependson"
          }
        },
        "type": "object",
        "title": "ExternalCreateCustomField"
      },
      "ExternalCustomField": {
        "properties": {
          "updatedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updatedat"
          },
          "createdAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Createdat"
          },
          "key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Key"
          },
          "companyId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Companyid"
          },
          "displayName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Displayname"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "category": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomFieldCategory"
              },
              {
                "type": "null"
              }
            ],
            "default": "ticket"
          },
          "fieldMetadata": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fieldmetadata"
          },
          "dynamicFieldMetadata": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dynamicfieldmetadata",
            "default": {}
          },
          "type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomFieldTypes"
              },
              {
                "type": "null"
              }
            ],
            "default": "Text"
          },
          "required": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Required"
          },
          "editableBy": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/EditableBy"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Editableby",
            "default": [
              "api"
            ]
          },
          "active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active"
          },
          "rules": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/CustomFieldRule"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rules"
          },
          "dependsOn": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dependson"
          },
          "id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          }
        },
        "type": "object",
        "title": "ExternalCustomField"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "HTTPBearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}
```