Kajabi Custom Fields API

The Custom Fields API from Kajabi — 2 operation(s) for custom fields.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

kajabi-custom-fields-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Kajabi API V1 Authentication Custom Fields API
  version: 1.1.0
  description: "## Public API\n* Server URL `https://api.kajabi.com`\n* Endpoint paths are prefixed with `/v1`\n* Version endpoint `GET https://api.kajabi.com/v1/version`\n* See the [Developers Site](https://developers.kajabi.com) for documentation and examples.\n* Try the demo [Postman collection](https://www.postman.com/kajabi-apis/beta-public-api-demo/collection/fg4iyaz/kajabi-public-api-v1)\n## API Keys\n* Your API `client_id` and `client_secret` are available on the [User API Keys](https://app.kajabi.com/admin/settings/security) section of the Kajabi Admin Portal.\n  * Custom API Keys can be created with specific permissions.\n  * Click the \"Create User API Key\" button, enter a name (e.g. \"My project\"), select the user and permissions, and click \"Create\".\n  * For security purposes, you may \"Delete\" or \"Rotate\" the api credentials at any time; which will invalidate any access tokens granted with the credentials.\n## Video Walkthroughs\n* [Capabilities](https://drive.google.com/file/d/1Puc9B2sSdA-RQb7YMxmUXg4FVoEXytoc/view?usp=sharing)\n* [Getting Started](https://drive.google.com/file/d/1hbGRShkxven_QMWvgYrerHKURbcZrnvJ/view?usp=sharing)\n* [Error Examples](https://drive.google.com/file/d/1i0wQK71I1jpaZVsxYwsn62gVj40S_E7Y/view?usp=sharing)\n* [External Contact Form](https://drive.google.com/file/d/1HqpULXvan5TOK3LvM7nILCuCkCaX0kFT/view?usp=sharing)\n"
  contact:
    email: support@kajabi.com
    name: Support
    url: https://help.kajabi.com/hc/en-us/articles/4404549690523-How-to-Get-Help-From-Kajabi-Live-Agents
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
- url: https://api.kajabi.com
  description: Production
