---
title: "Transform and validate an outbound Swift message"
method: POST
path: "/webapi/transform-and-validate"
tags: ["Outbound Messages"]
---

# Transform and validate an outbound Swift message

`POST /webapi/transform-and-validate`

## Request

- Base URL: `https://your-environment.appiancloud.com/suite`
- URL: `https://your-environment.appiancloud.com/suite/webapi/transform-and-validate`
- Auth: API key in header `appian-api-key`
- TypeScript: <https://skmtc.dev/appian/apis/appian-adapter-for-swift-api/docs/webapi/transform-and-validate/post.ts> (a function with typed inputs; its response is checked against the schema)

Works like the Outbound Messages API, but instead of sending the message
to a destination, it transforms the structured data into a Swift message,
validates it, and returns the result to the caller. Use this endpoint to
verify whether a payload produces a valid Swift message before sending.

## Request body

- TransformAndValidateRequest
  - `content` object, required: Same structure as the Outbound Messages API content field. Contains the message type identifier and the message-type-specific payload. See the companion file `message-type-schemas.yaml` for the full field definitions of each supported message type.
    - `messageType` string, required: The Swift message type identifier.
    - `content` object, required: The message-type-specific content.
  - `source` string: Identifier of the calling system.
  - `swiftVersion` '2025' | '2026': The Swift standards version to use.
  - `validateBic` boolean: Whether to validate BIC codes against the BIC reference database.

## Response `200`

Message is valid. Returns the generated Swift message.

- TransformAndValidateResponse: Successful response when the message is valid.
  - `errorOccurred` boolean: Whether an error occurred during processing.
  - `isValid` boolean: Whether the generated Swift message passed validation.
  - `error` string, nullable: Error message, or null on success.
  - `transformationResult` object
    - `Result` string: The generated Swift message string.
    - `errorOccurred` boolean
  - `validationResult` object
    - `isValid` boolean
    - `errorOccurred` boolean
  - `swiftMessage` string: The final validated Swift message string.

## Other responses

- `400`: Content field is empty.
- `401`: Unauthorized. Invalid or missing API key.
- `422`: Transformation error, validation error, or message is invalid.

---

[API](https://skmtc.dev/appian/apis/appian-adapter-for-swift-api.md) - [All operations](https://skmtc.dev/appian/apis/appian-adapter-for-swift-api/llms.txt) - [OpenAPI document](https://skmtc.dev/appian/apis/appian-adapter-for-swift-api/revisions/e569d9171a33?raw)
