> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.mercoa.com/embedded-ap-ar/api-reference/entity/send-onboarding-link/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mercoa.com/_mcp/server. # Send Onboarding Email POST https://api.mercoa.com/entity/{entityId}/onboarding Send an email with a onboarding link to the entity. The email will be sent to the email address associated with the entity. Reference: https://docs.mercoa.com/embedded-ap-ar/api-reference/entity/send-onboarding-link ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Path parameters - `entityId` (string, required) — Entity ID or Entity ForeignID ### Query parameters - `type` (enum, required) — The type of onboarding link to generate. If not provided, the default is payee. The onboarding options are determined by your organization's onboarding configuration. - Allowed values: `PAYEE`, `PAYOR` - `expiresIn` (string, optional) — Expressed in seconds or a string describing a time span. The default is 7 days. - `connectedEntityId` (string, optional) — The ID of the entity to connect to. If onboarding a payee, this should be the payor entity ID. If onboarding a payor, this should be the payee entity ID. If no connected entity ID is provided, the onboarding link will be for a standalone entity. - `redirectToPortal` (boolean, optional) — If true, the onboarding link will redirect to the vendor/customer portal if the entity is already onboarded. If false, the onboarding link will not redirect to the portal. The default is false. - `vendorPortalOptions` (object, optional) — The options for the vendor portal. - `tabs` (list of enum, optional) — The tabs to display in the vendor portal. If not provided, all tabs will be displayed. - Allowed values: `HOME`, `PROFILE`, `INVOICES`, `PAYMENT_METHODS`, `VENDOR_CREDITS` - `defaultTab` (enum, optional) — The default tab to display in the vendor portal. If not provided, the HOME tab will be displayed. - Allowed values: `HOME`, `PROFILE`, `INVOICES`, `PAYMENT_METHODS`, `VENDOR_CREDITS` - `welcomeMessage` (string, optional) — The welcome message to display in the vendor portal. If not provided, no welcome message will be displayed. ## Errors ### 400 Bad Request - `errorName` ("BadRequest", required) - `content` (string, required) ### 401 Unauthorized - `errorName` ("Unauthorized", required) - `content` (string, required) ### 403 Forbidden - `errorName` ("Forbidden", required) - `content` (string, required) ### 404 Not Found - `errorName` ("NotFound", required) - `content` (string, required) ### 409 Conflict - `errorName` ("Conflict", required) - `content` (string, required) ### 500 Internal Server Error - `errorName` ("InternalServerError", required) - `content` (string, required) ### 501 Unimplemented - `errorName` ("Unimplemented", required) - `content` (string, required) ## Examples **SDK Code** ```python import requests url = "https://api.mercoa.com/entity/entityId/onboarding" querystring = {"type":"PAYEE"} headers = {"Authorization": "Bearer "} response = requests.post(url, headers=headers, params=querystring) print(response.json()) ``` ```typescript import { MercoaClient } from "@mercoa/javascript"; const client = new MercoaClient({ token: "YOUR_TOKEN" }); await client.entity.sendOnboardingLink("entityId", { type: "PAYEE" }); ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.mercoa.com/entity/entityId/onboarding?type=PAYEE" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.mercoa.com/entity/entityId/onboarding?type=PAYEE") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.mercoa.com/entity/entityId/onboarding?type=PAYEE") .header("Authorization", "Bearer ") .asString(); ``` ```php request('POST', 'https://api.mercoa.com/entity/entityId/onboarding?type=PAYEE', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.mercoa.com/entity/entityId/onboarding?type=PAYEE"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.mercoa.com/entity/entityId/onboarding?type=PAYEE")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```