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

# Create Object Attribute

> Add an attribute to a custom object type. Its key and type never change. Returns the object type.



## OpenAPI

````yaml /openapi-v1.json post /api/v1/crm/objects/{type_key}/attributes
openapi: 3.1.0
info:
  title: AGO Public API
  version: 1.0.0
  description: Programmatic access to your AGO workspace.
servers:
  - url: https://{tenant_id}.api.useago.com
    description: AGO Public API v1
    variables:
      tenant_id:
        default: your-tenant-id
        description: Your AGO tenant identifier
security: []
paths:
  /api/v1/crm/objects/{type_key}/attributes:
    post:
      tags:
        - CRM objects
      summary: Create Object Attribute
      description: >-
        Add an attribute to a custom object type. Its key and type never change.
        Returns the object type.
      operationId: create_crm_object_attribute
      parameters:
        - in: path
          name: type_key
          schema:
            title: Type Key
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AttributeCreateIn'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response
                type: object
      security:
        - ScopedAPIKeyAuth: []
components:
  schemas:
    AttributeCreateIn:
      properties:
        label:
          title: Label
          type: string
        attribute_type:
          description: >-
            text, long_text, number, currency, date, timestamp, boolean, select,
            multi_select, status, rating, url, email, phone, domain, user,
            formula or ai
          title: Attribute Type
          type: string
        key:
          anyOf:
            - type: string
            - type: 'null'
          description: Permanent identifier; derived from the label when omitted
          title: Key
        options:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Options
        is_required:
          default: false
          title: Is Required
          type: boolean
        is_unique:
          default: false
          description: No two records may share a value; enables upsert on this attribute
          title: Is Unique
          type: boolean
        formula:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            For a formula attribute: arithmetic over number attributes, e.g.
            seats * price
          title: Formula
        prompt:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            For an AI attribute: what the model must answer about each record;
            options restrict the answer
          title: Prompt
        admin_only:
          default: false
          description: Read and written by the object type's admins only
          title: Admin Only
          type: boolean
        is_sensitive:
          default: false
          description: Never given to the support agent
          title: Is Sensitive
          type: boolean
      required:
        - label
        - attribute_type
      title: AttributeCreateIn
      type: object
  securitySchemes:
    ScopedAPIKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````

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