All Pepper Talk resources are exposed behind SSL from the base URL https://hostedpepper.getpeppertalk.com/api/v1/. Resources are relative to this base URL.
Resource: client/message/send
Method: POST
Content-Type: application/json
Data:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
"text": "Test message",
"to" : "receiver@yourdomain.com",
"from": "sender@yourdomain.com"
"topic_id": "352e723a-5f3f-455e-a1ee-548bac188ada",
"topic_title": "A topic title",
"images": [{
"img_src": "https://maps.googleapis.com/maps/api/staticmap?center=22.39762,68.91713&zoom=6&size=430x300",
"img_caption": "My Image"
}],
"locations": [{
"name":"My current location",
"location": {
"lat":22.8946639,
"lng":67.5970372
},
"map_thumbnail":"https://maps.googleapis.com/maps/api/staticmap?center=22.39762,68.91713&zoom=6&size=430x300",
}],
"custom_data": {
"optional": true
}
}
Parameters:
Response:
200 OK
Content-Type: application/json
{
"status":"sent",
"id":"6439ca0a-3234-4e52-a66a-dc41dbc4e6fe"
}
Error codes:
Resource: client/group/:group_id
A group id requires a prefix of grp: the rest of the group id can be any string. A group id should be unique for your app.
Method: POST
Content-Type: application/json
Data:
1
2
3
4
5
6
7
{
"group_name": "Test group 1",
"profile_photo": "http://cdn.yourdomain.com/images/group_profile.jpg",
"group_members": ["member1@yourdomain.com", "member2@yourdomain.com", "member3@yourdomain.com"],
"public_group" : false
"open_group" : false
}
Parameters:
Response:
200 OK
Content-Type: application/json
{
"public_group":false,
"profile_photo":"http://cdn.yourdomain.com/images/group_profile.jpg",
"owner":"user@yourdomain.com",
"open_group":false,
"name":"Test group 1",
"group_members":["member1@yourdomain.com", "member2@yourdomain.com", "member3@yourdomain.com", "user@yourdomain.com"],
"group_id":"grp:test_group_1.1"
}
Error codes:
Method: PUT
Content-Type: application/json
Data:
1
2
3
4
{
"group_name": "Test group 2",
"profile_photo": "http://cdn.yourdomain.com/images/group_profile.jpg"
}
Parameters:
Response:
200 OK
Content-Type: application/json
{
"public_group":false,
"profile_photo":"http://cdn.yourdomain.com/images/group_profile.jpg",
"owner":"user@yourdomain.com",
"open_group":false,
"name":"Test group 2",
"group_members":["member1@yourdomain.com", "member2@yourdomain.com", "member3@yourdomain.com", "user@yourdomain.com"],
"group_id":"grp:test_group_1.1"
}
Error codes:
Method: GET
Response:
200 OK
Content-Type: application/json
{
"public_group":false,
"profile_photo":"http://cdn.yourdomain.com/images/group_profile.jpg",
"owner":"user@yourdomain.com",
"open_group":false,
"name":"Test group 2",
"group_members":["member1@yourdomain.com", "member2@yourdomain.com", "member3@yourdomain.com", "user@yourdomain.com"],
"group_id":"grp:test_group_1.1"
}
Error codes:
Method: DELETE
Response:
200 OK
Error codes:
Resource: client/group/:group_id/members
Method: PUT
Content-Type: application/json
Data:
1
2
3
{
"group_members": ["member4@yourdomain.com", "member5@yourdomain.com"],
}
Parameters:
Response:
200 OK
Content-Type: application/json
{
"public_group":false,
"profile_photo":"http://cdn.yourdomain.com/images/group_profile.jpg",
"owner":"user@yourdomain.com",
"open_group":false,
"name":"Test group 1",
"group_members":["member1@yourdomain.com", "member2@yourdomain.com", "member3@yourdomain.com", "user@yourdomain.com", "member4@yourdomain.com", "member5@yourdomain.com"],
"group_id":"grp:test_group_1.1"
}
Error codes:
Method: DELETE
Content-Type: application/json
Data:
1
2
3
{
"group_members": ["member4@yourdomain.com", "member5@yourdomain.com"],
}
Parameters:
Response:
200 OK
Content-Type: application/json
{
"public_group":false,
"profile_photo":"http://cdn.yourdomain.com/images/group_profile.jpg",
"owner":"user@yourdomain.com",
"open_group":false,
"name":"Test group 1",
"group_members":["member1@yourdomain.com", "member2@yourdomain.com", "member3@yourdomain.com", "user@yourdomain.com"],
"group_id":"grp:test_group_1.1"
}
Error codes: