---
title: "Create or get a one on one chat"
method: POST
path: "/chat-app/chats/c/{receiverId}"
tags: ["💬 Chat App"]
---

# Create or get a one on one chat

`POST /chat-app/chats/c/{receiverId}`

This API endpoint enables a logged-in user to initiate a personalized one-on-one chat interaction with another user.

By providing correct `receiverId`, the API facilitates the creation of a private chat environment where participants can engage in direct and focused conversations.

## Response `200`

Create or get a one on one chat

- object
  - `data` object
    - `__v` number
    - `_id` string
    - `admin` string
    - `createdAt` string
    - `isGroupChat` boolean
    - `name` string
    - `participants` object[]
      - `__v` number
      - `_id` string
      - `avatar` object
        - `_id` string
        - `localPath` string
        - `url` string
      - `createdAt` string
      - `email` string
      - `isEmailVerified` boolean
      - `loginType` string
      - `role` string
      - `updatedAt` string
      - `username` string
    - `updatedAt` string
  - `message` string
  - `statusCode` number
  - `success` boolean

---

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