tags:
- name: Custom Fields
paths:
  /v1/custom_fields:
    get:
      summary: List custom fields
      description: "## Custom Field attributes\nThe 'handle' attribute may be used as a key for a contact resource, e.g. custom_1, custom_2, custom_3\n## Pagination\nUse `page[number]` and `page[size]` parameters to paginate results:\n### Get first page of 10 items\n* `GET /v1/custom_fields?page[number]=1&page[size]=10`\n### Get second page of 25 items\n* `GET /v1/custom_fields?page[number]=2&page[size]=25`\n\nThe response includes pagination links and meta data:\n```json\n{\n  \"links\": {\n    \"self\": \"https://app.kajabi.com/api/v1/custom_fields?page[number]=2&page[size]=10\",\n    \"first\": \"https://app.kajabi.com/api/v1/custom_fields?page[number]=1&page[size]=10\",\n    \"prev\": \"https://app.kajabi.com/api/v1/custom_fields?page[number]=1&page[size]=10\",\n    \"next\": \"https://app.kajabi.com/api/v1/custom_fields?page[number]=3&page[size]=10\",\n    \"last\": \"https://app.kajabi.com/api/v1/custom_fields?page[number]=5&page[size]=10\"\n  },\n  \"meta\": {\n    \"total_pages\": 5,\n    \"total_count\": 50,\n    \"current_page\": 2\n  }\n}\n```\n## Filter by Site ID\nUse the `filter[site_id]` parameter to get custom fields for a specific site:\n### Get custom fields for site with ID 123\n* `GET /v1/custom_fields?filter[site_id]=123`\n\nResponse will only include custom fields for that site\n```json\n{\n  \"data\": [\n    {\n      \"id\": \"123\",\n      \"type\": \"custom_fields\",\n      \"attributes\": {\n        \"handle\": \"custom_1\",\n        \"title\": \"Favorite Song\",\n        \"type\": \"TextField\",\n        \"required\": false\n      },\n      \"relationships\": {\n        \"site\": {\n          \"data\": {\n            \"id\": \"123\",\n            \"type\": \"sites\"\n          }\n        }\n      }\n    }\n  ]\n}\n```\n## Sorting\nUse the `sort` parameter to sort the results:\n### Sort by title in ascending order\n* `GET /v1/custom_fields?sort=title`\n### Sort by title in descending order\n* `GET /v1/custom_fields?sort=-title`\n## Filter by Title Contains\nUse the `filter[title_cont]` parameter to find custom fields where the title contains specific text:\n### Get custom fields with titles containing \"favorite\"\n* `GET /v1/custom_fields?filter[title_cont]=favorite`\n\nResponse will include custom fields with matching titles\n```json\n{\n  \"data\": [{\n    \"id\": \"123\",\n    \"type\": \"custom_fields\",\n    \"attributes\": {\n      \"handle\": \"custom_1\",\n      \"title\": \"Favorite Song\",\n      \"type\": \"TextField\",\n      \"required\": false\n    }\n  },\n  {\n    \"id\": \"456\",\n    \"type\": \"custom_fields\",\n    \"attributes\": {\n      \"handle\": \"custom_2\",\n      \"title\": \"Favorite Movie\",\n      \"type\": \"TextField\",\n      \"required\": false\n    }\n  }]\n}\n```\n## Filter by Required Field\nUse the `filter[required_eq]` parameter to find custom fields based on their required status:\n### Get custom fields that are required\n* `GET /v1/custom_fields?filter[required_eq]=true`\n\nResponse will include custom fields that are required\n```json\n{\n  \"data\": [{\n    \"id\": \"123\",\n    \"type\": \"custom_fields\",\n    \"attributes\": {\n      \"handle\": \"custom_1\",\n      \"title\": \"Phone Number\",\n      \"type\": \"TextField\",\n      \"required\": true\n    }\n  }]\n}\n```\n## Using Multiple Parameters Together\nYou can combine pagination, sorting, sparse fields and filtering in a single request:\n### Get page 2 of custom fields for site 123, sorted by title descending, including only handle and title fields\n* `GET /v1/custom_fields?page[number]=2&page[size]=10&sort=-title&filter[site_id]=123&fields[custom_fields]=handle,title`\n\nResponse will include paginated and filtered custom fields with sparse fields\n```json\n{\n  \"data\": [\n    {\n      \"id\": \"456\",\n      \"type\": \"custom_fields\",\n      \"attributes\": {\n        \"handle\": \"custom_2\",\n        \"title\": \"Favorite Movie\"\n      },\n      \"relationships\": {\n        \"site\": {\n          \"data\": {\n            \"id\": \"123\",\n            \"type\": \"sites\"\n          }\n        }\n      }\n    }\n  ],\n  \"links\": {\n    \"self\": \"https://app.kajabi.com/api/v1/custom_fields?page[number]=2&page[size]=10&sort=-title&filter[site_id]=123&fields[custom_fields]=handle,title\",\n    \"first\": \"https://app.kajabi.com/api/v1/custom_fields?page[number]=1&page[size]=10&sort=-title&filter[site_id]=123&fields[custom_fields]=handle,title\",\n    \"prev\": \"https://app.kajabi.com/api/v1/custom_fields?page[number]=1&page[size]=10&sort=-title&filter[site_id]=123&fields[custom_fields]=handle,title\",\n    \"next\": null,\n    \"last\": \"https://app.kajabi.com/api/v1/custom_fields?page[number]=2&page[size]=10&sort=-title&filter[site_id]=123&fields[custom_fields]=handle,title\"\n  },\n  \"meta\": {\n    \"total_pages\": 2,\n    \"total_count\": 15,\n    \"current_page\": 2\n  }\n}\n```\n"
      tags:
      - Custom Fields
      security:
      - Bearer: []
      parameters:
      - name: sort
        in: query
        required: false
        description: 'Sort order, use: title, handle, type, required for descending order use ''-'' e.g. &sort=-title'
        schema:
          type: string
      - name: page[number]
        in: query
        required: false
        schema:
          type: number
      - name: page[size]
        in: query
        required: false
        description: Number of documents
        schema:
          type: number
      - name: fields[custom_fields]
        in: query
        required: false
        description: Partial attributes as specified, e.g. fields[custom_fields]=handle,title,required
        schema:
          type: string
      - name: filter[site_id]
        in: query
        required: false
        description: Filter by site_id, for example ?filter[site_id]=111
        schema:
          type: string
      - name: filter[title_cont]
        in: query
        required: false
        description: Filter by title contains, for example ?filter[title_cont]=favorite
        schema:
          type: string
      - name: filter[type_eq]
        in: query
        required: false
        description: Filter by field type equals, for example ?filter[type_eq]=TextField
        schema:
          type: string
      - name: filter[required_eq]
        in: query
        required: false
        description: Filter by required field equals, for example ?filter[required_eq]=true
        schema:
          type: string
      responses:
        '200':
          description: Success, list of custom fields which the current user may access
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/custom_fields_index_response'
        '401':
          description: Unauthorized, Authorization header is missing or invalid
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/errors_unauthorized'
        '403':
          description: Forbidden, insufficient permission to access the resource
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/errors_forbidden'
  /v1/custom_fields/{id}:
    get:
      summary: Custom field details
      description: "## Custom Field attributes\n* `handle` (string) - The key for a `contact` resource, e.g. `custom_1`, `custom_2`, `custom_3`\n* `title` (string) - The title of the custom field\n* `type` (string) - The type of the custom field\n* `required` (boolean) - Whether the custom field is required\n* `archived` (boolean) - Whether the custom field is archived\n## Sparse Fields\nUse the `fields[custom_fields]` parameter to include only specific attributes:\n### Include only handle and title fields\n* `GET /v1/custom_fields/123?fields[custom_fields]=handle,title`\n\nResponse will include only the specified fields\n```json\n{\n  \"data\": {\n    \"id\": \"123\",\n    \"type\": \"custom_fields\",\n    \"attributes\": {\n      \"handle\": \"custom_1\",\n      \"title\": \"Favorite Song\"\n    }\n  }\n}\n```\n"
      tags:
      - Custom Fields
      security:
      - Bearer: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: fields[custom_fields]
        in: query
        required: false
        description: Partial attributes as specified, e.g. fields[custom_fields]=title,handle
        schema:
          type: string
      responses:
        '200':
          description: Success, shows details of a custom field
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/custom_fields_show_response'
        '401':
          description: Unauthorized, Authorization header is missing or invalid
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/errors_unauthorized'
        '403':
          description: Forbidden, insufficient permission to access the resource
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/errors_forbidden'
components:
  schemas:
    custom_fields_attributes:
      type: object
      properties:
        title:
          type: string
        handle:
          type: string
        type:
          type: string
        required:
          type: boolean
    custom_fields_index_response:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              type:
                type: string
              attributes:
                $ref: '#/components/schemas/custom_fields_attributes'
              relationships:
                type: object
                properties:
                  site:
                    type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/resource_identifier'
        links:
          type: object
          properties:
            self:
              type: string
            current:
              type: string
    resource_identifier:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
      required:
      - id
      - type
    errors_attributes:
      type: object
      properties:
        status:
          type: string
        source:
          type: object
          nullable: true
          properties:
            pointer:
              type: string
        title:
          type: string
        detail:
          type: string
    custom_fields_show_response:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
            type:
              type: string
            attributes:
              $ref: '#/components/schemas/custom_fields_attributes'
            relationships:
              type: object
              properties:
                site:
                  type: object
                  properties:
                    data:
                      $ref: '#/components/schemas/resource_identifier'
        links:
          type: object
          properties:
            self:
              type: string
            current:
              type: string
    errors_unauthorized:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/errors_attributes'
    errors_forbidden:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/errors_attributes'
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
x-mint:
  mcp:
    enabled: true