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

# Get Popular Templates

> **GET /defaultsettings/templates/popular**

## Description

**GET /defaultsettings/templates/popular**

**Description:**
Retrieve the most frequently used templates, sorted by usage count.

**Method:**
`GET`

**Query Parameters:**

| Parameter | Type    | Description                     | Required |
| --------- | ------- | ------------------------------- | -------- |
| category  | string  | Filter by category              | No       |
| limit     | integer | Number of results (default: 10) | No       |

## Code Examples

<CodeGroup>
  ```javascript Node.js theme={null}
  const response = await fetch('https://api.royalti.io/defaultsettings/templates/popular', {
    method: 'GET',
  });

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
    'https://api.royalti.io/defaultsettings/templates/popular',
  )

  data = response.json()
  print(data)
  ```

  ```bash cURL theme={null}
  curl -X GET https://api.royalti.io/defaultsettings/templates/popular \

  ```
</CodeGroup>


## OpenAPI

````yaml get /defaultsettings/templates/popular
openapi: 3.0.0
info:
  title: Royalti.io API
  description: "# Royalti API\r\n\r\nThis is the Royalti music royalty management platform API server.\r\n\r\n## Overview\r\n\r\nThe Royalti API provides comprehensive music royalty management services including:\r\n- Music publishing and writer management\r\n- Royalty processing and analytics\r\n- DDEX integration for music industry standards\r\n- File processing and pattern recognition\r\n- Payment processing and distribution\r\n\r\n## Authentication\r\n\r\nThe API uses JWT-based authentication with multiple protection levels:\r\n- Public endpoints for basic operations\r\n- Protected endpoints requiring valid JWT tokens\r\n- Admin endpoints for administrative functions\r\n\r\n## Features\r\n\r\n- Multi-dimensional royalty analytics\r\n- CWR (Collective Works Registration) support\r\n- DDEX integration for music metadata\r\n- Advanced file processing with pattern recognition\r\n- Real-time data processing with queue system"
  version: 2.6.0
  contact:
    name: Royalti.io Support
    email: support@royalti.io
    url: https://royalti.io
  license:
    name: Proprietary
    url: https://royalti.io/terms
servers:
  - url: https://api.royalti.io
    description: Production server
  - url: https://api-dev.royalti.io
    description: Development server
  - url: http://localhost:8084
    description: Local development
security:
  - bearerAuth: []
tags:
  - name: Accounting
    description: Accounting and financial transaction operations
  - name: DDEX
    description: DDEX operations (ERN/MEAD, messages, delivery, providers)
  - name: Label
    description: Label management operations
  - name: Internal Webhooks
    description: Internal system webhooks for royalty processing and downloads
  - name: Payment Webhooks
    description: Payment processor webhook endpoints
  - name: Billing Webhooks
    description: Stripe billing and subscription webhooks
  - name: Infrastructure Webhooks
    description: Cloudflare domain and SSL webhooks
  - name: Distribution Webhooks
    description: Digital distribution platform webhooks (FUGA)
paths:
  /defaultsettings/templates/popular:
    get:
      tags:
        - Templates
      summary: Get Popular Templates
      description: |-
        **GET /defaultsettings/templates/popular**

        **Description:**
        Retrieve the most frequently used templates, sorted by usage count.

        **Method:**
        `GET`

        **Query Parameters:**

        | Parameter | Type | Description | Required |
        | --- | --- | --- | --- |
        | category | string | Filter by category | No |
        | limit | integer | Number of results (default: 10) | No |
      parameters:
        - name: category
          in: query
          schema:
            type: string
            enum:
              - content
              - business
              - ddex
              - validation
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 50
            default: 10
      responses:
        '200':
          description: Popular templates retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Popular templates retrieved successfully
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/DefaultSettingTemplate'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    DefaultSettingTemplate:
      type: object
      description: A reusable template for default settings
      required:
        - id
        - name
        - category
        - entityType
        - settings
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the template
        name:
          type: string
          description: Template name
        description:
          type: string
          nullable: true
          description: Template description
        category:
          type: string
          enum:
            - content
            - business
            - ddex
            - validation
          description: Category of settings in this template
        entityType:
          type: string
          enum:
            - catalog
            - asset
            - product
            - release
          description: Type of entity this template is designed for
        settings:
          $ref: '#/components/schemas/DefaultSettingsData'
        isPublic:
          type: boolean
          default: true
          description: Whether this template is publicly accessible
        isSystem:
          type: boolean
          default: false
          description: Whether this is a system-provided template
        usageCount:
          type: integer
          default: 0
          description: Number of times this template has been applied
        tags:
          type: array
          items:
            type: string
          description: Tags for categorizing/searching templates
        createdBy:
          type: string
          format: uuid
          nullable: true
          description: User who created this template
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    DefaultSettingsData:
      type: object
      description: The actual settings data organized by category
      properties:
        content:
          type: object
          description: Content-related default settings
          properties:
            type:
              type: string
              enum:
                - Audio
                - Video
                - Ringtone
                - YouTube
              description: Media type
            format:
              type: string
              enum:
                - Single
                - EP
                - Album
                - LP
              description: Release format
            version:
              type: string
              description: Version information (e.g., "Deluxe Edition", "Remastered")
            explicit:
              type: string
              enum:
                - explicit
                - clean
              description: Explicit content flag
            language:
              type: string
              description: Primary language (ISO 639-1 code)
            mainGenre:
              type: array
              items:
                type: string
              description: Primary genre classifications
            subGenre:
              type: array
              items:
                type: string
              description: Secondary genre classifications
            contributors:
              type: object
              additionalProperties:
                type: array
                items:
                  type: string
              description: >-
                Contributors mapped by role (key: role name, value: array of
                contributor names)
        business:
          type: object
          description: Business-related default settings
          properties:
            label:
              type: string
              description: Record label name
            copyright:
              type: string
              description: Copyright notice (e.g., "© 2024 Label Name")
            publisher:
              type: string
              description: Music publisher name
            copyrightOwner:
              type: string
              description: Copyright owner/holder
            distribution:
              type: string
              description: Distribution method or partner
            status:
              type: string
              enum:
                - Live
                - Taken Down
                - Scheduled
                - Pending
                - Error
              description: Default release status
        ddex:
          type: object
          description: DDEX-specific default settings
          properties:
            enableDDEX:
              type: boolean
              description: Enable DDEX message generation
            labelName:
              type: string
              description: Label name for DDEX messages
            resourceReference:
              type: string
              description: Default resource reference pattern
            grid:
              type: string
              description: Global Release Identifier (GRid)
            icpn:
              type: string
              description: International Catalog Product Number
        validation:
          type: object
          description: Validation rules
          properties:
            requireGenre:
              type: boolean
              description: Require genre selection
            requireLyrics:
              type: boolean
              description: Require lyrics for tracks
            requireDescription:
              type: boolean
              description: Require description field
            minimumTrackCount:
              type: integer
              minimum: 0
              description: Minimum number of tracks
            maximumTrackCount:
              type: integer
              minimum: 1
              description: Maximum number of tracks
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: error
              message:
                type: string
                example: Unauthorized
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: error
              message:
                type: string
                example: Internal server error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT Authorization header using the Bearer scheme. Format: "Bearer
        {token}"

````