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

# Classify activities

> Classify one or more activities by applying tags and optionally sending feedback to the
originating provider.

Tags are applied to every activity specified in `activityIds`. All tag and activity validations are
atomic — if any ID is invalid or inaccessible, the entire request fails with no partial application.

**Tag constraints:**
- Tags must have domain `ACTIVITY`; any other domain results in error.
- Tags must not mix `FALSE_POSITIVE` category with other categories.
- Tags are re-applied if the activity was previously classified (idempotent update).




## OpenAPI

````yaml /specs/fc-act-bundled_generated.yaml post /v2/activities/classify
openapi: 3.0.3
info:
  title: Transaction and Activity Monitoring API
  version: '2.0'
  description: >-
    This is the MVP for Phase 1 APIs for V2.0 Transaction and Activity
    Monitoring. Currently in development, changes to the structure can occur
  contact:
    name: FrankieOne
    url: https://www.frankieone.com/
    email: help@frankieone.com
servers:
  - url: https://api.uat.frankie.one
    description: UAT Environment API Base URL
  - url: https://api.frankie.one
    description: Production API Base URL
security:
  - Api-Key: []
tags:
  - name: Activities
    description: >
      APIs to verify activities which will range from platform level activities
      such as login and registration

      to financial transactions such as deposits, withdrawals, etc.
  - name: Results
    description: |
      APIs to manage results for an individual or organization.
  - name: Sessions
    description: |
      APIs to manage sessions for an individual or organization.
