Warning: Deprecated

This endpoint has been deprecated in favor of the /invites-sent (plural) endpoint. All new integrations should use that endpoint instead.

YesGraph’s Invite API endpoints can help us tune the contact rankings for your app. We can find people and relationships that are similar to past successful invites.

This endpoint should be called when a user sends an invitation, either by email or SMS.

user_id required string or int The unique ID you use internally to reference the user sending the invite. 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. If not provided, this field defaults to the current time. The format should be 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 of the invite recipient. Use this field if the invite was sent via email.
phone required unless email is present string or int The phone number of the invite recipient. Use this field if the invite was sent via 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")

### Response
{
  "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

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