---
title: "Register a new link"
method: POST
path: "/api/links/"
tags: ["Links"]
---

# Register a new link

`POST /api/links/`

## ▶️ Usage

Register a new link (a connection between your user and their institution) using the Belvo API.

> 👍 We really recommend using our <a href="https://developers.belvo.com/docs/connect-widget" target="_blank">Connect Widget</a> to handle link creation and link status updates.

To make things easier, we've included custom examples for the links you can create for each of our products. Just click on the type of link you want to create in the **Body Params** section below.

## Request body

- union
  - LinksRequestEmploymentBrazil — The request body to create a link for employment institutions in Brazil.
    - `institution` string, required — The Belvo name for the institution. For employment institutions in Brazil, you can select the following institutions: - `inss_br_employment`
    - `username` string, required — The user's CPF (ID) used to log in to the institution. You can provide this either as 11 characters or with the format `XXX.XXX.XXX-XX`.
    - `password` string, password, required — The user's password used to log in to the institution.
    - `external_id` string — An additional identifier for the link, provided by you, to store in the Belvo database. **Cannot** include any Personal Identifiable Information (PII). **Must** be at least three characters long. If we identify that the identifier contains PII, we will force a `null` value. For more information, see our <a href="https://developers.belvo.com/docs/link-creation-best-practices#adding-your-own-identifier" target="_blank">Link creation article</a>.
    - `access_mode` 'single' | 'recurrent' — The type of link to create. - Use `single` to do ad hoc one-time POST requests for accounts, owners, and transactions. - Use `recurrent` to have Belvo access information on a recurrent basis so you always have fresh account, owner, balance, and transaction data. For more information, see our <a href="https://developers.belvo.com/docs/links-and-institutions#links" target="_blank">Links</a> article.
    - `fetch_resources` string[] — An array of resources that you would like to receive a historical update for. For **Employments Brazil** (INSS), you can select the following resources: - `EMPLOYMENTS` - `OWNERS`
    - `credentials_storage` string — Indicates whether or not to store credentials (and the duration for which to store the credentials). - For recurrent links, this is set to `store` by default (and cannot be changed). - For single links, this is set to `365d` by default. Can be either: - `store` to store credentials (until the link is deleted) - `nostore` to not store credentials - Any value between `1d` and `365d` to indicate the number of days you want the credentials to be stored. For more information, check out the <a href="https://developers.belvo.com/docs/data-retention-controls#credentials_storage" target="_blank">credentials_storage</a> section of our Data retention controls article.
    - `stale_in` string — Indicates how long any user-derived data should be stored in Belvo's database for the link (both single and recurrent). For example, if you send through `90d`, Belvo will remove any data from its database relating to the user after 90 days. For more information, check out the <a href="https://developers.belvo.com/docs/data-retention-controls#stale_in" target="_blank">stale_in</a> section of our Data retention controls article. > 📘 Info > > Belvo will only remove data for links that have not been updated in the period you provide in `stale_in`. Belvo will only remove data for links that have not been updated in the period you provide in `stale_in`. By default Belvo stores user data for 365 days, unless the link is deleted.
  - LinksRequestEmploymentMexico — The request body to create a link for employment institutions in Mexico.
    - `institution` string, required — The Belvo name for the institution. For employment institutions in Mexico, you can select the following institutions: - `imss_mx_employment` - `issste_mx_employment` - `planet_mx_employment` (Sandbox institution)
    - `username` string, required — The user's CURP (ID) used to log in to the institution.
    - `username2` string — The user's email address used to log in to the institution. Note required for `issste_mx_employment`.
    - `external_id` string — An additional identifier for the link, provided by you, to store in the Belvo database. **Cannot** include any Personal Identifiable Information (PII). **Must** be at least three characters long. If we identify that the identifier contains PII, we will force a `null` value. For more information, see our <a href="https://developers.belvo.com/docs/link-creation-best-practices#adding-your-own-identifier" target="_blank">Link creation article</a>.
    - `access_mode` 'single' | 'recurrent' — The type of link to create. - Use `single` to do ad hoc one-time POST requests for accounts, owners, and transactions. - Use `recurrent` to have Belvo access information on a recurrent basis so you always have fresh account, owner, balance, and transaction data. For more information, see our <a href="https://developers.belvo.com/docs/links-and-institutions#links" target="_blank">Links</a> article.
    - `fetch_resources` string[] — An array of resources that you would like to receive a historical update for. For **Employment Records Mexico** (IMSS and ISSSTE), you can select the following resources: - `EMPLOYMENT_RECORDS` Additionally, you can opt-in to the following Employment Record specific resources (contact your representative as additional costs apply): - `CURRENT_EMPLOYMENTS` (IMSS only) - `EMPLOYMENT_METRICS` (IMSS only)
    - `credentials_storage` string — Indicates whether or not to store credentials (and the duration for which to store the credentials). - For recurrent links, this is set to `store` by default (and cannot be changed). - For single links, this is set to `365d` by default. Can be either: - `store` to store credentials (until the link is deleted) - `nostore` to not store credentials - Any value between `1d` and `365d` to indicate the number of days you want the credentials to be stored. For more information, check out the <a href="https://developers.belvo.com/docs/data-retention-controls#credentials_storage" target="_blank">credentials_storage</a> section of our Data retention controls article.
    - `stale_in` string — Indicates how long any user-derived data should be stored in Belvo's database for the link (both single and recurrent). For example, if you send through `90d`, Belvo will remove any data from its database relating to the user after 90 days. For more information, check out the <a href="https://developers.belvo.com/docs/data-retention-controls#stale_in" target="_blank">stale_in</a> section of our Data retention controls article. > 📘 Info > > Belvo will only remove data for links that have not been updated in the period you provide in `stale_in`. Belvo will only remove data for links that have not been updated in the period you provide in `stale_in`. By default Belvo stores user data for 365 days, unless the link is deleted.
  - LinksRequestFiscalMexico — The request body to create a link for fiscal institutions in Mexico.
    - `institution` string, required — The Belvo name for the institution. For fiscal institutions in Mexico, you can select the following institutions: - `sat_mx_fiscal` - `tatooine_mx_fiscal` (Sandbox institution)
    - `username` string, required — The user's RFC (tax ID) used to log in to the institution.
    - `password` string, password, required — The user's password used to log in to the institution.
    - `external_id` string — An additional identifier for the link, provided by you, to store in the Belvo database. **Cannot** include any Personal Identifiable Information (PII). **Must** be at least three characters long. If we identify that the identifier contains PII, we will force a `null` value. For more information, see our <a href="https://developers.belvo.com/docs/link-creation-best-practices#adding-your-own-identifier" target="_blank">Link creation article</a>.
    - `access_mode` 'single' | 'recurrent' — The type of link to create. - Use `single` to do ad hoc one-time POST requests for accounts, owners, and transactions. - Use `recurrent` to have Belvo access information on a recurrent basis so you always have fresh account, owner, balance, and transaction data. For more information, see our <a href="https://developers.belvo.com/docs/links-and-institutions#links" target="_blank">Links</a> article.
    - `fetch_resources` string[] — An array of resources that you would like to receive a historical update for. For **Fiscal Mexico** (SAT), you can select the following resources: - `FINANCIAL_STATEMENTS` - `INVOICES` - `TAX_COMPLIANCE_STATUS` - `TAX_RETENTIONS` - `TAX_RETURNS` - `TAX_STATUS`
    - `credentials_storage` string — Indicates whether or not to store credentials (and the duration for which to store the credentials). - For recurrent links, this is set to `store` by default (and cannot be changed). - For single links, this is set to `365d` by default. Can be either: - `store` to store credentials (until the link is deleted) - `nostore` to not store credentials - Any value between `1d` and `365d` to indicate the number of days you want the credentials to be stored. For more information, check out the <a href="https://developers.belvo.com/docs/data-retention-controls#credentials_storage" target="_blank">credentials_storage</a> section of our Data retention controls article.
    - `stale_in` string — Indicates how long any user-derived data should be stored in Belvo's database for the link (both single and recurrent). For example, if you send through `90d`, Belvo will remove any data from its database relating to the user after 90 days. For more information, check out the <a href="https://developers.belvo.com/docs/data-retention-controls#stale_in" target="_blank">stale_in</a> section of our Data retention controls article. > 📘 Info > > Belvo will only remove data for links that have not been updated in the period you provide in `stale_in`. Belvo will only remove data for links that have not been updated in the period you provide in `stale_in`. By default Belvo stores user data for 365 days, unless the link is deleted.

