Before using the API
You need a valid API key to be able to use the public API. The key is usually only available to the Playgroup owner. All content is delivered as JSON data. All writes return true or false.
Get all active users
A list of all currently registered users with their most interesting data:
curl -L playgroup.community/api/v1/members?api_key=XXX-XXX-XXX\&domain=subdomain.playgroup.community
- name
- role
- avatar
- bio
- link
- status
- status_date
- location
- timezone
- interests
- spotify
- youtube
{
name: "...",
role: "...",
avatar: "...",
bio: "...",
link: "...",
status: "...",
status_date: "...",
location: "...",
timezone: "...",
interests: "...",
facebook: "...",
instagram: "...",
twitter: "...",
spotify: "...",
youtube: "...",
linkedin: "..."
}
Create New User
Creates a new user to your Playgroup:
curl -L playgroup.community/api/v1/create/user?api_key=XXX-XXX-XXX\&domain=subdomain.playgroup.community\&name=first_last\&email=name@example.com
- id
- name
- reset_link
{
id: "...",
name: "...",
email: "...",
reset_link: "...",
}
Change User Avatar
Changes the avatar for a registered user in your Playgroup:
curl -F avatar=@imagefile playgroup.community/api/v1/create/users/1/avatar?api_key=XXX-XXX-XXX\&domain=subdomain.playgroup.community
Upload Completed
Get all channels
A list of all public and private channels in your Playgroup.
curl -L playgroup.community/api/v1/channels?api_key=XXX-XXX-XXX\&domain=subdomain.playgroup.community
- id
- channel_name
- slug
- description
- channel_image
- public
{
id: "...",
channel_name: "...",
slug: "...",
description: "...",
channel_image: "...",
public: "..."
}
Get all threads
A list of all public and private threads in your Playgroup.
curl -L playgroup.community/api/v1/threads?api_key=XXX-XXX-XXX\&domain=subdomain.playgroup.community
- subject
- content
- thread_slug
- date
- last_update
{
subject: "...",
content: "...",
thread_slug: "...",
date: "...",
last_update: "..."
}
Create a new thread
Create a complete thread in a channel of your choice. You'll need to look at the URL to get the channel_slug in which the thread should be posted.
curl -L playgroup.community/api/v1/create/thread?api_key=XXX-XXX-XXX\&domain=subdomain.playgroup.community\&subject=New%20thread%20title\&content=lorem%20ipsum%20dolor%20sit%20amet\&channel_slug=general\&user=ben
- subject*
- content*
- channel_slug*
- user*
"true" or "false"
Create a new channel
Create a new public channel, accessible to all members.
curl -L playgroup.community/api/v1/create/channel?api_key=XXX-XXX-XXX\&domain=subdomain.playgroup.community\&name=API%20created%20channel\&description=lorem%20ipsum%20dolor%20sit%20amet
- name*
- description
- channel_image
"true" or "false"