paths:
  /v2/activities/classify:
    post:
      tags:
        - Activities
      summary: Classify activities
      description: >
        Classify one or more activities by applying tags and optionally sending
        feedback to the

        originating provider.


        Tags are applied to every activity specified in `activityIds`. All tag
        and activity validations are

        atomic — if any ID is invalid or inaccessible, the entire request fails
        with no partial application.


        **Tag constraints:**

        - Tags must have domain `ACTIVITY`; any other domain results in error.

        - Tags must not mix `FALSE_POSITIVE` category with other categories.

        - Tags are re-applied if the activity was previously classified
        (idempotent update).
      operationId: classifyActivities
      parameters:
        - $ref: '#/components/parameters/Api-Key'
        - $ref: '#/components/parameters/X-Frankie-CustomerID'
        - $ref: '#/components/parameters/X-Frankie-CustomerChildID'
        - $ref: '#/components/parameters/X-Frankie-Channel'
        - $ref: '#/components/parameters/X-Frankie-Username'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Classify-Activity-Req'
      responses:
        '201':
          description: Created — all activities tagged and provider feedback dispatched
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Classify-Activity-Res'
        '400':
          description: Bad Request — e.g. empty `activityIds` or `tagIds` arrays
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Invalid authentication:
                  value:
                    errorCode: AUTH-0002,
                    errorMsg: Unauthorized
                    details:
                      - issue: Invalid Authentication provided. Access denied.
                        issueLocation: request
                    requestId: 00000000S6MNG7624K2TDXT1E3
                No Api-Key:
                  value:
                    errorCode: AUTH-0401
                    errorMsg: Unauthorized
                    details:
                      - issue: No api key provided. Access denied.
                        issueLocation: request
                    requestId: 00000001S6MNG7624K2TDXT1E3
        '404':
          description: >-
            Not Found — one or more activity or tag IDs do not exist or belong
            to a different customer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            Unprocessable Entity — mixed `FALSE_POSITIVE` and other categories,
            or tag domain is not `ACTIVITY`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: >-
            Internal Server Error — includes failure to dispatch feedback to the
            provider
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Internal Server Error:
                  value:
                    errorCode: SYS-1063,
                    errorMsg: Failed to generate KYC report
                    requestId: 01HM5EM2QNNSC9K0PX9VC06HX3
        '502':
          description: Bad Gateway
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - Api-Key: []
components:
  parameters:
    Api-Key:
      name: api_key
      in: header
      schema:
        type: string
        example: 245c765b124a098d09ef8765....
      description: Your API key provided by FrankieOne
      required: true
    X-Frankie-CustomerID:
      name: X-Frankie-CustomerID
      in: header
      required: true
      schema:
        type: string
        example: 12345678-1234-1234-1234-123456789012
      description: Your Customer ID provided by FrankieOne
    X-Frankie-CustomerChildID:
      name: X-Frankie-CustomerChildID
      in: header
      required: false
      schema:
        type: string
        example: 87654321-4321-4321-4321-210987654321
      description: Your Customer Child ID provided by FrankieOne
    X-Frankie-Channel:
      name: X-Frankie-Channel
      in: header
      required: false
      schema:
        type: string
      description: >-
        Open string that can be used to define the "channel" the request comes
        in from. It can potentially be used in routing and risk calculations
        upon request. Default values that can be used are:  api portal smartui
        Any alphanumeric string is supported though. Anything over 64 characters
        will be truncated.
    X-Frankie-Username:
      name: X-Frankie-Username
      in: header
      description: Username provided by API caller
      required: false
      schema:
        type: string
        example: fred.flintstone@frankieone.com
  schemas:
    Classify-Activity-Req:
      type: object
      description: >-
        Request to classify one or more activities with tags and optionally
        provide feedback to the originating provider.
      required:
        - entityId
        - activityIds
        - tagIds
      properties:
        entityId:
          type: string
          format: uuid
          description: The entity that owns the activities being classified.
          example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
        activityIds:
          type: array
          description: >-
            IDs of the activities to classify. All activity IDs must exist and
            belong to the specified entity. If any are invalid or belong to a
            different tenant the entire request fails with 404 (to prevent data
            existence leakage).
          minItems: 1
          items:
            type: string
            format: ulid
          example:
            - 01HN9XHZN6MGXM9JXG50K59Q85
            - 01HN9XHZN6MGXM9JXG50K59Q86
        tagIds:
          type: array
          description: >
            IDs of tags to apply as classifications to the specified activities.
            Retrieve available tag IDs

            via GET /v2/tags (Core V2 API), filtering by relevant categories and
            domain

            (e.g.
            `?categories=FRAUD,MONEY_LAUNDERING,SCAM,TERRORISM_FINANCING,PROLIFERATION_FINANCING&domains=ACTIVITY`).


            All tags must exist and be accessible to the customer (SYSTEM or
            owned CUSTOMER tags).

            Duplicate IDs are silently removed.


            **Ordering:** The first tag in the array is treated as the primary
            reason when sending feedback

            to providers that support only a single classification.


            **Validation rules:**


            Tags with category `FALSE_POSITIVE` must not be mixed with tags from
            other categories

            (e.g. FRAUD, SCAM) — the intent cannot be reconciled and the request
            will be rejected with 422.


            Tags with category `IN_REVIEW` follow the same mutual-exclusivity
            rule — `IN_REVIEW` tags do not

            trigger provider feedback and must not be combined with
            non-`IN_REVIEW` tags.
          minItems: 1
          items:
            type: string
            format: uuid
          example:
            - 12345678-1234-1234-1234-123456789012
            - 87654321-4321-4321-4321-210987654321
        comment:
          $ref: '#/components/schemas/Comment'
          description: >-
            Optional comment to be recorded in the audit log for this
            classification.
    Classify-Activity-Res:
      type: object
      required:
        - requestId
        - mappings
      properties:
        requestId:
          $ref: '#/components/schemas/Request-ID'
        mappings:
          type: array
          description: >-
            Tag mappings applied to each classified activity, grouped by
            activity object.
          items:
            $ref: '#/components/schemas/Tag-Mapped-Object'
    Error:
      type: object
      x-examples:
        '400':
          requestId: 0123456789ABCDEFGHIJKLMNOP
          errorCode: API-0400
          errorMsg: Parsing credentials from "<invalid>" failed, because invalid.
          httpStatusCode: 400
        '401':
          requestId: 0123456789ABCDEFGHIJKLMNOP
          errorCode: API-0401
          errorMsg: Unauthenticated due to invalid credentials.
          httpStatusCode: 401
        '409':
          requestId: 0123456789ABCDEFGHIJKLMNOP
          errorCode: API-0409
          errorMsg: Conflict.
          httpStatusCode: 409
      allOf:
        - $ref: '#/components/schemas/Error-Base'
        - type: object
          properties:
            requestId:
              $ref: '#/components/schemas/Request-ID'
    Comment:
      type: object
      properties:
        commentId:
          type: string
          description: Unique identifier for the comment
          format: ulid
          example: 01K3G4CCQ3DY3B1413S19M9QW1
          readOnly: true
        text:
          type: string
          description: The text content of the comment.
          example: Update after speaking to customer over the phone directly.
        entityId:
          $ref: '#/components/schemas/Entity-ID-Writeable'
        entityType:
          $ref: '#/components/schemas/Entity-Type-Writeable'
    Request-ID:
      type: string
      example: 01HN9XHZN6MGXM9JXG50K59Q85
      description: The unique request identifier for the API call made.
    Tag-Mapped-Object:
      type: object
      description: An object and the tags mapped to it.
      required:
        - objectId
        - objectType
        - tags
      properties:
        objectId:
          type: string
          description: ID of the object (may be ULID or UUID).
          example: 12345678-1234-1234-1234-123456789012
        objectType:
          $ref: '#/components/schemas/Object-Type'
        tags:
          type: array
          description: >-
            Tags applied to this object, sorted by mapping createdAt descending
            (newest first).
          items:
            $ref: '#/components/schemas/Tag-Mapping'
    Error-Base:
      type: object
      properties:
        errorCode:
          type: string
        errorMsg:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/Issue'
    Entity-ID-Writeable:
      type: string
      description: >-
        Entities are assigned a FrankieOne auto-generated UUID to ensure global
        uniqueness, represented as entityId. The entityId allows for precise
        modification when required.

        To modify an entity, set the entityId of the entity you wish to update
        in an update request.
      example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
    Entity-Type-Writeable:
      type: string
      enum:
        - INDIVIDUAL
        - ORGANIZATION
        - UNKNOWN
      description: >-
        The type of entity within Frankie. This can be "INDIVIDUAL",
        "ORGANIZATION", or "UNKNOWN".
    Object-Type:
      description: The type of object being annotated.
      type: string
      enum:
        - ADDRESS
        - NAME
        - PHONE_NUMBER
        - EMAIL
        - DATE_OF_BIRTH
        - WEBSITE
        - SHAREHOLDER
        - OFFICIAL
        - UBO
        - REGISTRATION
        - SHAREHOLDING
        - SHARECAPITAL
        - DOCUMENT
        - DOCUMENT_ATTACHMENT
        - RESULT_PROCESS
        - RESULT_STEP
        - RESULT_WORKFLOW
        - SERVICE_PROFILE
        - AUDIT_EVENT
        - EXTERNAL_REFERENCE
        - RISK_ASSESSMENT
        - MATCHLIST
        - CUSTOMER
        - CUSTOMER_KEY
        - SERVICE
        - SECRET
        - USER
        - ACTIVITY
        - CASE
    Tag-Mapping:
      type: object
      description: >-
        A tag applied to an object, including the identifier for the specific
        mapping.
      required:
        - mappingId
      allOf:
        - $ref: '#/components/schemas/Tag-Base'
        - type: object
          properties:
            mappingId:
              type: string
              format: uuid
              description: Unique identifier for this tag-to-object mapping.
              example: 12345678-1234-1234-1234-123456789012
              readOnly: true
    Issue:
      type: object
      properties:
        issue:
          type: string
          description: Description of the issue.
        issueLocation:
          type: string
          description: The location or context where the issue was identified.
        issueType:
          type: string
          description: The type or category of the issue.
    Tag-Base:
      type: object
      required:
        - tagId
        - label
      properties:
        tagId:
          type: string
          format: uuid
          description: Unique identifier for the tag.
          example: 12345678-1234-1234-1234-123456789012
          readOnly: true
        label:
          type: string
          description: Human-readable name for the tag.
          example: ROMANCE_SCAM
        description:
          type: string
          description: Optional description for the tag.
          example: Indicates a potential romance scam.
        category:
          type: string
          description: Category used to group tags.
          example: FRAUD
        type:
          $ref: '#/components/schemas/Tag-Type'
        domain:
          type: string
          description: Optional domain context for the tag.
          example: ACTIVITY_MONITORING
    Tag-Type:
      description: >
        The type of the tag.

        - SYSTEM: A tag created by FrankieOne. The `createdBy` and `updatedBy`
        fields will be omitted for SYSTEM tags.

        - CUSTOMER: A tag created by the customer.
      type: string
      enum:
        - SYSTEM
        - CUSTOMER
  securitySchemes:
    Api-Key:
      type: apiKey
      in: header
      name: api_key
      description: ''

````