Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Peach v1 API Endpoints

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!

Login

{
    "email": "email@example.com",
    "password": "password"
}

Returns a JWT token to be used in all subsequent requests.

Check if email address is already registered

{
    "email": "email@example.com"
}

Register

{
    "email": "email@example.com",
    "name": "username",
    "password": "password"
}

Returns a JWT token to be used in all subsequent requests.

Connections

Explore connections

Send friend request

Accept a friend request

View a friend's connections

Send somebody a wave

{
    "targetStreamId": "ed5c01cf1d5f4d8da819e48fece71dcb",
    "type": "quarantine"
}

type can be switched out with any other wave type supported in the iOS application. Make sure it's lowercase.

View a connections's stream

Mark a stream as read (caught up with all unread items)

Post a comment on a post

{
    "body": "comment goes here",
    "postId": "e0b83e467d224b60b80ba38eb5c93550"
}

Publish a text post

{
	"message": [{
		"text": "Content goes here",
		"type": "text"
	}]
}

Like a post

{
    "postId": "4d78ade7bb324352a760a8f9de5291d7"
}

Unlike a post

Check for unread activity

View activity feed

Mark activity feed as read

Change your display name

{
    "displayName": "New Display Name"
}

Change your @username

{
    "name": "newusername"
}

Change your display image

{
    "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 visibility of your posts

Set visibility of your posts

Reset password

{
    "email": "email@example.com",
    "returnLink": "peach://recover"
}
@developit

This comment has been minimized.

Copy link

commented Jan 13, 2016

To post a comment:

POST /comment

{
    postId: 'xxxxx-post-id-here',
    body: 'hi!'
}
@ummjackson

This comment has been minimized.

Copy link
Owner Author

commented Jan 13, 2016

Thanks @developit - updated :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.