# Direct Messages

Direct messages (DMs) are private one-to-one conversations between SpaceKeep accounts. They live
on the Network and use the same identity as everything else.

## Starting a conversation

```
POST /social/conversations
```

with the target user id. If a conversation already exists between you and that user, the existing
thread is returned instead of creating a duplicate. A thread only surfaces in an inbox once it
carries a message.

Conversations are scoped to the canonical pair — you cannot spoof a participant.

## Reading your inbox

```
GET /social/conversations
```

returns your conversations, paginated with `cursor` and `limit`, most recent first. Each entry
includes the other participant and the last message.

Unread count for the badge:

```
GET /social/conversations/unread-count
```

## Reading a thread

```
GET /social/conversations/:conversationId
GET /social/conversations/:conversationId/messages
```

Messages are paginated with `cursor` and `limit`.

## Sending a message

```
POST /social/conversations/:conversationId/messages
```

| Part | Limit |
| --- | --- |
| Body text | 1–2,000 characters |
| Images | Up to 4 per message, via the SpaceKeep CDN |

Images are uploaded through the same upload path as post images and referenced by asset id.

## Deleting a message

You can delete your own messages:

```
DELETE /social/messages/:messageId
```

## Read receipts

```
POST /social/conversations/:conversationId/read
```

marks the conversation read up to the latest message.

## Typing indicators

```
POST /social/conversations/:conversationId/typing
```

signals that you are typing. Typing and read receipts are delivered over the realtime stream.

## Realtime

The Server-Sent Events stream (`GET /social/stream`) pushes new messages, typing events, read
receipts, and unread-count updates as they happen, so an open inbox updates without polling.

## Blocking and muting

You cannot message someone you have blocked, or who has blocked you. See [Follows](/network/follows/)
for blocks and mutes.

## Related

- [Follows](/network/follows/) — blocks and mutes that gate messaging
- [Notifications](/network/notifications/) — new-message notifications
- [Feeds](/network/feeds/) — the public side of the Network
