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    

/invite-sent

YesGraph's invite API endpoints can help us tune the results of our contact ranking. We can find people and relationships that are like the successful invites in the past.

/invite-sent should be called when a user sends an invitation over email or SMS.

user_id

required

string or int

The unique ID you use internally to reference the user sending the invite. This could be a string or an int.
Note: if you pass in a numeric user ID, it will be converted to a string, and thus returned as a string.

sent_at

optional

date

The date and time the invitation was sent. It defaults to the current time if not provided. This is an ISO 8601 date string or a Unix timestamp (integer). See the Dates section for details.

email

required (unless phone is present)

string

The email address that the invite was sent to. Use this key if the invite was sent via an email.

phone

required (unless email is present)

string or int

The phone number that the invite was sent to. Use this key if the invite was sent via an SMS.

# Use YesGraph's Python SDK 
# https://github.com/yesgraph/python-yesgraph
from yesgraph import YesGraphAPI
api = YesGraphAPI("YOUR_SECRET_KEY")
api.post_invite_sent("1234", email="john@smith.com")
###

{
  "message": "Invite sent added."
}
curl -X POST \
    -H 'Authorization: Bearer YOUR_SECRET_KEY' \
    -H 'Content-Type: application/json' \
    -d '
{
  "user_id": "1234",
  "email": "john@smith.com"
}
    ' \
    https://api.yesgraph.com/v0/invite-sent
###

{
  "message": "Invite sent added."
}

/invite-sent