Add User Interest

Endpoint

POST /user/interests - adds an user interest

Parameters

Parameter Parameter Type Data Type
api-key header string Required
Authorization header string Required
interest_id query string Required

Error messages

  • invalid HTTP_API_KEY
  • Not authenticated

HTTP response codes:

  • 200 - Success
  • 401 - Unauthorized action

Example request

curl --request POST \
  --url https://api-dev.radiozu.ro/v1/user/interests \
  --header 'Authorization: Bearer ATUH_TOKEN' \
  --header 'api-key: API_KEY' \
  --data interest_id=2 

Response fields

Returns an user interest (link between an user and an interest). None of the fields below are nullable.

  • user_id - id of user associated with the auth token used in request
  • interest_id - interest id
  • created_at and updated_at - timestamps
  • id - id of link/user interest

Example response

{
    "data": {
        "user_id": 4,
        "interest_id": "2",
        "updated_at": "2022-08-01T07:04:45.000000Z",
        "created_at": "2022-08-01T07:04:45.000000Z",
        "id": 1
    }
}