Loops Contact properties API

Create and list the custom properties available on contacts. 2 operation(s) in the Loops REST API v1 (OpenAPI 1.21.6).

OpenAPI Specification

loops-contact-properties-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Loops OpenAPI Spec Contact properties API
  description: This is the OpenAPI Spec for the [Loops API](https://loops.so/docs/api).
  version: 1.21.6
servers:
- url: https://app.loops.so/api/v1
tags:
- name: Contact properties
  description: Manage contact properties
paths:
  /contacts/properties:
    post:
      operationId: createContactProperty
      tags:
      - Contact properties
      summary: Create a contact property
      description: Create a custom contact property.
      x-mint:
        href: /api-reference/create-contact-property
        metadata:
          sidebarTitle: Create property
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContactPropertyCreateRequest'
        required: true
      responses:
        '200':
          description: Successful create.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactPropertySuccessResponse'
        '400':
          description: Bad request (e.g. invalid type).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactPropertyFailureResponse'
        '405':
          description: Wrong HTTP request method.
      security:
      - apiKey: []
    get:
      operationId: listContactProperties
      tags:
      - Contact properties
      summary: List contact properties
      description: Retrieve a list of your account's contact properties.<br>Use the `list` parameter to query "all" or "custom" properties.
      x-mint:
        href: /api-reference/list-contact-properties
        metadata:
          sidebarTitle: List properties
          description: Retrieve a list of your account's contact properties.
      parameters:
      - name: list
        in: query
        required: false
        description: '`all` (default) or `custom` (only custom contact properties)'
        schema:
          type: string
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ContactProperty'
        '405':
          description: Wrong HTTP request method.
      security:
      - apiKey: []
components:
  schemas:
    ContactProperty:
      type: object
      properties:
        key:
          type: string
          description: The key of the contact property.
        label:
          type: string
          description: The human-friendly label for this property.
        type:
          type: string
          description: The type of property.
          enum:
          - string
          - number
          - boolean
          - date
      examples:
      - key: favoriteColor
        label: Favorite color
        type: string
      required:
      - key
      - label
      - type
    ContactPropertyCreateRequest:
      type: object
      required:
      - name
      - type
      description: There are a few [reserved names](https://loops.so/docs/contacts/properties#reserved-names) that you cannot use for contact properties.
      properties:
        name:
          type: string
          examples:
          - favoriteColor
          description: The name of the property. This should be in camelCase, like `planName` or `importDate`.
        type:
          type: string
          examples:
          - string
          description: The type of property.
          enum:
          - string
          - number
          - boolean
          - date
      examples:
      - name: favoriteColor
        type: string
    ContactPropertyFailureResponse:
      type: object
      properties:
        success:
          type: boolean
          examples:
          - false
        message:
          type: string
          examples:
          - Property already exists.
      required:
      - success
      - message
      examples:
      - success: false
        message: Property already exists.
    ContactPropertySuccessResponse:
      type: object
      properties:
        success:
          type: boolean
          examples:
          - true
      required:
      - success
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer