Post Information
Last updated
Last updated
Get all posts by organization id.
Query Parameter ⬇️
organization_id (required)
String
A unique identifier for organization/community to find related posts.
Header Parameter ⬇️
Bearer {{access_token}} (required)
String
Access tokens enable secure access to Matar Resources.
Sample Request ⬇️️
curl --location 'https://matar.in.ngrok.io/api/v1/get_post?organization_id=129487316' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6dHJ1ZSwiaWF0IjoxNjkyOTQzNDY0LCJqdGkiOiJmNTY2MWMzMC00YWNkLTRjNDUtYmU2NS03ZmQyOGM2OTJiYzMiLCJ0eXBlIjoiYWNjZXNzIiwic3ViIjoiMzk1MDFUIiwibmJmIjoxNjkyOTQzNDY0LCJleHAiOjE2OTM4MDc0NjR9.soJepZDtTK3JLfvMjl_XL5jwQr9sP8oTOiA43Fi7VZs'
Responses ⬇️
Status Code: 🟢200 (200 denotes 'ok')
{
"page_details": {
"current_start": 0,
"next_offset": 10,
"total": 39
},
"posts": [
{
"_id": "VAGDWM8YZP",
"audio_data": null,
"audio_text": "हमें अपनी अच्छी सेहत के लिए क्या करना चाहिए?",
"audio_translation": null,
"audio_url": "https://matar-audio.s3.ap-south-1.amazonaws.com/RLOCWGZWM5v2Sehat_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": "25/08/2023 , 06:05 AM",
"data": {
"duration": 4.56,
"like": 1
},
"is_active": true,
"is_chatgpt_enabled": false,
"organization_id": "129487316",
"parent_post_id": null,
"sort_order": null,
"text": "हमें अपनी अच्छी सेहत के लिए क्या करना चाहिए?",
"user": {
"_id": "39501T",
"image_url": "https://listapp-images.s3.ap-south-1.amazonaws.com/matar_profile_05.png",
"name": "Sri"
},
"user_id": "39501T",
"user_post_activities": {
"like": true
},
"whisper_id": null
},
{
"_id": "KHNJOU",
"audio_data": null,
"audio_text": "मुझे अपनी अच्छी सेहत के लिए क्या करना चाहिए",
"audio_translation": null,
"audio_url": "https://matar-audio.s3.ap-south-1.amazonaws.com/13TUAJ5OLCv2storage_emulated_0_Android_data_com.listag_files_DCIM_question_recording.mp3",
"category_ids": [
"WJ6BWG"
],
"chatgpt_query_id": null,
"child_posts": [
{
"_id": "TA94F4",
"audio_data": null,
"audio_text": null,
"audio_translation": null,
"audio_url": "https://matar-audio.s3.ap-south-1.amazonaws.com/ZJO90T7ZS5v2audio.mp3",
"category_ids": [
"WJ6BWG"
],
"chatgpt_query_id": null,
"created_at": "25/05/2023 , 06:19 AM",
"data": {
"block": 0,
"dislike": 1,
"duration": 4.98,
"like": 0,
"view": 2
},
"is_active": true,
"is_chatgpt_enabled": true,
"organization_id": "129487316",
"parent_post_id": "KHNJOU",
"sort_order": null,
"text": null,
"user": {
"_id": "BXLUNL",
"image_url": null,
"name": "sri"
},
"user_id": "BXLUNL",
"user_post_activities": {},
"whisper_id": null
}
}
}
Status Code: 🔴404 (404 denotes 'Not found')
{
"message": "Ain't no cake like that."
}
Note: The response is shortened for formatting purposes.
Get children(answers) for a specified question post.
Query Parameter ⬇️
post_id (required)
String
A unique identifier for a post to find children or answers for.
offset (optional)
String
Set this to show answers/replies or children starting from a specific page.
Header Parameter ⬇️
Bearer {{access_token}} (required)
String
Access tokens enable secure access to Matar Resources.
Body Parameter ⬇️
parent_post_id (required)
String
Required to view all replies/children post linked to parent/question post. Provide the post_id as parent_post_id.
Sample Request ⬇️️
curl --location --request GET 'https://matar.in.ngrok.io/api/v1/get_post?post_id=LX8LQC&offset=0' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6dHJ1ZSwiaWF0IjoxNjkyOTQzNDY0LCJqdGkiOiJmNTY2MWMzMC00YWNkLTRjNDUtYmU2NS03ZmQyOGM2OTJiYzMiLCJ0eXBlIjoiYWNjZXNzIiwic3ViIjoiMzk1MDFUIiwibmJmIjoxNjkyOTQzNDY0LCJleHAiOjE2OTM4MDc0NjR9.soJepZDtTK3JLfvMjl_XL5jwQr9sP8oTOiA43Fi7VZs ' \
--form 'parent_post_id="LX8LQC"'
Responses ⬇️
Status Code: 🟢200 (200 denotes 'ok')
{
"_id": "LX8LQC",
"audio_data": null,
"audio_text": null,
"audio_translation": null,
"audio_url": "https://matar-audio.s3.ap-south-1.amazonaws.com/EWT3IROKZEaud1.m4a",
"category_ids": [],
"chatgpt_query_id": null,
"child_posts": [
{
"_id": "H9998M",
"audio_data": null,
"audio_text": null,
"audio_translation": null,
"audio_url": "https://matar-audio.s3.ap-south-1.amazonaws.com/C4738WZB8Caud1.m4a",
"category_ids": [],
"chatgpt_query_id": null,
"data": {},
"is_active": true,
"parent_post_id": "LX8LQC",
"text": "dummy text",
"user_id": "EQOKSU",
"whisper_id": null
},
{
"_id": "LWMVZC",
"audio_data": null,
"audio_text": null,
"audio_translation": null,
"audio_url": "https://matar-audio.s3.ap-south-1.amazonaws.com/UNMQ5Z68P8aud1.m4a",
"category_ids": [],
"chatgpt_query_id": null,
"data": {},
"is_active": true,
"parent_post_id": "LX8LQC",
"text": "dummy text",
"user_id": "EQOKSU",
"whisper_id": null
}
],
"child_posts_details": {
"cursor": 0,
"total": 100
},
"data": {},
"is_active": true,
"parent_post_id": null,
"text": "dummy text",
"user_id": "EQOKSU",
"whisper_id": null
}
Status Code: 🔴404 (404 denotes 'Not found')
{
"message": "Ain't no cake like that."
}
Get limited number of children(answers) for a specified question post.
Query Parameter ⬇️
post_id (required)
String
A unique identifier for a post to find children or answers for.
offset (optional)
String
Set this to show specific number of answers or children
Header Parameter ⬇️
Bearer {{access_token}} (required)
String
Access tokens enable secure access to Matar Resources.
Body Parameter ⬇️
parent_post_id (required)
String
Required to view all replies/children post linked to parent/question post. Provide the post_id as parent_post_id.
Sample Request ⬇️️
curl --location --request GET 'https://matar.in.ngrok.io/api/v1/get_post?post_id=LX8LQC&offset=1&organization_id=129487316' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6dHJ1ZSwiaWF0IjoxNjkyOTQzNDY0LCJqdGkiOiJmNTY2MWMzMC00YWNkLTRjNDUtYmU2NS03ZmQyOGM2OTJiYzMiLCJ0eXBlIjoiYWNjZXNzIiwic3ViIjoiMzk1MDFUIiwibmJmIjoxNjkyOTQzNDY0LCJleHAiOjE2OTM4MDc0NjR9.soJepZDtTK3JLfvMjl_XL5jwQr9sP8oTOiA43Fi7VZs' \
--form 'parent_post_id="LX8LQC"'
Responses ⬇️
Status Code: 🟢200 (200 denotes 'ok')
The response will list only a single child post for every post ID as offset is set to 1 in the sample request query params:
{
"_id": "LX8LQC",
"audio_data": null,
"audio_text": null,
"audio_translation": null,
"audio_url": "https://matar-audio.s3.ap-south-1.amazonaws.com/EWT3IROKZEaud1.m4a",
"category_ids": [],
"chatgpt_query_id": null,
"child_posts": [
{
"_id": "H9998M",
"audio_data": null,
"audio_text": null,
"audio_translation": null,
"audio_url": "https://matar-audio.s3.ap-south-1.amazonaws.com/C4738WZB8Caud1.m4a",
"category_ids": [],
"chatgpt_query_id": null,
"data": {},
"is_active": true,
"parent_post_id": "LX8LQC",
"text": "dummy text",
"user_id": "EQOKSU",
"whisper_id": null
}
],
"child_posts_details": {
"current_start": 0,
"cursor": 0,
"next_offset": 2,
"total": 2
},
"data": {},
"is_active": true,
"parent_post_id": null,
"text": "dummy text",
"user_id": "EQOKSU",
"whisper_id": null
}
Status Code: 🔴404 (404 denotes 'Not found')
{
"message": "Ain't no cake like that."
}
Get posts by a specific category filter.
Query Parameter ⬇️
category_id (required)
String
A unique identifier for a category to find relevant posts.
organization_id (required)
String
A unique identifier for identifying psts under an organization
Header Parameter ⬇️
Bearer {{access_token}} (required)
String
Access tokens enable secure access to Matar Resources.
Sample Request ⬇️️
curl --location --request GET 'https://matar.in.ngrok.io/api/v1/get_post?category_id=TFTWNI&organization_id=129487316' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6dHJ1ZSwiaWF0IjoxNjkyOTQzNDY0LCJqdGkiOiJmNTY2MWMzMC00YWNkLTRjNDUtYmU2NS03ZmQyOGM2OTJiYzMiLCJ0eXBlIjoiYWNjZXNzIiwic3ViIjoiMzk1MDFUIiwibmJmIjoxNjkyOTQzNDY0LCJleHAiOjE2OTM4MDc0NjR9.soJepZDtTK3JLfvMjl_XL5jwQr9sP8oTOiA43Fi7VZs'
Responses ⬇️
Status Code: 🟢200 (200 denotes 'ok')
The response will list all the posts in an organization by filtering to a specific category ID provided. Note that there are a total of 15 posts in the response below for a specified category.
Note: The response below is shortened for formatting purposes.
{
"page_details": {
"current_start": 0,
"next_offset": 10,
"total": 15
},
"posts": [
{
"_id": "VAGDWM8YZP",
"audio_data": null,
"audio_text": "हमें अपनी अच्छी सेहत के लिए क्या करना चाहिए?",
"audio_translation": null,
"audio_url": "https://matar-audio.s3.ap-south-1.amazonaws.com/RLOCWGZWM5v2Sehat_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": "25/08/2023 , 06:05 AM",
"data": {
"duration": 4.56,
"like": 1
},
"is_active": true,
"is_chatgpt_enabled": false,
"organization_id": "129487316",
"parent_post_id": null,
"sort_order": null,
"text": "हमें अपनी अच्छी सेहत के लिए क्या करना चाहिए?",
"user": {
"_id": "39501T",
"image_url": "https://listapp-images.s3.ap-south-1.amazonaws.com/matar_profile_05.png",
"name": "Sri"
},
"user_id": "39501T",
"user_post_activities": {
"like": true
},
"whisper_id": null
},
{
"_id": "CONYLC",
"audio_data": null,
"audio_text": "श्रीमान एक किसान के तौर पर आपका सवाल है कि हम खेती लेकर किस तरह करियर बना सकते हैं और इसमें सफल होने के लिए कौनसी कदम उठाने होंगे खेती में अगर संभव हो तो कृपया उत्तर हिंदी में दें धन्यवाद",
"audio_translation": null,
"audio_url": "https://matar-audio.s3.ap-south-1.amazonaws.com/53WL1YSXP4v208DY48PDIF.mp3",
"category_ids": [
"TFTWNI"
],
"chatgpt_query_id": null,
"child_posts": [
{
"_id": "GSYRNH",
"audio_data": null,
"audio_text": null,
"audio_translation": null,
"audio_url": "https://matar-audio.s3.ap-south-1.amazonaws.com/O9AYC2TLXHv2storage_emulated_0_Android_data_com.mutter_files_DCIM_answer_recording.mp3",
"category_ids": [
"TFTWNI"
],
"chatgpt_query_id": null,
"created_at": "17/05/2023 , 06:06 AM",
"data": {
"block": 0,
"dislike": 1,
"downvote": 0,
"like": 4,
"view": 4
},
"is_active": true,
"is_chatgpt_enabled": true,
"organization_id": "129487316",
"parent_post_id": "CONYLC",
"sort_order": null,
"text": null,
"user": {
"_id": "XUEWT6",
"image_url": "https://listapp-images.s3.ap-south-1.amazonaws.com/matar_profile_05.png",
"name": "shantanu"
},
"user_id": "XUEWT6",
"user_post_activities": {},
"whisper_id": null
}
Status Code: 🔴404 (404 denotes 'Not found')
{
"message": "Ain't no cake like that."
}
Get questions/posts asked by the specific user.
Query Parameter ⬇️
user_questions (required)
Boolean
A unique boolean for a category to find relevant posts only related to user. Set to true to get only user posted questions.
organization_id (required)
String
A unique identifier for identifying relevant posts under an organization
Header Parameter ⬇️
Bearer {{access_token}} (required)
String
Access tokens enable secure access to Matar Server Resources.
Sample Request ⬇️️
curl --location 'https://matar.in.ngrok.io/api/v1/get_post?user_questions=true&organization_id=129487316' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6dHJ1ZSwiaWF0IjoxNjkzMTYzNjYyLCJqdGkiOiI2Yzk3NTI1Mi05OWIzLTQzODEtOTU1NC0zM2VmM2ZhNTE0ZjUiLCJ0eXBlIjoiYWNjZXNzIiwic3ViIjoiRUE5UzZaIiwibmJmIjoxNjkzMTYzNjYyLCJleHAiOjE2OTQwMjc2NjJ9.vVll7d-oq_pNU6dDIZvmxFndZAUQ9QvTdh_AA6BvVuE'
Responses ⬇️
Status Code: 🟢200 (200 denotes 'ok')
The response will list all the posts/questions in an organization by filtering to a specific user.
{
"page_details": {
"current_start": 0,
"next_offset": 1,
"total": 1
},
"posts": [
{
"_id": "ZNF04X",
"audio_data": null,
"audio_text": null,
"audio_translation": null,
"audio_url": "https://matar-audio.s3.ap-south-1.amazonaws.com/8Z3IK53SUBaud1.m4a",
"category_ids": [
"TFTWNI"
],
"chatgpt_query_id": null,
"child_posts": [],
"child_posts_details": {
"current_start": 0,
"cursor": 0,
"next_offset": 0,
"total": 0
},
"data": {},
"is_active": true,
"parent_post_id": null,
"text": null,
"user_id": "EQOKSU",
"whisper_id": null
}
]
}
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 on network
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 linked 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.
total
Total number of child posts
chatgpt_query_id
A chatgpt unique dentifier 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 organization active or not.
is_chatgpt_enabled
Is chat gpt enabled to answer to question post in 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.