---
title: "Upsert Contact By Email Or Phone Number"
method: POST
path: "/api/v1/contact/upsert"
tags: ["Contact"]
---

# Upsert Contact By Email Or Phone Number

`POST /api/v1/contact/upsert`

Upsert a contact using email or phone number.
- **phone_number**: phone number of the contact including the country code. For ex: 16501111234
- **email**: email address of the contact.

## Query parameters

- `first_name` string, nullable, required
- `last_name` string, nullable, required
- `email` string, email, nullable, required
- `phone_number` string, nullable, required

## Response `201`

Successful Response

- IPostResponseBaseIContactRead
  - `message` string, nullable
  - `meta` union
    - object
    - unknown
  - `data` IContactRead
    - `first_name` string, nullable, required
    - `last_name` string, nullable, required
    - `email` string, nullable, required
    - `channels` object
    - `user_attributes` object
    - `last_seen` string, date-time, nullable
    - `last_sent` string, date-time, nullable
    - `org_id` string, uuid, nullable
    - `first_assistant_id` string, uuid, nullable
    - `last_assistant_id` string, uuid, nullable
    - `first_widget_id` string, uuid, nullable
    - `last_widget_id` string, uuid, nullable
    - `custom_fields` object, nullable
    - `id` string, uuid, required
    - `created_at` string, date-time, nullable, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/insighto/apis/ragify.md) · [All operations](https://skmtc.net/insighto/apis/ragify/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/insighto/ragify/revisions/cdca56191be9/schema)
