# Making Your First API Call

This guide walks you through making your first API calls with Peach's platform, starting with creating a borrower and adding their contact details.

You can also do this through the sandbox Admin Portal. This quickstart covers the API approach.

## Before You Start

To execute the API calls in this guide, you'll need:

1. **Sandbox Environment Access**: [Request access](https://docs.google.com/forms/d/e/1FAIpQLSf-kJGjUDafsCC3OEvij3y5waoCjvSuSA4uCk3BKcvdpZgmVA/viewform) from Peach support if you haven't already
2. **Loan Type ID**: Available during onboarding or from your Peach account manager
3. **API Testing Tool**: We recommend Postman for testing:
  - Download Postman from [postman.com/downloads](https://www.postman.com/downloads/)
  - Import the Peach API collection using the [<img src="https://run.pstmn.io/button.svg" alt="Run In Postman" style="width: 128px; height: 32px;">](https://app.getpostman.com/run-collection/23131454-99e27da9-79dd-4570-929a-72ce999de673?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D23131454-99e27da9-79dd-4570-929a-72ce999de673%26entityType%3Dcollection%26workspaceId%3Dca5f20b2-c9a1-4706-9785-3c05510737ff) button
  - Fork the collection to create your own copy


## Step 1: Create a Borrower

First, we'll create a borrower record. A borrower can represent either a person or business in the Peach system.

### Request


```http
POST https://sandboxapi.peach.finance/api/people
Content-Type: application/json
X-API-KEY: <YOUR-API-KEY>

{
  "status": "active",
  "externalId": "BORROWER-123",  // Optional: your system's ID
  "name": {
    "firstName": "Elmer",
    "middleName": "Fudd",
    "lastName": "Jones"
  },
  "dateOfBirth": "1970-01-01",
  "identity": {
    "identityType": "SSN",
    "value": "111111111"
  }
}
```

### Response


```json
{
  "id": "BO-1234-ABCD",
  "status": "active",
  "externalId": "BORROWER-123",
  "name": {
    "firstName": "Elmer",
    "middleName": "Fudd", 
    "lastName": "Jones"
  },
  "dateOfBirth": "1970-01-01",
  "identity": {
    "identityType": "SSN",
    "value": "111111111"
  },
  "createdAt": "2024-01-09T10:30:00Z"
}
```

**Verify:** Confirm the response includes an `id` field and that `status` is `active`.

Save the `id` value from the response—we'll refer to it as `PERSON_ID` in the next steps.

## Step 2: Add Home Address Contact Details

After creating the borrower, let's add their home address as a contact method.

### Request


```http
POST https://sandboxapi.peach.finance/api/people/{PERSON_ID}/contacts
Content-Type: application/json
X-API-KEY: <YOUR-API-KEY>

{
  "contactType": "address",
  "label": "home",
  "affiliation": "self",
  "status": "primary",
  "address": {
    "addressLine1": "1 Main St",
    "addressLine2": "",
    "city": "Houston",
    "state": "TX",
    "postalCode": "77002",
    "country": "US"
  }
}
```

### Response


```json
{
  "id": "CT-456-DEF",
  "contactType": "address",
  "label": "home",
  "affiliation": "self",
  "status": "primary",
  "address": {
    "addressLine1": "1 Main St",
    "addressLine2": "",
    "city": "Houston",
    "state": "TX",
    "postalCode": "77002",
    "country": "US"
  },
  "createdAt": "2024-01-09T10:35:00Z"
}
```

**Verify:** Run `GET /api/people/{PERSON_ID}/contacts` to confirm the home address appears with `status` set to `primary`.

## Next Steps

Now that you've created a borrower and added their contact information, you can:

- Add additional contact methods (email, phone)
- Create a user account for the borrower
- Create a loan for the borrower
- Enable autopay


For detailed information about these and other operations, see:

- [API Reference](/api-docs/api-public/#section/Introduction)
- [Core Concepts](/getting-started/core-concepts)
- [Borrower Management](/borrowers/)
- [Loan Management](/loan-lifecycle/)


## Additional Tips

- Always store the Peach ID values returned in responses for future reference
- Use meaningful external IDs to help map Peach records to your system
- Test thoroughly in sandbox before moving to production
- Contact Peach support if you need help with any API operations