Feed Notification Portal Post Questions Topics Users Groups Search Virtual Currency Errors Widgets Request API Credentials Introduction Welcome to the Tribe API! We have language bindings in Shell and JavaScript! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right. Authentication Tribe supports multiple authorization methods suitable for different scenarios. The two most common methods are: JWT Access Token Tribe Access Token JWT Access Token To authorize, use this code: # With shell, you can just pass the correct header with each request curl "api_endpoint_here" -H "Authorization: Bearer " Make sure to replace with your JWT access token. If your product's authentication already provides JWT access tokens, the easiest way is to use the same access token in Tribe. To do so, you need to install the "JWT Authorization" app from Tribe app store. Tribe supports JWKS and Public Key to validate the JWT access token. The JWT access token should include sub (The ID of user), name, iat (token issued time), and email. If the user already exists in Tribe it will perform the API request on behalf of the user. If the user does not exist, it will create the user based on the information in the JWT access token and performs the action on behalf of the new user. Tribe expects for the JWT access token to be included in API requests to the server in a header that looks like the following: Authorization: Bearer You must replace with the JWT access token. Tribe Access Token If your product does not support JWT access token or you are using Tribe as the main identity service, you need to first request for a client ID and client Secret by contacting us. Then, you'll be able to generate access token and refresh token using one of the following OAuth2 methods: The result for both POST requests will look like this: { "token_type": "bearer", "access_token": "", "expires_in": 31536000, "refresh_token": "" } To authorize, use this code: # With shell, you can just pass the correct header with each request curl "api_endpoint_here" -H "Authorization: Bearer " Make sure to replace with the generated access token. 1. Password Grant Type To get an access token for a user using their username/email and password you can use the password grant_type. This is useful when you want to authenticate user in a phone app or a custom login form, where user enters their username and password and you want to generate an access token for them. To do so, you should send a POST request to https://YOUR_COMMUNITY_URL/api/v1/oauth/token. It should include the following payload as application/x-www-form-urlencoded: Key Value grant_type password client_id The client ID provided by Tribe client_secret The client secret provided by Tribe username The username you want to authenticate with password The password you want to authenticate with 2. Tribe Custom Grant Type Tribe also have a custom grant_type called tribe:client_secret_credentials. With this grant type, you will be able to get the access_token and refresh_token for any user by their email, user_id (Tribe user id), or external_id (Your product's user_id that was passed in OAuth2 authentication). To do so, you should send a POST request to https://YOUR_COMMUNITY_URL/api/v1/oauth/token. It should include the following payload as application/x-www-form-urlencoded: Key Value grant_type tribe:client_secret_credentials client_id The client ID provided by Tribe client_secret The client secret provided by Tribe email, user_id or external_id The unique identifier of the user By default, this grant_type is open to all IP addresses, but for security reasons, we suggest that you give us a list of IP addresses and we'll limit it to those. Tribe expects the access token to be included in API requests to the server in a header that looks like the following: Authorization: Bearer You must replace with the generated access token. Answers Get All Answers curl "https://community.tribe.so/api/v1/answers" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: [ { "_id": "5bf0e89ada3be54c190b78ba", "updatedAt": "2018-12-03T22:20:11.069Z", "createdAt": "2018-11-18T04:20:42.892Z", "draftContent": "", "portal": "5a73b1fcc48071e4c4dc1cae", "question": { "_id": "5bf0e860da3be54c190b78b8", "shortId": "5okGL", "updatedAt": "2018-12-03T23:26:53.588Z", "createdAt": "2018-11-18T04:19:44.936Z", "title": "Can I embed external services (YouTube, Vimeo, etc.) in my answers or posts?", "user": { "_id": "5bacc9ff630b876a1e9785f7", "profile": { "counts": { "requests": 0, "edits": 0, "questionsFollowers": 0, "questions": 8, "comments": 0, "answersWords": 615, "answersVotes": 0, "answersViews": 0, "answers": 3, "views": 0, "followings": 0, "followers": 0 }, "score": 13, "externalId": null, "verified": false, "description": "", "title": "", "picture": "/files/users/5f7/5bacc9ff630b876a1e9785f7_15302.png", "website": "", "location": "", "gender": "", "name": "Robert D", "username": "robertd" }, "id": "5bacc9ff630b876a1e9785f7" }, "publishedAt": "2018-11-18T04:19:44.933Z", "portal": "5a73b1fcc48071e4c4dc1cae", "lastAskedAt": "2018-11-18T04:19:44.933Z", "actor": "5b1f99a7478dd3768d84b646", "__v": 1, "lastAnsweredAt": "2018-11-18T04:25:42.040Z", "referrers": [], "rewards": [], "hasReward": false, "downvotes": [], "upvotes": [], "followers": [], "askers": [], "comments": [], "topics": [ { "_id": "5b88264d3d9228aa7c41f692", "name": "Tribe", "user": { "_id": "5b881b2a90ecbe6751123d7e", "profile": { "counts": { "requests": 2, "edits": 148, "questionsFollowers": 0, "questions": 32, "comments": 0, "answersWords": 5753, "answersVotes": 0, "answersViews": 0, "answers": 31, "views": 0, "followings": 1, "followers": 2 }, "score": 115, "externalId": null, "verified": false, "description": "

 

", "title": "Biomedical Engineer ", "picture": "/files/users/d7e/5b881b2a90ecbe6751123d7e_57697.png", "website": "", "location": "", "gender": "", "name": "Elnaz Najafi", "username": "elnajafi89" }, "id": "5b881b2a90ecbe6751123d7e" }, "picture": "/files/topics/692/5b88264d3d9228aa7c41f692_72807.png", "id": "5b88264d3d9228aa7c41f692" } ], "score": 0, "status": "published", "counts": { "asks": 1, "downvotes": 0, "upvotes": 0, "edits": 2, "comments": 0, "hiddenAnswers": 0, "answers": 1, "views": 33, "followers": 0 }, "type": "general", "privacy": "public", "anonymous": false, "verified": false, "locked": false, "id": "5bf0e860da3be54c190b78b8" }, "user": { "_id": "5b1f99a7478dd3768d84b646", "profile": { "counts": { "requests": 2, "edits": 46, "questionsFollowers": 0, "questions": 2, "comments": 2, "answersWords": 1586, "answersVotes": 0, "answersViews": 0, "answers": 12, "views": 0, "followings": 3, "followers": 3 }, "score": 52, "externalId": null, "verified": true, "description": "

 

", "title": "Tribe Moderator", "picture": "/files/users/646/5b1f99a7478dd3768d84b646_66172.png", "website": "", "location": "", "gender": "male", "name": "Siavash Mahmoudian", "username": "siavash" }, "id": "5b1f99a7478dd3768d84b646", "followed": false }, "__v": 1, "publishedAt": "2018-11-18T04:25:42.037Z", "shortId": "PEVpN", "downvotes": [], "upvotes": [ "5bc64d97a8c76d6d771ae914" ], "comments": [], "rewards": [], "images": [], "links": [], "score": 0, "global": true, "status": "published", "media": [], "counts": { "reasks": 0, "edits": 2, "downvotes": 0, "upvotes": 1, "comments": 0, "views": 34 }, "privacy": "public", "anonymous": false, "verified": false, "summary": "...", "id": "5bf0e89ada3be54c190b78ba", "upvoted": false, "downvoted": false, "intro": "..." } ] This endpoint retrieves all answers. HTTP Request GET /api/v1/answers Query Parameters Parameter Type Default Description page Number 1 Intended page limit Number 20 Number of items per page sort String createdAt.desc The field to sort on Get a Specific Answer curl "https://community.tribe.so/api/v1/answers/5bf0e89ada3be54c190b78ba" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "_id": "5bf0e89ada3be54c190b78ba", "updatedAt": "2018-12-03T22:20:11.069Z", "createdAt": "2018-11-18T04:20:42.892Z", "draftContent": "", "portal": "5a73b1fcc48071e4c4dc1cae", "question": { "_id": "5bf0e860da3be54c190b78b8", "shortId": "5okGL", "updatedAt": "2018-12-03T23:26:53.588Z", "createdAt": "2018-11-18T04:19:44.936Z", "title": "Can I embed external services (YouTube, Vimeo, etc.) in my answers or posts?", "user": { "_id": "5bacc9ff630b876a1e9785f7", "profile": { "counts": { "requests": 0, "edits": 0, "questionsFollowers": 0, "questions": 8, "comments": 0, "answersWords": 615, "answersVotes": 0, "answersViews": 0, "answers": 3, "views": 0, "followings": 0, "followers": 0 }, "score": 13, "externalId": null, "verified": false, "description": "", "title": "", "picture": "/files/users/5f7/5bacc9ff630b876a1e9785f7_15302.png", "website": "", "location": "", "gender": "", "name": "Robert D", "username": "robertd" }, "id": "5bacc9ff630b876a1e9785f7" }, "publishedAt": "2018-11-18T04:19:44.933Z", "portal": "5a73b1fcc48071e4c4dc1cae", "lastAskedAt": "2018-11-18T04:19:44.933Z", "actor": "5b1f99a7478dd3768d84b646", "__v": 1, "lastAnsweredAt": "2018-11-18T04:25:42.040Z", "referrers": [], "rewards": [], "hasReward": false, "downvotes": [], "upvotes": [], "followers": [], "askers": [], "comments": [], "topics": [ { "_id": "5b88264d3d9228aa7c41f692", "name": "Tribe", "user": { "_id": "5b881b2a90ecbe6751123d7e", "profile": { "counts": { "requests": 2, "edits": 148, "questionsFollowers": 0, "questions": 32, "comments": 0, "answersWords": 5753, "answersVotes": 0, "answersViews": 0, "answers": 31, "views": 0, "followings": 1, "followers": 2 }, "score": 115, "externalId": null, "verified": false, "description": "

 

", "title": "Biomedical Engineer ", "picture": "/files/users/d7e/5b881b2a90ecbe6751123d7e_57697.png", "website": "", "location": "", "gender": "", "name": "Elnaz Najafi", "username": "elnajafi89" }, "id": "5b881b2a90ecbe6751123d7e" }, "picture": "/files/topics/692/5b88264d3d9228aa7c41f692_72807.png", "id": "5b88264d3d9228aa7c41f692" } ], "score": 0, "status": "published", "counts": { "asks": 1, "downvotes": 0, "upvotes": 0, "edits": 2, "comments": 0, "hiddenAnswers": 0, "answers": 1, "views": 33, "followers": 0 }, "type": "general", "privacy": "public", "anonymous": false, "verified": false, "locked": false, "id": "5bf0e860da3be54c190b78b8" }, "user": { "_id": "5b1f99a7478dd3768d84b646", "profile": { "counts": { "requests": 2, "edits": 46, "questionsFollowers": 0, "questions": 2, "comments": 2, "answersWords": 1586, "answersVotes": 0, "answersViews": 0, "answers": 12, "views": 0, "followings": 3, "followers": 3 }, "score": 52, "externalId": null, "verified": true, "description": "

 

", "title": "Tribe Moderator", "picture": "/files/users/646/5b1f99a7478dd3768d84b646_66172.png", "website": "", "location": "", "gender": "male", "name": "Siavash Mahmoudian", "username": "siavash" }, "id": "5b1f99a7478dd3768d84b646", "followed": false }, "__v": 1, "publishedAt": "2018-11-18T04:25:42.037Z", "shortId": "PEVpN", "downvotes": [], "upvotes": [ "5bc64d97a8c76d6d771ae914" ], "comments": [], "rewards": [], "images": [], "links": [], "score": 0, "global": true, "status": "published", "media": [], "counts": { "reasks": 0, "edits": 2, "downvotes": 0, "upvotes": 1, "comments": 0, "views": 34 }, "privacy": "public", "anonymous": false, "verified": false, "summary": "...", "id": "5bf0e89ada3be54c190b78ba", "upvoted": false, "downvoted": false, "intro": "..." } This endpoint retrieves a specific answer using ID. HTTP Request GET /api/v1/answers/{id} URL Parameters Parameter Type Description id String The ID of the item Create an Answer curl "https://community.tribe.so/api/v1/questions/5c7bfc7a157c2c34f735a53e/answers" -X POST -H "Authorization: Bearer {access_token}" -H 'Content-Type: application/json; charset=utf-8' --DATA '{"content":""

Very good answer!

","anonymous": false,"status":"published"}' The above command returns JSON structured like this: { "_id": "5c7c04de68b07737dec0b39e", "updatedAt": "2019-03-03T16:49:29.077Z", "createdAt": "2019-03-03T16:46:22.281Z", "portal": "5c7bf24f157c2c34f735a539", "question": { "_id": "5c7bfc7a157c2c34f735a53e", "shortId": "5ogL5", "lang": "en", "updatedAt": "2019-03-03T16:47:35.149Z", "createdAt": "2019-03-03T16:10:34.005Z", "title": "My anonymous question", "publishedAt": "2019-03-03T16:10:34.003Z", "portal": "5c7bf24f157c2c34f735a539", "lastAskedAt": "2019-03-03T16:10:34.003Z", "user": { "_id": "5c7bf251157c2c34f735a53a", "profile": { "counts": { "requests": 0, "edits": 1, "questionsFollowers": 0, "questions": 2, "comments": 0, "answersWords": 3, "answersVotes": 0, "answersViews": 0, "answers": 1, "views": 0, "followings": 0, "followers": 0 }, "score": 10, "verified": false, "description": "", "title": "", "picture": "https://gravatar.com/avatar/b7711ecd91aebb5dd1b7c153dbfd92d0?s=200&d=retro", "website": "", "location": "", "gender": "", "name": "Admin", "username": "admin" }, "id": "5c7bf251157c2c34f735a53a" }, "__v": 1, "lastAnsweredAt": "2019-03-03T16:47:35.149Z", "referrers": [], "rewards": [], "hasReward": false, "downvotes": [], "upvotes": [], "followers": [], "askers": [], "comments": [], "topics": [ { "_id": "5c7bff4bc389b77bdf1f2726", "name": "test", "user": { "_id": "5c7bf251157c2c34f735a53a", "profile": { "counts": { "requests": 0, "edits": 1, "questionsFollowers": 0, "questions": 2, "comments": 0, "answersWords": 3, "answersVotes": 0, "answersViews": 0, "answers": 1, "views": 0, "followings": 0, "followers": 0 }, "score": 10, "verified": false, "description": "", "title": "", "picture": "https://gravatar.com/avatar/b7711ecd91aebb5dd1b7c153dbfd92d0?s=200&d=retro", "website": "", "location": "", "gender": "", "name": "Admin", "username": "admin" }, "id": "5c7bf251157c2c34f735a53a" }, "id": "5c7bff4bc389b77bdf1f2726" } ], "score": 0, "status": "published", "counts": { "asks": 1, "downvotes": 0, "upvotes": 0, "edits": 2, "comments": 0, "hiddenAnswers": 0, "answers": 2, "views": 1, "followers": 0 }, "type": "general", "privacy": "public", "anonymous": false, "verified": false, "locked": false, "id": "5c7bfc7a157c2c34f735a53e" }, "user": { "_id": "5c7c00dd68b07737dec0b39a", "profile": { "counts": { "requests": 0, "edits": 2, "questionsFollowers": 0, "questions": 0, "comments": 0, "answersWords": 3, "answersVotes": 0, "answersViews": 0, "answers": 1, "views": 0, "followings": 0, "followers": 0 }, "score": 10, "verified": false, "description": "", "title": "", "picture": "https://gravatar.com/avatar/a6ac5b09b633aafba41b4a0cda22976e?s=200&d=retro", "website": "", "location": "", "gender": "", "name": "Amir", "username": "triplea1373" }, "id": "5c7c00dd68b07737dec0b39a" }, "__v": 0, "content": "

Very good answer!A

