API Reference
reward-triggers
6 endpoints
/api/v1/reward-triggers/reward-slug/{reward_slug}Get Triggers By Reward Slug
Get reward triggers by the associated reward template's slug.
Intended for public/frontend use to check if a claimable reward trigger exists for a given reward slug.
Path parameters
| reward_slug* | string |
Responses
| Field | Type | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| total_items* | integer | Total number of items available | ||||||||||||||||||||||||||||||||||||
| total_pages* | integer | Total number of pages available | ||||||||||||||||||||||||||||||||||||
| current_page* | integer | Current page number | ||||||||||||||||||||||||||||||||||||
| items* | RewardTriggerResponse[] | List of items on the current page | ||||||||||||||||||||||||||||||||||||
array items · RewardTriggerResponse
| ||||||||||||||||||||||||||||||||||||||
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
Example request
curl -X GET "https://api.davi.social/api/v1/reward-triggers/reward-slug/{reward_slug}" \
-H "Authorization: Bearer <token>"/api/v1/reward-triggers/{trigger_uuid}Get Reward Trigger
Get a reward trigger by UUID.
Path parameters
| trigger_uuid* | string (uuid) |
Responses
| Field | Type | Description |
|---|---|---|
| uuid* | string | |
| created_at* | string (date-time) | |
| updated_at | string (date-time) | null | |
| name* | string | |
| description | string | null | |
| enabled* | boolean | |
| reward_template_uuid* | string | |
| trigger_scopes* | string[] | |
| reward_metadata* | object | |
| organization_uuid | string | null | |
| deduplication_window_seconds | integer | null |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
Example request
curl -X GET "https://api.davi.social/api/v1/reward-triggers/{trigger_uuid}" \
-H "Authorization: Bearer <token>"/api/v1/reward-triggers/{trigger_uuid}Update Reward Trigger
Update a reward trigger.
Requires an org-scoped token for the reward's organization.
Path parameters
| trigger_uuid* | string (uuid) |
Request body*application/json
| Field | Type | Description |
|---|---|---|
| name | string | null | Name of the trigger |
| description | string | null | Optional description |
| trigger_scopes | string[] | null | List of scope patterns |
| reward_metadata | object | null | Metadata to pass with the reward distribution |
| enabled | boolean | null | Whether the trigger is enabled |
| deduplication_window_seconds | integer | null | Deduplication window in seconds |
Responses
| Field | Type | Description |
|---|---|---|
| uuid* | string | |
| created_at* | string (date-time) | |
| updated_at | string (date-time) | null | |
| name* | string | |
| description | string | null | |
| enabled* | boolean | |
| reward_template_uuid* | string | |
| trigger_scopes* | string[] | |
| reward_metadata* | object | |
| organization_uuid | string | null | |
| deduplication_window_seconds | integer | null |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
Example request
curl -X PATCH "https://api.davi.social/api/v1/reward-triggers/{trigger_uuid}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{ /* request body */ }'/api/v1/reward-triggers/{trigger_uuid}Delete Reward Trigger
Delete a reward trigger.
Requires an org-scoped token for the reward's organization.
Path parameters
| trigger_uuid* | string (uuid) |
Responses
| Field | Type | Description |
|---|---|---|
| message* | string | Success or status message |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
Example request
curl -X DELETE "https://api.davi.social/api/v1/reward-triggers/{trigger_uuid}" \
-H "Authorization: Bearer <token>"/api/v1/organizations/{organization_slug}/reward-triggersList Organization Reward Triggers
List all reward triggers for an organization.
Path parameters
| organization_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
Responses
| Field | Type | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| total_items* | integer | Total number of items available | ||||||||||||||||||||||||||||||||||||
| total_pages* | integer | Total number of pages available | ||||||||||||||||||||||||||||||||||||
| current_page* | integer | Current page number | ||||||||||||||||||||||||||||||||||||
| items* | RewardTriggerResponse[] | List of items on the current page | ||||||||||||||||||||||||||||||||||||
array items · RewardTriggerResponse
| ||||||||||||||||||||||||||||||||||||||
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
Example request
curl -X GET "https://api.davi.social/api/v1/organizations/{organization_slug}/reward-triggers" \
-H "Authorization: Bearer <token>"/api/v1/organizations/{organization_slug}/reward-triggersCreate Reward Trigger
Create a new reward trigger for an organization.
Requires an org-scoped token for the target organization.
Path parameters
| organization_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
Request body*application/json
| Field | Type | Description |
|---|---|---|
| name* | string | Name of the trigger |
| description | string | null | Optional description |
| reward_template_uuid* | string | string (uuid) | UUID of the reward template to distribute |
| trigger_scopes* | string[] | List of scope patterns (e.g., ['activity.checked_in:count:5', 'activity.registered:first']) |
| reward_metadata | object | Metadata to pass with the reward distribution |
| organization_uuid | string | string (uuid) | null | Organization UUID (optional, for organization-specific triggers) |
| enabled | boolean | Whether the trigger is enabled default: true |
| deduplication_window_seconds | integer | null | Deduplication window in seconds, null = no deduplication |
Responses
| Field | Type | Description |
|---|---|---|
| uuid* | string | |
| created_at* | string (date-time) | |
| updated_at | string (date-time) | null | |
| name* | string | |
| description | string | null | |
| enabled* | boolean | |
| reward_template_uuid* | string | |
| trigger_scopes* | string[] | |
| reward_metadata* | object | |
| organization_uuid | string | null | |
| deduplication_window_seconds | integer | null |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
Example request
curl -X POST "https://api.davi.social/api/v1/organizations/{organization_slug}/reward-triggers" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{ /* request body */ }'