Accounts
Create a link to add a Plaid or card account
Returns a short-lived link you hand to the entity. Opening it takes them to a Melio-hosted page that runs the Plaid or card flow and adds the internal account for them, so bank and card details never pass through your servers. Authenticate with your api-key.
POST
/
accounts
/
link
const options = {
method: 'POST',
headers: {
'Melio-Entity-Id': '<melio-entity-id>',
'api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({type: 'plaid'})
};
fetch('https://api.melio.com/v2/accounts/link', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
{
"data": {
"url": "https://developers.melio.com/accounts/add?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9&type=plaid",
"expiration": "2026-07-08T16:04:05Z"
}
}{
"error": {
"type": "invalid_request_error",
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}{
"error": {
"type": "authorization_error",
"code": "BUSINESS_NOT_ELIGIBLE",
"message": "Business is not eligible to add an internal account. See the limitations endpoint for details."
}
}{
"error": {
"type": "invalid_request_error",
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}Headers
Body
application/json
const options = {
method: 'POST',
headers: {
'Melio-Entity-Id': '<melio-entity-id>',
'api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({type: 'plaid'})
};
fetch('https://api.melio.com/v2/accounts/link', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
{
"data": {
"url": "https://developers.melio.com/accounts/add?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9&type=plaid",
"expiration": "2026-07-08T16:04:05Z"
}
}{
"error": {
"type": "invalid_request_error",
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}{
"error": {
"type": "authorization_error",
"code": "BUSINESS_NOT_ELIGIBLE",
"message": "Business is not eligible to add an internal account. See the limitations endpoint for details."
}
}{
"error": {
"type": "invalid_request_error",
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}
}