# Get Profile

**Endpoint**

&#x20;`GET/v2/auth/profile`

**Link**

{% embed url="<https://stagep.tst-apidmndelss.com/openapi/v2.html#/operations/Auth_Profile>" %}

***

### **Request**

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `Bearer <JWT>`     | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns user and partner details in a structured JSON object.

#### **Response Fields**

**1. Partner Object**

| Field       | Type     | Description            | Example                                  |
| ----------- | -------- | ---------------------- | ---------------------------------------- |
| **`id`**    | `string` | Unique partner ID.     | `"a2813d61-51a3-487f-b5bb-3aea43dd2581"` |
| **`name`**  | `string` | Partner company name.  | `"Acme Inc."`                            |
| **`email`** | `string` | Partner contact email. | `"partner@acme.com"`                     |
| **`phone`** | `string` | Partner contact phone. | `"+1234567890"`                          |

**2. User Object**

| Field       | Type      | Description                          | Example                                  |
| ----------- | --------- | ------------------------------------ | ---------------------------------------- |
| **`id`**    | `string`  | Unique user ID.                      | `"2e325799-392d-41d4-8dd6-6cea890c6982"` |
| **`name`**  | `string`  | User's full name.                    | `"John Doe"`                             |
| **`email`** | `string`  | User's email.                        | `"user@example.com"`                     |
| **`phone`** | `string`  | User's phone number.                 | `"+1987654321"`                          |
| **`is2FA`** | `boolean` | 2FA enabled status (`true`/`false`). | `true`                                   |

**Example Response:**

```
{
  "item": {
    "partner": {
      "id": "a2813d61-51a3-487f-b5bb-3aea43dd2581",
      "name": "Acme Inc.",
      "email": "partner@acme.com",
      "phone": "+1234567890"
    },
    "user": {
      "id": "2e325799-392d-41d4-8dd6-6cea890c6982",
      "name": "John Doe",
      "email": "user@example.com",
      "phone": "+1987654321",
      "is2FA": true
    }
  }
}
```

### **Error Responses**

1. **Invalid/Missing Token**:

   ```
   {
     "error": "Unauthorized"
   }
   ```
2. **Expired Token**:

   ```
   {
     "error": "Token expired"
   }
   ```

***

### **Notes**

* **Permissions**:
  * Requires an **active session** (valid JWT).
  * <mark style="color:red;">Partner details are only included for</mark> <mark style="color:red;"></mark><mark style="color:red;">**business accounts**</mark><mark style="color:red;">.</mark>
* **2FA Status**:
  * `is2FA: true` means the user must provide OTP codes for login.

### Examples

**Real request**&#x20;

```postman_json
Authorization:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxMTI5NzYxLCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.atnfresV4v9XT9f_ze3ShmVs337TWt087Ze0MNuiiWk
```

**Real response**&#x20;

200 OK

```postman_json
{
  "item": {
    "partner": {
      "id": "3354815d-1a23-4b1c-81ec-306388cddfa4",
      "name": "Delos test",
      "email": "",
      "phone": ""
    },
    "user": {
      "id": "5ff73da8-224e-44de-a235-2d7a76c3144c",
      "name": "Test",
      "email": "test@delos.financial",
      "phone": "",
      "is2FA": false
    }
  }
}
```


---

# 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://docs.delos.financial/authentication/get-profile.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.
