# Agent Profile

## List Agent Profiles

<mark style="color:blue;">`GET`</mark> `https://{organisation}.clearlrs.com/xapi/agents/profile`

Returns a list of **profileIds** stored for the specified parameters.

#### Query Parameters

| Name         | Type   | Description |
| ------------ | ------ | ----------- |
| agent        | object | 1           |
| registration | string | 2           |

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

```
```

{% endtab %}
{% endtabs %}

## Retrieve Agent Profile

<mark style="color:blue;">`GET`</mark> `https://{organisation}.clearlrs.com/xapi/agents/profile`

Retrieves the Agent Profile document

#### Query Parameters

| Name      | Type   | Description |
| --------- | ------ | ----------- |
| agent     | object | 1           |
| profileId | string | 2           |

{% tabs %}
{% tab title="200 The document currently stored in the Agent Profile resource." %}

```
```

{% endtab %}

{% tab title="302 " %}

```
```

{% endtab %}
{% endtabs %}

## Update Agent Profile

<mark style="color:orange;">`PUT`</mark> `https://{organisation}.clearlrs.com/xapi/agents/profile`

Replaces the Agent Profile document for the given **agent** and **profileId**.

#### Query Parameters

| Name      | Type   | Description |
| --------- | ------ | ----------- |
| agent     | object | 1           |
| profileId | string | 2           |

{% tabs %}
{% tab title="204 The document was successfully updated." %}

```
```

{% endtab %}

{% tab title="400 The request is missing required parameters." %}

```javascript
{
    "code": 400,
    "name": "Bad Request",
    "body": [
        {
            "name": "ValidationError",
            "description": "'query' must contain property  'agent'",
            "property": "query",
            "value": {
                "document": ""
            }
        },
        {
            "name": "ValidationError",
            "description": "'query' must contain property  'profileId'",
            "property": "query",
            "value": {
                "document": ""
            }
        }
    ]
}
```

{% endtab %}
{% endtabs %}

## Merge Agent Profile

<mark style="color:green;">`POST`</mark> `https://{organisation}.clearlrs.com/xapi/agents/profile`

#### Query Parameters

| Name      | Type   | Description |
| --------- | ------ | ----------- |
| agent     | object | 1           |
| profileId | string | 2           |

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

```
```

{% endtab %}
{% endtabs %}

## Remove Agent Profile

<mark style="color:red;">`DELETE`</mark> `https://{organisation}.clearlrs.com/xapi/agents/profile`

#### Query Parameters

| Name      | Type   | Description |
| --------- | ------ | ----------- |
| agent     | object | 1           |
| profileId | string | 2           |

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

```
```

{% endtab %}
{% endtabs %}
