# Get Agent Context

Retrieves the content of the agent context.

This action is available in API version 67.0 and later.

## Supported REST HTTP Methods

**URI:** `/services/data/vXX.X/actions/standard/getAgentContext`

Where `XX.X` is the latest API version.

**Formats:** JSON, XML

**HTTP Methods:** POST

**Authentication:** `Authorization: Bearer TOKEN`

Where `TOKEN` is a variable.

## Inputs

| Input                | Type   | Description                                   |
| -------------------- | ------ | --------------------------------------------- |
| `contextDescription` | string | Optional. A description of the agent context. |

## Outputs

| Output             | Type   | Description                                                                                                                   |
| ------------------ | ------ | ----------------------------------------------------------------------------------------------------------------------------- |
| `agentContextApex` | string | Specifies the agent context as an Apex object. This output is an Apex output type that contains nested arrays in JSON format. |

## Example

Sample request body:

```nolang
{
  "inputs" : [{
    "contextDescription" : "Sample agent context description."
  }]
}
```

Sample response body:

```nolang
{
  "actionName" : "getAgentContext",
  "errors" : null,
  "isSuccess" : true,
  "outputValues" : {
    "agentContextApex" : {
      "contextDescription" : "Sample agent context description.",
      "contextId" : "0XxRZ0000008iPeYAI",
      "content" : "Sample agent context content."
    }
  }
}
```
