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

# Add a custom property to accounts, people or deals.

> Adds the definition of a custom property: its label, its system name and the control
used to fill it in. Only Account, Person and Deal have custom properties; any other
entityType returns 404. Once added, the property's values are read and written under
its SystemName on the accounts, people or deals themselves.
            
- **Label** (required): the name shown in Outseta. It must be unique among the entity
  type's custom properties and must not be the label of a standard property (for
  example Email on a person).
- **SystemName**: the property's name in the API, webhooks and forms. It must start
  with a letter, contain only letters, numbers and _, be unique for the entity type and
  not be the name of a standard property. When left out it is derived from Label the way
  the Outseta app does: Label "Favorite color" gives FavoriteColor.
- **ControlType**: one of Text, TextArea, Number, Date, Checkbox, Select, RadioList,
  CheckboxList. Defaults to Text. Select is a dropdown with one choice, RadioList shows
  the same choice as radio buttons, CheckboxList allows several choices, and Checkbox is
  a single yes/no whose value is True or False.
- **ControlParams**: the control's settings as a JSON object serialized into a string,
  not a nested object. Select, RadioList and CheckboxList need at least one option:
  "{\"Options\":[\"Small\",\"Medium\",\"Large\"]}". Number may set a Step
  ("{\"Step\":0.01}"); Text may set HintText and a Pattern (a regular expression the value
  must match). Other controls need no ControlParams.
            
EntityType comes from the URL; a Uid or EntityType in the request body is ignored.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/attributes/{entityType}/definitions
openapi: 3.0.0
info:
  title: Outseta API
  description: >-
    Outseta REST API. See the [API
    overview](https://docs.outseta.com/api-reference/overview) for
    authentication, field selection, pagination, filtering, errors, rate limits
    and webhooks.
  version: v1
servers:
  - url: https://{subdomain}.outseta.com
    description: Your Outseta account
    variables:
      subdomain:
        default: your-subdomain
        description: >-
          Your Outseta account subdomain — the part before ".outseta.com" in
          your admin URL.
security: []
paths:
  /api/v1/attributes/{entityType}/definitions:
    post:
      tags:
        - Attribute
      summary: Add a custom property to accounts, people or deals.
      description: >-
        Adds the definition of a custom property: its label, its system name and
        the control

        used to fill it in. Only Account, Person and Deal have custom
        properties; any other

        entityType returns 404. Once added, the property's values are read and
        written under

        its SystemName on the accounts, people or deals themselves.
                    
        - **Label** (required): the name shown in Outseta. It must be unique
        among the entity
          type's custom properties and must not be the label of a standard property (for
          example Email on a person).
        - **SystemName**: the property's name in the API, webhooks and forms. It
        must start
          with a letter, contain only letters, numbers and _, be unique for the entity type and
          not be the name of a standard property. When left out it is derived from Label the way
          the Outseta app does: Label "Favorite color" gives FavoriteColor.
        - **ControlType**: one of Text, TextArea, Number, Date, Checkbox,
        Select, RadioList,
          CheckboxList. Defaults to Text. Select is a dropdown with one choice, RadioList shows
          the same choice as radio buttons, CheckboxList allows several choices, and Checkbox is
          a single yes/no whose value is True or False.
        - **ControlParams**: the control's settings as a JSON object serialized
        into a string,
          not a nested object. Select, RadioList and CheckboxList need at least one option:
          "{\"Options\":[\"Small\",\"Medium\",\"Large\"]}". Number may set a Step
          ("{\"Step\":0.01}"); Text may set HintText and a Pattern (a regular expression the value
          must match). Other controls need no ControlParams.
                    
        EntityType comes from the URL; a Uid or EntityType in the request body
        is ignored.
      operationId: Definition_AddDefinition
      parameters:
        - name: entityType
          in: path
          required: true
          description: 'The entity type to add the property to: Account, Person or Deal'
          schema:
            type: string
            nullable: true
          x-position: 1
      requestBody:
        x-name: definition
        description: The custom property to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddDefinitionRequest'
            example:
              Label: T-shirt size
              ControlType: Select
              ControlParams: '{"Options":["Small","Medium","Large"]}'
        x-position: 2
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Definition'
        '400':
          description: >-
            A validation error, for example a Label or SystemName that is taken,
            or a Select without options.
          content:
            application/json:
              schema:
                type: object
                example:
                  ErrorMessage: string
                  EntityValidationErrors:
                    - Entity: {}
                      TypeName: string
                      ValidationErrors: []
                additionalProperties: false
                properties:
                  ErrorMessage:
                    type: string
                    nullable: true
                  EntityValidationErrors:
                    type: array
                    nullable: true
                    items:
                      type: object
                      additionalProperties: false
                      properties:
                        Entity:
                          nullable: true
                        TypeName:
                          type: string
                          nullable: true
                        ValidationErrors:
                          type: array
                          nullable: true
                          items:
                            $ref: '#/components/schemas/FieldValidationError'
                      title: EntityValidationError
                title: ValidationError
        '401':
          description: Unauthorized
        '404':
          description: The entityType is not Account, Person or Deal.
      security:
        - Bearer: []
        - ApiKey: []
