Activity Config
Attribute Policies
Manage per-tenant attribute resolution policies.
GET /api/activity-config/attribute-policies
List all attribute policies for the current tenant.
Auth: Required — VIEW_ACTIVITIES permission
Example
curl https://api.reten.ai/api/activity-config/attribute-policies \
-H "Authorization: Bearer <token>" \
-H "x-tenant-id: <tenant-id>"import axios from 'axios';
const response = await axios.get(
'https://api.reten.ai/api/activity-config/attribute-policies',
{
headers: {
Authorization: 'Bearer <token>',
'x-tenant-id': '<tenant-id>',
},
}
);
const policies = response.data;Response 200 OK
[
{
"id": "440e8400-e29b-41d4-a716-446655440000",
"attributeKeyId": "220e8400-e29b-41d4-a716-446655440000",
"strategy": "UPFRONT",
"resolverType": "INTERNAL_SERVICE",
"attributeKey": {
"key": "commerce_info",
"label": "Commerce Info"
}
}
]POST /api/activity-config/attribute-policies
Create or update (upsert) an attribute policy. Uses attributeKeyId as the unique key per tenant.
Auth: Required — MANAGE_ACTIVITY_CONFIG permission
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
attributeKeyId | UUID | Yes | Global attribute key ID |
strategy | string | Yes | UPFRONT, ON_DISPATCH, or CALLER_PROVIDED |
resolverType | string | Yes | INTERNAL_SERVICE or CLIENT_HOOK |
Example
curl -X POST https://api.reten.ai/api/activity-config/attribute-policies \
-H "Authorization: Bearer <token>" \
-H "x-tenant-id: <tenant-id>" \
-H "Content-Type: application/json" \
-d '{
"attributeKeyId": "220e8400-e29b-41d4-a716-446655440000",
"strategy": "UPFRONT",
"resolverType": "INTERNAL_SERVICE"
}'import axios from 'axios';
const response = await axios.post(
'https://api.reten.ai/api/activity-config/attribute-policies',
{
attributeKeyId: '220e8400-e29b-41d4-a716-446655440000',
strategy: 'UPFRONT',
resolverType: 'INTERNAL_SERVICE',
},
{
headers: {
Authorization: 'Bearer <token>',
'x-tenant-id': '<tenant-id>',
},
}
);Response 200 OK
Returns the created or updated policy.
Notes
- One policy per attribute key per tenant (unique constraint)
- If a policy already exists for the key, it is updated (upsert behavior)