> This page is part of EVVA for Developers (https://developers.evvahub.com), the documentation of the EVVA Partner API. The API is in developer preview and the SDK packages are not yet published: do not suggest installing them. Index: https://developers.evvahub.com/llms.txt

# Get messages around a message

GET https://api.evvahub.com/partner/v1/accounts/{creatorId}/conversations/{conversationId}/messages/window

Returns one window of messages centred on an anchor message.

**Cursors**

`older` is a `before` cursor for `GET /partner/v1/accounts/{creatorId}/conversations/{conversationId}/messages`,
and `newer` is a `cursor` for
`GET /partner/v1/accounts/{creatorId}/conversations/{conversationId}/messages/after`.

**Unknown anchors**

An anchor that cannot be resolved (withdrawn, in another conversation, or unknown) returns `anchor: null` with an
empty page. It is never a `404`, so message ids cannot be probed.

Messages carry the same fields as in the conversation's message history, and each message's `tip` is always
`null`.

**Required scopes:** `read:messages`.

Reference: https://developers.evvahub.com/api-reference/chat/get-message-window

## Authentication

- `Authorization` header (bearer token, required) — OAuth 2.0 client credentials. Request an access token at `POST /partner/v1/oauth/token` (`grant_type=client_credentials`) with the application's client secret or a `private_key_jwt` assertion, then send it as `Authorization: Bearer evpa_live_…` (or `evpa_test_…` for a sandbox application). Tokens are opaque and short lived (see `expires_in`); there is no refresh token. Each operation lists the scopes it requires.

## Request

### Path parameters

- `creatorId` (string, required) — The creator profile id — the ONLY source of the creator a request acts for.
- `conversationId` (string, required)

### Query parameters

- `anchor` (string, required) — The message to centre the window on.
- `limit` (integer, optional) — How many messages the window holds. Values above 100 are clamped to 100.

### Headers

- `X-Creator-Id` (string, optional) — Optional echo of the path `creatorId`; any other value is refused with 403 CREATOR_CONTEXT_MISMATCH.

## Response

### 200

The window.

- `conversation` (MessagePageConversation, required) — The thread, or null before its first message.
- `anchor` (MessageWindowAnchor, required, nullable)
- `messages` (list of DirectMessage, required)
- `older` (string, required, nullable) — A `before` cursor for `listMessages`.
- `newer` (string, required, nullable) — A `cursor` for `listMessagesAfter`.

## Errors

### 400 Bad Request Error

Invalid or missing parameters: `INVALID_REQUEST` (`details` names the fields), or a more specific code of the operation.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 401 Unauthorized Error

Token missing, malformed, expired or revoked: `INVALID_TOKEN` (or `UNAUTHORIZED` when no bearer token was sent). Request a new token and retry.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 403 Forbidden Error

Not your creator, or not with this token: `GRANT_REVOKED` (no active link to the creator), `NOT_ASSIGNED`, `OAUTH_SCOPE_MISSING` (the creator has not consented to the scope), `INSUFFICIENT_SCOPE` (the token lacks it), `CREATOR_CONTEXT_MISMATCH`, `AGENCY_SUSPENDED`.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 404 Not Found Error

No such resource, or it belongs to another creator: `NOT_FOUND` or a more specific code.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 429 Too Many Requests Error

Rate limited: `RATE_LIMIT_EXCEEDED`. Wait `Retry-After` seconds before retrying.

- `code` (enum, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
  - Allowed values: `RATE_LIMIT_EXCEEDED`, `TOO_MANY_MESSAGES`
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (RateLimitErrorDetails, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 500 Internal Server Error

Unexpected server error: `INTERNAL_ERROR`. Nothing internal is disclosed; quote the `X-Request-Id` when you report it.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 503 Service Unavailable Error

Temporarily unavailable: `SERVICE_UNAVAILABLE`, `TEMPORARILY_UNAVAILABLE`, `MEDIA_STORAGE_UNAVAILABLE` or `CREATOR_STANDING_UNAVAILABLE`. Retry after `Retry-After` seconds.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

## Types

### MessagePageConversation

The thread, or null before its first message.

- `id` (string, required)
- `lastMessageAt` (datetime, required, nullable)
- `pinnedMessage` (MessageQuote, optional, nullable)
- `buyerRef` (string, optional, nullable) — APPLICATIONS ONLY — the application's pairwise pseudonym of the buyer.

### MessageWindowAnchor

- `messageRef` (string, required)

### DirectMessage

- `id` (string, required)
- `senderRole` (enum, required)
  - Allowed values: `USER`, `CREATOR`
- `body` (string, required, nullable)
- `createdAt` (datetime, required)
- `kind` (enum, required)
  - Allowed values: `UNRECORDED`, `STANDARD`, `PAID`, `PAID_BROADCAST`, `PAID_ICE_BREAKER`, `TIP`, `ICE_BREAKER`, `BROADCAST`, `AUTOMATED`
- `authorship` (enum, required)
  - Allowed values: `UNRECORDED`, `HUMAN_AUTHORED`, `AI_DRAFTED_HUMAN_SENT`, `AI_GENERATED_APPROVED`, `AI_AUTOMATED`, `PLATFORM_AUTOMATED`
- `lifetime` (DirectMessageLifetime, required, nullable)
- `media` (list of MessageMedia, required)
- `receipt` (enum, required, nullable) — The actual status of a message the creator sent; null on the fan's messages. - `sent` — the message was saved. - `delivered` — the fan's client acknowledged delivery. A realtime publish or a partner call never counts. - `read` — the fan's read position reached it, subject to the fan's receipt setting. - `purchased` — the same as `paid.purchased`, and only with `read:revenue`.
  - Allowed values: `sent`, `delivered`, `read`
- `editedAt` (datetime, required, nullable)
- `revision` (integer, required)
- `replyTo` (DirectMessageReplyTo, required, nullable) — The quoted message this one answers (on the Partner reads).
- `reactions` (list of DirectMessageReactionsItems, required) — Reaction chips folded for the creator (on the Partner reads).
- `paid` (PaidMessageTerms, required, nullable) — The PPV facet as the seller sees it, with `purchased` (on the Partner reads). The PPV send answers its own terms in `PaidMessageSendResult.paid`.
- `tip` (DirectMessageTip, required, nullable) — Always null on the Partner surface (no per-fan gross spend for an agency).
- `senderBuyerRef` (string, optional, nullable) — APPLICATIONS ONLY, on the message page — the application's pairwise pseudonym of the buyer on a message the buyer wrote (`senderRole: USER`); `null` on the creator's side.

### RateLimitErrorDetails

Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

- `retryAfterSec` (integer, required)
- `level` (enum, optional) — The DM send limit that refused the message, set only with `TOO_MANY_MESSAGES`. It is never a quota, a count or a key. - `conversation` — one side of one thread. - `sender` — a person's own ceiling; it does not apply to applications. - `creator` — everything sent for the creator, studio included. - `application` — everything your application sends. - `agency` — everything your agency sends. - `platform` — the agency's fair share of the platform: its throughput or its concurrency. See [rate limits](/authentication/rate-limits).
  - Allowed values: `conversation`, `sender`, `creator`, `application`, `agency`, `platform`

### MessageQuote

- `id` (string, required)
- `senderRole` (enum, required)
  - Allowed values: `USER`, `CREATOR`
- `preview` (string, required)
- `hasMedia` (boolean, required)
- `retracted` (boolean, required)

### DirectMessageLifetime

- `viewOnce` (boolean, required)
- `opened` (boolean, required)
- `expiresAt` (datetime, required, nullable)

### MessageMedia

- `mediaAssetId` (string, required)
- `kind` (string, required)
- `position` (integer, required)
- `available` (boolean, required)
- `durationLabel` (string, required, nullable) — The media's duration, as `m:ss`.
- `width` (integer, required, nullable)
- `height` (integer, required, nullable)
- `freeSample` (boolean, required)
- `caption` (string, required, nullable)
- `displayName` (string, required, nullable)
- `sizeBytes` (integer, required)

### DirectMessageReplyTo

The quoted message this one answers (on the Partner reads).

- `id` (string, required)
- `senderRole` (enum, required)
  - Allowed values: `USER`, `CREATOR`
- `preview` (string, required)
- `hasMedia` (boolean, required)
- `retracted` (boolean, required)

### DirectMessageReactionsItems

- `kind` (string, required)
- `count` (integer, required)
- `mine` (boolean, required)

### PaidMessageTerms

- `priceMinor` (string, required)
- `currency` (string, required)
- `blurPreview` (boolean, required)
- `unlocked` (boolean, required)
- `offerExpiresAt` (datetime, optional, nullable)
- `orderRef` (string, optional, nullable) — The reader's own order — always null for the seller side.
- `purchased` (boolean, optional, nullable) — Whether the offer sold, as the seller (the creator) sees it. On the Partner reads (history, window, after, status) it is set only when the reader's consent covers `read:revenue`, because a purchase is a money fact on every channel; otherwise `null`.

### DirectMessageTip

Always null on the Partner surface (no per-fan gross spend for an agency).

- `amountMinor` (string, required)
- `currency` (string, required)
- `settled` (boolean, required)
- `payment` (enum, optional)
  - Allowed values: `OPEN`, `IN_FLIGHT`, `CLOSED`

## Examples

**Response**

```json
{
  "conversation": {
    "id": "cm4r8a1vz0007qz8wk2j9h4mt",
    "lastMessageAt": "2026-12-01T18:51:12.046Z",
    "pinnedMessage": null
  },
  "anchor": {
    "messageRef": "cm4r9c3hd000bqz8wp6t1x8ny"
  },
  "messages": [
    {
      "id": "cm4r9b1fc000aqz8wn6r2w4mx",
      "senderRole": "USER",
      "body": "Will you post the full studio session this week?",
      "createdAt": "2026-12-01T18:39:52.104Z",
      "kind": "STANDARD",
      "authorship": "HUMAN_AUTHORED",
      "lifetime": null,
      "media": [],
      "receipt": null,
      "editedAt": null,
      "revision": 0,
      "replyTo": null,
      "reactions": [],
      "paid": null,
      "tip": null
    },
    {
      "id": "cm4r9c3hd000bqz8wp6t1x8ny",
      "senderRole": "CREATOR",
      "body": "Yes! The full session is up now, unlock it below.",
      "createdAt": "2026-12-01T18:42:07.512Z",
      "kind": "PAID",
      "authorship": "HUMAN_AUTHORED",
      "lifetime": null,
      "media": [
        {
          "mediaAssetId": "cm4rb5k8e000fqz8wd3s7g2lx",
          "kind": "video",
          "position": 0,
          "available": true,
          "durationLabel": "4:32",
          "width": 1920,
          "height": 1080,
          "freeSample": false,
          "caption": null,
          "displayName": "studio-session-full.mp4",
          "sizeBytes": 48211375
        }
      ],
      "receipt": "read",
      "editedAt": null,
      "revision": 0,
      "replyTo": {
        "id": "cm4r9b1fc000aqz8wn6r2w4mx",
        "senderRole": "USER",
        "preview": "Will you post the full studio session this week?",
        "hasMedia": false,
        "retracted": false
      },
      "reactions": [
        {
          "kind": "LOVE",
          "count": 1,
          "mine": false
        }
      ],
      "paid": {
        "priceMinor": "999",
        "currency": "USD",
        "blurPreview": true,
        "unlocked": true,
        "offerExpiresAt": null,
        "orderRef": null,
        "purchased": true
      },
      "tip": null
    },
    {
      "id": "cm4r9e7kg000dqz8wr3v8z2pa",
      "senderRole": "USER",
      "body": "Just unlocked it, thank you!",
      "createdAt": "2026-12-01T18:47:31.880Z",
      "kind": "STANDARD",
      "authorship": "HUMAN_AUTHORED",
      "lifetime": null,
      "media": [],
      "receipt": null,
      "editedAt": null,
      "revision": 0,
      "replyTo": null,
      "reactions": [],
      "paid": null,
      "tip": null
    }
  ],
  "older": "eyJjcmVhdGVkQXQiOiIyMDI2LTEyLTAxVDE4OjM5OjUyLjEwNFoiLCJpZCI6ImNtNHI5YjFmYzAwMGFxejh3bjZyMnc0bXgifQ",
  "newer": "eyJjcmVhdGVkQXQiOiIyMDI2LTEyLTAxVDE4OjQ3OjMxLjg4MFoiLCJpZCI6ImNtNHI5ZTdrZzAwMGRxejh3cjN2OHoycGEifQ"
}
```

**SDK Code**

```python Chat_getMessageWindow_example
import requests

url = "https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/conversations/cm4r8a1vz0007qz8wk2j9h4mt/messages/window"

querystring = {"anchor":"cm4r9c3hd000bqz8wp6t1x8ny","limit":"3"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```go Chat_getMessageWindow_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/conversations/cm4r8a1vz0007qz8wk2j9h4mt/messages/window?anchor=cm4r9c3hd000bqz8wp6t1x8ny&limit=3"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```php Chat_getMessageWindow_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/conversations/cm4r8a1vz0007qz8wk2j9h4mt/messages/window?anchor=cm4r9c3hd000bqz8wp6t1x8ny&limit=3', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```