", "draftContent": "", "publishedAt": "2019-03-03T16:47:35.147Z", "shortId": "yJ1pQ", "downvotes": [], "upvotes": [], "comments": [], "rewards": [], "images": [], "links": [], "score": 0, "global": true, "status": "published", "media": [], "counts": { "reasks": 0, "edits": 3, "downvotes": 0, "upvotes": 0, "comments": 0, "views": 1 }, "privacy": "public", "anonymous": false, "verified": false, "summary": "Very good answer!A", "id": "5c7c04de68b07737dec0b39e", "upvoted": false, "downvoted": false } The endpoint creates an answer for a specific question. HTTP Request POST /api/v1/questions/:questionId/answers URL Parameters Parameter Type Description questionId String The ID of the question Request Parameters Parameter Type Description content String The content of the answer anonymous Boolean Is it an anonymous answer or not status String Status of the answer. Can be: archived collapsed draft published unapproved unlisted scheduled new Extra Request Parameters for Moderators Parameter Type Description verified Boolean Is this answer verified or not user String The ID of the user to create an answer on behalf Answer a poll curl "https://community.tribe.so/api/v1/answers/5e3d8df499d91a48d101d8e2/poll" -X POST -H "Authorization: Bearer {access_token}" -H 'Content-Type: application/json; charset=utf-8' --DATA '{"poll":"5e3d8df499d91a48d101d8e4"}' The endpoint creates a poll answer for a specific question. HTTP Request POST /api/v1/answers/:questionId/poll URL Parameters Parameter Type Description questionId String The ID of the question Request Parameters Parameter Type Description poll String ID of the selected poll option Update a Specific Answer curl "https://community.tribe.so/api/v1/answers/5bf0e89ada3be54c190b78ba" -X PUT -H "Authorization: Bearer {access_token}" -H 'Content-Type: application/json; charset=utf-8' --DATA '{"content":"Test answer","anonymous": false,"status":"published"}' This endpoint update a specific answer. HTTP Request PUT /api/v1/answers/{id} URL Parameters Parameter Type Description id String The ID of the answer to update Request Parameters Parameter Type Description content String The content of the answer anonymous String Is it an anonymous answer or not Extra Request Parameters for Moderators Parameter Type Description verified String Is this a verified answer or not status String Status of the answer. Can be: archived collapsed draft published unapproved unlisted scheduled new Delete a Specific Answer curl "https://community.tribe.so/api/v1/answers/5bf0e89ada3be54c190b78ba" -X DELETE -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "success": true } This endpoint deletes a specific answer. HTTP Request DELETE /api/v1/answers/{id} URL Parameters Parameter Type Description id String The ID of the answer to delete Delete a Specific Draft Answer curl "https://community.tribe.so/api/v1/answers/5bf0e89ada3be54c190b78ba/draft" -X DELETE -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "success": true } This endpoint deletes a specific draft answer. HTTP Request DELETE /api/v1/answers/{id}/draft URL Parameters Parameter Type Description id String The ID of the answer to delete Upvote a Specific Answer curl "https://community.tribe.so/api/v1/answers/5bf0e89ada3be54c190b78ba/votes" -X POST -H "Authorization: Bearer {access_token}" This endpoint upvotes for a specific answer. HTTP Request POST /api/v1/answers/:id/votes URL Parameters Parameter Type Description id String The ID of the answer to add a vote Remove Upvote for a Specific Answer curl "https://community.tribe.so/api/v1/answers/5bf0e89ada3be54c190b78ba/votes" -X DELETE -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "success": true } This endpoint removes an upvote for a specific answer. HTTP Request DELETE /api/v1/answers/:id/votes URL Parameters Parameter Type Description id String The ID of the answer to remove a vote Get List of Votes for a Specific Answer curl "https://community.tribe.so/api/v1/answers/5bf0e89ada3be54c190b78ba/votes" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "upvotes": [ { "_id": "5bc64d97a8c76d6d771ae914", "profile": { "title": "Customer Success @Tribe", "picture": "https://gravatar.com/avatar/1ec94547651bb4e27ce2bdd0113f7487?s=200&d=retro", "name": "Mo Malayeri", "username": "mo11832" }, "id": "5bc64d97a8c76d6d771ae914" }, { "_id": "5b881b2a90ecbe6751123d7e", "profile": { "title": "Community Manager at Tribe", "picture": "/files/users/d7e/5b881b2a90ecbe6751123d7e_88402.png", "name": "Eli Najafi", "username": "elnaz" }, "id": "5b881b2a90ecbe6751123d7e" }, { "_id": "5b912f01f19a473232026862", "profile": { "title": "Marketing Manager", "picture": "/files/users/862/5b912f01f19a473232026862_29979.png", "name": "Melanie Jones", "username": "mike2" }, "id": "5b912f01f19a473232026862" }, { "_id": "5bacc9ff630b876a1e9785f7", "profile": { "title": "", "picture": "/files/users/5f7/5bacc9ff630b876a1e9785f7_15302.png", "name": "Robert D", "username": "robertd" }, "id": "5bacc9ff630b876a1e9785f7" }, { "_id": "5ba95b5c630b876a1e9785a5", "profile": { "title": "Community Manager at BHD", "picture": "/files/users/5a5/5ba95b5c630b876a1e9785a5_41926.png", "name": "Eddie Reid", "username": "ereid" }, "id": "5ba95b5c630b876a1e9785a5" }, { "_id": "5b8ff4190607d4174e2eb73b", "profile": { "title": "Community Moderator at Acondo", "picture": "/files/users/73b/5b8ff4190607d4174e2eb73b_29849.png", "name": "Kenneth Jensen", "username": "mike1" }, "id": "5b8ff4190607d4174e2eb73b" } ], "downvotes": [] } This endpoint retrieves all answers for a specific answer. HTTP Request GET /api/v1/answers/:id/votes URL Parameters Parameter Type Description id String The ID of the answer to receive the votes Add a Comment for a Specific Answer curl "https://community.tribe.so/api/v1/answers/5bf0e89ada3be54c190b78ba/comments" -X POST -H "Authorization: Bearer {access_token}" --DATA "{'body':'New comment'}" This endpoint adds a comment for a specific answer. HTTP Request POST /api/v1/answers/:id/comments URL Parameters Parameter Type Description id String The ID of the answer to add a comment Request Parameters Parameter Type Description body String The content of the comment Extra Request Parameters for Moderators Parameter Type Description user String The ID of the user to comment on behalf Update a Specific Comment for a Specific Answer curl "https://community.tribe.so/api/v1/answers/5bf0e89ada3be54c190b78ba/comments/4sf0e89ada3be54c190b78b2" -X PUT -H "Authorization: Bearer {access_token}" --DATA "{'body':'Updated comment'}" This endpoint updates a specific comment. HTTP Request PUT /api/v1/answers/:answerId/comments/:id URL Parameters Parameter Type Description id String The ID of the comment to update answerId String The ID of the answer to add a comment Request Parameters Parameter Type Description body String The content of the comment Remove a Specific Comment from a Specific Answer curl "https://community.tribe.so/api/v1/answers/5bf0e89ada3be54c190b78ba/comments/4sf0e89ada3be54c190b78b2" -X DELETE -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "success": true } This endpoint removes a specific comment. HTTP Request DELETE /api/v1/answers/:answerId/comments/:id URL Parameters Parameter Type Description id String The ID of the comment to remove answerId String The ID of the answer to remove a comment Add Log for Specific Answers curl "https://community.tribe.so/api/v1/answers/logs" -X POST -H "Authorization: Bearer {access_token}" --DATA '{ ids: ["5bf0e89ada3be54c190b78ba"] }' The above command returns JSON structured like this: { "success": true } This endpoint adds a log for a specific answer. HTTP Request POST /api/v1/answers/logs Request Parameters Parameter Type Description logs Array The ID of answers to add log Get Stats of Specific User for Answers curl "https://community.tribe.so/api/v1/user/stats/answers/views" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "values": { "2019-02-10": 0, "2019-02-11": 0, "2019-02-12": 0, "2019-02-13": 0, "2019-02-14": 0, "2019-02-15": 0, "2019-02-16": 0, "2019-02-17": 0, "2019-02-18": 0, "2019-02-19": 0, "2019-02-20": 0, "2019-02-21": 0, "2019-02-22": 0, "2019-02-23": 0, "2019-02-24": 0, "2019-02-25": 0, "2019-02-26": 0, "2019-02-27": 0, "2019-02-28": 0, "2019-03-01": 0, "2019-03-02": 0, "2019-03-03": 0, "2019-03-04": 0, "2019-03-05": 0, "2019-03-06": 0, "2019-03-07": 0, "2019-03-08": 0, "2019-03-09": 0, "2019-03-10": 0, "2019-03-11": 0, "2019-03-12": 0, "2019-03-13": 0 }, "type": "user_answer_viewed", "timestamp": "2019-03-01" } This endpoint returns statistics of a specific user for answers. HTTP Request GET /api/v1/user/stats/answers/:metric Request Parameters Parameter Type Description metric String Metric for the statistics. Can be views,votes,follows Reporting a Specific Answer curl "https://community.tribe.so/api/v1/answers/5a816275f8030b3bdd655b0d/reports" -X POST -H "Authorization: Bearer {access_token}" This endpoint reports (flags) a specific answer to admins and moderators. HTTP Request POST /api/v1/answers/:id/reports URL Parameters Parameter Type Description id String The ID of the answer to report Query Parameters Parameter Type Description type String The type of the report. Can be Harrasment, Spam, DoesntAnswerQuestion, Plagiarism, JokeAnswer, OutOfDate, PoorlyWritten, FactuallyIncorrect, or AgainstRules description String The optional description of the report shown to admins and moderators Comments Update a Specific Comment curl "https://community.tribe.so/api/v1/comments/5c0621864cb2b119dc174a63" -X PUT -H "Authorization: Bearer {access_token}" --DATA "{data}" This endpoint updates a specific comment. HTTP Request PUT /api/v1/comments/:id URL Parameters Parameter Type Description id String The ID of the comment to update Request Parameters Parameter Type Description body String The content of the comment Delete a Specific Comment curl "https://community.tribe.so/api/v1/comments/5c0621864cb2b119dc174a63" -X DELETE -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "success": true } This endpoint deletes a specific comment. HTTP Request DELETE /api/v1/comments/{id} URL Parameters Parameter Type Description id String The ID of the comment to delete Upvote for a Specific Comment curl "https://community.tribe.so/api/v1/comments/5c0621864cb2b119dc174a63/votes" -X POST -H "Authorization: Bearer {access_token}" This endpoint upvotes a specific comment. HTTP Request POST /api/v1/comments/{id}/votes URL Parameters Parameter Type Description id String The ID of the comment to upvote Remove an Upvote for a Specific Comment curl "https://community.tribe.so/api/v1/comments/5c0621864cb2b119dc174a63/votes" -X DELETE -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "success": true } This endpoint removes an upvote a specific comment. HTTP Request DELETE /api/v1/comments/{id}/votes URL Parameters Parameter Type Description id String The ID of the comment to remove an upvote Reporting a Specific Comment curl "https://community.tribe.so/api/v1/comments/5a816275f8030b3bdd655b0d/reports" -X POST -H "Authorization: Bearer {access_token}" This endpoint reports (flags) a specific comment to admins and moderators. HTTP Request POST /api/v1/comments/:id/reports URL Parameters Parameter Type Description id String The ID of the comment to report Query Parameters Parameter Type Description type String The type of the report. Can be Harrasment, Spam, Plagiarism, JokeComment, OutOfDate, PoorlyWritten, FactuallyIncorrect, or AgainstRules description String The optional description of the report shown to admins and moderators Feed Get User Feed curl "https://community.tribe.so/api/v1/feed" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: [ { "_id": "topics-1", "type": "Topics", "topics": [ ... ], "description": "You have not picked any topics yet. Please pick some to improve this page." }, { "_id": "5c0621864cb2b119dc174a63", "type": "Discussion", "publishedAt": "2018-12-04T06:41:10.031Z", "post": { ... } }, { "_id": "5bf0e89ada3be54c190b78ba", "type": "Answer", "publishedAt": "2018-11-18T04:25:42.037Z", "answer": { ... } } ] This endpoint retrieves user feed. HTTP Request GET /api/v1/feed Query Parameters Parameter Type Default Description type String Comma separated list of types to filter on. Types can be post, question, discussion, and article page Number 1 Intended page limit Number 20 Number of items per page sort String createdAt.desc The field to sort on Notification Get User Notification curl "https://community.tribe.so/api/v1/notifications" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: [ { "_id": "5bf2ac9b86eb922c246e77ca", "emailAt": "2018-11-19T12:29:15.723Z", "updatedAt": "2018-11-19T12:29:15.722Z", "createdAt": "2018-11-19T12:29:15.722Z", "verb": "follow_user", "to": "5b1f99a7478dd3768d84b646", "__v": 0, "emailSent": false, "read": false, "objects": [], "from": [ { "_id": "5bd164051f117e0440efb07c", "profile": { "picture": "https://gravatar.com/avatar/533db9190e9912306ed3334e3dba2a56?s=200&d=retro", "name": "Sayle", "username": "sayele" }, "id": "5bd164051f117e0440efb07c" } ] }, { "_id": "5bf210a61c546252b2d79030", "updatedAt": "2018-11-19T01:23:50.998Z", "createdAt": "2018-11-19T01:23:50.998Z", "verb": "upvote", "to": "5b1f99a7478dd3768d84b646", "__v": 0, "emailSent": false, "read": false, "objects": [ { ... } ], "from": [ { "_id": "5bd9d35ad242f810e3d84ab6", "profile": { "picture": "/files/users/ab6/5bd9d35ad242f810e3d84ab6_77365.png", "name": "Soheil Alavi", "username": "soheil" }, "id": "5bd9d35ad242f810e3d84ab6" } ] }, { "_id": "5be36b573fb95035bf9085a5", "emailAt": "2018-11-07T22:46:47.681Z", "updatedAt": "2018-11-07T22:46:47.679Z", "createdAt": "2018-11-07T22:46:47.679Z", "verb": "ask", "to": "5b1f99a7478dd3768d84b646", "__v": 0, "emailSent": false, "read": false, "objects": [ { "_id": "5be36b573fb95035bf9085a3", "shortId": "QrmZ6", "updatedAt": "2018-11-22T22:09:56.432Z", "createdAt": "2018-11-07T22:46:47.522Z", "title": "What is Tribe's Privacy Policy?", "publishedAt": "2018-11-07T22:46:47.519Z", "portal": "5a73b1fcc48071e4c4dc1cae", "lastAskedAt": "2018-11-07T22:46:47.519Z", "actor": "5b3f7fe0d5a11b6297259cab", "__v": 2, "lastAnsweredAt": "2018-11-07T22:47:16.105Z", "referrers": [ { "type": "social", "source": "facebook", "count": 1, "_id": "5be36fa23fb95035bf9085a8", "urls": [] } ], "rewards": [], "hasReward": false, "askers": [], "score": 0, "status": "published", "type": "general", "privacy": "public", "anonymous": false, "verified": false, "locked": false, "id": "5be36b573fb95035bf9085a3" } ], "from": [ { "_id": "5b913111f19a473232026877", "profile": { "picture": "/files/users/877/5b913111f19a473232026877_65884.png", "name": "Adrian Garcia", "username": "adriang" }, "id": "5b913111f19a473232026877" } ] } ] This endpoint retrieves user notifications. HTTP Request GET /api/v1/notifications Query Parameters Parameter Type Default Description page Number 1 Intended page limit Number 20 Number of items per page Get User Notification Summary curl "https://community.tribe.so/api/v1/notifications/summary" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "count": "19" } This endpoint retrieves user notifications count. HTTP Request GET /api/v1/notifications/summary Mark All Notifications as Read curl "https://community.tribe.so/api/v1/notifications/summary" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "success": true } This endpoint marks all user notifications as read. HTTP Request POST /api/v1/notifications/read Mark a Specific Notification as Read curl "https://community.tribe.so/api/v1/notifications/5b913111f19a473232026877/read" -X POST -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "success": true } This endpoint marks a specific notification as read. HTTP Request POST /api/v1/notifications/:id/read URL Parameters Parameter Type Description id String The ID of the notification to mark as read Firebase Notification curl "https://community.tribe.so/api/v1/user/devices" -X POST -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "success": true } If you are using Firebase app, you can receive the firebase notification on user devices. After installing the app, you should paste your JSON configuration file in the app's settings section. You must include inside the JSON. After finishing the configuration, you need you need to register the device tokens. HTTP Request This endpoint register the token to a specific user. POST /api/v1/user/devices URL Parameters Parameter Type Description type String Type of the device. It can be android, ios token String The device token to register name String Name associated to the device HTTP Request This endpoint discards the token from a specific user. DELETE /api/v1/user/devices URL Parameters Parameter Type Description token String The device token to discard Notification Object The notification object you receive in the device have the following structure. Key Value title Name of the portal body Message of the notification name Name of the user icon Icon of the notification url URL associated with the notification tag A static string with notification as value Portal Get Portal Information curl "https://community.tribe.so/api/v1/portal" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "_id": "5a73b1fcc48071e4c4dc1cae", "updatedAt": "2018-11-30T00:46:42.809Z", "createdAt": "2018-02-02T02:13:32.692Z", "name": "Tribe", "domain": "community.tribe.so", "baseUrl": "https://community.tribe.so", "moderators": [], "admins": [], "__v": 9, "englishName": "Tribe", "description": "Tribe is a cloud-based community platform that plugs into your marketing stack. Integrated with your social media, it helps you amplify the vibe around your business by allowing you and your customers to create content.", "keywords": "", "longName": "Tribe, a cloud based community platform", "favicon": "/files/portals/cae/favicon_19357.png", "logo": "/files/portals/cae/logo_59518.png", "banner": "/files/portals/cae/banner_96419.png", "apps": [], "announcement": { "title": "Forums are dead. Build your tribe.", "picture": "/files/portals/cae/announcement_79671.png", "link": "https://tribe.so/#request-form", "enabled": true, "content": "

