---
title: "Fetch SAML IdP metadata XML from a URL"
method: POST
path: "/api/v1/dotauth/fetch/saml-metadata"
tags: ["dotAuth"]
---

# Fetch SAML IdP metadata XML from a URL

`POST /api/v1/dotauth/fetch/saml-metadata`

## Request

- Base URL: `https://docs.anzworldline-solutions.com.au`
- URL: `https://docs.anzworldline-solutions.com.au/api/v1/dotauth/fetch/saml-metadata`
- Auth: none declared
- TypeScript: <https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/docs/api/v1/dotauth/fetch/saml-metadata/post.ts> (a function with typed inputs; its response is checked against the schema)

Authenticated proxy that fetches SAML metadata XML from an IdP's metadata endpoint URL. Returns the raw XML as a string so the admin can review it before saving.

## Request body

- object

## Response `200`

Metadata fetched successfully

- object: Object with a single 'xml' field containing the raw metadata XML

## Other responses

- `400`: Missing or invalid metadata URL
- `401`: Authentication required
- `500`: Internal server error

## Changes

- **2026-10-30** `4fd8e917d458`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/changes/api/v1/dotauth/fetch/saml-metadata/post.md)

---

[API](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api.md) - [All operations](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/revisions/4fd8e917d458?raw)
