> For the complete documentation index, see [llms.txt](https://talque.gitbook.io/public/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://talque.gitbook.io/public/webhooks/users.md).

# Users

Some APIs require you to identify users, for example to set someone as a vendor admin. Furthermore, there are two different notions of "user" that are needed for different purposes, either

* Someone who is reachable by email (identified by account id). This always exists for a given email address.
* A profile that is part of the network (identified by a profile id). This may not exist.

## Look up by email

<mark style="color:green;">`POST`</mark> `https://talque.com/webhook/org/:orgId/profile/email-lookup`

Discover the account and profile id for a given email address. The profile id can be `null` if there is no profile.  In addition, basic user and profile data is returned.&#x20;

The input email is matched against the primary or an alias email of potentially existing users, in which case the returned account data will have the primary email address. The output `orgProfile` is only listed if the user is already participant of the network.

**Body**

| Name        | Type           | Description                                                             |
| ----------- | -------------- | ----------------------------------------------------------------------- |
| `email`     | string         | Valid email address                                                     |
| `firstName` | string         | Optional first name of the user, may be used in transactional emails    |
| `lastName`  | string         | Optional last name of the user, may be used in transactional emails     |
| `locale`    | string \| null | Optional [language preference](/public/json-api/enumerations/locale.md) |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
   "accountId": "iu9AuaYoIPHTgtCB43z0",
   "profileId": "pFs6jhrgEH6o50rYwJvy",
   "account": { ... },
   "orgProfile": { ... },
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}


---

# 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://talque.gitbook.io/public/webhooks/users.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.
