Post Activity Type
Last updated
Last updated
Post an Activity Type on an audio post.
Query Parameter âŦī¸
organization_id (required)
String
6-Digit Alpha Numerical number for identifying a particular org.
Header Parameter âŦī¸
Bearer {{access_token}} (required)
String
Access tokens enable secure access to Matar Resources.
Body Parameter âŦī¸
post_activity_type (required)
String
Activity Type can be of 8 types reply, like, downvote, dislike, share, upvote, block, view.
To know more about activity types check the Activity Types API endpoint.
post_id (required)
String
Every created post has a unique identifier that identifies a particular audio post.
Sample Request âŦī¸ī¸
curl --location 'https://matar.in.ngrok.io/api/v1/post_activity?organization_id=685QVK' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6dHJ1ZSwiaWF0IjoxNjkyOTQzNDY0LCJqdGkiOiJmNTY2MWMzMC00YWNkLTRjNDUtYmU2NS03ZmQyOGM2OTJiYzMiLCJ0eXBlIjoiYWNjZXNzIiwic3ViIjoiMzk1MDFUIiwibmJmIjoxNjkyOTQzNDY0LCJleHAiOjE2OTM4MDc0NjR9.soJepZDtTK3JLfvMjl_XL5jwQr9sP8oTOiA43Fi7VZs' \
--header 'Content-Type: application/json' \
--data '{
"post_activity_type": "like",
"post_id": "VAGDWM8YZP",
"data": {
"hi": "hello"
}
}'
Responses âŦī¸
Status Code: đĸ200 (200 denotes 'ok')
{
"message": "New user activity on post",
"post_activity": {
"_id": "4RAY29",
"data": {
"hi": "hello"
},
"is_active": true,
"organization_id": "685QVK",
"post_activity_type": "like",
"post_id": "VAGDWM8YZP",
"user_id": "39501T"
}
}
Status Code: đ´404 (404 denotes 'Not found')
{
"message": "Ain't no cake like that."
}
Response Parameters Description:
message
Server generated message when some new activity is detected on post
post_activity_id
A unique identifier linked to activity type on post.
post_activity_data
is active
Whether organization is active or not.
organization_id
Phone Number Linked to User Account
post_activity_type
Type of user activity on post.
post_id
Post ID linked to the post on which user activity is detected.
user_id
User ID linked to user from which activity is posted.
Get user activity type for questions and answers posts.
Query Parameter âŦī¸
organization_id (required)
String
A unique identifier for organization in which question or answer is posted.
post_activity_type (optional)
String
Activity Type can be of 8 types reply, like, downvote, dislike, share, upvote, block, view. Provide any type to find the relevant type of posts.
Header Parameter âŦī¸
Bearer {{access_token}} (required)
String
Access Token for securely accessing Matar server resources.
Sample Request âŦī¸ī¸
The request below will get alist of posts that are liked by user.
curl --location --request GET 'https://matar.in.ngrok.io/api/v1/user_post_activities?post_activity_type=like&organization_id=129487316' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6dHJ1ZSwiaWF0IjoxNjkzMTY3MDI4LCJqdGkiOiI3YWMxYmI5Mi02MDljLTRjMzktYTliOC1kZDBhNmExOTJjZjEiLCJ0eXBlIjoiYWNjZXNzIiwic3ViIjoiRUE5UzZaIiwibmJmIjoxNjkzMTY3MDI4LCJleHAiOjE2OTQwMzEwMjh9.ef95SR3_rR3KkGCdIQoiZBMixU6TA2xNJ5w-i3xTtig' \
--form 'file=@"/Users/srikalyanburra/Downloads/aud1.m4a"' \
--form 'parent_post_id="LX8LQC"'
Responses âŦī¸
Status Code: đĸ200 (200 denotes 'ok')
{
"page_details": {
"current_start": 0,
"next_offset": 1,
"total": 1
},
"posts": [
{
"_id": "YQ4V7H6JN7",
"audio_data": null,
"audio_text": "ā¤šā¤ŽāĨ⤠ā¤
ā¤Ē⤍āĨ ā¤
ā¤āĨā¤āĨ ⤏āĨā¤šā¤¤ ā¤āĨ ⤞ā¤ŋ⤠ā¤āĨā¤¯ā¤ž ā¤ā¤°ā¤¨ā¤ž ā¤ā¤žā¤šā¤ŋā¤?",
"audio_translation": null,
"audio_url": "https://matar-audio.s3.ap-south-1.amazonaws.com/26O9BZNI43v2Sehat_Question.flac",
"category_ids": [
"TFTWNI"
],
"chatgpt_query_id": null,
"child_posts": [],
"child_posts_details": {
"current_start": 0,
"cursor": 0,
"next_offset": 0,
"total": 0
},
"created_at": "27/08/2023 , 08:13 PM",
"data": {
"duration": 4.56,
"like": 1
},
"is_active": true,
"is_chatgpt_enabled": false,
"organization_id": "129487316",
"parent_post": {},
"parent_post_id": null,
"sort_order": null,
"text": "ā¤šā¤ŽāĨ⤠ā¤
ā¤Ē⤍āĨ ā¤
ā¤āĨā¤āĨ ⤏āĨā¤šā¤¤ ā¤āĨ ⤞ā¤ŋ⤠ā¤āĨā¤¯ā¤ž ā¤ā¤°ā¤¨ā¤ž ā¤ā¤žā¤šā¤ŋā¤?",
"user": {
"_id": "EA9S6Z",
"image_url": null,
"name": "Sri"
},
"user_id": "EA9S6Z",
"user_post_activities": {
"like": true
},
"whisper_id": null
}
]
}
Response Parameters Description:
page_details_current_start
Current post page number.
page_details_next_offset
Set a particular page number to start for post-viewing via offset.
page_details _total
Total number of post pages available to view.
post_id
A unique identifier linked to posted audio question.
post_audio_text
Contains transcribed version of audio post.
post_audio_url
URL of where audio post is stored.
category_ids
A unique identifier containing the category in which question is posted.
child_posts
Contains list of child posts. A child post is a answer/reply post to the parent/question post.
child_posts_current_start
Current child post page number.
child_posts_cursor
child_posts_next_offset
Set a particular page number to start from for child post-viewing via offset.
total
Total number of child posts
chatgpt_query_id
A chatgpt identifier linked to audio question asked by users.
created_at
Post creation date
duration
Duration of audio post in minutes and seconds.
like
Total number of likes for the post.
is_active
Is the organization active or not.
is_chatgpt_enabled
Is chat gpt enabled to answer to question post inn an organization
organization_id
Organization in which the question is posted.
parent_post_id
If question post has replies or child post then the question has a valid parent_post_id. parent_post_id is set to null when question post has no replies.
sort_order
When there are multiple posts to display they are sorted by sort order and has a number assigned to it. If there is a single post to display the sort_order will be set to null.
text
Contains post text transcribed from audio.
user_id
User ID of the account from which audio is posted.
user image_url
Image URL containing the user account image.
user_name
Name for the user account.
user_post_activities
Any post activity performed by the linked user.
whisper_id
Used internally for speech-to-text tasks.