---
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}`

## Request

- Base URL: `https://api.freeapi.app/api/v1`
- URL: `https://api.freeapi.app/api/v1/chat-app/chats/c/{receiverId}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/hiteshchoudhary-ssesph/apis/freeapi/docs/chat-app/chats/c/:receiverId/post.ts> (a function with typed inputs; its response is checked against the schema)

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.dev/hiteshchoudhary-ssesph/apis/freeapi.md) - [All operations](https://skmtc.dev/hiteshchoudhary-ssesph/apis/freeapi/llms.txt) - [OpenAPI document](https://skmtc.dev/hiteshchoudhary-ssesph/apis/freeapi/revisions/a9f3a290e4dc?raw)
