> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.modernfi.com/api-reference/depositors/create/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.modernfi.com/_mcp/server. # Create Depositor POST https://api.modernfi.com/digital-banking/v1/depositors Content-Type: application/json Reference: https://docs.modernfi.com/api-reference/depositors/create ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Servers - `https://api.modernfi.com` (Production, default) - `https://api.uat.modernfi.com` (UAT) - `http://localhost:8000` (Local) ## Request ### Headers - `idempotency-key` (string, required) ### Body (application/json) This endpoint expects a CreateDepositorRequest. - `tin` (string, required) — TIN must be unique per institution - `first_name` (string, optional, nullable) - `last_name` (string, optional, nullable) - `entity_name` (string, optional, nullable) - `is_organization` (boolean, optional, default: false) - `institution_depositor_id` (string, optional, nullable) - `phone_numbers` (list of PhoneNumberData, optional, nullable) - `emails` (list of EmailData, optional, nullable) - `addresses` (list of AddressData, optional, nullable) - `account_ids` (list of string, optional, nullable) - `depositor_type` (enum, optional, nullable) - Allowed values: `CONSUMER`, `BUSINESS`, `NONPROFIT`, `LOCAL_GOVERNMENT`, `FEDERAL_GOVERNMENT`, `US_DEPOSITORY`, `FOREIGN_DEPOSITORY`, `FOREIGN_GOVERNMENT` - `ownership_category` (enum, optional, nullable) - Allowed values: `JOINT`, `SINGLE`, `RETIREMENT`, `ESTATE_REVOCABLE_TRUST`, `OTHER_CONSUMER`, `CORPORATION`, `LIMITED_LIABILITY_COMPANY`, `LIMITED_PARTNERSHIP`, `SOLE_PROPRIETORSHIP`, `OTHER_BUSINESS`, `CLUBS_ASSOCIATIONS`, `OTHER_NONPROFIT`, `MUNICIPALITIES`, `SCHOOL_DISTRICTS`, `OTHER_LOCAL_GOVERNMENT`, `US_GOVERNMENT`, `US_DEPOSITORY` - `account_officer` (string, optional, nullable) - `notes` (string, optional, nullable) - `institution_opt_out_federal_ids` (list of string, optional, nullable) — List of institutions (by federal_id) excluded from receiving this depositor's funds ## Response ### 201 Successful Response - `id` (string, required) - `institution_id` (string, required) - `institution_depositor_id` (string, required, nullable) - `first_name` (string, required, nullable) - `last_name` (string, required, nullable) - `entity_name` (string, required, nullable) - `is_organization` (boolean, required) - `phone_numbers` (list of PhoneNumberData, required) - `emails` (list of EmailData, required) - `addresses` (list of AddressData, required) - `depositor_type` (enum, required) - Allowed values: `CONSUMER`, `BUSINESS`, `NONPROFIT`, `LOCAL_GOVERNMENT`, `FEDERAL_GOVERNMENT`, `US_DEPOSITORY`, `FOREIGN_DEPOSITORY`, `FOREIGN_GOVERNMENT` - `tin_last_four` (string, optional, nullable) — Last 4 digits of the TIN (masked). - `ownership_category` (enum, optional, nullable) - Allowed values: `JOINT`, `SINGLE`, `RETIREMENT`, `ESTATE_REVOCABLE_TRUST`, `OTHER_CONSUMER`, `CORPORATION`, `LIMITED_LIABILITY_COMPANY`, `LIMITED_PARTNERSHIP`, `SOLE_PROPRIETORSHIP`, `OTHER_BUSINESS`, `CLUBS_ASSOCIATIONS`, `OTHER_NONPROFIT`, `MUNICIPALITIES`, `SCHOOL_DISTRICTS`, `OTHER_LOCAL_GOVERNMENT`, `US_GOVERNMENT`, `US_DEPOSITORY` - `account_officer` (string, optional, nullable) - `notes` (string, optional, nullable) - `institution_opt_out_federal_ids` (list of string, optional) — List of institutions (by federal_id) excluded from receiving this depositor's funds - `tin` (string, optional, nullable, deprecated) ## Errors ### 400 Bad Request Error Bad Request - Invalid input or validation error - `detail` (list of map from string to any, required) ### 401 Unauthorized Error Unauthenticated - Invalid or missing authentication credentials - `detail` (string, required) ### 403 Forbidden Error Unauthorized - Insufficient permissions to access resource - `detail` (string, required) ### 422 Unprocessable Entity Error Validation Error - `detail` (list of ValidationError, optional) ### 500 Internal Server Error Internal Server Error - `detail` (string, required) ## Types ### PhoneNumberData - `number` (string, required) - `is_primary` (boolean, optional, default: true) ### EmailData - `email_address` (string, required) - `is_primary` (boolean, optional, default: true) ### AddressData - `street` (string, required) - `city` (string, required) - `state` (string, required) - `zip` (string, required) - `country_code` (string, required) — ISO 3166-1 alpha-2 country code (e.g., US) - `is_primary` (boolean, optional, default: true) ### ValidationError - `loc` (list of ValidationErrorLocItems, required) - `msg` (string, required) - `type` (string, required) - `input` (any, optional) - `ctx` (ValidationErrorCtx, optional) ### ValidationErrorLocItems ### ValidationErrorCtx ## Examples **Request** ```json { "tin": "string" } ``` **Response** ```json { "id": "string", "institution_id": "string", "institution_depositor_id": "string", "first_name": "string", "last_name": "string", "entity_name": "string", "is_organization": true, "phone_numbers": [ { "number": "string", "is_primary": true } ], "emails": [ { "email_address": "string", "is_primary": true } ], "addresses": [ { "street": "string", "city": "string", "state": "string", "zip": "string", "country_code": "string", "is_primary": true } ], "depositor_type": "CONSUMER", "tin_last_four": "string", "ownership_category": "JOINT", "account_officer": "string", "notes": "string", "institution_opt_out_federal_ids": [ "string" ], "tin": "string" } ``` **SDK Code** ```python import requests url = "https://api.modernfi.com/digital-banking/v1/depositors" payload = { "tin": "string" } headers = { "idempotency-key": "idempotency-key", "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.modernfi.com/digital-banking/v1/depositors'; const options = { method: 'POST', headers: { 'idempotency-key': 'idempotency-key', Authorization: 'Bearer ', 'Content-Type': 'application/json' }, body: '{"tin":"string"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.modernfi.com/digital-banking/v1/depositors" payload := strings.NewReader("{\n \"tin\": \"string\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("idempotency-key", "idempotency-key") req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") 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.modernfi.com/digital-banking/v1/depositors") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["idempotency-key"] = 'idempotency-key' request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"tin\": \"string\"\n}" 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.modernfi.com/digital-banking/v1/depositors") .header("idempotency-key", "idempotency-key") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"tin\": \"string\"\n}") .asString(); ``` ```php request('POST', 'https://api.modernfi.com/digital-banking/v1/depositors', [ 'body' => '{ "tin": "string" }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', 'idempotency-key' => 'idempotency-key', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.modernfi.com/digital-banking/v1/depositors"); var request = new RestRequest(Method.POST); request.AddHeader("idempotency-key", "idempotency-key"); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"tin\": \"string\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "idempotency-key": "idempotency-key", "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = ["tin": "string"] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.modernfi.com/digital-banking/v1/depositors")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data 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() ```