---
title: "PUT /sessions/{sessionIdentifier}/invocationSteps/"
method: PUT
path: "/sessions/{sessionIdentifier}/invocationSteps/"
---

# PUT /sessions/{sessionIdentifier}/invocationSteps/

`PUT /sessions/{sessionIdentifier}/invocationSteps/`

Add an invocation step to an invocation in a session. An invocation step stores fine-grained state checkpoints, including text and images, for each interaction. For more information about sessions, see [Store and retrieve conversation history and context with Amazon Bedrock sessions](https://docs.aws.amazon.com/bedrock/latest/userguide/sessions.html).

Related APIs:

*   [GetInvocationStep](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_GetInvocationStep.html)
    
*   [ListInvocationSteps](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_ListInvocationSteps.html)
    
*   [ListInvocations](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_ListInvocations.html)
    
*   [ListSessions](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_ListInvocations.html)

## Path parameters

- `sessionIdentifier` string, required

## Request body

- object
  - `invocationIdentifier` string, required — The unique identifier (in UUID format) of the invocation to add the invocation step to.
  - `invocationStepId` string — The unique identifier of the invocation step in UUID format.
  - `invocationStepTime` string, date-time, required — Time Stamp.
  - `payload` object, required — Payload content, such as text and images, for the invocation step.
    - `contentBlocks` BedrockSessionContentBlock[] — The content for the invocation step.
      - `image` object — The image in the invocation step.
        - `format` 'png' | 'jpeg' | 'gif' | 'webp', required — The format of the image.
        - `source` object, required — The source for the image.
          - `bytes` string — The raw image bytes for the image. If you use an Amazon Web Services SDK, you don't need to encode the image bytes in base64.
          - `s3Location` object — The path to the Amazon S3 bucket where the image is stored.
            - `uri` string, required — The path to the Amazon S3 bucket where the image is stored.
      - `text` string — The text in the invocation step.

## Response `201`

Success

- PutInvocationStepResponse
  - `invocationStepId` string, required — The unique identifier of the invocation step in UUID format.

## Other responses

- `480` — ResourceNotFoundException
- `481` — ConflictException
- `482` — ValidationException
- `483` — InternalServerException
- `484` — ThrottlingException
- `485` — AccessDeniedException
- `486` — ServiceQuotaExceededException

---

[API](https://skmtc.net/aws/apis/bedrock-agent-runtime.md) · [All operations](https://skmtc.net/aws/apis/bedrock-agent-runtime/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/bedrock-agent-runtime/versions/fe358131c0ad/schema)
