The YesGraph Developer Hub

Welcome to the YesGraph developer hub. You'll find comprehensive guides and documentation to help you start working with YesGraph as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

If you don't have access to your user's contacts yet, you can still get into using YesGraph by looking at data from your own users. YesGraph allows you to submit data about your users in bulk. We use this data to generate better ranking results for your users.

POST /users

Should be called when you want to submit your user's information to YesGraph to let us analyze your users and return enriched results.

# Use YesGraph's Python SDK 
# https://github.com/yesgraph/python-yesgraph
from yesgraph import YesGraphAPI
api = YesGraphAPI("YOUR_SECRET_KEY")
users = [
  {
    "username": "nvie",
    "name": "Vincent Driessen",
    "email": "me@nvie.com"
  },
  {
    "id": "1234",
    "email": "ivan@kirigin.com"
  },
  {
    "username": "myhorseapp",
    "name": "Jonathan Chu",
    "email": "jonathan.chu@me.com"
  }
]
api.post_users(users)
###

{
  "message": "Bulk of 3 users stored for test.",
  "meta": {
    "time": 0.08466883659362793,
    "docs": "https://www.yesgraph.com/docs/#post-users"
  }
}
curl -X POST \
    -H 'Authorization: Bearer YOUR_SECRET_KEY' \
    -H 'Content-Type: application/json' \
    -d '[
  {
    "username": "nvie",
    "name": "Vincent Driessen",
    "email": "me@nvie.com"
  },
  {
    "id": "1234",
    "email": "ivan@kirigin.com"
  },
  {
    "username": "myhorseapp",
    "name": "Jonathan Chu",
    "email": "jonathan.chu@me.com"
  }
]' \
    https://api.yesgraph.com/v0/users
###

{
  "message": "Bulk of 3 users stored for test.",
  "meta": {
    "time": 0.08466883659362793,
    "docs": "https://www.yesgraph.com/docs/#post-users"
  }
}

Standardized properties

Every User document may specify the following fields. These fields are standardized based on common naming conventions used in software. Please try to send your data using these conventional fields.

Parameter
Attributes
Description

id

required unless username is present

Your internal user ID, if applicable

username

required unless id is present

Your internal username, if applicable

name

optional

The full name of the user

first_name

optional

The first name of the user

last_name

optional

The last name of the user

email

optional

The email address of the user

phone

optional

The phone number of the user

location

optional

The location of the user

picture

optional

The picture URL for this user

url

optional

A link to the account or profile for this user

*

optional, object

Any other keys you wish to store on this user

Aliased properties

For your convenience, we've aliased the following column names, so they will be automatically detected.

If you send...
...we'll store it as

city

location

family_name / familyName

last_name

fullname / fullName

name

given_name / givenName

first_name

image

picture

image_url / imageUrl

picture

link

url

picture_url / pictureUrl

picture

pk

id

telephone

phone

Excess properties

If you have more properties you want to record on your user record, you can just add them, and they will remain stored on your user data. Examples of these custom fields could be properties like last_login, subscription, has_payment, or last_purchase data. Whatever makes sense for your app.

/users