> For the complete documentation index, see [llms.txt](https://fair-indonesia.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fair-indonesia.gitbook.io/docs/developers/guides/resolve-emails-to-creators.md).

# Resolve Emails to Creators

If you already have a list of email addresses — from a sign-up form, a CRM, or a past outreach list — this guide turns them into matched social profiles you can act on. You submit the emails, poll for the matched profiles, and then optionally pull a live follower count for the handles you matched. Every call uses the base URL and your raw token in the `Authorization` header (no `Bearer` prefix).

All paths below are relative to the base URL:

* Trial / staging: `https://stg.api.fair-indonesia.com/api/fairservice`
* Production: `https://api.fair-indonesia.com/api/fairservice`

## 1. Submit the emails with `POST /email-lookup`

Send your list of addresses to `POST /email-lookup`. This runs as a job and returns an `id` you use to collect the results. You can submit a batch of emails in a single request.

```bash
curl -X POST https://stg.api.fair-indonesia.com/api/fairservice/email-lookup \
  -H 'Authorization: <your_token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "emails": [
    "creator1@example.com",
    "creator2@example.com"
  ]
}'
```

```json
{
  "id": "3a1b...",
  "created_at": "2026-01-01T00:00:00Z",
  "emails": [ "creator1@example.com", "creator2@example.com" ],
  "status": "IN_PROGRESS"
}
```

## 2. Poll for matches with `GET /email-lookup/{id}`

Take the `id` and poll `GET /email-lookup/{id}` until `status` is no longer `IN_PROGRESS`. The result splits your list into `matched_emails` — each with the social profile that was found — and `non_matched_emails` for the addresses with no match. The `lookup_report` gives you the match counts at a glance.

```bash
curl -X GET https://stg.api.fair-indonesia.com/api/fairservice/email-lookup/3a1b... \
  -H 'Authorization: <your_token>'
```

```json
{
  "lookup_report": {
    "id": "3a1b...",
    "status": "SUCCESS",
    "matched_count": 0,
    "non_matched_count": 0
  },
  "matched_emails": [
    {
      "email": "creator1@example.com",
      "platform_username": "string",
      "full_name": "string",
      "follower_count": 0,
      "url": "https://example.com",
      "is_verified": true
    }
  ],
  "non_matched_emails": [ "creator2@example.com" ]
}
```

Each matched profile already carries a `follower_count`, a `platform_username`, the profile `url`, and verification status — enough to triage who is worth a closer look.

## 3. Refresh follower counts with `GET /profiles`

The follower count returned by the lookup is a snapshot. When you want the live number — for example, before deciding who to prioritise — call `GET /profiles` with the matched handle and the platform ID. It returns the up-to-date follower count along with the bio, verification status, and profile image.

```bash
curl -X GET 'https://stg.api.fair-indonesia.com/api/fairservice/profiles?identifier=matched_username&work_platform_id=9bb8913b-ddd9-430b-a66a-d74d846e6c66' \
  -H 'Authorization: <your_token>'
```

```json
{
  "platform_username": "string",
  "url": "https://example.com",
  "full_name": "string",
  "follower_count": 0,
  "following_count": 0,
  "is_verified": true,
  "is_business": true,
  "introduction": "string"
}
```

From a raw email list, you now have matched handles with live follower numbers ready for outreach.

## Related

* [Creator Search & Analytics](/docs/developers/api-reference/creator-search-analytics.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://fair-indonesia.gitbook.io/docs/developers/guides/resolve-emails-to-creators.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
