> For the complete documentation index, see [llms.txt](https://docs.paypangea.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.paypangea.com/wallet-creation/api-integration/request-a-wallet.md).

# Request a wallet

<mark style="color:green;">`POST`</mark> `/auth/request-wallet`

This endpoint is designed to initiate the process of creating or retrieving a user's wallet. It requires the user to authenticate and then submit a request with either an email or a phone number. The system will then either create a new wallet if one does not exist for the submitted credentials or return an existing wallet if it is already associated with them.

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <API_KEY>` |

**Body**

<table><thead><tr><th width="210">Name</th><th>Type</th><th width="278">Description</th><th>Required</th></tr></thead><tbody><tr><td>email</td><td>string</td><td>email of wallet holder </td><td>OPTIONAL</td></tr><tr><td>phone</td><td>string</td><td>phone of wallet holder </td><td>OPTIONAL</td></tr></tbody></table>

**Response**

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

```json
{
  "status": 200,
  "wallet": <wallet_address>
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "code": 400,
  "message": <error message>
}
```

{% 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://docs.paypangea.com/wallet-creation/api-integration/request-a-wallet.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.
