Peach (peach.cool) API Endpoints
Peach is hot right now so I poked around their API using https://mitmproxy.org/
As of the last update, this seems to be a fairly extensive/complete list of v1 endpoints, but feel free to submit revisions to this gist with any others you find!
- POST https://v1.peachapi.com/login
- Accept: application/json
- Body:
{
"email": "[email protected]",
"password": "password"
}
Returns a JWT token to be used in all subsequent requests.
- POST https://v1.peachapi.com/precheck/create/user
- Accept: application/json
- Body:
{
"email": "[email protected]"
}
- POST https://v1.peachapi.com/register
- Accept: application/json
- Body:
{
"email": "[email protected]",
"name": "username",
"password": "password"
}
Returns a JWT token to be used in all subsequent requests.
- GET https://v1.peachapi.com/connections
- Accept: application/json
- Authorization: Bearer token.goeshere
- GET https://v1.peachapi.com/connections/explore
- Accept: application/json
- Authorization: Bearer token.goeshere
- POST https://v1.peachapi.com/stream/n/username/connection
- Accept: application/json
- Authorization: Bearer token.goeshere
- POST https://v1.peachapi.com/friend-request/ed5c01cf1d5f4d8da819e48fece71dcb/accept
- Accept: application/json
- Authorization: Bearer token.goeshere
- GET https://v1.peachapi.com/stream/n/username/connections
- Accept: application/json
- Authorization: Bearer token.goeshere
- POST https://v1.peachapi.com/activity/wave
- Accept: application/json
- Authorization: Bearer token.goeshere
- Body:
{
"targetStreamId": "ed5c01cf1d5f4d8da819e48fece71dcb",
"type": "quarantine"
}
type
can be switched out with any other wave type supported in the iOS application. Make sure it's lowercase.
- GET https://v1.peachapi.com/stream/id/ed5c01cf1d5f4d8da819e48fece71dcb
- Accept: application/json
- Authorization: Bearer token.goeshere
- PUT https://v1.peachapi.com/stream/id/ed5c01cf1d5f4d8da819e48fece71dcb/read
- Accept: application/json
- Authorization: Bearer token.goeshere
- POST https://v1.peachapi.com/comment
- Accept: application/json
- Authorization: Bearer token.goeshere
- Body:
{
"body": "comment goes here",
"postId": "e0b83e467d224b60b80ba38eb5c93550"
}
- POST https://v1.peachapi.com/post
- Accept: application/json
- Authorization: Bearer token.goeshere
- Body:
{
"message": [{
"text": "Content goes here",
"type": "text"
}]
}
- POST https://v1.peachapi.com/like
- Accept: application/json
- Authorization: Bearer token.goeshere
- Body:
{
"postId": "4d78ade7bb324352a760a8f9de5291d7"
}
- DELETE https://v1.peachapi.com/like/postID/4d78ade7bb324352a760a8f9de5291d7
- Accept: application/json
- Authorization: Bearer token.goeshere
- GET https://v1.peachapi.com/activity/isUnread
- Accept: application/json
- Authorization: Bearer token.goeshere
- GET https://v1.peachapi.com/stream/activity
- Accept: application/json
- Authorization: Bearer token.goeshere
- PUT https://v1.peachapi.com/activity/read
- Accept: application/json
- Authorization: Bearer token.goeshere
- PUT https://v1.peachapi.com/stream/displayName
- Accept: application/json
- Authorization: Bearer token.goeshere
- Body:
{
"displayName": "New Display Name"
}
- PUT https://v1.peachapi.com/stream/name
- Accept: application/json
- Authorization: Bearer token.goeshere
- Body:
{
"name": "newusername"
}
- PUT https://v1.peachapi.com/stream/avatarSrc
- Accept: application/json
- Authorization: Bearer token.goeshere
- Body:
{
"avatarSrc": "http://s3.amazonaws.com/peach-assets-prod-temp/files/636740B2-F378-4179-A21F-69E56AE9B038.jpg"
}
The iOS client creates a unique ID and uploads the file to S3 automatically, but requires signing with a certificate in the header to succesfully upload. Thankfully, you can pass any remotely hosted image path to the avatarSrc
value. Including gifs (which don't render in the official app but will in third-party apps)
- GET https://v1.peachapi.com/stream/visibility
- Accept: application/json
- Authorization: Bearer token.goeshere
- POST https://v1.peachapi.com/stream/visibility
- Accept: application/json
- Authorization: Bearer token.goeshere
- POST https://v1.peachapi.com/recover
- Accept: application/json
- Body:
{
"email": "[email protected]",
"returnLink": "peach://recover"
}