Tribe is a cloud-based community platform that plugs into your marketing stack. Integrated with your social media, it helps you amplify the vibe around your business by allowing you and your customers to create content. 

", "action": "Request Demo", "layout": "imageSidePadded" }, "template": { "sidebar": "", "head": "", "css": "", "body": "", "menu": { "height": 65 }, "navbar": { "links": [ { "_id": "5bf2400486eb922c246e77c5", "url": "https://tribe.so/features", "text": "Features", "position": "start" }, { "_id": "5bf2400486eb922c246e77c4", "url": "https://tribe.so/services", "text": "Services", "position": "start" }, { "_id": "5bf2400486eb922c246e77c3", "url": "https://tribe.so/#pricing", "text": "Pricing", "position": "start" }, { "_id": "5bf2400486eb922c246e77c2", "url": "https://tribe.so/app-store", "text": "App Store", "position": "start" } ], "enabled": true, "linksString": "Features | https://tribe.so/features | start\nServices | https://tribe.so/services | start\nPricing | https://tribe.so/#pricing | start\nApp Store | https://tribe.so/app-store | start" }, "colors": { "primary": "#26c964" }, "theme": "default" }, "messages": { "motto": "Join the community of community managers!" }, "featured": { "posts": [], "events": [], "answers": [ "5babcf33630b876a1e9785cd" ], "topics": [ "5b912fcb3d9228aa7c4220dc", "5b9002da3d9228aa7c421ec4", "5b912f963d9228aa7c4220db", "5b8ffc353d9228aa7c421eb1", "5b9ad5883d9228aa7c422f0c", "5b88264d3d9228aa7c41f692" ], "users": [], "questions": [] }, "links": { "twitter": "", "telegram": "", "privacy": "/question/5be36b573fb95035bf9085a3", "linkedin": "", "instagram": "", "faq": "", "facebook": "" }, "currency": { "external": { "name": "CAD" }, "conversionRate": 1, "internal": { "name": "Coin" }, "enabled": true }, "counts": { "unapprovedAnswers": 0, "unapprovedQuestions": 0, "comments": 0, "unanswered": 25, "topics": 30, "answers": 72, "questions": 91, "users": 28 }, "sections": [], "policies": { "cookieConsent": "enabled", "registration": "public", "content": "shareable", "access": "public" }, "stage": "inception", "status": "live", "type": "root", "plan": "basic", "topics": [ { "_id": "5b9ad5883d9228aa7c422f0c", "name": "Online Community", "user": { "_id": "5b881b2a90ecbe6751123d7e", "profile": { "counts": { "requests": 2, "edits": 148, "questionsFollowers": 0, "questions": 32, "comments": 0, "answersWords": 5753, "answersVotes": 0, "answersViews": 0, "answers": 31, "views": 0, "followings": 1, "followers": 2 }, "score": 115, "externalId": null, "verified": false, "description": "

 

", "title": "Biomedical Engineer ", "picture": "/files/users/d7e/5b881b2a90ecbe6751123d7e_57697.png", "website": "", "location": "", "gender": "", "name": "Elnaz Najafi", "username": "elnajafi89" }, "id": "5b881b2a90ecbe6751123d7e" }, "picture": "/files/topics/f0c/5b9ad5883d9228aa7c422f0c_586.png", "id": "5b9ad5883d9228aa7c422f0c" }, { "_id": "5babb4603d9228aa7c423c23", "name": "Tribe Services", "user": { "_id": "5b881b2a90ecbe6751123d7e", "profile": { "counts": { "requests": 2, "edits": 148, "questionsFollowers": 0, "questions": 32, "comments": 0, "answersWords": 5753, "answersVotes": 0, "answersViews": 0, "answers": 31, "views": 0, "followings": 1, "followers": 2 }, "score": 115, "externalId": null, "verified": false, "description": "

 

", "title": "Biomedical Engineer ", "picture": "/files/users/d7e/5b881b2a90ecbe6751123d7e_57697.png", "website": "", "location": "", "gender": "", "name": "Elnaz Najafi", "username": "elnajafi89" }, "id": "5b881b2a90ecbe6751123d7e" }, "picture": "/files/topics/c23/5babb4603d9228aa7c423c23_22837.png", "id": "5babb4603d9228aa7c423c23" }, { "_id": "5bb1abe13d9228aa7c4242ba", "name": "Tribe Features", "user": { "_id": "5b1f99a7478dd3768d84b646", "profile": { "counts": { "requests": 2, "edits": 46, "questionsFollowers": 0, "questions": 2, "comments": 2, "answersWords": 1586, "answersVotes": 0, "answersViews": 0, "answers": 12, "views": 0, "followings": 3, "followers": 3 }, "score": 52, "externalId": null, "verified": true, "description": "

 

", "title": "Tribe Moderator", "picture": "/files/users/646/5b1f99a7478dd3768d84b646_66172.png", "website": "", "location": "", "gender": "male", "name": "Siavash Mahmoudian", "username": "siavash" }, "id": "5b1f99a7478dd3768d84b646" }, "picture": "/files/topics/2ba/5bb1abe13d9228aa7c4242ba_65172.png", "id": "5bb1abe13d9228aa7c4242ba" }, { "_id": "5babe5eb3d9228aa7c423c66", "name": "Tribe Apps", "user": { "_id": "5b881b2a90ecbe6751123d7e", "profile": { "counts": { "requests": 2, "edits": 148, "questionsFollowers": 0, "questions": 32, "comments": 0, "answersWords": 5753, "answersVotes": 0, "answersViews": 0, "answers": 31, "views": 0, "followings": 1, "followers": 2 }, "score": 115, "externalId": null, "verified": false, "description": "

 

", "title": "Biomedical Engineer ", "picture": "/files/users/d7e/5b881b2a90ecbe6751123d7e_57697.png", "website": "", "location": "", "gender": "", "name": "Elnaz Najafi", "username": "elnajafi89" }, "id": "5b881b2a90ecbe6751123d7e" }, "picture": "/files/topics/c66/5babe5eb3d9228aa7c423c66_66024.png", "id": "5babe5eb3d9228aa7c423c66" } ], "aliases": [], "id": "5a73b1fcc48071e4c4dc1cae", "updateHash": "c7bc3e38df948c7342f9e6b41d817136" } This endpoint retrieves portal information. HTTP Request GET /api/v1/portal Get Portal Health Stats curl "https://community.tribe.so/api/v1/stats/portal" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "usersActions": 220, "usersPosts": 132, "usersSeen": 359, "user": { "lastSeenAt": "a few seconds ago", "lastActionAt": "7 minutes ago", "lastPostAt": "7 minutes ago" } } This endpoint retrieves portal health stats. HTTP Request GET /api/v1/stats/portal Get Portal Leaderboard curl "https://community.tribe.so/api/v1/stats/users/leaderboard" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: [ { "target": { "_id": "5b881b2a90ecbe6751123d7e", "profile": { "counts": { "requests": 2, "edits": 148, "questionsFollowers": 0, "questions": 32, "comments": 0, "answersWords": 5753, "answersVotes": 0, "answersViews": 0, "answers": 31, "views": 0, "followings": 1, "followers": 2 }, "score": 115, "externalId": null, "verified": false, "description": "", "title": "Biomedical Engineer ", "picture": "/files/users/d7e/5b881b2a90ecbe6751123d7e_57697.png", "website": "", "location": "", "gender": "", "name": "Elnaz Najafi", "username": "elnajafi89" }, "id": "5b881b2a90ecbe6751123d7e", "followed": true }, "total": 115 }, { "target": { "_id": "5b7625c6307b5967d06481fb", "profile": { ... } }, "total": 10 }, { "target": { "_id": "5b7de7d02234e67f52e900cf", "profile": { ... } }, "total": 10 } ] This endpoint retrieves users leaderboard in portal. HTTP Request GET /api/v1/stats/users/leaderboard Update the Portal curl "https://community.tribe.so/api/v1/portal" -X PUT -H "Authorization: Bearer {access_token}" --DATA '{"name": "Test Portal","domain":"test.com"}' This endpoint updates the portal. HTTP Request PUT /api/v1/portal Request Parameters Parameter Type Description Required name String The name of the portal Yes domain String The domain of the portal Yes subdomain String The subdomain of the portal No announcement Object The announcement visible to all users on the homepage. No banner String The path to the banner image. This image is used as the default og:image. No description String Description of the portal No email String Email of the portal No englishName String Name of the portal in English No favicon String Icon of the portal No keywords Array Keywords related to the portal No links Object Community links used in the sidebar and emails. No logo String Logo of the portal No longName String The full name of the community. This is being used as the title of community home. No messages String Custom messages for the community. No policies Object Policies of community. No stage String Define the stage of the community. Can be: inceptionestablishmentmaturitymitosis. No template Object Template of the portal No Announcement Parameters Parameter Type Description action String The action button text content String Content of the announcement enabled String Is announcement enabled? layout String The layout of the announcement. Can be: imageTopimageSideimageSidePaddedimageBackgroundimageTopBackgrounddarkImageBackground link String Link related to the announcement picture String Url to the picture of the announcement title String Title of the announcement Links Parameters Parameter Type Description bug String Name of the holder facebook String Facebook handle of the portal faq String FAQ url of the portal feature String Request for feature url. homepage String Homepage of the portal instagram String Instagram handle of the portal linkedin String Linkedin handle of the portal privacy String Url to portal's privacy policy telegram String Telegram handle of the portal terms String Url to portal's terms and condition twitter String Twitter handle of the portal Messages Parameters Parameter Type Description askRules String Rules of asking questions motto String Motto of the portal questionIntro String Introduction for questions signupRules String Rules of signing up topicIntro String Introduction for topics userIntro String Introduction for users Template Parameters Parameter Type Description body String Body tag of the template colors.default String Default Color colors.defaultLink String Default link colors.link String Color of links colors.menuLink String Color of menu colors.primary String Primary Color colors.secondary String Secondary Color css String Custom CSS appended to the end of the code as style tag. menu.background String Background Color of menu menu.border Number Border size of the menu menu.height Number Border height of the menu navbar.background String Background Color of the navigation bar navbar.border Number Border size of the navigation bar navbar.color String Color of the navigation bar navbar.enabled Boolean Is navigation bar enabled? navbar.height Number Height the navigation bar navbar.links Array Links of the navigation bar navbar.linksString String Links of the navigation bar in String format. sidebar String The HTML code used inside the sidebar box. Policies Parameters Parameter Type Description access String Access privacy of the community. Can be: public, private. cookieConsent String Display cookie consent? Can be: enabled, disabled. email String Defines the types of emails to be sent from the community. Can be: important, disabled, enabled. registration String The registration policy of the community. Can be: public, approval, invitation. Install an App curl "https://community.tribe.so/api/v1/apps/5c7ff860c389b77bdf1f272b/settings" -X POST -H "Authorization: Bearer {access_token}" -H 'Content-Type: application/json; charset=utf-8' The above command returns JSON structured like this: { "_id": "5c7bf24f157c2c34f735a539", "updatedAt": "2019-03-13T14:11:32.761Z", "createdAt": "2019-03-03T15:27:11.190Z", "name": "Tribe", "baseUrl": "https://community.tribe.so", "description": "", "domain": "tribe.so", "__v": 7, "apps": [ { "app": { "_id": "5c8635bac389b77bdf1f2732", "slug": "moderation", "updatedAt": "2019-03-13T14:10:03.311Z", "name": "Moderation", "shortDescription": "Let admins create a minimum reptation.", "picture": "https://tribe.so/assets/images/appstore/jwt-sso.png", "__v": 0, "createdAt": "2019-03-11T10:17:25.732Z", "settings": { "user": [], "portal": [ { "type": "checkbox", "name": "enabled", "_id": "5c890f3b1ff360189a3d038e", "private": false, "values": [] }, { "type": "number", "name": "minimumReputation", "_id": "5c890f3b1ff360189a3d038d", "private": true, "values": [] } ] }, "components": { "settings": "Moderation" }, "permissions": [], "active": true, "premium": false, "followers": [], "counts": { "followers": 0, "installs": 0 }, "screenshots": [], "categories": [ "Functionality" ], "author": { "link": "https://tribe.so", "name": "Tribe Technologies, Inc" }, "type": "native", "id": "5c8635bac389b77bdf1f2732" }, "slug": "moderation", "settings": { "minimumReputation": "8", "_id": "5c8635bac389b77bdf1f2732", "enabled": true }, "_id": "5c864854f6e41f201083bf60", "enabled": false }, { "app": { "_id": "5c7bf24fc389b77bdf1f271f", "name": "Welcome Email", "updatedAt": "2019-03-13T14:10:03.304Z", "shortDescription": "Send an automatic customized welcome email to new users.", "slug": "welcome-email", "picture": "https://tribe.so/assets/images/appstore/welcome-email.png", "__v": 0, "createdAt": "2019-03-03T15:27:07.020Z", "settings": { "user": [], "portal": [ { "type": "checkbox", "name": "enabled", "_id": "5c890f3b1ff360189a3d0378", "private": false, "values": [] }, { "type": "text", "name": "fromEmail", "_id": "5c890f3b1ff360189a3d0377", "private": true, "values": [] }, { "type": "text", "name": "fromName", "_id": "5c890f3b1ff360189a3d0376", "private": true, "values": [] }, { "type": "text", "name": "subject", "_id": "5c890f3b1ff360189a3d0375", "private": true, "values": [] }, { "type": "text", "name": "message", "_id": "5c890f3b1ff360189a3d0374", "private": true, "values": [] } ] }, "components": { "settings": "WelcomeEmail" }, "permissions": [], "active": true, "premium": false, "followers": [], "counts": { "followers": 0, "installs": 0 }, "screenshots": [], "categories": [ "Functionality" ], "author": { "link": "https://tribe.so", "name": "Tribe Technologies, Inc" }, "type": "native", "id": "5c7bf24fc389b77bdf1f271f" }, "slug": "welcome-email", "settings": { "_id": "5c7bf24fc389b77bdf1f271f" }, "_id": "5c864865f6e41f201083bf61", "enabled": false }, { "app": { "_id": "5c7ff860c389b77bdf1f272b", "name": "SendGrid", "updatedAt": "2019-03-13T14:10:03.305Z", "shortDescription": "Send emails from your SendGrid account resulting in better email delivery.", "slug": "sendgrid", "picture": "https://tribe.so/assets/images/appstore/sendgrid.png", "__v": 0, "createdAt": "2019-03-06T16:42:05.969Z", "settings": { "user": [], "portal": [ { "type": "checkbox", "name": "enabled", "_id": "5c890f3b1ff360189a3d037b", "private": false, "values": [] }, { "type": "text", "name": "username", "_id": "5c890f3b1ff360189a3d037a", "private": true, "values": [] }, { "type": "text", "name": "password", "_id": "5c890f3b1ff360189a3d0379", "private": true, "values": [] } ] }, "components": { "settings": "SendGrid" }, "permissions": [], "active": true, "premium": false, "followers": [], "counts": { "followers": 0, "installs": 0 }, "screenshots": [], "categories": [ "Functionality" ], "author": { "link": "https://tribe.so", "name": "Tribe Technologies, Inc" }, "type": "native", "id": "5c7ff860c389b77bdf1f272b" }, "slug": "sendgrid", "settings": { "_id": "5c7ff860c389b77bdf1f272b" }, "_id": "5c890f941ff360189a3d038f", "enabled": false } ], "secrets": { "ssoKey": "1f4f219a4b525ddfaba64a54f997e226353726720b477c7c" }, "announcement": { "layout": "imageSide" }, "template": { "navbar": { "links": [], "enabled": false, "linksString": "" }, "theme": "default" }, "featured": { "posts": [], "events": [], "answers": [], "topics": [], "users": [], "questions": [] }, "currency": { "conversionRate": 100, "enabled": false }, "counts": { "unapprovedAnswers": 0, "unapprovedQuestions": 0, "comments": 0, "unanswered": 0, "topics": 0, "answers": 0, "questions": 0, "users": 0 }, "sections": [], "policies": { "email": "enabled", "cookieConsent": "disabled", "registration": "public", "content": "shareable", "access": "public" }, "stage": "inception", "status": "live", "type": "general", "plan": "basic", "topics": [], "aliases": [], "corsWhitelist": [], "id": "5c7bf24f157c2c34f735a539", "updateHash": "1473a306957af1b78b580c0d4cf896ff" } The endpoint installs an app in the portal. HTTP Request POST /api/v1/apps/:id/settings URL Parameters Parameter Type Description id String The ID of app to install Uninstall an App curl "https://community.tribe.so/api/v1/apps/5c7ff860c389b77bdf1f272b/settings" -X DELETE -H "Authorization: Bearer {access_token}" -H 'Content-Type: application/json; charset=utf-8' The above command returns JSON structured like this: { "_id": "5c7bf24f157c2c34f735a539", "updatedAt": "2019-03-13T14:15:04.709Z", "createdAt": "2019-03-03T15:27:11.190Z", "name": "Tribe", "baseUrl": "https://community.tribe.so", "description": "", "domain": "tribe.so", "__v": 8, "apps": [ { "app": { "_id": "5c8635bac389b77bdf1f2732", "slug": "moderation", "updatedAt": "2019-03-13T14:10:03.311Z", "name": "Moderation", "shortDescription": "Let admins create a minimum reptation.", "picture": "https://tribe.so/assets/images/appstore/jwt-sso.png", "__v": 0, "createdAt": "2019-03-11T10:17:25.732Z", "settings": { "user": [], "portal": [ { "type": "checkbox", "name": "enabled", "_id": "5c890f3b1ff360189a3d038e", "private": false, "values": [] }, { "type": "number", "name": "minimumReputation", "_id": "5c890f3b1ff360189a3d038d", "private": true, "values": [] } ] }, "components": { "settings": "Moderation" }, "permissions": [], "active": true, "premium": false, "followers": [], "counts": { "followers": 0, "installs": 0 }, "screenshots": [], "categories": [ "Functionality" ], "author": { "link": "https://tribe.so", "name": "Tribe Technologies, Inc" }, "type": "native", "id": "5c8635bac389b77bdf1f2732" }, "slug": "moderation", "settings": { "enabled": true, "_id": "5c8635bac389b77bdf1f2732", "minimumReputation": "8" }, "_id": "5c864854f6e41f201083bf60", "enabled": false }, { "app": { "_id": "5c7bf24fc389b77bdf1f271f", "name": "Welcome Email", "updatedAt": "2019-03-13T14:10:03.304Z", "shortDescription": "Send an automatic customized welcome email to new users.", "slug": "welcome-email", "picture": "https://tribe.so/assets/images/appstore/welcome-email.png", "__v": 0, "createdAt": "2019-03-03T15:27:07.020Z", "settings": { "user": [], "portal": [ { "type": "checkbox", "name": "enabled", "_id": "5c890f3b1ff360189a3d0378", "private": false, "values": [] }, { "type": "text", "name": "fromEmail", "_id": "5c890f3b1ff360189a3d0377", "private": true, "values": [] }, { "type": "text", "name": "fromName", "_id": "5c890f3b1ff360189a3d0376", "private": true, "values": [] }, { "type": "text", "name": "subject", "_id": "5c890f3b1ff360189a3d0375", "private": true, "values": [] }, { "type": "text", "name": "message", "_id": "5c890f3b1ff360189a3d0374", "private": true, "values": [] } ] }, "components": { "settings": "WelcomeEmail" }, "permissions": [], "active": true, "premium": false, "followers": [], "counts": { "followers": 0, "installs": 0 }, "screenshots": [], "categories": [ "Functionality" ], "author": { "link": "https://tribe.so", "name": "Tribe Technologies, Inc" }, "type": "native", "id": "5c7bf24fc389b77bdf1f271f" }, "slug": "welcome-email", "settings": { "_id": "5c7bf24fc389b77bdf1f271f" }, "_id": "5c864865f6e41f201083bf61", "enabled": false } ], "secrets": { "ssoKey": "1f4f219a4b525ddfaba64a54f997e226353726720b477c7c" }, "announcement": { "layout": "imageSide" }, "template": { "navbar": { "links": [], "enabled": false, "linksString": "" }, "theme": "default" }, "featured": { "posts": [], "events": [], "answers": [], "topics": [], "users": [], "questions": [] }, "currency": { "conversionRate": 100, "enabled": false }, "counts": { "unapprovedAnswers": 0, "unapprovedQuestions": 0, "comments": 0, "unanswered": 0, "topics": 0, "answers": 0, "questions": 0, "users": 0 }, "sections": [], "policies": { "email": "enabled", "cookieConsent": "disabled", "registration": "public", "content": "shareable", "access": "public" }, "stage": "inception", "status": "live", "type": "general", "plan": "basic", "topics": [], "aliases": [], "corsWhitelist": [], "id": "5c7bf24f157c2c34f735a539", "updateHash": "3fa36c8343b45caeb47b31c8c59a082b" } The endpoint uninstalls an app in the portal. HTTP Request DELETE /api/v1/apps/:id/settings URL Parameters Parameter Type Description id String The ID of app to uninstall Post Get All Post curl "https://community.tribe.so/api/v1/posts" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: [ { "_id": "5c0621864cb2b119dc174a63", "shortId": "Px10b", "lang": "en", "updatedAt": "2018-12-04T06:41:25.370Z", "createdAt": "2018-12-04T06:41:10.046Z", "title": "This is a test discussion.", "content": "

