Record a bandit arm outcome for a participant
POST
https://api.evidential.dev/v1/experiments/{experiment_id}/assignments/{participant_id}/outcome
Records the outcome for a participant's assigned arm and returns the updated arm parameters.
Use this in push integrations to report each outcome as it happens. Applies only to MAB or CMAB experiments using push-based integrations.
Prerequisites:
- The experiment must record outcomes through this API. Experiments of type
mab_online_dwhuse the pull integration, where Evidential reads outcomes from a connected data warehouse, and they reject this call. - The participant must already have an assignment. Create one with the GET assignment endpoint first.
- The participant must not already have a recorded outcome. Use the GET assignment endpoint to check whether an outcome is already recorded.
The endpoint returns a 422 error if a prerequisite is not met.
Authorization
Path parameters
Request body JSON required
Returns
200
Successful Response
JSON
400
The request is invalid. Check that the request body matches the required structure and that all required fields and headers are present.
403
You did not provide a valid API key, or your API key does not have permission for this operation.
Tip: Check that the API key in the X-API-Key header has access to the data source or experiment.
404
The resource was not found, or you do not have access to it.
Tip: Check that the API key in the X-API-Key header has access to the data source or experiment.