---
title: "Creates a new exchange and returns location of exchange metadata in a response header."
method: POST
path: "/workflows/{localWorkflowId}/exchanges"
tags: ["Credentials"]
---

# Creates a new exchange and returns location of exchange metadata in a response header.

`POST /workflows/{localWorkflowId}/exchanges`

Creates a new exchange and returns location of exchange metadata in a response header.

## Parameters

- `./components/parameters/path/LocalWorkflowId.yml` — unresolved $ref

## Request body

- CreateExchangeRequest — Object containing information about the exchange to be created.
  - `expires` string — The date and time (expressed as an XML Schema dateTimeStamp) that the exchange expires.
  - `variables` ExchangeVariables — Variables needed for an exchange.
    - `results` object — Results from each step of an exchange.
      - `STEP_NAME` ExchangeStepResults — Results from a step of an exchange.
        - `verifiablePresentation` VerifiablePresentation — unresolved $ref
        - `openId` object — Results from OID4* holder interaction.
          - `clientProfileId` object — The verifier's (client's) identifier, which is used to secure interactions and prevent replay attacks.
          - `authorizationResponse` object — A credential bearing response that the holder sends to the verifier.
          - `presentationSubmission` object — A mapping between input descriptors and credentials that a holder submits.
        - `inviteRequest` object — Results from an invite request.
          - `inviteResponse` object — Response to invite request indicating where to redirect holder.
            - `url` string — URL where exchange should proceed.
            - `purpose` string — Description of interaction.
            - `referenceId` string — Unique ID of invite request.
  - `openId` object — Optional parameters to enable OID4* protocol for delivery.

## Response `201`

Exchange successfully created (with data)

## Other responses

- `204` — Exchange successfully created (without data)
- `400` — Invalid input
- `401` — Not Authorized
- `500` — Internal Error

## Changes

- **2025-09-23** `b389c0efc239` — 1 info
  - added the new optional request property `variables/results`
- **2025-09-23** `6ea21199b726` — 1 warning
  - removed the request property `variables/results`
- **2025-09-23** `6915d62b393a` — 2 info
  - added the new optional request property `variables/results/STEP_NAME/inviteRequest`
  - added the new optional request property `variables/results/STEP_NAME/openId`
- **2025-09-23** `a52f8ca5b671` — 1 info
  - added the new optional request property `variables/results`
- **2025-09-23** `474599254bb9` — 1 warning
  - removed the request property `variables/results`

[Full history](https://skmtc.dev/w3c/apis/verifiable-credential-api-for-lifecycle-management/changes/workflows/:localWorkflowId/exchanges/post.md)

---

[API](https://skmtc.dev/w3c/apis/verifiable-credential-api-for-lifecycle-management.md) · [All operations](https://skmtc.dev/w3c/apis/verifiable-credential-api-for-lifecycle-management/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/w3c/verifiable-credential-api-for-lifecycle-management/revisions/f263eee4bf23/schema)
