---
title: "Controller Build Rfm Configuration"
method: POST
path: "/ad_analytics/rfm/build_configuration"
---

# Controller Build Rfm Configuration

`POST /ad_analytics/rfm/build_configuration`

## Request

- Base URL: `https://api.akkio.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.akkio.com/ad_analytics/rfm/build_configuration`
- Auth: none declared

Builds the configuration for an RFM model

## Request body

- RFMBuildConfigurationPayload
  - `rfm_id` integer, required: The ID of the RFM model to build configuration for
  - `num_segments` integer, required: The number of segments to build for the RFM model

## Response `201`

Successful Response

- SrcAsyncJobServiceBuildConcreteAsyncJobRecordClassLocalsConcreteAsyncJobRecord5
  - `id` integer, nullable: ID of this object.
  - `created_at` string, date-time, nullable: datetime object representing when this object was created.
  - `updated_at` string, date-time, nullable: datetime object representing when this object was updated.
  - `deleted_at` string, date-time, nullable: datetime object representing when this object was deleted.
  - `status` 'RUNNING' | 'COMPLETED' | 'FAILED'
  - `endpoint` string: Endpoint spawning async job
  - `request` union: request sent to endpoint
    - object
    - unknown[]
      - unknown
  - `sync_response` union: sync response
    - object
    - unknown[]
      - unknown
  - `error` string, nullable: error message
  - `response` RFMConfiguration: Configuration settings for RFM analysis, using equal-width boundaries for segmentation. Supports configurable number of segments (3, 5, or 7).
    - `id` integer, nullable: ID of this object.
    - `created_at` string, date-time, nullable: datetime object representing when this object was created.
    - `updated_at` string, date-time, nullable: datetime object representing when this object was updated.
    - `deleted_at` string, date-time, nullable: datetime object representing when this object was deleted.
    - `async_job_id` integer, required: ID of the async job used for this RFM configuration.
    - `r_segments` integer, required: Number of segments for Recency dimension.
    - `f_segments` integer, required: Number of segments for Frequency dimension.
    - `m_segments` integer, required: Number of segments for Monetary dimension.
    - `boundary_method` 'equal_width'
    - `name` string, nullable: Optional name for this configuration.
    - `insights` unknown[], nullable: List of insights for this configuration.
      - unknown
    - `rfm_id` integer, required: The ID of the RFM analysis this configuration belongs to.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/akkio/apis/akkio-api.md) - [All operations](https://skmtc.dev/akkio/apis/akkio-api/llms.txt) - [OpenAPI document](https://skmtc.dev/akkio/apis/akkio-api/revisions/c477deff6271?raw)