components:
  schemas:
    AddDefinitionRequest:
      type: object
      description: >-
        A custom property to add to accounts, people or deals. Only Label is
        required.
      additionalProperties: false
      required:
        - Label
      properties:
        Label:
          type: string
          description: >-
            The name of the property shown in Outseta, for example "T-shirt
            size". Unique among the

            entity type's custom properties, and not the label of a standard
            property.
          minLength: 1
        SystemName:
          type: string
          description: >-
            The name of the property in the API, webhooks and forms, for example
            TShirtSize. Starts

            with a letter and holds only letters, numbers and _. Unique for the
            entity type, and not

            the name of a standard property. Derived from Label when left out.
          pattern: ^[A-Za-z][A-Za-z0-9_]*$
          nullable: true
        ControlType:
          type: string
          description: >-
            The control used to fill in the property: Text (the default),
            TextArea, Number, Date,

            Checkbox (True or False), Select (a dropdown with one choice),
            RadioList (one choice) or

            CheckboxList (several choices).
          nullable: true
        ControlParams:
          type: string
          description: >-
            The control's settings: a JSON object serialized into a string, not
            a nested object.

            Select, RadioList and CheckboxList need their options, for example

            "{\"Options\":[\"Small\",\"Medium\",\"Large\"]}". Number may set a
            Step, for example

            "{\"Step\":0.01}"; Text may set HintText and Pattern (a regular
            expression).
          nullable: true
    Definition:
      example:
        Uid: string
        _objectType: string
        Created: string
        Updated: string
        ActivityEventData: {}
        ControlType: string
        ControlParams: string
        Label: string
        SystemName: string
        EntityType: 0
        Position: 0
        Hidden: false
      allOf:
        - $ref: '#/components/schemas/AbstractQcountBean'
        - type: object
          additionalProperties: false
          properties:
            ControlType:
              type: string
              maxLength: 250
              nullable: true
            ControlParams:
              type: string
              nullable: true
            Label:
              type: string
              nullable: true
            SystemName:
              type: string
              nullable: true
            EntityType:
              $ref: '#/components/schemas/EntityType'
            Position:
              type: integer
              format: int32
              nullable: true
            Hidden:
              type: boolean
    FieldValidationError:
      type: object
      additionalProperties: false
      properties:
        ErrorCode:
          type: string
          nullable: true
        ErrorMessage:
          type: string
          nullable: true
        PropertyName:
          type: string
          nullable: true
    AbstractQcountBean:
      allOf:
        - $ref: '#/components/schemas/AbstractBean'
        - type: object
          additionalProperties: false
          required:
            - Qcount_Id
          properties:
            ActivityEventData:
              nullable: true
    EntityType:
      type: integer
      description: >-
        `0` - None, `1` - Account, `2` - Person, `3` - Deal, `4` - Case, `5` -
        Invoice, `6` - EmailLog, `7` - Plan, `8` - DiscountCoupon, `9` - AddOn,
        `10` - Task, `11` - Segment, `12` - Broadcast, `13` - Article
      x-enumNames:
        - None
        - Account
        - Person
        - Deal
        - Case
        - Invoice
        - EmailLog
        - Plan
        - DiscountCoupon
        - AddOn
        - Task
        - Segment
        - Broadcast
        - Article
      x-enum-descriptions:
        - ''
        - ''
        - ''
        - ''
        - ''
        - ''
        - ''
        - ''
        - ''
        - ''
        - ''
        - ''
        - ''
        - ''
      enum:
        - 0
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 9
        - 10
        - 11
        - 12
        - 13
    AbstractBean:
      type: object
      x-abstract: true
      additionalProperties: false
      required:
        - Id
        - Created
        - CreatedByUser_Id
        - Updated
        - UpdatedByUser_Id
      properties:
        Uid:
          type: string
          maxLength: 10
          nullable: true
        _objectType:
          type: string
          nullable: true
        Created:
          type: string
          readOnly: true
          format: date-time
          minLength: 1
        Updated:
          type: string
          readOnly: true
          format: date-time
          minLength: 1
  securitySchemes:
    Bearer:
      type: http
      description: Enter your access token (OAuth / JWT).
      scheme: bearer
      bearerFormat: JWT
    ApiKey:
      type: apiKey
      description: 'Enter: Outseta {api_key}:{api_secret}'
      name: Authorization
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.