POST
/
activity
/
{workspaceId}
/
user
/
{userId}
curl --request POST \
  --url https://api.hyra.io/activity/{workspaceId}/user/{userId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "duration": 123,
  "game": "<string>",
  "gifted_by": "<string>",
  "messages_sent": 123
}'
{
  "activity": {
    "_id": "<string>",
    "duration": 123,
    "end": "<string>",
    "ended": true,
    "friends": [
      "<string>"
    ],
    "game": "<string>",
    "idle_time": 123,
    "messages_sent": 123,
    "start": "<string>",
    "tracked_idle": 123
  },
  "totals": {
    "messages": 123,
    "minutes": 123,
    "period": "<string>"
  }
}

Authorizations

Authorization
string
headerrequired

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

Path Parameters

userId
string
required
workspaceId
string
required

Query Parameters

withNewTotal
boolean

Body

application/json
duration
number
required
game
string
gifted_by
string
messages_sent
number
required

Response

200 - application/json
activity
object
required
totals
object