Merge subpackage_customRegexRules API

The subpackage_customRegexRules API from Merge — 4 operation(s) for subpackage_customregexrules.

Documentation

Specifications

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-schema/hris-api-employee-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-structure/hris-api-employee-structure.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-schema/ats-api-candidate-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-schema/ats-api-application-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-structure/ats-api-candidate-structure.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-schema/accounting-api-invoice-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-structure/accounting-api-invoice-structure.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-schema/ticketing-api-ticket-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-structure/ticketing-api-ticket-structure.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-schema/crm-api-opportunity-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-structure/crm-api-opportunity-structure.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-schema/file-storage-api-file-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-structure/file-storage-api-file-structure.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-schema/knowledge-base-api-article-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-structure/knowledge-base-api-article-structure.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-schema/chat-api-message-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-structure/chat-api-message-structure.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-schema/agent-handler-tool-pack-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-structure/agent-handler-tool-pack-structure.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-schema/gateway-response-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-structure/gateway-response-structure.json

Other Resources

🔗
Website
https://www.merge.dev/categories/hr-payroll-api
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-ld/merge-hris-api-context.jsonld
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/examples/hris-api-employee-example.json
🔗
Website
https://www.merge.dev/categories/ats-recruiting-api
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-ld/merge-ats-api-context.jsonld
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/examples/ats-api-candidate-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/examples/ats-api-application-example.json
🔗
Website
https://www.merge.dev/categories/accounting-api
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-ld/merge-accounting-api-context.jsonld
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/examples/accounting-api-invoice-example.json
🔗
Website
https://www.merge.dev/categories/ticketing-api
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-ld/merge-ticketing-api-context.jsonld
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/examples/ticketing-api-ticket-example.json
🔗
Website
https://www.merge.dev/categories/crm-api
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-ld/merge-crm-api-context.jsonld
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/examples/crm-api-opportunity-example.json
🔗
Website
https://www.merge.dev/categories/file-storage-api
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-ld/merge-file-storage-api-context.jsonld
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/examples/file-storage-api-file-example.json
🔗
Website
https://www.merge.dev/categories/knowledge-base
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-ld/merge-knowledge-base-api-context.jsonld
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/examples/knowledge-base-api-article-example.json
🔗
Website
https://www.merge.dev/categories/chat
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-ld/merge-chat-api-context.jsonld
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/examples/chat-api-message-example.json
🔗
Website
https://www.merge.dev/merge-agent-handler
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-ld/merge-agent-handler-context.jsonld
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/examples/agent-handler-tool-pack-example.json
🔗
Support
https://help.ah.merge.dev/
🔗
Website
https://www.merge.dev/gateway
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/json-ld/merge-gateway-context.jsonld
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/merge/refs/heads/main/examples/gateway-response-example.json

OpenAPI Specification

merge-subpackage-customregexrules-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Accounting subpackage_customRegexRules API
  version: 1.0.0
