Skip to main content
POST
/
activities
Create an activity
curl --request POST \
  --url https://api.smile.io/v1/activities \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "activity": {
    "customer_id": 304169228,
    "token": "activity_f57a9b5a8d0ac5",
    "distinct_id": "212993",
    "created_on_origin_at": "2024-04-04T15:10:42.030Z"
  }
}
'
{
  "activity": {
    "id": 503256787,
    "customer_id": 304169228,
    "token": "activity_f57a9b5a8d0ac5",
    "distinct_id": "212993",
    "created_on_origin_at": "2024-04-04T15:10:42.030Z",
    "created_at": "2024-05-15T08:35:08.920Z",
    "updated_at": "2024-05-15T08:35:08.920Z"
  }
}
This endpoint requires the scope.
Once created, activities will be asynchronously evaluated against the loyalty program’s configuration to determine if any rewards should be issued. This evaluation happens automatically and no additional API calls are required.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
activity
With customer ID · object
required

Response

201 - application/json

The activity was successfully created.

activity
object