> For the complete documentation index, see [llms.txt](https://manual.personr.co/api-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://manual.personr.co/api-documentation/entities/linking-a-ubo-to-an-entity.md).

# Linking a UBO to an entity

Optionally, you can link existing applicants or entities to another entity as a UBO

When you've created an entity, use this endpoint to link other applicants or entities as ultimate beneficial owners (UBOs) to the original entity. This will allow you to clearly view the company structure.

{% hint style="warning" %}
Note: You don't need to use this endpoint if you're verifying an entity using a verification link. Verification links require representatives to input UBOs during the verification process.
{% endhint %}

Before linking a UBO, make sure you have created the applicant or entity using the required endpoints: [Creating an applicant](/api-documentation/applicants/creating-an-applicant.md)or [Creating an entity](/api-documentation/entities/creating-an-entity.md). You will need to remember their `applicantId` for this call and input them into `uboApplicantId`.

***

## Link a UBO to the entity

<mark style="color:green;">`POST`</mark> `/api-add-ubo`

| Name          | Value                 |
| ------------- | --------------------- |
| Content-Type  | `multipart/form-data` |
| Authorization | `Bearer YOUR_TOKEN`   |

**Body**

<table><thead><tr><th>Name</th><th width="165">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>applicantId</code></td><td>string</td><td>The entity's applicantId you wish for others to be linked to <mark style="color:red;">(required)</mark></td></tr><tr><td><code>uboApplicantId</code></td><td>string</td><td>Unique applicantId generated on applicant or entity creation <mark style="color:red;">(required)</mark></td></tr><tr><td><code>position</code></td><td>string</td><td>The type of UBO - see below for options <mark style="color:red;">(required)</mark></td></tr></tbody></table>

**UBO** `position` **types**

| Name          | Description                        |
| ------------- | ---------------------------------- |
| `Director`    | A director of the entity           |
| `Shareholder` | A shareholder of the entity        |
| `Other`       | Use this when nothing else applies |

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

```sh
curl --location 'https://enterprise.personr.co/api/1.1/wf/api-add-ubo' \
--form 'applicantId="4242424242424x424242424242424242"' \
--form 'uboApplicantId="4242424242424x424242424242424242"' \
--form 'position="Director"' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
const axios = require('axios');
const FormData = require('form-data');

const formData = new FormData();

formData.append('applicantId', '4242424242424x424242424242424242');
formData.append('uboApplicantId', '4242424242424x424242424242424242');
formData.append('position', 'Director');

axios.post('https://enterprise.personr.co/api/1.1/wf/api-add-ubo', formData, {
  headers: {
    ...formData.getHeaders(),
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
  },
})
.then((response) => {
  console.log(response.data);
})
.catch((error) => {
  console.error(error);
});
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
const formData = new FormData();
formData.append('applicantId', '4242424242424x424242424242424242');
formData.append('uboApplicantId', '4242424242424x424242424242424242');
formData.append('position', 'Director');

fetch('https://enterprise.personr.co/api/1.1/wf/api-add-ubo', {
  method: 'POST',
  body: formData,
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
  },
})
.then(response => response.json())
.then(data => {
  console.log(data);
})
.catch(error => {
  console.error('Error:', error);
});
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
require 'uri'
require 'json'
require 'net/http/post/multipart'

url = URI('https://enterprise.personr.co/api/1.1/wf/api-add-ubo')

req = Net::HTTP::Post::Multipart.new url,
  'applicantId' => '4242424242424x424242424242424242',
  'uboApplicantId' => '4242424242424x424242424242424242',
  'position' => 'Director'

req['Authorization'] = 'Bearer YOUR_ACCESS_TOKEN'

res = Net::HTTP.start(url.hostname, url.port, use_ssl: url.scheme == 'https') do |http|
  http.request(req)
end

puts JSON.parse(res.body)
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = 'https://enterprise.personr.co/api/1.1/wf/api-add-ubo'

data = {
    'applicantId': '4242424242424x424242424242424242',
    'uboApplicantId': '4242424242424x424242424242424242',
    'position': 'Director'
}

headers = {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}

response = requests.post(url, data=data, headers=headers)

print(response.json())
```

{% endtab %}
{% endtabs %}

**Response**

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

```json
{
"status":"success",
"applicantId":"4242424242424x424242424242424242",
"ubos":[   {
        "applicantId":"4242424242424x424242424242424242",
        "type":"Individual",
        "position":"Director"
    }],
"errors":[]
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "statusCode": 400,
    "message": "Error: incorrect applicantId provided"
}
```

{% 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://manual.personr.co/api-documentation/entities/linking-a-ubo-to-an-entity.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