Here is the content of the discussion.

", "portal": "5a73b1fcc48071e4c4dc1cae", "publishedAt": "2018-12-04T06:41:10.031Z", "user": { "_id": "5b1f99a7478dd3768d84b646", "profile": { "counts": { "requests": 2, "edits": 46, "questionsFollowers": 0, "questions": 2, "comments": 2, "answersWords": 1586, "answersVotes": 0, "answersViews": 0, "answers": 12, "views": 0, "followings": 3, "followers": 3 }, "score": 52, "externalId": null, "verified": true, "description": "

 

", "title": "Tribe Moderator", "picture": "/files/users/646/5b1f99a7478dd3768d84b646_66172.png", "website": "", "location": "", "gender": "male", "name": "Siavash Mahmoudian", "username": "siavash" }, "id": "5b1f99a7478dd3768d84b646" }, "__v": 2, "referrers": [], "global": true, "downvotes": [], "upvotes": [], "comments": [], "rewards": [], "videos": [], "files": [], "images": [], "attachments": [], "links": [], "topics": [ { "_id": "5b88264d3d9228aa7c41f692", "name": "Tribe", "user": { "_id": "5b881b2a90ecbe6751123d7e", "profile": { "counts": { "requests": 2, "edits": 148, "questionsFollowers": 0, "questions": 32, "comments": 0, "answersWords": 5753, "answersVotes": 0, "answersViews": 0, "answers": 31, "views": 0, "followings": 1, "followers": 2 }, "score": 115, "externalId": null, "verified": false, "description": "

 

", "title": "Biomedical Engineer ", "picture": "/files/users/d7e/5b881b2a90ecbe6751123d7e_57697.png", "website": "", "location": "", "gender": "", "name": "Elnaz Najafi", "username": "elnajafi89" }, "id": "5b881b2a90ecbe6751123d7e" }, "picture": "/files/topics/692/5b88264d3d9228aa7c41f692_72807.png", "id": "5b88264d3d9228aa7c41f692" } ], "posters": [ { "user": "5b1f99a7478dd3768d84b646", "score": 1, "_id": "5c062192f3d2d61a37864a5c" } ], "followers": [], "score": 0, "counts": { "downvotes": 0, "links": 0, "totalUpvotes": 0, "upvotes": 0, "followers": 1, "users": 1, "edits": 0, "responses": 1, "comments": 0, "views": 0 }, "status": "published", "privacy": "public", "type": "discussion", "anonymous": false, "verified": false, "responses": [ "5c062192f3d2d61a37864a5b" ], "summary": "Here is the content of the discussion.", "id": "5c0621864cb2b119dc174a63", "upvoted": false, "downvoted": false, "followed": false } ] This endpoint retrieves all posts. HTTP Request GET /api/v1/posts Query Parameters Parameter Type Default Description page Number 1 Intended page limit Number 20 Number of items per page sort String createdAt.desc The field to sort on type String Type of posts. It can be empty (for all types) or a string of types of posts (post, discussion, article, response) seprated by comma Get a Specific Post curl "https://community.tribe.so/api/v1/posts/5c0621864cb2b119dc174a63" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "_id": "5c0621864cb2b119dc174a63", "shortId": "Px10b", "lang": "en", "updatedAt": "2018-12-04T06:41:25.370Z", "createdAt": "2018-12-04T06:41:10.046Z", "title": "This is a test discussion.", "content": "

Here is the content of the discussion.

", "portal": "5a73b1fcc48071e4c4dc1cae", "publishedAt": "2018-12-04T06:41:10.031Z", "user": { "_id": "5b1f99a7478dd3768d84b646", "profile": { "counts": { "requests": 2, "edits": 46, "questionsFollowers": 0, "questions": 2, "comments": 2, "answersWords": 1586, "answersVotes": 0, "answersViews": 0, "answers": 12, "views": 0, "followings": 3, "followers": 3 }, "score": 52, "externalId": null, "verified": true, "description": "

 

", "title": "Tribe Moderator", "picture": "/files/users/646/5b1f99a7478dd3768d84b646_66172.png", "website": "", "location": "", "gender": "male", "name": "Siavash Mahmoudian", "username": "siavash" }, "id": "5b1f99a7478dd3768d84b646" }, "__v": 2, "referrers": [], "global": true, "downvotes": [], "upvotes": [], "comments": [], "rewards": [], "videos": [ { "_id": "5e3a15595ac93e649abfe40b", "name": "tribe.mp4", "formatType": "video/mp4", "original": "...", "duration": 6923, "status": "complete", "poster": "...", "src": [ { "url": "...", "quality": "1080", "compression": "avc" }, { "url": "...", "quality": "720", "compression": "avc" }, { "url": "...", "quality": "480", "compression": "avc" }, { "url": "...", "quality": "1080", "compression": "avc" }, { "url": "...", "quality": "720", "compression": "avc" }, { "url": "...", "quality": "480", "compression": "avc" } ] } ], "files": [ { "src": "...", "name": "...", "formatType": "application/pdf", "_id": "5e3a15995a071453baa99355" } ], "images": [ { "src": "...", "width": 512, "height": 512, "color": "#2abb80", "formatType": "png", "_id": "5e3a15995a071453baa99356" } ], "attachments": [], "links": [ { "title": "How to scale content marketing using customer community", "description": "Scaling your ‘content marketing’ is a sizeable program to take on, especially if you want to generate business results. However, one…", "url": "https://medium.com/triberians/how-to-scale-content-marketing-using-customer-community-de4ad2410dfd", "image": "https://miro.medium.com/max/1200/1*3DUhF_ByisFPhtQHBwGozw.jpeg", "_id": "5e3a15d04eb79156d40204cf", "status": "200", "clicks": 0 } ], "topics": [ { "_id": "5b88264d3d9228aa7c41f692", "name": "Tribe", "user": { "_id": "5b881b2a90ecbe6751123d7e", "profile": { "counts": { "requests": 2, "edits": 148, "questionsFollowers": 0, "questions": 32, "comments": 0, "answersWords": 5753, "answersVotes": 0, "answersViews": 0, "answers": 31, "views": 0, "followings": 1, "followers": 2 }, "score": 115, "externalId": null, "verified": false, "description": "

 

", "title": "Biomedical Engineer ", "picture": "/files/users/d7e/5b881b2a90ecbe6751123d7e_57697.png", "website": "", "location": "", "gender": "", "name": "Elnaz Najafi", "username": "elnajafi89" }, "id": "5b881b2a90ecbe6751123d7e" }, "picture": "/files/topics/692/5b88264d3d9228aa7c41f692_72807.png", "id": "5b88264d3d9228aa7c41f692" } ], "posters": [ { "user": "5b1f99a7478dd3768d84b646", "score": 1, "_id": "5c062192f3d2d61a37864a5c" } ], "followers": [], "score": 0, "counts": { "downvotes": 0, "links": 0, "totalUpvotes": 0, "upvotes": 0, "followers": 1, "users": 1, "edits": 0, "responses": 1, "comments": 0, "views": 0 }, "status": "published", "privacy": "public", "type": "discussion", "anonymous": false, "verified": false, "responses": [ "5c062192f3d2d61a37864a5b" ], "summary": "Here is the content of the discussion.", "id": "5c0621864cb2b119dc174a63", "upvoted": false, "downvoted": false, "followed": false } This endpoint retrieves a specific post using ID. HTTP Request GET /api/v1/posts/{id} URL Parameters Parameter Type Description id String The ID of the item Create a new Post curl "https://community.tribe.so/api/v1/posts" -X POST -H "Authorization: Bearer {access_token}" --DATA "{data}" This endpoint creates a new post. HTTP Request POST /api/v1/posts Request Parameters Parameter Type Description title String The title of the post content String The content of the post type String The type of the post images Array An array of urls pointing to the images attached to this post (Only works with simple post type) files Array An array of urls pointing to the files attached to this post (Only works with simple post type) parent String The ID of the parent post replyTo String The ID of the post to reply group String The ID of the group to post Extra Request Parameters for Moderators Parameter Type Description locked Boolean Is the post locked? verified Boolean Is the post verified? status String The status of the post. Can be: new draft published unlisted archived collapsed scheduled unapproved user String The ID of the user to post on behalf Add Image, File or Video to a Post This endpoint uploads a new file that can be attached to a simple post or included in an article post. HTTP Request @deprecated POST /api/v1/posts/image This endpoint has been deprecated and will be removed in a future version. POST /api/v1/uploads/posts The above command returns JSON structured like this for Image, File or Video: { "uploaded": true, "url": "https://static.t-cdn.net/.../posts/.../file" } Request Parameters Parameter Type Description upload File The image, file or video in multipart/form-data format. Supported video formats For Image or File To attach an image or a file to a post, first we need to send the file to this endpoint. The endpoint resizes the images, scans files, and returns the url of the image or file. For simple post type, you can pass an array of urls to the post creation end-point (POST /api/v1/posts). You should pass the array in the body with images or files key. For article post type you can add the image in the content of the post as an HTML tag (e.g. ). For Video To attach a video to a post, first we need to send the video to this endpoint. The endpoint uploads to Amazon S3 and returns the url of the original video. For simple post type, you can pass an array of urls to the post creation end-point (POST /api/v1/posts). You should pass the array in the body with videos key. Once the Post is created, the video is queued for processing. If the original video is in MP4 format, it will be readily available for the users to view it. In case the video is in any other format, the video's status will be set to "processing" under videos key. Upon completion, the video's status is updated to "complete" and poster, duration, and src with different compressions will be added to the video object. Update a Specific Post curl "https://community.tribe.so/api/v1/posts/5c0621864cb2b119dc174a63" -X PUT -H "Authorization: Bearer {access_token}" --DATA "{data}" This endpoint updates a specific post. HTTP Request PUT /api/v1/posts/:id URL Parameters Parameter Type Description id String The ID of the post to update Request Parameters Parameter Type Description title String The title of the post content String The content of the post Extra Request Parameters for Moderators Parameter Type Description locked Boolean Is the post locked? verified Boolean Is the post verified? status String The status of the post. Can be: new draft published unlisted archived collapsed scheduled unapproved Delete a Specific Post curl "https://community.tribe.so/api/v1/posts/5c0621864cb2b119dc174a63" -X DELETE -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "success": true } This endpoint deletes a specific post. HTTP Request DELETE /api/v1/posts/{id} URL Parameters Parameter Type Description id String The ID of the post to delete Get Post's Responses curl "https://community.tribe.so/api/v1/posts/5c0621864cb2b119dc174a63/responses" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: [ { "_id": "5c062192f3d2d61a37864a5b", "shortId": "PKqoR", "lang": "en", "updatedAt": "2018-12-04T06:41:22.270Z", "createdAt": "2018-12-04T06:41:22.270Z", "content": "

