Skip to main content

Get User Action Recommendations

GET /users/{user_id}/actions

Get a list recommended actions for a given user. Growth actions are weighted by expected impact. Higher weights means greater expected impact. Base weights reflect the influence of the action on the growth calculations based on past engagement.

Request Parameters

Path Parameters

NameTypeDescription
user_id requiredstring

Query Parameters

NameTypeDescription
limitinteger

Default: 10
Number of actions to be returned in result

allow_repeatsboolean

Default: True
Include actions already taken? Default is true (1)

Header Parameters

NameTypeDescription
program-id requiredstring

Responses

200 Successful Response

UserNextActionList | application/json

NameTypeProperties
actions requiredarray

items: {'$ref': '#/components/schemas/UserNextAction'}

UserNextAction | application/json

NameTypeProperties
event_type requiredstring

description: The behavior recommended in the action

asset_id requiredstring
asset_name requiredstring
growth_weight requirednumber

description: The strength of the action recommendation for the given user. Higher values mean stronger recommendation.

base_weight requirednumber

description: The historical weight of the action for the given user, accounting for recency and frequency. Higher values mean greater impact on the recommendations. NOTE: exclude values > 0 to recommend new actions only

Response Example

{
"actions": [
{
"event_type": "string",
"asset_id": "string",
"asset_name": "string",
"growth_weight": "number",
"base_weight": "number"
}
]
}

404 User history not found

ErrorMessage | application/json

NameTypeProperties
detail requiredstring

422 Validation Error

HTTPValidationError | application/json

NameTypeProperties
detailarray

items: {'$ref': '#/components/schemas/ValidationError'}

ValidationError | application/json

NameTypeProperties
loc requiredarray

items: {'anyOf': [{'type': 'string'}, {'type': 'integer'}]}

msg requiredstring
type requiredstring