A strong team onboarding flow can drive higher engagement and activation with your users! YesGraph enables you to search across all your app’s data, to connect each user with their coworkers and improve activation across the board.

The /domain-emails endpoint allows you to quickly search across all of your data for people who share an email domain.

A secret key is required for this endpoint, so only app administrators can access this. Your users (with client keys or tokens) will not be able to access information on other users using this endpoint.

GET /domain-emails/:domain

Make a GET request to this endpoint, with the email domain you’d like to search for, to get a list of people on that domain.

domain required string The email domain to search for

Arguments

batch_size optional (default is 50) int Maximum number of results to return
page optional (default is page 1) int Page number of results to return

Example

# Use YesGraph's Python SDK 
# https://github.com/yesgraph/python-yesgraph
from yesgraph import YesGraphAPI

api = YesGraphAPI("YOUR_SECRET_KEY")

response = api.get_domain_emails("yesgraph.com", page=3, batch_size=2)
print(response)

### Response
{
  "meta": {
    "time": 0.12345
  },
  "prev_page": 2,
  "current_page": 3,
  "next_page": 4,
  "emails": [
    {
      "email": "ivan@yesgraph.com",
      "domain": "yesgraph.com",
      "filtered": false,
      "aliases": [
        {
          "email": "ivan@yesgraph.com",
          "user_id": "1234"
        },
        {
          "email": "ivan@gmail.com",
          "user_id": "5678"
        }
      ],
    },
    {
      "email": "support@yesgraph.com",
      "domain": "yesgraph.com",
      "filtered": true,
      "aliases": [
        {
          "email": "support@yesgraph.com",
        }
      ]
    }
  ]
}
curl -X GET \
    -H 'Authorization: Bearer YOUR_SECRET_KEY' \
    -H 'Content-Type: application/json' \
    https://api.yesgraph.com/v0/domain-emails/yesgraph.com?page=3&batch_size=2

### Response
{
  "meta": {
    "time": 0.12345
  },
  "prev_page": 2,
  "current_page": 3,
  "next_page": 4,
  "emails": [
    {
      "email": "ivan@yesgraph.com",
      "domain": "yesgraph.com",
      "filtered": false,
      "aliases": [
        {
          "email": "ivan@yesgraph.com",
          "user_id": "1234"
        },
        {
          "email": "ivan@gmail.com",
          "user_id": "5678"
        }
      ],
    },
    {
      "email": "support@yesgraph.com",
      "domain": "yesgraph.com",
      "filtered": true,
      "aliases": [
        {
          "email": "support@yesgraph.com",
        }
      ]
    }
  ]
}