This is a test response to a discussion.

", "parent": "5c0621864cb2b119dc174a63", "portal": "5a73b1fcc48071e4c4dc1cae", "publishedAt": "2018-12-04T06:41:22.262Z", "user": { "_id": "5b1f99a7478dd3768d84b646", "profile": { "counts": { "requests": 2, "edits": 46, "questionsFollowers": 0, "questions": 2, "comments": 2, "answersWords": 1586, "answersVotes": 0, "answersViews": 0, "answers": 12, "views": 0, "followings": 3, "followers": 3 }, "score": 52, "externalId": null, "verified": true, "description": "

 

", "title": "Tribe Moderator", "picture": "/files/users/646/5b1f99a7478dd3768d84b646_66172.png", "website": "", "location": "", "gender": "male", "name": "Siavash Mahmoudian", "username": "siavash" }, "id": "5b1f99a7478dd3768d84b646" }, "__v": 0, "referrers": [], "global": true, "downvotes": [], "upvotes": [], "comments": [], "rewards": [], "videos": [], "files": [], "images": [], "attachments": [], "links": [], "topics": [], "posters": [], "followers": [], "score": 0, "counts": { "downvotes": 0, "links": 0, "totalUpvotes": 0, "upvotes": 0, "followers": 1, "users": 1, "edits": 0, "responses": 0, "comments": 0, "views": 0 }, "status": "published", "privacy": "public", "type": "response", "anonymous": false, "verified": false, "responses": [], "summary": "This is a test response to a discussion.", "id": "5c062192f3d2d61a37864a5b", "upvoted": false, "downvoted": false, "followed": false } ] HTTP Request GET /api/v1/posts/{id}/responses URL Parameters Parameter Type Description id String The ID of the question Query Parameters Parameter Type Default Description page Number 1 Intended page limit Number 20 Number of items per page sort String createdAt.desc The field to sort on Upvote for a Specific Post curl "https://community.tribe.so/api/v1/posts/5c0621864cb2b119dc174a63/votes" -X POST -H "Authorization: Bearer {access_token}" This endpoint upvotes a specific post. HTTP Request POST /api/v1/posts/{id}/votes URL Parameters Parameter Type Description id String The ID of the post to upvote Remove an Upvote for a Specific Post curl "https://community.tribe.so/api/v1/posts/5c0621864cb2b119dc174a63/votes" -X DELETE -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "success": true } This endpoint removes an upvote a specific post. HTTP Request DELETE /api/v1/posts/{id}/votes URL Parameters Parameter Type Description id String The ID of the post to remove an upvote Add a Comment for a Specific Post curl "https://community.tribe.so/api/v1/posts/5bf0e89ada3be54c190b78ba/comments" -X POST -H "Authorization: Bearer {access_token}" --DATA "{'body':'New comment'}" This endpoint adds a comment for a specific post. HTTP Request POST /api/v1/posts/:id/comments URL Parameters Parameter Type Description id String The ID of the post to add a comment Request Parameters Parameter Type Description body String The content of the comment Extra Request Parameters for Moderators Parameter Type Description user String The ID of the user to comment on behalf Update a Specific Comment for a Specific Post curl "https://community.tribe.so/api/v1/posts/5bf0e89ada3be54c190b78ba/comments/4sf0e89ada3be54c190b78b2" -X PUT -H "Authorization: Bearer {access_token}" --DATA "{'body':'Updated comment'}" This endpoint updates a specific comment. HTTP Request PUT /api/v1/posts/:postId/comments/:id URL Parameters Parameter Type Description id String The ID of the comment to update postId String The ID of the post to add a comment Request Parameters Parameter Type Description body String The content of the comment Remove a Specific Comment from Specific Post curl "https://community.tribe.so/api/v1/posts/5bf0e89ada3be54c190b78ba/comments/4sf0e89ada3be54c190b78b2" -X DELETE -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "success": true } This endpoint removes a specific comment. HTTP Request DELETE /api/v1/posts/:postId/comments/:id URL Parameters Parameter Type Description id String The ID of the comment to remove postId String The ID of the post to remove a comment Reporting a Specific Post curl "https://community.tribe.so/api/v1/posts/5a816275f8030b3bdd655b0d/reports" -X POST -H "Authorization: Bearer {access_token}" This endpoint reports (flags) a specific post to admins and moderators. HTTP Request POST /api/v1/posts/:id/reports URL Parameters Parameter Type Description id String The ID of the post to report Query Parameters Parameter Type Description type String The type of the report. Can be Harrasment, Spam, PoorlyWritten, IncorrectTopics, or AgainstRules description String The optional description of the report shown to admins and moderators Questions Get All Questions curl "https://community.tribe.so/api/v1/questions" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: [ { "_id": "5a816275f8030b3bdd655b0d", "updatedAt": "2018-02-12T19:07:21.136Z", "createdAt": "2018-02-12T09:46:29.646Z", "title": "What is a perfect life?", "lastAskedAt": "2018-02-12T09:46:29.642Z", "__v": 0, "lastAnsweredAt": "2018-02-12T19:07:21.135Z", "downvotes": [], "upvotes": [], "followers": [], "askers": [], "comments": [], "topics": [], "score": 0, "counts": { "asks": 1, "downvotes": 0, "upvotes": 0, "edits": 2, "comments": 0, "hiddenAnswers": 0, "answers": 2, "views": 8, "followers": 0 }, "type": "general", "anonymous": true, "verified": false, "locked": false, "followed": false } ] This endpoint retrieves all questions. HTTP Request GET /api/v1/questions Query Parameters Parameter Type Default Description page Number 1 Intended page limit Number 20 Number of items per page sort String createdAt.desc The field to sort on Get a Specific Question curl "https://community.tribe.so/api/v1/questions/5a816275f8030b3bdd655b0d" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "_id": "5a816275f8030b3bdd655b0d", "updatedAt": "2018-02-12T19:07:21.136Z", "createdAt": "2018-02-12T09:46:29.646Z", "title": "What is a perfect life?", "lastAskedAt": "2018-02-12T09:46:29.642Z", "__v": 0, "lastAnsweredAt": "2018-02-12T19:07:21.135Z", "downvotes": [], "upvotes": [], "followers": [], "askers": [], "comments": [], "topics": [], "score": 0, "counts": { "asks": 1, "downvotes": 0, "upvotes": 0, "edits": 2, "comments": 0, "hiddenAnswers": 0, "answers": 2, "views": 8, "followers": 0 }, "type": "general", "anonymous": true, "verified": false, "locked": false, "followed": false } This endpoint retrieves a specific question using ID. HTTP Request GET /api/v1/questions/{id} URL Parameters Parameter Type Description id String The ID of the item Delete a Specific Question curl "https://community.tribe.so/api/v1/questions/5a816275f8030b3bdd655b0d" -X DELETE -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "success": true } This endpoint deletes a specific question. HTTP Request DELETE /api/v1/questions/{id} URL Parameters Parameter Type Description id String The ID of the question to delete Get Question's Answers curl "https://community.tribe.so/api/v1/questions/5a816275f8030b3bdd655b0d/answers" -H "Authorization: Bearer {access_token}" HTTP Request GET /api/v1/questions/{id}/answers URL Parameters Parameter Type Description id String The ID of the question Query Parameters Parameter Type Default Description page Number 1 Intended page limit Number 20 Number of items per page sort Number createdAt.desc The field to sort on Get Question's Experts curl "https://community.tribe.so/api/v1/questions/5a816275f8030b3bdd655b0d/experts" -H "Authorization: Bearer {access_token}" HTTP Request GET /api/v1/questions/{id}/experts URL Parameters Parameter Type Description id String The ID of the question Get a Question's Recommendations curl "https://community.tribe.so/api/v1/questions/5a816275f8030b3bdd655b0d/recommendations" -H "Authorization: Bearer {access_token}" HTTP Request GET /api/v1/questions/{id}/recommendations URL Parameters Parameter Type Description id String The ID of the question Get Similar Questions curl "https://community.tribe.so/api/v1/questions/similars" -H "Authorization: Bearer {access_token}" This endpoint find related questions to keywords or a question title. HTTP Request GET /api/v1/questions/similars Query Parameters Parameter Type Default Description query String "" Keywords or title of a question Create a Question curl "https://community.tribe.so/api/v1/questions" -X POST -H "Authorization: Bearer {access_token}" This endpoint creates a new question. HTTP Request POST /api/v1/questions Query Parameters Parameter Type Description title String The title of the question to create description String The description of the question to create anonymous Boolean Is this an anonymous question? from String The ID of the user who has beend asked from topics [String] The IDs of the topics related to the question group String The ID of the group to post options [{ text: String }] (Optional) An array of poll options in [{ text: 'Option text' }] format Extra Query Parameters for Moderators Parameter Type Description type String The type of the question to create locked Boolean Is the question locked? verified Boolean Is the question verified? status String Status of the question to create. Can be: archived collapsed published unapproved unlisted featured scheduled user String The ID of the user to ask a question on behalf Add Image, File or Video to a Question This endpoint uploads a new file that can be attached to a Question. HTTP Request @deprecated POST /api/v1/questions/image This endpoint has been deprecated and will be removed in a future version. POST /api/v1/uploads/questions The above command returns JSON structured like this for Image, File or Video: { "uploaded": true, "url": "https://static.t-cdn.net/.../questions/.../file" } Request Parameters Parameter Type Description upload File The image, file or video in multipart/form-data format. Supported video formats For Image or File To attach an image or a file to a question, first we need to send the file to this endpoint. The endpoint resizes the images, scans files, and returns the url of the image or file. You can pass an array of urls to the question creation end-point (POST /api/v1/questions). You should pass the array in the body with images or files key. For Video To attach a video to a question, first we need to send the video to this endpoint. The endpoint uploads to Amazon S3 and returns the url of the original video. You can pass an array of urls to the question creation end-point (POST /api/v1/questions). You should pass the array in the body with videos key. Once the Question is created, the video is queued for processing. If the original video is in MP4 format, it will be readily available for the users to view it. In case the video is in any other format, the video's status will be set to "processing" under videos key. Upon completion, the video's status is updated to "complete" and poster, duration, and src with different compressions will be added to the video object. Update a Specific Question curl "https://community.tribe.so/api/v1/questions/5a816275f8030b3bdd655b0d" -X PUT -H "Authorization: Bearer {access_token}" This endpoint updates a specific question. HTTP Request PUT /api/v1/questions/:id URL Parameters Parameter Type Description id String The ID of the question to update Query Parameters Parameter Type Description title String The title of the question to create description String The description of the question to create anonymous Boolean Is this an anonymous question? options [{ text: String, _id: ID }] (Optional) An array of poll options in [{ text: 'Option text', _id: "5e2...ab" }] format. _id is the ID of the option passed while fetching a question object. Extra Query Parameters for Moderators Parameter Type Description type String The type of the question to create locked Boolean Is the question locked? verified Boolean Is the question verified? status String Status of the question to create. Can be: archived collapsed published unapproved unlisted featured scheduled Add a Comment for a Specific Question curl "https://community.tribe.so/api/v1/questions/5bf0e89ada3be54c190b78ba/comments" -X POST -H "Authorization: Bearer {access_token}" --DATA "{'body':'New comment'}" This endpoint adds a comment for a specific question. HTTP Request POST /api/v1/questions/:id/comments URL Parameters Parameter Type Description id String The ID of the question to add a comment Request Parameters Parameter Type Description body String The content of the comment Extra Request Parameters for Moderators Parameter Type Description user String The ID of the user to comment on behalf Update a Specific Comment for a Specific Question curl "https://community.tribe.so/api/v1/questions/5bf0e89ada3be54c190b78ba/comments/4sf0e89ada3be54c190b78b2" -X PUT -H "Authorization: Bearer {access_token}" --DATA "{'body':'Updated comment'}" This endpoint updates a specific comment. HTTP Request PUT /api/v1/questions/:questionId/comments/:id URL Parameters Parameter Type Description id String The ID of the comment to update questionId String The ID of the question to add a comment Request Parameters Parameter Type Description body String The content of the comment Remove a Specific Comment from Specific Question curl "https://community.tribe.so/api/v1/questions/5bf0e89ada3be54c190b78ba/comments/4sf0e89ada3be54c190b78b2" -X DELETE -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "success": true } This endpoint removes a specific comment. HTTP Request DELETE /api/v1/questions/:questionId/comments/:id URL Parameters Parameter Type Description id String The ID of the comment to remove questionId String The ID of the question to remove a comment Get Stats of Specific User for Questions curl "https://community.tribe.so/api/v1/user/stats/questions/views" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "values": { "2019-02-10": 0, "2019-02-11": 0, "2019-02-12": 0, "2019-02-13": 0, "2019-02-14": 0, "2019-02-15": 0, "2019-02-16": 0, "2019-02-17": 0, "2019-02-18": 0, "2019-02-19": 0, "2019-02-20": 0, "2019-02-21": 0, "2019-02-22": 0, "2019-02-23": 0, "2019-02-24": 0, "2019-02-25": 0, "2019-02-26": 0, "2019-02-27": 0, "2019-02-28": 0, "2019-03-01": 0, "2019-03-02": 0, "2019-03-03": 0, "2019-03-04": 0, "2019-03-05": 0, "2019-03-06": 0, "2019-03-07": 0, "2019-03-08": 0, "2019-03-09": 0, "2019-03-10": 0, "2019-03-11": 0, "2019-03-12": 0, "2019-03-13": 0 }, "type": "user_question_viewed", "timestamp": "2019-03-01" } This endpoint returns statistics of a specific user for questions. HTTP Request GET /api/v1/user/stats/questions/:metric Request Parameters Parameter Type Description metric String Metric for the statistics. Can be: views,votes,follows Follow a question curl "https://community.tribe.so/api/v1/questions/5bf0e89ada3be54c190b78ba/followers" -X POST -H "Authorization: Bearer {access_token}" This endpoint follows a question. HTTP Request POST /api/v1/questions/{id}/followers Unfollow a question curl "https://community.tribe.so/api/v1/questions/5bf0e89ada3be54c190b78ba/followers" -X DELETE -H "Authorization: Bearer {access_token}" This endpoint unfollows a question. HTTP Request DELETE /api/v1/questions/{id}/followers Reporting a Specific Question curl "https://community.tribe.so/api/v1/questions/5a816275f8030b3bdd655b0d/reports" -X POST -H "Authorization: Bearer {access_token}" This endpoint reports (flags) a specific question to admins and moderators. HTTP Request POST /api/v1/questions/:id/reports URL Parameters Parameter Type Description id String The ID of the question to report Query Parameters Parameter Type Description type String The type of the report. Can be Harrasment, Spam, Insincere, PoorlyWritten, IncorrectTopics, or AgainstRules description String The optional description of the report shown to admins and moderators Topics Get All Topics curl "https://community.tribe.so/api/v1/topics" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: [ { "_id": "5b88264d3d9228aa7c41f692", "name": "Tribe", "portal": "5a73b1fcc48071e4c4dc1cae", "updatedAt": "2018-11-29T06:16:08.223Z", "__v": 8, "createdAt": "2018-08-30T17:15:57.884Z", "aliases": [], "children": [ "5bb1abe13d9228aa7c4242ba", "5babb4603d9228aa7c423c23", "5bbf7b083d9228aa7c427450", "5babe5eb3d9228aa7c423c66" ], "counts": { "questions": 55, "followers": 3, "subquestions": 79, "children": 4 }, "definitions": [], "paths": [ [ { "_id": "5b88264d3d9228aa7c41f692", "name": "Tribe", "picture": "/files/topics/692/5b88264d3d9228aa7c41f692_72807.png" } ] ], "shortId": "5oqoy", "user": "5b881b2a90ecbe6751123d7e", "picture": "/files/topics/692/5b88264d3d9228aa7c41f692_72807.png", "experts": { "5b881b2a90ecbe6751123d7e": 24, "5b3f7fe0d5a11b6297259cab": 16, "5b1f99a7478dd3768d84b646": 12, "5b913111f19a473232026877": 3, "5ba95b5c630b876a1e9785a5": 1 }, "about": "", "followed": true } ] This endpoint retrieves all topics. HTTP Request GET /api/v1/topics Query Parameters Parameter Type Default Description page Number 1 Intended page limit Number 20 Number of items per page sort String createdAt.desc The field to sort on type String Filter topics based on their type. Can be category, collection, or tag definition String Filter topics based on their definition Get a Specific Topic curl "https://community.tribe.so/api/v1/topics/5b88264d3d9228aa7c41f692" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "_id": "5b88264d3d9228aa7c41f692", "name": "Tribe", "portal": "5a73b1fcc48071e4c4dc1cae", "updatedAt": "2018-11-29T06:16:08.223Z", "__v": 8, "createdAt": "2018-08-30T17:15:57.884Z", "aliases": [], "children": [ "5bb1abe13d9228aa7c4242ba", "5babb4603d9228aa7c423c23", "5bbf7b083d9228aa7c427450", "5babe5eb3d9228aa7c423c66" ], "counts": { "questions": 55, "followers": 3, "subquestions": 79, "children": 4 }, "definitions": [], "paths": [ [ { "_id": "5b88264d3d9228aa7c41f692", "name": "Tribe", "picture": "/files/topics/692/5b88264d3d9228aa7c41f692_72807.png" } ] ], "shortId": "5oqoy", "user": "5b881b2a90ecbe6751123d7e", "picture": "/files/topics/692/5b88264d3d9228aa7c41f692_72807.png", "experts": { "5b881b2a90ecbe6751123d7e": 24, "5b3f7fe0d5a11b6297259cab": 16, "5b1f99a7478dd3768d84b646": 12, "5b913111f19a473232026877": 3, "5ba95b5c630b876a1e9785a5": 1 }, "about": "", "followed": true } This endpoint retrieves a specific topic using ID. HTTP Request GET /api/v1/topics/{id} URL Parameters Parameter Type Description id String The ID of the item Create a Topic curl "https://community.tribe.so/api/v1/topics" -X POST -H "Authorization: Bearer {access_token}" -H 'Content-Type: application/json; charset=utf-8' \ --DATA '{"name":"Test Topic"}' The above command returns JSON structured like this: { "_id": "5b88264d3d9228aa7c41f693", "name": "Test Topic", "portal": "5a73b1fcc48071e4c4dc1cae", "updatedAt": "2018-11-29T06:16:08.223Z", "__v": 8, "createdAt": "2018-08-30T17:15:57.884Z", "aliases": [], "children": [], "counts": { "questions": 0, "followers": 0, "subquestions": 0, "children": 0 }, "definitions": [], "paths": [], "shortId": "5oqoy", "user": "5b881b2a90ecbe6751123d7e", "experts": {}, "about": "", "followed": false } This endpoint creates a new topic. HTTP Request POST /api/v1/topics Request Parameters Parameter Type Default Description name String null The name of the Topic about String null The description of the Topic picture String null Url to a picture for this Topic definitions [String] [] The different types assigned with the Topic. It can be an array of following: ['Concept', 'Location', 'Localizable','Activity', 'QuestionType', 'Category', 'Event', 'Person', 'AcademicField', 'Job', 'Person', 'Company', 'School', 'Product', 'Adult'] aliases [String] [] An array of Aliases for this Topic. Aliases help users search the Topic with different keywords. externalId String null The unique ID of the Topic in an external platform. This is useful when creating a Topic for an external entity. upsert Boolean false If true, it will try to create the topic, if a topic with same name exists it'll return the topic. If false, it will throw an error if a topic with the same name exists. Update a Specific Topic curl "https://community.tribe.so/api/v1/topics/5b88264d3d9228aa7c41f692" -X PUT -H "Authorization: Bearer {access_token}" -H 'Content-Type: application/json; charset=utf-8' \ --DATA '{data}' This endpoint updates a specific topic. HTTP Request PUT /api/v1/topics/:id URL Parameters Parameter Type Default id String The ID of the topic to update Request Parameters Parameter Type Default Description name String null The name of the Topic about String null The description of the Topic definitions [String] [] The different types assigned with the Topic. It can be an array of following: ['Concept', 'Location', 'Localizable','Activity', 'QuestionType', 'Category', 'Event', 'Person', 'AcademicField', 'Job', 'Person', 'Company', 'School', 'Product', 'Adult'] aliases [String] [] An array of Aliases for this Topic. Aliases help users search the Topic with different keywords. Extra Request Parameters Parameter Type Default Description picture String null Url to a picture for this Topic externalId String null The unique ID of the Topic in an external platform. This is useful when creating a Topic for an external entity. Delete a Specific Topic curl "https://community.tribe.so/api/v1/topics/5b88264d3d9228aa7c41f692" -X DELETE -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "success": true } This endpoint deletes a specific topic. HTTP Request DELETE /api/v1/topics/{id} URL Parameters Parameter Type Description id String The ID of the topic to delete Get Topic's Questions curl "https://community.tribe.so/api/v1/topics/5b88264d3d9228aa7c41f692/questions" -H "Authorization: Bearer {access_token}" HTTP Request GET /api/v1/topics/{id}/questions URL Parameters Parameter Type Description id String The ID of the topic Get Topic's Experts curl "https://community.tribe.so/api/v1/topics/5b88264d3d9228aa7c41f692/experts" -H "Authorization: Bearer {access_token}" HTTP Request GET /api/v1/topics/{id}/experts URL Parameters Parameter Type Description id String The ID of the topic Add a Child curl "https://community.tribe.so/api/v1/topics/5b88264d3d9228aa7c41f692/children" -X POST -H "Authorization: Bearer {access_token}" --DATA '{ name: "Child" }' HTTP Request POST /api/v1/topics/{id}/children URL Parameters Parameter Type Description id String The ID of the topic Request Parameters Parameter Type Description name String Name of the child to add Remove a Child curl "https://community.tribe.so/api/v1/topics/5b88264d3d9228aa7c41f692/children/4c88264d3d9118aa7c41f6ff" -X DELETE -H "Authorization: Bearer {access_token}" HTTP Request DELETE /api/v1/topics/:id/children/:childId URL Parameters Parameter Type Description id String The ID of the topic childId String The ID of the child to delete Follow a topic curl "https://community.tribe.so/api/v1/topics/5b88264d3d9228aa7c41f692/followers" -X POST -H "Authorization: Bearer {access_token}" This endpoint follows a topic. HTTP Request POST /api/v1/topics/{id}/followers Unfollow a topic curl "https://community.tribe.so/api/v1/topics/5b88264d3d9228aa7c41f692/followers" -X DELETE -H "Authorization: Bearer {access_token}" This endpoint unfollows a topic. HTTP Request DELETE /api/v1/topics/{id}/followers Users Get All Users curl "https://community.tribe.so/api/v1/users" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: [ { "_id": "5b1f99a7478dd3768d84b646", "profile": { "counts": { "requests": 2, "edits": 46, "questionsFollowers": 0, "questions": 2, "comments": 2, "answersWords": 1586, "answersVotes": 0, "answersViews": 0, "answers": 12, "views": 0, "followings": 3, "followers": 3 }, "score": 52, "externalId": null, "verified": true, "description": "", "title": "Tribe Moderator", "picture": "", "website": "", "location": "", "gender": "male", "name": "John Smith", "username": "john" }, "id": "5b1f99a7478dd3768d84b646", "followed": false } ] This endpoint retrieves all users. HTTP Request GET /api/v1/users Query Parameters Parameter Type Default Description page Number 1 Intended page limit Number 20 Number of items per page sort Number createdAt.desc The field to sort on query String Query to filter on name, username, and title Extra Query Parameters for Moderators Parameter Type Default Description role String Filter users based on role. Can be admin, moderator, member, and bot email String Comma separated list of emails to filter on Create a new User curl "https://community.tribe.so/api/v1/users" -X POST -H "Authorization: Bearer {access_token}" --DATA '{data}' This endpoint creates a new user. HTTP Request POST /api/v1/users/ Request Parameters Parameter Type Description Required username String Username of the user Yes name String Name of the user Yes email String Email of the user Yes password String Password of the user Yes confirmPassword String Confirm password of the user No Extra Request Parameters for Admins Parameter Type Description Required externalId String The ID of user in the external service No role String The role of the user. Can be member, moderator, or admin No source String The source of the user (e.g. API, SSO, Google, etc.) Can be used for analytics. No Invite new Users curl "https://community.tribe.so/api/v1/user/email/invitations" -X POST -H "Authorization: Bearer {access_token}" --DATA '{data}' The above command returns JSON structured like this: { "success": true, "count": 1 } This endpoint send invitation email to people. The free plan is limited to 50 invitaions per day. HTTP Request POST /api/v1/user/email/invitations/ Request Parameters Parameter Type Description Required role String Role of the users Yes users Array List of users Yes message String Custom message for the invitation No User Parameters Parameter Type Description name String Name of the user email String Email of the user Get a Specific User curl "https://community.tribe.so/api/v1/users/5b1f99a7478dd3768d84b646" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "_id": "5b1f99a7478dd3768d84b646", "profile": { "counts": { "requests": 2, "edits": 46, "questionsFollowers": 0, "questions": 2, "comments": 2, "answersWords": 1586, "answersVotes": 0, "answersViews": 0, "answers": 12, "views": 0, "followings": 3, "followers": 3, "posts": 1, "responses": 1, "groups": 2, "replies": 2, "receivedLikes": 3 }, "score": 52, "externalId": null, "verified": true, "description": "", "title": "Tribe Moderator", "picture": "", "website": "", "location": "", "gender": "male", "name": "John Smith", "username": "john" }, "id": "5b1f99a7478dd3768d84b646", "followed": false } This endpoint retrieves a specific user using ID. HTTP Request GET /api/v1/users/{id} URL Parameters Parameter Type Description id String The ID of the user You can pass `external:{externalId}` as the id to find a specific user using an external ID. If you want to find users based on their email address, you can use Get All Users endpoint and pass email as query string. Update a Specific User curl "https://community.tribe.so/api/v1/users/5b1f99a7478dd3768d84b646" -X PUT -H "Authorization: Bearer {access_token}" --DATA '{data}' This endpoint updates a specific user using ID. HTTP Request PUT /api/v1/users/{id} URL Parameters Parameter Type Description id String The ID of the user to update Request Parameters Parameter Type Description Required username String Username of the user Yes name String Name of the user Yes email String Email of the user Yes password String Password of the user Yes confirmPassword String Confirm password of the user No links Object List of user's social network accounts No bankAccount Object User's bank account No location String Location of the user No website String Website owned by user No gender String Gender of the user No title String Title of the user No description String A short description of user No Bank Account Parameters Parameter Type Description holderName String Name of the holder accountNumber String Account number type String Type of the account. Can be card, checking, saving routingNumber String Routing number for the bank account bankName String Name of the bank related to account Links Parameters Parameter Type Description telegram String Telegram account of the user instagram String Instagram account of the user twitter String Twitter account of the user facebook String Facebook account of the user linkedin String Twitter account of the user homepage String The url of homepage of user Extra Request Parameters for Moderators Parameter Type Description verified Boolean Is the user verified or not status String Status of the user badge Object User's badge Extra Request Parameters for Admin Parameter Type Description role String Role of the user Badge Parameters Parameter Type Description text Boolean Text of the badge type String Type of the badge. It can be one of the followings: [gold, silver, bronze] Delete a Specific User curl "https://community.tribe.so/api/v1/users/5b1f99a7478dd3768d84b646" -X DELETE -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "success": true } This endpoint deletes a specific user. HTTP Request DELETE /api/v1/users/{id} URL Parameters Parameter Type Description id String The ID of the user to delete Get User's Groups curl "https://community.tribe.so/api/v1/users/5b1f99a7478dd3768d84b646/groups" -H "Authorization: Bearer {access_token}" The above comand returns JSON structured like this: [ { "_id": "5ddc1f29b8015f67d2059aeb", "shortId": "P87Ny", "updatedAt": "2019-11-25T18:36:25.921Z", "createdAt": "2019-11-25T18:36:25.921Z", "slug": "my-group", "name": "My Group", "portal": "5dc1c8c8ee91b9d39b6cc422", "user": "5b1f99a7478dd3768d84b646", "__v": 0, "pinned": [], "topics": [], "featured": { "posts": [], "topics": [], "users": [], "questions": [] }, "notificationsDefaults": { "inapp": { "enabled": false }, "email": { "enabled": false } }, "score": 0, "counts": { "members": 1, "posts": 0, "comments": 0, "answers": 0, "questions": 0 }, "registration": "open", "privacy": "public", "status": "active", "contentTypes": [], "type": "general", "verified": false, "summary": "", "id": "5ddc1f29b8015f67d2059aeb" } ] This endpoint retrieves a specific user's groups using ID. HTTP Request GET /api/v1/users/{id}/groups URL Parameters Parameter Type Description id String The ID of the user Get User's Followers curl "https://community.tribe.so/api/v1/users/5b1f99a7478dd3768d84b646/followers" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: [ { "_id": "5b3f7fe0d5a11b6297259cab", "profile": { "counts": { "requests": 2, "edits": 46, "questionsFollowers": 0, "questions": 2, "comments": 2, "answersWords": 1586, "answersVotes": 0, "answersViews": 0, "answers": 12, "views": 0, "followings": 3, "followers": 3, "posts": 1, "responses": 1, "groups": 2, "replies": 2, "receivedLikes": 3 }, "score": 58, "externalId": null, "verified": true, "description": "

 

