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

# 3. Add Bucket

> Bucket(s) - Segmentation to suit different customer or transaction profiles

A bucket can be described in simple terms as a group of transactions to fit a set of screening metrics. Often, this is done to segment transactions conducted by different customer groups, depending on different business needs.

By default, **all transactions** uploaded into Athena will be registered into the Bucket named "Ordinary". Please note that the name and description of this bucket cannot be modified nor deleted.

To create your own bucket, perform the following API call. Take note that Bucket names must be **unique**.


## OpenAPI

````yaml post /api/buckets
openapi: 3.0.3
info:
  title: Athena API
  version: v3
  x-logo:
    url: https://cynopsis.co/wp-content/uploads/2021/03/logo-2.png
    altText: Cynopsis Solutions
  description: >-
    ATHENA is an advanced real-time transaction monitoring solution designed to
    detect and prevent money laundering, fraud, and terrorism financing. Powered
    by proprietary AML rules, ATHENA analyzes transactions in real time,
    providing clear, intuitive visual insights to streamline compliance
    processes.
        
        ✅ Real-Time Monitoring – Instantly analyzes transaction data to detect anomalies and potential compliance risks.
        ✅ Visualized Insights – Converts complex data into easy-to-understand charts, aiding faster decision-making.
        ✅ Seamless Integration – Easily integrates with existing financial and compliance systems.
        
        Ideal for financial institutions, fintech companies, and regulated businesses, ATHENA enhances risk management and ensures regulatory compliance with ease.
  contact:
    email: tech@cynopsis.co
servers:
  - url: http://localhost/api
    description: Local development server
security: []
paths:
  /api/buckets:
    post:
      tags:
        - Buckets
      summary: Create a bucket
      description: Create a new bucket.
      operationId: bucket_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BucketRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/BucketRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/BucketRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                type: object
                properties:
                  bucket_rules:
                    type: array
                    items:
                      type: object
                      description: Rule object
                    description: List of bucket rules.
                  rule_id:
                    type: integer
                    description: Rule ID.
                  rule_setting:
                    type: object
                    description: Rule settings.
                  activate_rule:
                    type: boolean
                    description: Activate rule.
                  last_timestamp:
                    type: string
                    description: Last timestamp.
                  modified_by:
                    type: object
                    properties:
                      id:
                        type: integer
                  created_by:
                    type: object
                    properties:
                      id:
                        type: integer
          description: Bucket created successfully.
      security:
        - CustomAuthentication: []
        - cookieAuth: []
        - BearerAuth: []
components:
  schemas:
    BucketRequest:
      type: object
      description: |-
        A ModelSerializer that takes an additional `fields` argument that
        controls which fields should be displayed.
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
        active_indicator:
          type: boolean
        description:
          type: string
        rule_id:
          type: integer
          writeOnly: true
        rule_setting:
          type: object
          additionalProperties: {}
          writeOnly: true
        activate_rule:
          type: boolean
          writeOnly: true
      required:
        - name
  securitySchemes:
    CustomAuthentication:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token obtained from AWS Cognito or custom authentication service
    cookieAuth:
      type: apiKey
      in: cookie
      name: sessionid

````