Documentation
Links

Links

Links are used to represent a connection between monetr and Plaid (or potentially some other source of data for bank transactions and balances). But links can also be used to represent a manual budgeting "area". Links are either created automatically by following the Plaid workflow; or can be created manually using these API endpoints to do manual budgeting.

List Links

This endpoint does not support any pagination, it simply returns all of the links associated with the currently authenticated account.

HTTP
GET /api/links

Response Body

AttributeTypeRequiredDescription
linkIdnumberyesThe unique identifier for a given link within monetr. This is unique.
linkTypeenumyesWhat type of link this is.
- 0 Unknown (likely an error state)
- 1 Plaid Link (managed)
- 2 Manual Link
plaidInstitutionIdstringnoIf the link is a Plaid link, then this will include Plaid's unique identifier for the institution it is assocaited with. This is used to retrieve basic institution information. It is null for manual links
linkStatusenumyesThe status of the link, for manual links this will always be 2.
- 0 Unknown (likely an error state)
- 1 Pending (the link is currently being setup by the user, or waiting on Plaid data)
- 2 Setup (the link is healthy and functioning normally)
- 3 Error (something is wrong with the link that might require user interaction to resolve)
- 4 Pending Expiration (the credentials for the link are going to expire and it needs to be reauthenticated)
- 5 Revoked (the user has revoked access to the bank via Plaid)
errorCodestringnoIf the link is an error state this will have an error code from Plaid, this is used to help decide what action needs to be taken to fix the link.
expirationDatedatetimenoIf the Plaid link can expire, then its expiration date will be stored here. After this date the link will need to be reauthenticated.
institutionNamestringyesThe name of the instituion or link. If this is a Plaid link then this will be the name of the bank assocaited with the link in Plaid. If this is a manual link then this will be the name given to the link at creation.
customInstitutionNamestringnoPlaid links cannot have their institutionName updated, but if the user wants a custom name for a Plaid link then this field will be used.
createdAtdatetimeyesWhen this link was created. This will be in UTC.
createdByUserIdnumberyesThe ID of the user who created the link. Links are "owned" by the user who creates them. Even if multiple people have access to the same account, a link is "owned" by the one who creates it.
updatedAtdatetimeyesWhen this link was last updated. Note: This field might not be well maintained and should not be relied on, it may be deprecated in the future.
lastManualSyncdatetimenoThe last time this link was "manually" triggered to sync.
lastSuccessfulUpdatedatetimenoThe last time this link successfully received new data from Plaid.

Create (Manual) Link

Manual links can be created witha a post request. But allow only a subset of the fields to be provided and managed by the client.

Request Body

AttributeTypeRequiredDescription
institutionNamestringyesThe name of the instituion or link.
customInstitutionNamestringnoCustom institution name for a link, this field may be subject to changes in behavior for manual links

Response Body

AttributeTypeRequiredDescription
linkIdnumberyesThe unique identifier for a given link within monetr. This is unique.
linkTypeenumyesWill always be 2 for manual links.
linkStatusenumyesThe status of the link, for manual links this will always be 2.
institutionNamestringyesThe name of the instituion or link. If this is a Plaid link then this will be the name of the bank assocaited with the link in Plaid. If this is a manual link then this will be the name given to the link at creation.
customInstitutionNamestringnoPlaid links cannot have their institutionName updated, but if the user wants a custom name for a Plaid link then this field will be used.
createdAtdatetimeyesWhen this link was created. This will be in UTC.
createdByUserIdnumberyesThe ID of the user who created the link. Links are "owned" by the user who creates them. Even if multiple people have access to the same account, a link is "owned" by the one who creates it.
updatedAtdatetimeyesWhen this link was last updated. Note: This field might not be well maintained and should not be relied on, it may be deprecated in the future.

Create Manual Link Example

Example Create Manual Link Request
curl --request POST \
  --url "https://my.monetr.app/api/links" \
  --header "content-type: application/json" \
  --data '{
    "institutionName": "My Manual Budgeting"
}'