", "title": "Community Moderator at Tribe", "picture": "/files/users/cab/5b3f7fe0d5a11b6297259cab_57983.png", "website": "", "location": "", "gender": "", "name": "Mike Modiri", "username": "mike" }, "id": "5b3f7fe0d5a11b6297259cab", "followed": false } ] This endpoint retrieves a specific user's followers using ID. HTTP Request GET /api/v1/users/{id}/followers URL Parameters Parameter Type Description id String The ID of the user Get User's Following curl "https://community.tribe.so/api/v1/users/5b1f99a7478dd3768d84b646/followings" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: [ { "_id": "5b3f7fe0d5a11b6297259cab", "profile": { "counts": { "requests": 2, "edits": 46, "questionsFollowers": 0, "questions": 4, "comments": 0, "answersWords": 1128, "answersVotes": 0, "answersViews": 0, "answers": 8, "views": 0, "followings": 1, "followers": 2 }, "score": 58, "externalId": null, "verified": true, "description": "

 

", "title": "Community Moderator at Tribe", "picture": "/files/users/cab/5b3f7fe0d5a11b6297259cab_57983.png", "website": "", "location": "", "gender": "", "name": "Mike Modiri", "username": "mike" }, "id": "5b3f7fe0d5a11b6297259cab", "followed": false } ] This endpoint retrieves a specific user's followings using ID. HTTP Request GET /api/v1/users/{id}/followings URL Parameters Parameter Type Description id String The ID of the user Follow a user curl "https://community.tribe.so/api/v1/users/5b1f99a7478dd3768d84b646/followers" -X POST -H "Authorization: Bearer {access_token}" This endpoint follows a user. HTTP Request POST /api/v1/users/{id}/followers Unfollow a user curl "https://community.tribe.so/api/v1/users/5b1f99a7478dd3768d84b646/followers" -X DELETE -H "Authorization: Bearer {access_token}" This endpoint unfollows a user. HTTP Request DELETE /api/v1/users/{id}/followers Get User's Expertise curl "https://community.tribe.so/api/v1/users/5b1f99a7478dd3768d84b646/expertise" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: [ { "topic": { "_id": "5b88264d3d9228aa7c41f692", "name": "Tribe", "portal": "5a73b1fcc48071e4c4dc1cae", "updatedAt": "2018-12-04T06:41:25.365Z", "__v": 8, "createdAt": "2018-08-30T17:15:57.884Z", "shortId": "5oqoy", "picture": "/files/topics/692/5b88264d3d9228aa7c41f692_72807.png", "experts": { "5ba95b5c630b876a1e9785a5": 1, "5b913111f19a473232026877": 3, "5b1f99a7478dd3768d84b646": 12, "5b3f7fe0d5a11b6297259cab": 16, "5b881b2a90ecbe6751123d7e": 24 }, "about": "

 

