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

# List pronunciation rules

> Lists rules in a organization



## OpenAPI

````yaml get /rules
openapi: 3.0.1
info:
  title: BeyondWords REST API
  description: |-
    This is the documentation for the BeyondWords REST API.
              You can use this API to use BeyondWords programmatically.
              You can get your API Key and Project ID for each project in the Project settings tab in the BeyondWords
              <a href="https://dash.beyondwords.io/dashboard">dashboard</a>.
  version: 1.0.0
servers:
  - url: https://api.beyondwords.io/v1
security: []
paths:
  /rules:
    get:
      tags:
        - Rules
      summary: List
      description: Lists rules in a organization
      operationId: rules#index
      parameters:
        - name: pagination[limit]
          in: query
          required: false
          description: '''limit'' sets the number of results to return in each page.'
          schema:
            type: integer
        - name: pagination[offset]
          in: query
          required: false
          description: >-
            'offset' sets the first position to return from the results of the
            query. The default is 0, which starts the page at the first result.
          schema:
            type: integer
        - name: order[by]
          in: query
          schema:
            type: string
            enum:
              - type
              - key
              - value
              - created
          required: false
          description: This is used to order rules by type or key or value
        - name: order[dir]
          in: query
          schema:
            type: string
            enum:
              - asc
              - desc
          required: false
          description: This is used to order analytics in the ascending or descending order
        - name: filter[type]
          in: query
          required: false
          description: filter by rule type
          schema:
            type: string
        - name: filter[preview_status]
          in: query
          required: false
          description: filter by rule preview status
          schema:
            type: string
        - name: filter[key]
          in: query
          required: false
          description: filter by rule key
          schema:
            type: string
        - name: filter[scopes]
          in: query
          style: deepObject
          explode: true
          schema:
            type: object
          description: filter items by scopes
          required: false
        - name: filter[languages][]
          in: query
          schema:
            type: array
            items:
              type: string
          required: false
          description: filter by languages
        - name: filter[voices][]
          in: query
          schema:
            type: array
            items:
              type: integer
          required: false
          description: filter by voices
      responses:
        '200':
          description: OK
          content:
            application/json:
              examples:
                example:
                  $ref: '#/components/examples/rulesExample'
              schema:
                $ref: '#/components/schemas/rulesModel'
          headers:
            X-BeyondWords-Filter:
              description: The filters fields applied (if any).
              schema:
                type: string
              required: false
            X-Pagination-Limit:
              description: |-
                The requested number of results to be returned for this request.
                          The actual number of results returned may be lower.
              schema:
                type: integer
              required: false
            X-Pagination-OffSet:
              description: >-
                The position of the first result in the response (before
                pagination was applied).
              schema:
                type: integer
              required: false
            X-Pagination-Total-Count:
              description: >-
                The total number of results returned for this query (before
                pagination was applied).
              schema:
                type: integer
              required: false
            X-BeyondWords-Order-By:
              description: The ordering field applied (if any).
              schema:
                type: string
              required: false
            X-BeyondWords-Order-Dir:
              description: The ordering direction applied (if any).
              schema:
                type: string
              required: false
        '401':
          description: Invalid authentication token
          content:
            application/json:
              examples:
                example:
                  $ref: '#/components/examples/unauthorizedErrorExample'
              schema:
                $ref: '#/components/schemas/errorModel'
      security:
        - apiKey: []
components:
  examples:
    rulesExample:
      summary: Sample list of rules response
      value:
        - id: 1
          key: CO2
          value: United States of America
          type: Carbon dioxide
          project:
            id: 1
            name: Test project
          content:
            id: d8414aee-4171-419e-be42-bd57e9e2ccd2
            title: >-
              Unveiling the Catastrophic Consequences of Excess Carbon Dioxide
              Emissions
          created: 2023-01-01 00:00:00 UTC
          updated: 2023-01-01 00:00:05 UTC
        - id: 2
          key: Ocasio
          value: oʊˈkɑːsi.oʊ
          type: ipa_transcription
          created: 2023-01-01 00:00:00 UTC
          updated: 2023-01-01 00:00:05 UTC
        - id: 3
          key: NATO
          type: say_as_word
          created: 2023-01-01 00:00:00 UTC
          updated: 2023-01-01 00:00:05 UTC
        - id: 4
          key: IPO
          type: say_as_letter_sequence
          created: 2023-01-01 00:00:00 UTC
          updated: 2023-01-01 00:00:05 UTC
    unauthorizedErrorExample:
      summary: Unauthorized error
      value:
        code: 401
        message: Unauthorized
  schemas:
    rulesModel:
      type: array
      items:
        $ref: '#/components/schemas/ruleModel'
    errorModel:
      type: object
      properties:
        code:
          type: integer
          description: Error code
        message:
          type: string
          description: Error message
        errors:
          type: array
          nullable: true
          items:
            type: object
            properties:
              location:
                type: string
              message:
                type: string
    ruleModel:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier for the rule
        project:
          type: object
          nullable: true
          properties:
            id:
              type: integer
              description: Project ID this rule belongs to
            name:
              type: string
              nullable: true
        content:
          type: object
          nullable: true
          properties:
            id:
              type: string
              description: Content ID this rule is scoped to (if any)
            title:
              type: string
              nullable: true
        type:
          type: string
          description: >-
            The rule type. Possible values are `substitute`, `say_as_word`,
            `say_as_letter_sequence`, `ipa_transcription`,
            `pinyin_transcription`, `jyutping_transcription`. Please note that
            not all voices support all rules
          enum:
            - substitute
            - say_as_word
            - say_as_letter_sequence
            - ipa_transcription
            - pinyin_transcription
            - jyutping_transcription
        preview_status:
          type: string
          enum:
            - processing
            - processed
            - error
          description: Status of preview generation for this rule
        language:
          type: object
          nullable: true
          properties:
            code:
              type: string
              description: Language code (ISO 639-1 with optional region, e.g., en_GB)
            name:
              type: string
              description: Human-readable language name
            accent:
              type: string
              nullable: true
              description: Regional accent variant (if available)
        preview_voice:
          type: object
          nullable: true
          properties:
            id:
              type: integer
              description: Voice ID used for preview generation
            name:
              type: string
              description: Voice display name
        preview_audio:
          type: object
          nullable: true
          properties:
            url:
              type: string
              description: URL to the generated preview audio
            content_type:
              type: string
              description: MIME type of the preview audio
            duration:
              type: number
              description: Duration (seconds) of the preview audio
        key:
          type: string
          description: The exact text to match in content when applying this rule
        value:
          type: string
          nullable: true
          description: Replacement text or phonetic transcription (depending on rule type)
        magic_ipa_used:
          type: boolean
          description: >-
            When true, the Magic IPA feature was used to generate the
            transcription
        created:
          type: string
          description: Time at which the object was created (ISO 8601)
        updated:
          type: string
          description: Time at which the object was updated (ISO 8601)
  securitySchemes:
    apiKey:
      type: apiKey
      name: X-Api-Key
      in: header

````