servers:
- url: https://api.merge.dev/api
- url: https://api-eu.merge.dev/api
- url: https://api-ap.merge.dev/api
tags:
- name: subpackage_customRegexRules
paths:
  /api/v1/security/custom-regex-rules/:
    get:
      operationId: list-custom-regex-rules
      summary: List custom regex rules
      description: Returns all custom regex rules for the organization.
      tags:
      - subpackage_customRegexRules
      parameters:
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        schema:
          type: integer
      - name: page_size
        in: query
        description: Number of results to return per page.
        required: false
        schema:
          type: integer
      - name: Authorization
        in: header
        description: Token-based authentication with required prefix "Bearer"
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedCustomRegexRuleResponseList'
    post:
      operationId: create-custom-regex-rule
      summary: Create custom regex rule
      description: Create a new custom regex rule for the organization.
      tags:
      - subpackage_customRegexRules
      parameters:
      - name: Authorization
        in: header
        description: Token-based authentication with required prefix "Bearer"
        required: true
        schema:
          type: string
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomRegexRuleResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomRegexRuleCreateInput'
  /api/v1/security/custom-regex-rules/{rule_id}/:
    get:
      operationId: get-custom-regex-rule
      summary: Get custom regex rule
      description: Retrieve a single custom regex rule by ID.
      tags:
      - subpackage_customRegexRules
      parameters:
      - name: rule_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: Authorization
        in: header
        description: Token-based authentication with required prefix "Bearer"
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomRegexRuleResponse'
    delete:
      operationId: delete-custom-regex-rule
      summary: Delete custom regex rule
      description: Delete a custom regex rule.
      tags:
      - subpackage_customRegexRules
      parameters:
      - name: rule_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: Authorization
        in: header
        description: Token-based authentication with required prefix "Bearer"
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
    patch:
      operationId: update-custom-regex-rule
      summary: Update custom regex rule
      description: Update a custom regex rule. Name cannot be changed after creation.
      tags:
      - subpackage_customRegexRules
      parameters:
      - name: rule_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: Authorization
        in: header
        description: Token-based authentication with required prefix "Bearer"
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomRegexRuleResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedCustomRegexRuleUpdateInput'
  /api/v1/tool-packs/{tool_pack_id}/custom-regex-rules/:
    get:
      operationId: list-custom-regex-rules-tool-pack
      summary: List custom regex rules (Tool Pack)
      description: Returns custom regex rules for a tool pack, including organization defaults. Tool-pack-level rules take precedence where both exist.
      tags:
      - subpackage_customRegexRules
      parameters:
      - name: tool_pack_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: defined_at
        in: query
        description: 'Filter by where the rule is defined. Values: ORGANIZATION, TOOL_PACK.'
        required: false
        schema:
          type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        schema:
          type: integer
      - name: page_size
        in: query
        description: Number of results to return per page.
        required: false
        schema:
          type: integer
      - name: Authorization
        in: header
        description: Token-based authentication with required prefix "Bearer"
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedPublicCombinedCustomRegexRuleList'
    post:
      operationId: create-custom-regex-rule-tool-pack
      summary: Create custom regex rule (Tool Pack)
      description: Create a custom regex rule for a tool pack. If name matches an org rule, creates an override.
      tags:
      - subpackage_customRegexRules
      parameters:
      - name: tool_pack_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: Authorization
        in: header
        description: Token-based authentication with required prefix "Bearer"
        required: true
        schema:
          type: string
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicCombinedCustomRegexRule'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomRegexOverrideCreateInput'
  /api/v1/tool-packs/{tool_pack_id}/custom-regex-rules/{rule_id}/:
    get:
      operationId: get-custom-regex-rule-tool-pack
      summary: Get custom regex rule (Tool Pack)
      description: Retrieve a single custom regex rule for a tool pack by ID.
      tags:
      - subpackage_customRegexRules
      parameters:
      - name: rule_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: tool_pack_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: Authorization
        in: header
        description: Token-based authentication with required prefix "Bearer"
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicCombinedCustomRegexRule'
    delete:
      operationId: delete-custom-regex-rule-tool-pack
      summary: Delete custom regex rule (Tool Pack)
      description: Delete a custom regex rule override (reverts to org default) or permanently delete a tool-pack-only rule.
      tags:
      - subpackage_customRegexRules
      parameters:
      - name: rule_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: tool_pack_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: Authorization
        in: header
        description: Token-based authentication with required prefix "Bearer"
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
    patch:
      operationId: update-custom-regex-rule-tool-pack
      summary: Update custom regex rule (Tool Pack)
      description: Update a custom regex rule for a tool pack. Name cannot be changed after creation.
      tags:
      - subpackage_customRegexRules
      parameters:
      - name: rule_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: tool_pack_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: Authorization
        in: header
        description: Token-based authentication with required prefix "Bearer"
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicCombinedCustomRegexRule'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedToolPackCustomRegexOverride'
components:
  schemas:
    PatchedCustomRegexRuleUpdateInputOutboundAction:
      type: string
      enum:
      - BLOCK
      - REDACT
      - LOG
      - NONE
      description: '* `BLOCK` - BLOCK

        * `REDACT` - REDACT

        * `LOG` - LOG

        * `NONE` - NONE'
      title: PatchedCustomRegexRuleUpdateInputOutboundAction
    PatchedToolPackCustomRegexOverrideOutboundAction:
      type: string
      enum:
      - BLOCK
      - REDACT
      - LOG
      - NONE
      description: '* `BLOCK` - BLOCK

        * `REDACT` - REDACT

        * `LOG` - LOG

        * `NONE` - NONE'
      title: PatchedToolPackCustomRegexOverrideOutboundAction
    PatchedToolPackCustomRegexOverrideInboundAction:
      type: string
      enum:
      - BLOCK
      - REDACT
      - LOG
      - NONE
      description: '* `BLOCK` - BLOCK

        * `REDACT` - REDACT

        * `LOG` - LOG

        * `NONE` - NONE'
      title: PatchedToolPackCustomRegexOverrideInboundAction
    CustomRegexRuleCreateInputOutboundAction:
      type: string
      enum:
      - BLOCK
      - REDACT
      - LOG
      - NONE
      default: REDACT
      description: '* `BLOCK` - BLOCK

        * `REDACT` - REDACT

        * `LOG` - LOG

        * `NONE` - NONE'
      title: CustomRegexRuleCreateInputOutboundAction
    CustomRegexRuleCreateInput:
      type: object
      properties:
        name:
          type: string
        regex:
          type: string
        score:
          type: number
          format: double
          default: 0.5
        inbound_action:
          $ref: '#/components/schemas/CustomRegexRuleCreateInputInboundAction'
          description: '* `BLOCK` - BLOCK

            * `REDACT` - REDACT

            * `LOG` - LOG

            * `NONE` - NONE'
        outbound_action:
          $ref: '#/components/schemas/CustomRegexRuleCreateInputOutboundAction'
          description: '* `BLOCK` - BLOCK

            * `REDACT` - REDACT

            * `LOG` - LOG

            * `NONE` - NONE'
        context_keywords:
          type: array
          items:
            type: string
      required:
      - name
      - regex
      description: 'Shared field validators for create and update input serializers.


        The presidio validate_* functions raise RequestValidationError (a DRF APIException),

        which bypasses the serializer''s field error mapping. We catch and re-raise as

        serializers.ValidationError so errors are attributed to the correct field.'
      title: CustomRegexRuleCreateInput
    PatchedToolPackCustomRegexOverride:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        is_active:
          type: boolean
        regex:
          type: string
        score:
          type: number
          format: double
        context_keywords:
          description: Any type
        inbound_action:
          $ref: '#/components/schemas/PatchedToolPackCustomRegexOverrideInboundAction'
          description: '* `BLOCK` - BLOCK

            * `REDACT` - REDACT

            * `LOG` - LOG

            * `NONE` - NONE'
        outbound_action:
          $ref: '#/components/schemas/PatchedToolPackCustomRegexOverrideOutboundAction'
          description: '* `BLOCK` - BLOCK

            * `REDACT` - REDACT

            * `LOG` - LOG

            * `NONE` - NONE'
        created_at:
          type: string
          format: date-time
        modified_at:
          type: string
          format: date-time
      description: Rejects requests that explicitly set defined_at to ORGANIZATION in tool pack endpoints.
      title: PatchedToolPackCustomRegexOverride
    CustomRegexRuleCreateInputInboundAction:
      type: string
      enum:
      - BLOCK
      - REDACT
      - LOG
      - NONE
      default: REDACT
      description: '* `BLOCK` - BLOCK

        * `REDACT` - REDACT

        * `LOG` - LOG

        * `NONE` - NONE'
      title: CustomRegexRuleCreateInputInboundAction
    CustomRegexOverrideCreateInput:
      type: object
      properties:
        name:
          type: string
        regex:
          type: string
        score:
          type: number
          format: double
        context_keywords:
          description: Any type
        is_active:
          type: boolean
        inbound_action:
          $ref: '#/components/schemas/CustomRegexOverrideCreateInputInboundAction'
          description: '* `BLOCK` - BLOCK

            * `REDACT` - REDACT

            * `LOG` - LOG

            * `NONE` - NONE'
        outbound_action:
          $ref: '#/components/schemas/CustomRegexOverrideCreateInputOutboundAction'
          description: '* `BLOCK` - BLOCK

            * `REDACT` - REDACT

            * `LOG` - LOG

            * `NONE` - NONE'
      required:
      - name
      - regex
      - score
      - context_keywords
      - is_active
      - inbound_action
      - outbound_action
      description: Input serializer for POST /tool-packs/<id>/custom-regex-rules/.
      title: CustomRegexOverrideCreateInput
    CustomRegexOverrideCreateInputOutboundAction:
      type: string
      enum:
      - BLOCK
      - REDACT
      - LOG
      - NONE
      description: '* `BLOCK` - BLOCK

        * `REDACT` - REDACT

        * `LOG` - LOG

        * `NONE` - NONE'
      title: CustomRegexOverrideCreateInputOutboundAction
    CustomRegexOverrideCreateInputInboundAction:
      type: string
      enum:
      - BLOCK
      - REDACT
      - LOG
      - NONE
      description: '* `BLOCK` - BLOCK

        * `REDACT` - REDACT

        * `LOG` - LOG

        * `NONE` - NONE'
      title: CustomRegexOverrideCreateInputInboundAction
    CustomRegexRuleResponseOutboundAction:
      type: string
      enum:
      - BLOCK
      - REDACT
      - LOG
      - NONE
      description: '* `BLOCK` - BLOCK

        * `REDACT` - REDACT

        * `LOG` - LOG

        * `NONE` - NONE'
      title: CustomRegexRuleResponseOutboundAction
    PatchedCustomRegexRuleUpdateInputInboundAction:
      type: string
      enum:
      - BLOCK
      - REDACT
      - LOG
      - NONE
      description: '* `BLOCK` - BLOCK

        * `REDACT` - REDACT

        * `LOG` - LOG

        * `NONE` - NONE'
      title: PatchedCustomRegexRuleUpdateInputInboundAction
    PaginatedPublicCombinedCustomRegexRuleList:
      type: object
      properties:
        count:
          type: integer
        next:
          type:
          - string
          - 'null'
          format: uri
        previous:
          type:
          - string
          - 'null'
          format: uri
        results:
          type: array
          items:
            $ref: '#/components/schemas/PublicCombinedCustomRegexRule'
      required:
      - count
      - results
      title: PaginatedPublicCombinedCustomRegexRuleList
    PublicCombinedCustomRegexRule:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        regex:
          type: string
        score:
          type: number
          format: double
        context_keywords:
          description: Any type
        is_active:
          type: boolean
        outbound_action:
          type: string
        defined_at:
          type: string
      required:
      - id
      - name
      - regex
      - score
      - context_keywords
      - is_active
      - outbound_action
      - defined_at
      description: Custom regex rule with effective configuration for a tool pack.
      title: PublicCombinedCustomRegexRule
    CustomRegexRuleResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        regex:
          type: string
        score:
          type: number
          format: double
        context_keywords:
          type: array
          items:
            type: string
        is_active:
          type: boolean
        created_at:
          type: string
          format: date-time
        modified_at:
          type: string
          format: date-time
        outbound_action:
          oneOf:
          - $ref: '#/components/schemas/CustomRegexRuleResponseOutboundAction'
          - type: 'null'
          description: '* `BLOCK` - BLOCK

            * `REDACT` - REDACT

            * `LOG` - LOG

            * `NONE` - NONE'
        defined_at:
          type: string
      required:
      - id
      - name
      - regex
      - score
      - context_keywords
      - is_active
      - created_at
      - modified_at
      - outbound_action
      - defined_at
      description: Custom regex rule for an organization.
      title: CustomRegexRuleResponse
    PatchedCustomRegexRuleUpdateInput:
      type: object
      properties:
        name:
          type: string
        regex:
          type: string
        score:
          type: number
          format: double
        inbound_action:
          $ref: '#/components/schemas/PatchedCustomRegexRuleUpdateInputInboundAction'
          description: '* `BLOCK` - BLOCK

            * `REDACT` - REDACT

            * `LOG` - LOG

            * `NONE` - NONE'
        outbound_action:
          $ref: '#/components/schemas/PatchedCustomRegexRuleUpdateInputOutboundAction'
          description: '* `BLOCK` - BLOCK

            * `REDACT` - REDACT

            * `LOG` - LOG

            * `NONE` - NONE'
        context_keywords:
          type: array
          items:
            type: string
        is_active:
          type: boolean
      description: 'Shared field validators for create and update input serializers.


        The presidio validate_* functions raise RequestValidationError (a DRF APIException),

        which bypasses the serializer''s field error mapping. We catch and re-raise as

        serializers.ValidationError so errors are attributed to the correct field.'
      title: PatchedCustomRegexRuleUpdateInput
    PaginatedCustomRegexRuleResponseList:
      type: object
      properties:
        count:
          type: integer
        next:
          type:
          - string
          - 'null'
          format: uri
        previous:
          type:
          - string
          - 'null'
          format: uri
        results:
          type: array
          items:
            $ref: '#/components/schemas/CustomRegexRuleResponse'
      required:
      - count
      - results
      title: PaginatedCustomRegexRuleResponseList
  securitySchemes:
    tokenAuth:
      type: http
      scheme: bearer
      description: Token-based authentication with required prefix "Bearer"