", "counts": { "children": 4, "edits": 0, "posts": 1, "subquestions": 79, "questions": 55, "subanswers": 0, "answers": 0, "views": 0, "followers": 3 }, "paths": [ [ { "picture": "/files/topics/692/5b88264d3d9228aa7c41f692_72807.png", "name": "Tribe", "_id": "5b88264d3d9228aa7c41f692" } ] ], "id": "5b88264d3d9228aa7c41f692", "followed": true }, "score": 12 }, { "topic": { ... }, "score": 5 }, { "topic": { ... }, "score": 2 }, { "topic": { ... }, "score": 1 } ] This endpoint retrieves a specific user's expertise using ID. HTTP Request GET /api/v1/users/{id}/expertise URL Parameters Parameter Type Description id String The ID of the user Get User's Questions curl "https://community.tribe.so/api/v1/users/5b1f99a7478dd3768d84b646/questions" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: [ { "_id": "5ddbdb3d47a56345bc4bb3d2", "shortId": "dAV2L", "lang": "en", "updatedAt": "2019-11-25T13:46:37.529Z", "createdAt": "2019-11-25T13:46:37.529Z", "title": "how do i embed endorsal dynamic form on tribe and can i use tags from the site like avatar, first name, second name and email?", "publishedAt": "2019-11-25T13:46:37.528Z", "portal": "5a73b1fcc48071e4c4dc1cae", "lastAskedAt": "2019-11-25T13:46:37.528Z", "user": { "_id": "5dd484e7b033d753be0f71a4", "profile": { "name": "andy sandford", "username": "andrewsandford", ... }, "externalId": null, "id": "5dd484e7b033d753be0f71a4" }, "__v": 0, "referrers": [], "aliases": [], "rewards": [], "hasReward": false, "downvotes": [], "upvotes": [], "followers": [], "askers": [], "comments": [], "options": [], "topics": [], "score": 0, "status": "published", "counts": { "pollVotes": 0, "asks": 1, "downvotes": 0, "upvotes": 0, "edits": 1, "comments": 0, "hiddenAnswers": 0, "answers": 0, "views": 0, "followers": 0 }, "type": "general", "privacy": "public", "anonymous": false, "verified": false, "locked": false, "id": "5ddbdb3d47a56345bc4bb3d2", "followed": false, "url": "/question/5ddbdb3d47a56345bc4bb3d2", "api_url": "/questions/5ddbdb3d47a56345bc4bb3d2" }, ... ] This endpoint retrieves a specific user's questions using ID. HTTP Request GET /api/v1/users/{id}/questions URL Parameters Parameter Type Default Description id String The ID of the user page Number 1 Intended page limit Number 20 Number of items per page sort String createdAt.desc The field to sort on Get User's Answers curl "https://community.tribe.so/api/v1/users/5b1f99a7478dd3768d84b646/answers" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: [ { "_id": "5dd7260552a5be0ba42b94a6", "updatedAt": "2019-11-25T12:55:10.718Z", "createdAt": "2019-11-22T00:04:21.631Z", "portal": "5a73b1fcc48071e4c4dc1cae", "question": { "_id": "5dd6f272f8730a37e88ba86c", ... }, "user": { "_id": "5c7037e168356d17013df39b", "profile": { "name": "Preetish", "username": "preetish", ... }, ... }, "__v": 9, "lang": "en", "publishedAt": "2019-11-22T00:12:25.579Z", "shortId": "LOKKn", "downvotes": [], "upvotes": [ ... ], "comments": [ ... ], "rewards": [], "images": [ ... ], "links": [ ... ], "privacy": "public", "anonymous": false, "verified": false, "summary": "Sure, if you have already verified your domain via Google Analytics or Tag Manager, you can simply use that. Otherwise, you can access the community Theme (look for advanced settings tab) un...", "id": "5dd7260552a5be0ba42b94a6", ... }, ... ] This endpoint retrieves a specific user's answers using ID. HTTP Request GET /api/v1/users/{id}/answers URL Parameters Parameter Type Default Description id String The ID of the user page Number 1 Intended page limit Number 20 Number of items per page sort String createdAt.desc The field to sort on Get User's Posts curl "https://community.tribe.so/api/v1/users/5c7037e168356d17013df39b/posts?type=discussion" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: [ { "_id": "5d03f4abdb3dbb6f2c9d4ff8", "shortId": "yM7Zz", "lang": "en", "updatedAt": "2019-11-23T15:49:47.804Z", "createdAt": "2019-06-14T19:25:31.241Z", "title": "Common Mistakes to Avoid When Building Online Communities", "content": "

This comprehensive blog covers the 10 most common mistakes that must be avoided when building online communities — from the lack of content seeding and internal support to poor processes and aggressive growth targets.

What are some of your key learnings from community building?

", "publishedAt": "2019-06-14T19:25:31.201Z", "portal": "5a73b1fcc48071e4c4dc1cae", "user": { "_id": "5c7037e168356d17013df39b", "profile": { "name": "Preetish", "username": "preetish", ... }, "externalId": null, "id": "5c7037e168356d17013df39b" }, "__v": 6, "referrers": [], "downvotes": [], "upvotes": [ ... ], "comments": [], "rewards": [], "files": [], "images": [], "attachments": [], "topics": [ ... ], "posters": [ ... ], "followers": [ ... ], "score": 0, "counts": { "downvotes": 0, "links": 0, "totalUpvotes": 0, "upvotes": 2, "followers": 0, "edits": 0, "responses": 1, "comments": 0, "views": 0 }, "status": "published", "privacy": "public", "kind": "article", "type": "discussion", "anonymous": false, "verified": false, "responses": [ ... ], "summary": "This comprehensive blog covers the 10 most common mistakes that must be avoided when building online communities — from the lack of content seeding and internal support to poor processes and...", "id": "5d03f4abdb3dbb6f2c9d4ff8", "upvoted": false, "downvoted": false, "followed": false } ] This endpoint retrieves a specific user's posts (Discussions, Blogs, Quick Post, Replies) using ID. HTTP Request GET /api/v1/users/{id}/posts URL Parameters Parameter Type Default Description id String The ID of the user type String Type of posts. It can be empty (for all types) or a string of types of posts (post, discussion, article, response) seprated by comma page Number 1 Intended page limit Number 20 Number of items per page sort String createdAt.desc The field to sort on Add device token curl "https://community.tribe.so/api/v1/user/devices" -H "Authorization: Bearer {access_token}" -X POST --DATA "{...}" The above command returns JSON structured like this: { "success": true } This endpoint add device token to the authenticated user. HTTP Request POST /api/v1/user/devices URL Parameters Parameter Default Description id The ID of user to add the device token Request Parameters Parameter Default Description token Device token type Type of the device. It can be one of [web , ios, android] name Optional name for the device Remove device token curl "https://community.tribe.so/api/v1/user/devices" -H "Authorization: Bearer {access_token}" -X DELETE --DATA "{...}" The above command returns JSON structured like this: { "success": true } This endpoint remove device token from the authenticated user. HTTP Request DELETE /api/v1/user/devices URL Parameters Parameter Default Description id The ID of user to add the device token Request Parameters Parameter Default Description token Device token Get Users Leaderboard curl "https://community.tribe.so/api/v1/stats/users/leaderboard" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: [ { "target": { "_id": "5e1df0f22fd9c490684b834a", "profile": { "counts": { "receivedLikes": 0, "replies": 0, "groups": 0, "requests": 0, "edits": 0, "questionsFollowers": 0, "responses": 0, "posts": 0, "questions": 0, "comments": 0, "answersWords": 0, "answersVotes": 0, "answers": 0, "views": 0, "followings": 0, "followers": 0 }, "score": 10, "verified": false, "badge": { "type": "silver" }, "description": "", "title": "", "banner": "", "picture": "https://gravatar.com/avatar/b7711ecd91aebb5dd1b7c153dbfd92d0?s=200&d=retro", "website": "", "location": "", "gender": "", "name": "Admin", "username": "admin" }, "id": "5e1df0f22fd9c490684b834a", "followed": false }, "total": 10 }, ... ] This endpoint retrieves users leaderboard for a specific period. It includes an array of user object (target) and their score (total). HTTP Request GET /api/v1/stats/users/leaderboard Query Parameters Parameter Type Default Description period String all Can be all, month, or week Groups Create a Group curl "https://community.tribe.so/api/v1/groups" -H "Authorization: Bearer {access_token}" -X POST The above command returns JSON structured like this: { "__v": 0, "shortId": "GRmdo", "updatedAt": "2020-03-04T17:41:01.656Z", "createdAt": "2020-03-04T17:41:01.656Z", "slug": "a-good-car", "name": "A good car", "portal": "5b8f50eff731cf14c8b40bac", "user": { "_id": "5d41ef5c16eaa51dbfb47fbf", "updatedAt": "2020-03-04T17:40:58.469Z", "createdAt": "2019-07-31T19:43:24.999Z", "portal": "5b8f50eff731cf14c8b40bac", "email": "[email protected]", "deviceTokens": [], "slack": null, "messenger": null, "telegram": null, "facebook": null, "linkedin": null, "google": null, "lastPostAt": "2020-01-08T20:56:51.142Z", "lastActionAt": "2020-03-02T13:57:38.331Z", "lastSeenAt": "2020-03-04T17:40:58.469Z", "notifications": { "email": { "newFollowersFrequency": "default", "followedUsersFrequency": "default", "upvotesFrequency": "default", "followedPostsFrequency": "default", "followedTopicsFrequency": "default", "mentionsFrequency": "default", "topicFollowMethod": "default", "autoFollow": true, "enabled": true }, "telegram": { "comment_upvote": true, "upvote": true, "request_answer": true, "comment": true, "ask": true, "answer": true, "follow_question": true, "mention": true, "follow_user": true } }, "profile": ..., "groups": [...], "devices": [], "externalId": null, "followedUsers": [], "followedTopics": [ "5d769dd30494fcc995cd84d9" ], "credit": 0, "status": "active", "role": "admin", "emailStatus": "verified", "bankAccount": { "routingNumber": "", "accountNumber": "" }, "id": "5d41ef5c16eaa51dbfb47fbf" }, "_id": "5e5fe82d90ab955f09ca40fd", "pinned": [], "topics": [], "featured": { "posts": [], "topics": [], "users": [], "questions": [] }, "notificationsDefaults": { "inapp": { "enabled": false }, "email": { "enabled": false } }, "score": 0, "counts": { "members": 1, "posts": 0, "comments": 0, "answers": 0, "questions": 0 }, "registration": "open", "privacy": "public", "status": "active", "contentTypes": [], "type": "general", "verified": false, "summary": "", "id": "5e5fe82d90ab955f09ca40fd", "joinStatus": "none" } This endpoint creates a new group. Only for admins. HTTP Request POST /api/v1/groups Query Parameters Parameter Default Description name Name of the group to create slug Slug of the group to create color Color of the group to create type general Type of the group to create. It can be one the followings: [blog, general, feedback] description Description of the group to create privacy public Group privacy. It can be one of the followings: [public, private, secret] verified Is group verified? picture Picture URL of the group banner Banner URL of the group registration open Registration of the group. It can be one of the followings: [open, invitation, approval, none] featured.topics Array of highlighted topics' IDs Update a Specific Group curl "https://community.tribe.so/api/v1/groups" -H "Authorization: Bearer {access_token}" -X PUT The above command returns JSON structured like this: { "__v": 0, "shortId": "GRmdo", "updatedAt": "2020-03-04T17:41:01.656Z", "createdAt": "2020-03-04T17:41:01.656Z", "slug": "a-good-car", "name": "A good car", "portal": "5b8f50eff731cf14c8b40bac", "user": { "_id": "5d41ef5c16eaa51dbfb47fbf", "updatedAt": "2020-03-04T17:40:58.469Z", "createdAt": "2019-07-31T19:43:24.999Z", "portal": "5b8f50eff731cf14c8b40bac", "email": "[email protected]", "deviceTokens": [], "slack": null, "messenger": null, "telegram": null, "facebook": null, "linkedin": null, "google": null, "lastPostAt": "2020-01-08T20:56:51.142Z", "lastActionAt": "2020-03-02T13:57:38.331Z", "lastSeenAt": "2020-03-04T17:40:58.469Z", "notifications": { "email": { "newFollowersFrequency": "default", "followedUsersFrequency": "default", "upvotesFrequency": "default", "followedPostsFrequency": "default", "followedTopicsFrequency": "default", "mentionsFrequency": "default", "topicFollowMethod": "default", "autoFollow": true, "enabled": true }, "telegram": { "comment_upvote": true, "upvote": true, "request_answer": true, "comment": true, "ask": true, "answer": true, "follow_question": true, "mention": true, "follow_user": true } }, "profile": ..., "groups": [...], "devices": [], "externalId": null, "followedUsers": [], "followedTopics": [ "5d769dd30494fcc995cd84d9" ], "credit": 0, "status": "active", "role": "admin", "emailStatus": "verified", "bankAccount": { "routingNumber": "", "accountNumber": "" }, "id": "5d41ef5c16eaa51dbfb47fbf" }, "_id": "5e5fe82d90ab955f09ca40fd", "pinned": [], "topics": [], "featured": { "posts": [], "topics": [], "users": [], "questions": [] }, "notificationsDefaults": { "inapp": { "enabled": false }, "email": { "enabled": false } }, "score": 0, "counts": { "members": 1, "posts": 0, "comments": 0, "answers": 0, "questions": 0 }, "registration": "open", "privacy": "public", "status": "active", "contentTypes": [], "type": "general", "verified": false, "summary": "", "id": "5e5fe82d90ab955f09ca40fd", "joinStatus": "none" } This endpoint updates a specific group using ID HTTP Request PUT /api/v1/groups/:id Query Parameters Parameter Default Description name Name of the group to create slug Slug of the group to create color Color of the group to create type general Type of the group to create. It can be one the followings: [blog, general, feedback] description Description of the group to create privacy public Group privacy. It can be one of the followings: [public, private, secret] verified Is group verified? picture Picture URL of the group banner Banner URL of the group registration open Registration of the group. It can be one of the followings: [open, invitation, approval, none] featured.topics Array of highlighte topics' IDs Get a Specific Group curl "https://community.tribe.so/api/v1/groups/5dbc4c34560ef636c0f66172" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "_id": "5dbc4c34560ef636c0f66172", "shortId": "KdlVm", "updatedAt": "2020-03-01T17:20:25.750Z", "createdAt": "2019-11-01T15:16:04.500Z", "slug": "community-owners-hub", "name": "Community Owners Hub", "description": "

Welcome community owners hub!

Building a community is not about the platform but rather the right strategy, plan and execution. This group is a place to learn the best community management techniques, sharing your challenges and learnings to build a successful and engaging community.

Happy community!

