Track Media Play
curl --request POST \
--url https://api.thefaithapp.com/v1/analytics/track/media-play \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"content_type": "audio",
"content_id": 30,
"content_title": "Sample Prayer",
"session_id": "session-123",
"platform": "android"
}
'const options = {
method: 'POST',
headers: {
'X-API-Key': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
content_type: 'audio',
content_id: 30,
content_title: 'Sample Prayer',
session_id: 'session-123',
platform: 'android'
})
};
fetch('https://api.thefaithapp.com/v1/analytics/track/media-play', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.thefaithapp.com/v1/analytics/track/media-play"
payload = {
"content_type": "audio",
"content_id": 30,
"content_title": "Sample Prayer",
"session_id": "session-123",
"platform": "android"
}
headers = {
"X-API-Key": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": "Success",
"message": "Media Play tracked",
"data": {
"id": 1
}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}Analytics
Track Media Play
Records media playback.
POST
/
v1
/
analytics
/
track
/
media-play
Track Media Play
curl --request POST \
--url https://api.thefaithapp.com/v1/analytics/track/media-play \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"content_type": "audio",
"content_id": 30,
"content_title": "Sample Prayer",
"session_id": "session-123",
"platform": "android"
}
'const options = {
method: 'POST',
headers: {
'X-API-Key': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
content_type: 'audio',
content_id: 30,
content_title: 'Sample Prayer',
session_id: 'session-123',
platform: 'android'
})
};
fetch('https://api.thefaithapp.com/v1/analytics/track/media-play', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.thefaithapp.com/v1/analytics/track/media-play"
payload = {
"content_type": "audio",
"content_id": 30,
"content_title": "Sample Prayer",
"session_id": "session-123",
"platform": "android"
}
headers = {
"X-API-Key": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": "Success",
"message": "Media Play tracked",
"data": {
"id": 1
}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}Authorizations
Public client key copied from Developer Access. The member bearer token authenticates the request.
Member access token returned by POST /v1/auth/token.
Body
application/json
Content type.
Maximum string length:
50Content identifier.
Content title.
Maximum string length:
255Client-generated analytics session identifier.
Maximum string length:
100Client platform.
Available options:
web, ios, android Playback duration in seconds.
Optional event metadata.
Was this page helpful?