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

# Create a site custom property

> Define a new custom property for sites of the partner the API key belongs to, the same way "Add property" does in Settings → Custom Properties. `dropdown` and `multi_select` need `options`, given as labels; `defaultValue` then refers to option ids. Names must be unique among the existing properties. Requires the `customProperty:write` scope.



## OpenAPI

````yaml /openapi.yaml post /v1/site/custom-property
openapi: 3.1.0
info:
  title: ProVision Public API
  version: 1.0.0
  description: >-
    Use the ProVision Public API to integrate with ProVision conversations,
    clients, sites, projects, users, labels, and signal incidents. All endpoints
    accept and return JSON, are authenticated with an `x-api-key` header, and
    are scoped to a single partner tenant.
  contact:
    email: help@onevisionresources.com
    name: OneVision Resources Support
  license:
    name: Proprietary
servers:
  - url: https://connect.provisionapp.io
    description: Production
security: []
tags:
  - name: Conversations
    description: >-
      Support conversations: list and read them, create new ones, update status
      and urgency, read messages, post internal notes, and link sites and
      labels.
  - name: Clients
    description: >-
      The people your team supports: list, read, create, and update clients, and
      link them to their sites.
  - name: Sites
    description: >-
      The addresses your team services: list, read, create, and update sites,
      and apply labels.
  - name: Site files
    description: >-
      Documentation attached to a site, such as plans, photos, and manuals:
      list, download, upload, and delete.
  - name: Projects
    description: >-
      Installation projects at a site. Available to partners with access to
      ProVision Projects.
  - name: Users
    description: The platform users on your team, who can be assignees and message senders.
  - name: User groups
    description: >-
      The groups that bundle permissions for platform users: list the public
      groups available to your team.
  - name: Labels
    description: >-
      The public labels your team can apply to conversations, sites, and
      client-site links.
  - name: Signal incidents
    description: >-
      Raised when a conversation pages someone, and open until an agent resolves
      it: list and resolve them.
  - name: System
    description: Service health, for checking that your API key and network path work.
paths:
  /v1/site/custom-property:
    post:
      tags:
        - Sites
      summary: Create a site custom property
      description: >-
        Define a new custom property for sites of the partner the API key
        belongs to, the same way "Add property" does in Settings → Custom
        Properties. `dropdown` and `multi_select` need `options`, given as
        labels; `defaultValue` then refers to option ids. Names must be unique
        among the existing properties. Requires the `customProperty:write`
        scope.
      operationId: createSiteCustomProperty
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomPropertyBody'
      responses:
        '201':
          description: Created site custom property
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomProperty'
              example:
                id: ca_3f9a1c2e7b8d4e5fa6b7c8d9e0f1a2b3
                entity: site
                name: Warranty Tier
                type: dropdown
                options:
                  - id: gold
                    name: Gold
                  - id: silver
                    name: Silver
                  - id: bronze
                    name: Bronze
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - OpenApiKeyAuth: []
components:
  schemas:
    CreateCustomPropertyBody:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          description: Display name. Must be unique among the entity's custom properties.
          example: Warranty Tier
        type:
          type: string
          enum:
            - short_text
            - multi_line_text
            - url
            - number
            - checkbox
            - dropdown
            - multi_select
            - date
            - date_time
          description: Value type the property accepts
          example: dropdown
        options:
          type: array
          items:
            type: string
          description: >-
            Option labels. Required, and non-empty, for `dropdown` and
            `multi_select`, not accepted for other types.
          example:
            - Gold
            - Silver
            - Bronze
        defaultValue:
          anyOf:
            - type: string
            - type: number
            - type: boolean
            - type: array
              items:
                type: string
          description: >-
            Value pre-filled on new records. For `dropdown` an option id, for
            `multi_select` a list of option ids, for `checkbox` a boolean, for
            `number` a number, otherwise a string.
          example: gold
      required:
        - name
        - type
    CustomProperty:
      type: object
      properties:
        id:
          type: string
          description: >-
            Stable id of the property. This is what `customProperties` is keyed
            by on reads and writes — the display name can be renamed, this
            cannot.
          example: ca_warranty_count
        entity:
          $ref: '#/components/schemas/CustomPropertyEntity'
        name:
          type: string
          description: Display name, as configured in ProVision
          example: Warranty count
        type:
          type: string
          description: Value type the property accepts
          example: number
        options:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: Value to send for this option
                example: east
              name:
                type: string
                description: Option label as configured
                example: East
            required:
              - id
              - name
          description: >-
            Selectable options for `dropdown` and `multi_select`; empty for
            every other type
      required:
        - id
        - entity
        - name
        - type
        - options
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
      required:
        - error
    CustomPropertyEntity:
      type: string
      enum:
        - site
        - conversation
        - client
      description: The entity a custom property is defined for
    ApiError:
      type: object
      properties:
        code:
          type: string
          description: Machine-readable error code
          example: NOT_FOUND
        message:
          type: string
          description: Human-readable error description
      required:
        - code
        - message
  securitySchemes:
    OpenApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Send the API key in the x-api-key header.

````

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