", "portal": "5a73b1fcc48071e4c4dc1cae", "user": "5b881b2a90ecbe6751123d7e", "__v": 5, "picture": "/files/groups/172/5dbc4c34560ef636c0f66172_90175.jpg", "banner": "/files/groups/172/5dbc4c34560ef636c0f66172_92570.jpg", "pinned": [ { "resourceType": "posts", "resourceId": "5df104da7c0d09330836b2bc", "_id": "5df104ee83dddf38d37754cf" } ], "topics": [], "featured": { "posts": [], "topics": [ { "_id": "5dbc53520494fcc995454b9f", "name": "Basics for Building a Community", "slug": "basics-for-building-a-community", "id": "5dbc53520494fcc995454b9f" }, { "_id": "5dbc61380494fcc9954e6f8f", "name": "Share What You Have Done In Your Community", "slug": "share-what-you-have-done-in-your-community", "id": "5dbc61380494fcc9954e6f8f" }, { "_id": "5dbc61740494fcc9954e7f9a", "name": "Promote Your Community", "slug": "promote-your-community", "id": "5dbc61740494fcc9954e7f9a" } ], "users": [], "questions": [] }, "notificationsDefaults": { "inapp": { "enabled": false }, "email": { "enabled": false } }, "score": 0, "counts": { "members": 82, "posts": 19, "comments": 0, "answers": 20, "questions": 3 }, "registration": "open", "privacy": "public", "status": "active", "contentTypes": [], "type": "general", "verified": false, "summary": "Welcome community owners hub! \n\nBuilding a community is not about the platform but rather the right strategy, plan and execution. This group is a place to learn the best community management...", "id": "5dbc4c34560ef636c0f66172", "joinStatus": "joined" } This endpoint retrieves a specific group using ID. HTTP Request GET /api/v1/groups/:id URL Parameters Parameter Type Description id String The ID of the item Delete a Group curl "https://community.tribe.so/api/v1/groups/:id" -H "Authorization: Bearer {access_token}" -X DELETE The above command returns JSON structured like this: { "success": true } This endpoint removes a specific group. Only for admins. HTTP Request DELETE /api/v1/groups/:id Get List of Members curl "https://community.tribe.so/api/v1/groups/:id/members" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: [ { "_id": "5de208b557fd4f3748a7d815", "email": ..., "profile": { "counts": { "receivedLikes": 21, "replies": 5, "groups": 0, "requests": 0, "edits": 0, "questionsFollowers": 0, "responses": 0, "posts": 0, "questions": 1, "comments": 6, "answersWords": 123, "answersVotes": 0, "answers": 4, "views": 0, "followings": 0, "followers": 0 }, "score": 131, "verified": false, "badge": { "type": "silver" }, "description": "", "title": "", "banner": "", "picture": "https://lh3.googleusercontent.com/a-/AAuE7mDKbsqrfN6UncLd_7UwTuDaR3NS8qvyi2W5wCzXzA", "website": "", "location": "", "gender": "", "name": ..., "username": ... }, "groups": [...], "externalId": null, "role": "member", "id": "5de208b557fd4f3748a7d815", "followed": false }, { "_id": "5e580a6856cbdb5c735d9aaa", "email": ..., "profile": { "counts": { "receivedLikes": 0, "replies": 0, "groups": 0, "requests": 0, "edits": 0, "questionsFollowers": 0, "responses": 0, "posts": 0, "questions": 1, "comments": 0, "answersWords": 0, "answersVotes": 0, "answers": 0, "views": 0, "followings": 0, "followers": 0 }, "score": 12, "verified": false, "badge": { "type": "silver" }, "description": "", "title": "", "banner": "", "picture": "https://gravatar.com/avatar/7919f07546893656cb0beb7a3d4e25f3?s=200&d=retro", "website": "", "location": "", "gender": "", "name": ..., "username": ..., }, "groups": [...], "externalId": null, "role": "member", "id": "5e580a6856cbdb5c735d9aaa", "followed": false } ] This endpoint retreives members of a group using ID. HTTP Request GET /api/v1/groups/:id/members Parameter Type Default Description page Number 1 Intended page limit Number 20 Number of items per page sort String groups.createdAt.desc The field to sort on. You can use recent and oldest as well as other sort parameters. Add a Member curl "https://community.tribe.so/api/v1/groups/:id/members" -H "Authorization: Bearer {access_token}" -X POST --DATA "{}" The above command returns JSON structured like this: This endpoint adds a user to a specific group. Only for admins. HTTP Request POST /api/v1/groups/:id/members Parameter Default Description user ID of the user to add Remove a Member curl "https://community.tribe.so/api/v1/groups/:id/members/:userId" -H "Authorization: Bearer {access_token}" -X DELETE The above command returns JSON structured like this: This endpoint removes a user from a specific group. Only for admins. HTTP Request DELETE /api/v1/groups/:id/members/:userId Get Group's Activity Feed curl "https://community.tribe.so/api/v1/groups/:id/feed" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: [ { "_id": "topics-1", "type": "Topics", "topics": [ ... ], "description": "You have not picked any topics yet. Please pick some to improve this page." }, { "_id": "5c0621864cb2b119dc174a63", "type": "Discussion", "publishedAt": "2018-12-04T06:41:10.031Z", "post": { ... } }, { "_id": "5bf0e89ada3be54c190b78ba", "type": "Answer", "publishedAt": "2018-11-18T04:25:42.037Z", "answer": { ... } } ] This endpoint retrieves group's activity feed. HTTP Request GET /api/v1/groups/:id/feed URL Parameters Parameter Type Description id String The ID of the group Query Parameters Parameter Type Default Description type String Comma separated list of types to filter on. Types can be post, question, discussion, and article page Number 1 Intended page limit Number 20 Number of items per page sort String createdAt.desc The field to sort on Add a Topic to Group curl "https://community.tribe.so/api/v1/groups/:id/topics" -H "Authorization: Bearer {access_token}" -X DELETE --DATA "{...}" The above command returns JSON structured like this: This endpoint adds a topic to a specific group. Only for admins. HTTP Request POST /api/v1/groups/:id/topics Parameter Default Description name Name of the topic to add Get All Groups curl "https://community.tribe.so/api/v1/groups?topicName=First%20Topic" The above command returns JSON structured like this: [ { "_id": "5db1b9b4c014eee3fcd97402", "shortId": "P8Bkn", "updatedAt": "2019-11-04T09:46:06.068Z", "createdAt": "2019-10-24T14:48:20.773Z", "slug": "first-group", "name": "First group", "portal": "5db1aaf9d2e97764f5c4b58e", "user": "5d3077834d0c0c03cb892a5f", "__v": 67, "pinned": [], "topics": [ { "_id": "5dbdb0a2fe1c5e37f16bd9f4", "name": "First Topic", "slug": "first-topic", "paths": [], "id": "5dbdb0a2fe1c5e37f16bd9f4" }, { "_id": "5dbdb0a7fe1c5e37f16bda84", "name": "Second Topic", "slug": "second-topic", "paths": [], "id": "5dbdb0a7fe1c5e37f16bda84" } ], ... } ] This endpoint retrieves all groups. HTTP Request GET /api/v1/groups Query Parameters Parameter Type Default Description page Number 1 Intended page limit Number 20 Number of items per page sort String createdAt.desc The field to sort on query String "" Keywords or name of a group topicName String Topics' exact names separated by comma Add A User to Multiple Groups curl "https://community.tribe.so/api/v1/users/:id/groups" -H "Authorization: Bearer {access_token}" -X POST --DATA "{...}" The above command returns JSON structured like this: { "_id": "5db1aafad2e97764f5c4b593", "profile": { ... }, "groups": [ { "group": { "_id": "5db1b9b4c014eee3fcd97402", "shortId": "P8Bkn", "updatedAt": "2019-11-04T09:46:06.068Z", "createdAt": "2019-10-24T14:48:20.773Z", "slug": "first-group", "name": "First group", "portal": "5db1aaf9d2e97764f5c4b58e", "user": "5d3077834d0c0c03cb892a5f", ... }, "status": "joined", "createdAt": "2019-10-24T15:00:03.565Z", "role": "member", "_id": "5db1bc73267d8cfed33cd2f3" }, { "_id": "5dbe1943d794c01bbdf0196f", "createdAt": "2019-11-03T00:03:15.702Z", "role": "admin", "status": "joined", "group": { "_id": "5dbe1943d794c01bbdf0196e", "shortId": "QOlqV", "updatedAt": "2019-11-04T13:22:09.911Z", "createdAt": "2019-11-03T00:03:15.664Z", "slug": "second-group", "name": "Second group", "portal": "5db1aaf9d2e97764f5c4b58e", "user": "5db1aafad2e97764f5c4b593", ... } }, { "_id": "5dbe1a279fe204230b82f5a4", "createdAt": "2019-11-03T00:07:03.922Z", "role": "admin", "status": "joined", "group": { "_id": "5dbe1a279fe204230b82f5a3", "shortId": "y9Mk7", "updatedAt": "2019-11-03T01:25:34.006Z", "createdAt": "2019-11-03T00:07:03.898Z", "slug": "asd-123", "name": "asd 123", "portal": "5db1aaf9d2e97764f5c4b58e", "user": "5db1aafad2e97764f5c4b593", ... } } ], "externalId": null, "id": "5db1aafad2e97764f5c4b593", "followed": false } This endpoint join user to multiple groups. It can also be used for community admins to add a user to multiple groups. HTTP Request POST /api/v1/users/:id/groups URL Parameters Parameter Default Description id The ID of user to join (add) Request Parameters Parameter Default Description groupIds List of the groups' IDs to join Join Multiple Groups curl "https://community.tribe.so/api/v1/user/groups" -H "Authorization: Bearer {access_token}" -X POST --DATA "{...}" The above command returns JSON structured like this: { "_id": "5db1aafad2e97764f5c4b593", "profile": { ... }, "groups": [ { "group": { "_id": "5db1b9b4c014eee3fcd97402", "shortId": "P8Bkn", "updatedAt": "2019-11-04T09:46:06.068Z", "createdAt": "2019-10-24T14:48:20.773Z", "slug": "first-group", "name": "First group", "portal": "5db1aaf9d2e97764f5c4b58e", "user": "5d3077834d0c0c03cb892a5f", ... }, "status": "joined", "createdAt": "2019-10-24T15:00:03.565Z", "role": "member", "_id": "5db1bc73267d8cfed33cd2f3" }, { "_id": "5dbe1943d794c01bbdf0196f", "createdAt": "2019-11-03T00:03:15.702Z", "role": "admin", "status": "joined", "group": { "_id": "5dbe1943d794c01bbdf0196e", "shortId": "QOlqV", "updatedAt": "2019-11-04T13:22:09.911Z", "createdAt": "2019-11-03T00:03:15.664Z", "slug": "second-group", "name": "Second group", "portal": "5db1aaf9d2e97764f5c4b58e", "user": "5db1aafad2e97764f5c4b593", ... } }, { "_id": "5dbe1a279fe204230b82f5a4", "createdAt": "2019-11-03T00:07:03.922Z", "role": "admin", "status": "joined", "group": { "_id": "5dbe1a279fe204230b82f5a3", "shortId": "y9Mk7", "updatedAt": "2019-11-03T01:25:34.006Z", "createdAt": "2019-11-03T00:07:03.898Z", "slug": "asd-123", "name": "asd 123", "portal": "5db1aaf9d2e97764f5c4b58e", "user": "5db1aafad2e97764f5c4b593", ... } } ], "externalId": null, "id": "5db1aafad2e97764f5c4b593", "followed": false } This endpoint joins the authenticated user to multiple groups. HTTP Request POST /api/v1/user/groups Request Parameters Parameter Default Description groupIds List of the group IDs to join Search Global Search curl "https://community.tribe.so/api/v1/search?query=amir" -H "Authorization: Bearer {access_token}" The above command returns JSON structured like this: { "items": [ { "role": "member", "profile": { "username": "amirtyz", "name": "Amir T", "gender": "", "location": "", "website": "", "picture": "https://gravatar.com/avatar/90bff30e822fcae0f56d13ce9e4a28e5?s=200&d=retro", "banner": "", "title": "", "description": "", "badge": {}, "verified": false, "score": 10, "counts": { "followers": 0, "followings": 0, "views": 0, "answers": 0, "answersVotes": 0, "answersWords": 0, "comments": 0, "questions": 0, "posts": 0, "responses": 0, "questionsFollowers": 0, "edits": 0, "requests": 0, "groups": 0, "replies": 0, "receivedLikes": 0 } }, "notifications": { "telegram": { "follow_user": false, "mention": false, "follow_question": false, "answer": false, "ask": false, "comment": false, "request_answer": false, "upvote": false, "comment_upvote": false }, "email": { "enabled": true, "autoFollow": true, "topicFollowMethod": "default", "mentionsFrequency": "daily", "followedTopicsFrequency": "never", "followedPostsFrequency": "daily", "upvotesFrequency": "daily", "followedUsersFrequency": "default", "newFollowersFrequency": "daily" } }, "lastSeenAt": "2019-12-05T00:12:10.907Z", "lastActionAt": "2019-12-05T00:12:10.929Z", "lastPostAt": null, "portal": "5a73b1fcc48071e4c4dc1cae", "_id": "5de84a9c53e2404848b1b0fb", "_type": "user" }, { "role": "member", "profile": { "username": "triplea1373", "name": "Amir Ahangari", "gender": "", "location": "", "website": "", "picture": "https://gravatar.com/avatar/a6ac5b09b633aafba41b4a0cda22976e?s=200&d=retro", "banner": "", "title": "", "description": "", "badge": {}, "verified": false, "score": 10, "counts": { "followers": 0, "followings": 0, "views": 0, "answers": 0, "answersVotes": 0, "answersWords": 0, "comments": 0, "questions": 0, "posts": 0, "responses": 0, "questionsFollowers": 0, "edits": 0, "requests": 0, "groups": 0, "replies": 0, "receivedLikes": 0 } }, "notifications": { "telegram": { "follow_user": true, "mention": true, "follow_question": true, "answer": true, "ask": true, "comment": true, "request_answer": true, "upvote": true, "comment_upvote": true }, "email": { "enabled": true, "autoFollow": true, "topicFollowMethod": "default", "mentionsFrequency": "default", "followedTopicsFrequency": "default", "followedPostsFrequency": "default", "upvotesFrequency": "default", "followedUsersFrequency": "default", "newFollowersFrequency": "default" } }, "lastSeenAt": "2019-03-28T17:02:15.034Z", "lastActionAt": null, "lastPostAt": null, "portal": "5a73b1fcc48071e4c4dc1cae", "_id": "5c890abdf1d2414b5034dc3a", "_type": "user" }, { "role": "admin", "profile": { "username": "amir", "name": "Amir Ahangari", "gender": "", "location": "", "website": "", "picture": "/files/users/a3e/5cf06ec07575275814411a3e_7824.png", "banner": "", "title": "Fullstack Developer at Tribe", "description": "", "badge": { "text": "Tribe Team" }, "verified": true, "score": 30, "counts": { "followers": 4, "followings": 7, "views": 0, "answers": 3, "answersVotes": 0, "answersWords": 75, "comments": 2, "questions": 0, "posts": 0, "responses": 0, "questionsFollowers": 0, "edits": 8, "requests": 1, "groups": 0, "replies": 0, "receivedLikes": 0 } }, "notifications": { "telegram": { "follow_user": true, "mention": true, "follow_question": true, "answer": true, "ask": true, "comment": true, "request_answer": true, "upvote": true, "comment_upvote": true }, "email": { "enabled": true, "autoFollow": true, "topicFollowMethod": "default", "mentionsFrequency": "default", "followedTopicsFrequency": "default", "followedPostsFrequency": "default", "upvotesFrequency": "default", "followedUsersFrequency": "default", "newFollowersFrequency": "default" } }, "lastSeenAt": "2019-12-09T21:38:35.192Z", "lastActionAt": "2019-12-09T21:38:18.333Z", "lastPostAt": "2019-12-09T21:38:18.333Z", "portal": "5a73b1fcc48071e4c4dc1cae", "_id": "5cf06ec07575275814411a3e", "_type": "user" } ], "count": 3 } This endpoint retrieves search results. HTTP Request GET /api/v1/search Query Parameters Parameter Type Default Description page Number 1 Intended page limit Number 20 Number of items per page sort String createdAt.desc The field to sort on type String all Type of the result. It can be one of [question , group, topic, post, user, all] query String Query to search Virtual Currency Add Credit to User curl "https://community.tribe.so/api/v1/users/:id/credit" -H "Authorization: Bearer {access_token}" -X POST The above command returns JSON structured like this: This endpoint adds credits to a specific user. It does not reduce credits from the giver and is only for admins. HTTP Request POST /api/v1/users/:id/credit Query Parameters Parameter Default Description type credit Type of the request. For adding credit it must be credit amount Amount of the credit to add Withdraw Credit from User curl "https://community.tribe.so/api/v1/users/:id/credit" -H "Authorization: Bearer {access_token}" -X POST The above command returns JSON structured like this: This endpoint withdraws credits from a specific user. Only for admins. HTTP Request POST /api/v1/users/:id/credit Query Parameters Parameter Default Description type withdraw Type of the request. For withdrawing credit it must be withdraw amount Amount of the credit to withdraw Deposit Credit from User curl "https://community.tribe.so/api/v1/users/:id/credit" -H "Authorization: Bearer {access_token}" -X POST The above command returns JSON structured like this: This endpoint deposits credits to a specific user. HTTP Request POST /api/v1/users/:id/credit Query Parameters Parameter Default Description type deposit Type of the request. For withdrawing credit it must be deposit amount Amount of the credit to deposit Errors The Tribe API uses the following error codes: Error Code Meaning 400 Bad Request -- Your request is invalid. 401 Unauthorized -- Your API key is wrong. 403 Forbidden -- The requested item is hidden for administrators only. 404 Not Found -- The requested item could not be found. 405 Method Not Allowed -- You tried to access an endpoint with an invalid method. 410 Gone -- The item requested has been removed from our servers. 429 Too Many Requests -- You're sending too many requests! 500 Internal Server Error -- We had a problem with our server. Try again later. 503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later. Widgets Getting Started Tribe widgets are components from community which you can easily embed in your product, website, or service. Using Tribe widgets is super simple. Start by pasting following script in your website's tag. skip to Main Content

Back To Top