# 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: 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:

```
GET https://talque.gitbook.io/public/webhooks/users.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
