---
title: "Record a play for a song"
method: POST
path: "/songs/{song_id}/record-play"
tags: ["Now Playing"]
---

# Record a play for a song

`POST /songs/{song_id}/record-play`

Take a song_id and update the object_count and user_activity table with a play. This allows other sources to record play history to Ampache.

## Path parameters

- `song_id` string, required

## Query parameters

- `user` string
- `client` string
- `date` integer

## Request body

- RecordPlayRequest
  - `user` string
  - `client` string — Client/agent name recorded with the request.
  - `date` integer

## Response `200`

Recorded

- SuccessResponse
  - `success` string

## Other responses

- `400` — HTTP 400 Bad Request (errors 4705, 4710).
- `401` — HTTP 401 Unauthorized (error 4701).
- `403` — HTTP 403 Forbidden (errors 4700, 4703, 4742).
- `404` — HTTP 404 Not Found (error 4704).
- `500` — HTTP 500 Internal Server Error (error 4702).

---

[API](https://skmtc.net/ampache/apis/ampache-rest-api.md) · [All operations](https://skmtc.net/ampache/apis/ampache-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ampache/ampache-rest-api/revisions/42d304fb6867/schema)
