> For the complete documentation index, see [llms.txt](https://dev.vulos.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.vulos.io/reference/profile-api.md).

# Profile API

{% hint style="success" %}
If you use the [JavaScript SDK](/reference/identity-javascript-sdk.md) you could use the [`ProfileApi`](/reference/identity-javascript-sdk/the-base-package/profile/profileapi.md) abstraction instead.
{% endhint %}

{% hint style="warning" %}
You need the [`profile:read`](/identity/scopes-and-claims.md#profile-read) scope to access this API.
{% endhint %}

## User Profile

<mark style="color:blue;">`GET`</mark> `https://identity.vulos.io/api/v1/profile/:id`

Get the user's public profile information.

#### Path Parameters

| Name                                 | Type   | Description   |
| ------------------------------------ | ------ | ------------- |
| id<mark style="color:red;">\*</mark> | String | The user's ID |

#### Headers

| Name                                            | Type   | Description                                                               |
| ----------------------------------------------- | ------ | ------------------------------------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer authentication with the access token obtained using OpenID Connect |

{% tabs %}
{% tab title="400: Bad Request Error response" %}

```json
{
    "error": "Something went wrong",
    "code": "<errror code>",
    "request": "<request id>"
}
```

{% endtab %}

{% tab title="401: Unauthorized Empty body" %}

```javascript
```

{% endtab %}

{% tab title="200: OK The user's public profile" %}

```javascript
{
    "firstName": "John",
    "lastName": "Doe"
}
```

{% endtab %}
{% endtabs %}

## Organization Profile

<mark style="color:blue;">`GET`</mark> `https://identity.vulos.io/api/v1/profile/organization/:id`

Get the organization's public profile information.

#### Path Parameters

| Name                                 | Type   | Description                |
| ------------------------------------ | ------ | -------------------------- |
| id<mark style="color:red;">\*</mark> | String | The ID of the organization |

#### Headers

| Name                                            | Type   | Description                                                               |
| ----------------------------------------------- | ------ | ------------------------------------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer authentication with the access token obtained using OpenID Connect |

{% tabs %}
{% tab title="200: OK The organization's public profile" %}

```javascript
{
    "name": "Example",
    "address": "Example Address",
    "city": "Example Test",
    "country": "Example Country Name",
    "state": "Example State Name",
    "website": "https://example.com",
    "verified": false,
    "uniqueId": "<example unique id>",
    "zipCode": "<example zip code>"
}
```

{% endtab %}

{% tab title="400: Bad Request Error response" %}

```javascript
{
    "error": "Something went wrong",
    "code": "<errror code>",
    "request": "<request id>"
}
```

{% endtab %}

{% tab title="401: Unauthorized Empty body" %}

```javascript
```

{% endtab %}
{% endtabs %}

## Search Organizations

<mark style="color:blue;">`GET`</mark> `https://identity.vulos.io/api/v1/profile/organization/search/:search/:amount/:offset`

Search for an organization by name.

#### Path Parameters

| Name                                     | Type   | Description                                                                             |
| ---------------------------------------- | ------ | --------------------------------------------------------------------------------------- |
| search<mark style="color:red;">\*</mark> | String | The keyword to find in the organization's name                                          |
| amount                                   | String | The maximal amount of organizations to return (defaults to `10`, it's limited to `100`) |
| offset                                   | String | The amount of organizations to skip (defaults to `0`)                                   |

#### Headers

| Name                                            | Type   | Description                                                               |
| ----------------------------------------------- | ------ | ------------------------------------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer authentication with the access token obtained using OpenID Connect |

{% tabs %}
{% tab title="200: OK An array of organization profiles with an ID" %}

```javascript
[
    {
        "id": 1,
        "name": "Example"
        // additional public profile data
    },
    {
        "id": 2,
        "name": "Scond Example"
    }
]
```

{% endtab %}

{% tab title="400: Bad Request Empty body" %}

```javascript
```

{% endtab %}

{% tab title="401: Unauthorized Empty body" %}

```javascript
```

{% endtab %}
{% endtabs %}
