---
schema_version: "1"
id: 345a1c3bf6bdecf04730fa81e465d30e696df98d7703d7ad9fc08f0e93f6abd4
title: Get Context
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/data-cloud/agentic-memory-context/references/agentic-memory-context-ref/agentic-memory-api-get-context.md
canonical_url: https://developer.salesforce.com/docs/data/agentic-memory-context/references/agentic-memory-context-api-ref/agentic-memory-api-get-context.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 31423f955f7733732fc12c06e19705e7af0f098ab3ac629edd3bd8b96108bafd
products:
  - Agentic Memory & Context
  - Data 360 Developer Documentation
---
# Get Context

Retrieves assembled context for a profile. Returns context entries categorized by source type (profile, conversation, additional data graphs).

**URI:** `/api/v1/agentic/context`

**HTTP Method:** `GET`

**Authentication:** Bearer JWT

## Query Parameters

| Parameter           | Type    | Required    | Description                                                                           |
| ------------------- | ------- | ----------- | ------------------------------------------------------------------------------------- |
| agent_id            | String  | Yes         | Agent identifier. Query parameter, not header.                                        |
| conversation_id     | String  | Yes         | Conversation identifier.                                                              |
| owner_id            | String  | No          | Individual or User ID. If provided, `owner_type` is required.                         |
| owner_type          | String  | Conditional | Type of owner. Required when `owner_id` is present. Values: `individual`, `employee`. |
| mode                | String  | No          | Context retrieval mode. Value: `fast` (pre-indexed).                                  |
| latency_sensitivity | String  | No          | Latency sensitivity. Values: `low`, `medium`, `high`.                                 |
| token_budget        | Integer | No          | Maximum token budget for response.                                                    |

## Request Headers

| Header        | Required | Description       |
| ------------- | -------- | ----------------- |
| Authorization | Yes      | Bearer JWT token. |

## Response Body Schema

| Field                    | Type              | Description                                                                                |
| ------------------------ | ----------------- | ------------------------------------------------------------------------------------------ |
| contextId                | String            | Unique identifier for this context response. Use for tracing and debugging.                |
| sessionId                | String            | Session identifier associated with this context.                                           |
| createdAt                | String (ISO 8601) | Timestamp when context was assembled.                                                      |
| userContext              | Array             | List of context entries.                                                                   |
| userContext[].entry      | String            | Context content.                                                                           |
| userContext[].sourceType | String            | Source of the context entry. Values: `Profile`, `Conversation`, or other Data Graph names. |

### Example Response

**Status:** `200 OK`

```json
{
  "contextId": "ctx-abc-123",
  "sessionId": "sess-A",
  "createdAt": "2026-06-22T10:00:00Z",
  "userContext": [
    { "entry": "User prefers dark mode", "sourceType": "Profile" },
    { "entry": "Last purchase: running shoes", "sourceType": "Conversation" }
  ]
}
```

## Mode Behavior

**fast mode (default):**

- Returns pre-indexed and precomputed context.
- Low latency.
- Parameters `query`, `latency_sensitivity`, and `token_budget` do not apply.
- Currently the only supported mode.

## Error Codes

| Status Code | Description                                                       |
| ----------- | ----------------------------------------------------------------- |
| 400         | Bad Request. Invalid query parameters or missing required fields. |
| 401         | Unauthorized. Invalid or missing JWT token.                       |
| 500         | Internal Server Error.                                            |
