> ## 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 Link Type

> Create a link type between two object types, at least one of them custom
(e.g. subscription -> company, many_to_one).



## OpenAPI

````yaml /openapi-v1.json post /api/v1/crm/link-types
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/link-types:
    post:
      tags:
        - CRM objects
      summary: Create Link Type
      description: |-
        Create a link type between two object types, at least one of them custom
        (e.g. subscription -> company, many_to_one).
      operationId: create_crm_link_type
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LinkTypeIn'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response
                type: object
      security:
        - ScopedAPIKeyAuth: []
components:
  schemas:
    LinkTypeIn:
      properties:
        source_type:
          description: Key of the object type the link starts from
          title: Source Type
          type: string
        target_type:
          description: Key of the object type the link points to
          title: Target Type
          type: string
        cardinality:
          default: many_to_one
          description: >-
            many_to_one (each source record has one target), one_to_one or
            many_to_many
          title: Cardinality
          type: string
        key:
          anyOf:
            - type: string
            - type: 'null'
          title: Key
        source_label:
          anyOf:
            - type: string
            - type: 'null'
          description: How the link reads on a source record, e.g. Company
          title: Source Label
        target_label:
          anyOf:
            - type: string
            - type: 'null'
          description: How the link reads on a target record, e.g. Subscriptions
          title: Target Label
      required:
        - source_type
        - target_type
      title: LinkTypeIn
      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.