## Response `201`

Created

- Link
  - `id` string, uuid — Belvo's unique identifier for the current item.
  - `institution` string — Belvo's name for the institution.
  - `access_mode` 'single' | 'recurrent' | 'null', nullable — The link type. For more information, see our <a href="https://developers.belvo.com/docs/links-and-institutions#links" target="_blank">Links</a> article. We return one of the following enum values: - `single` - `recurrent` - `null`
  - `last_accessed_at` string, date-time, nullable — The ISO-8601 timestamp of Belvo's most recent successful access to the institution for the given link.
  - `created_at` string, date-time — The ISO-8601 timestamp of when the data point was created in Belvo's database.
  - `external_id` string — An additional identifier for the link, provided by you, to store in the Belvo database. **Cannot** include any Personal Identifiable Information (PII). **Must** be at least three characters long. If we identify that the identifier contains PII, we will force a `null` value. For more information, see our <a href="https://developers.belvo.com/docs/link-creation-best-practices#adding-your-own-identifier" target="_blank">Link creation article</a>.
  - `institution_user_id` string — > 📘 Info > > Only applicable for links created **after 08-02-2022**. A unique 44-character string that can be used to identify a user at a given institution. 📚 Check out our <a href="https://developers.belvo.com/docs/link-creation-best-practices#avoiding-duplicated-links" target="_blank">Avoiding duplicated links</a> DevPortal article for more information and tips on how to use it.
  - `status` 'valid' | 'invalid' | 'unconfirmed' | 'token_required' — The current status of the link. For more information, see our <a href="https://developers.belvo.com/docs/links-and-institutions#links" target="_blank">Link</a> article in the devportal. We return one of the following values: - `valid` - `invalid` - `unconfirmed` - `token_required`
  - `created_by` string, uuid — The unique ID for the user that created this item.
  - `refresh_rate` '6h' | '12h' | '24h' | '7d' | '30d' | 'null', nullable — The update refresh rate for the recurrent link. For more information, check out our <a href="https://developers.belvo.com/docs/links-and-institutions#recurrent-links" target="_blank">recurrent link documentation</a> in our DevPortal. We return one of the following enum values: - `6h` - `12h` - `24h` - `7d` (default) - `30d` (once a month) - `null` (for single links)
  - `credentials_storage` string — Indicates whether or not to store credentials (and the duration for which to store the credentials). - For recurrent links, this is set to `store` by default (and cannot be changed). - For single links, this is set to `365d` by default. Can be either: - `store` to store credentials (until the link is deleted) - `nostore` to not store credentials - Any value between `1d` and `365d` to indicate the number of days you want the credentials to be stored. For more information, check out the <a href="https://developers.belvo.com/docs/data-retention-controls#credentials_storage" target="_blank">credentials_storage</a> section of our Data retention controls article.
  - `fetch_resources` string[] — An array of resources that you will receive a historical update for.
  - `stale_in` string — Indicates how long any user-derived data should be stored in Belvo's database for the link (both single and recurrent). For example, if you send through `90d`, Belvo will remove any data from its database relating to the user after 90 days. For more information, check out the <a href="https://developers.belvo.com/docs/data-retention-controls#stale_in" target="_blank">stale_in</a> section of our Data retention controls article. > 📘 Info > > Belvo will only remove data for links that have not been updated in the period you provide in `stale_in`. Belvo will only remove data for links that have not been updated in the period you provide in `stale_in`. By default Belvo stores user data for 365 days, unless the link is deleted.

## Other responses

- `400` — Bad request error
- `401` — Unauthorized
- `403` — Access to Belvo API denied
- `404` — Not Found Error
- `408` — Request Timeout
- `428` — MFA Token Required
- `500` — Unexpected Error

---

[API](https://skmtc.net/belvo/apis/belvo-api-docs.md) · [All operations](https://skmtc.net/belvo/apis/belvo-api-docs/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/belvo/belvo-api-docs/revisions/e82dca4a4b97/schema)
