> ## Documentation Index
> Fetch the complete documentation index at: https://docs.minimo.it/llms.txt
> Use this file to discover all available pages before exploring further.

# API Sync

> Sync contacts with Minimo using the REST API

## Overview

If your application doesn't use PostgreSQL, you can sync contacts with Minimo using our REST API. Every time a user is created or updated in your app, you call the Minimo API to keep contacts in sync.

<Warning>
  **Using PostgreSQL or Supabase?** We recommend the [native Supabase Connection](/product/data-sync/supabase) instead —
  it's plug-and-play, requires no code, and has no API failure points.
</Warning>

***

## How it works

1. **On app startup**: ensure your custom fields exist in Minimo
2. **On user create/update**: call the upsert endpoint to sync the contact
3. **On user delete** (optional): call the delete endpoint to remove the contact

The upsert endpoint handles both creation and updates automatically, matching contacts by email or phone.

***

## Implementation

### Use an AI coding tool

The fastest way to implement API sync is with our ready-made AI prompt. Give it to your AI coding tool (Cursor, Claude, Lovable, V0, Replit) and it will generate the full integration for you.

<Card title="Contact Sync AI Prompt" icon="wand-magic-sparkles" href="/guides/ai-prompts/contact-sync">
  Ready-to-use prompt that generates a complete contact sync integration with custom field setup, upsert logic, and
  lifecycle hooks.
</Card>

### Build it manually

If you prefer to implement it yourself, refer to the API reference:

<CardGroup cols={2}>
  <Card title="Upsert Contact" icon="user-plus" href="/api-reference/core-data/contacts/upsert">
    Create or update a contact by email or phone.
  </Card>

  <Card title="Custom Fields" icon="list" href="/api-reference/core-data/custom-fields/list">
    List and create custom field definitions.
  </Card>
</CardGroup>
