> For the complete documentation index, see [llms.txt](https://openapi.logto.io/dev/llms.txt)

# Create SAML application

> POST /api/saml-applications
> 
> Create a new SAML application with the given configuration. A default signing certificate with 3 years lifetime will be automatically created.



## Servers
- Logto endpoint address.: https://[tenant_id].logto.app (Logto endpoint address.)


## Authentication methods
- O auth2


## Parameters



### Body: application/json (object)

- **name** (string)
  The name of the SAML application.

- **description** (string | null)
  Optional description of the SAML application.

- **customData** (object)
  Optional custom data for the application.

- **attributeMapping** (object)

- **entityId** (string | null)

- **acsUrl** (string | null)
  The Assertion Consumer Service (ACS) URL where the SAML response will be sent.

- **encryption** (object | null)
  Validator function

- **authnRequestConfig** (object | null)
  IdP-side authentication policy. Fresh authentication is forced unless forceAuthn is explicitly false, including when this object is null or empty. PATCH replaces this object.

- **nameIdFormat** (string)

- **staticAttributes** (object)
  Fixed SAML attributes added to every assertion, keyed by attribute name. Names may only contain letters, digits, and `_.:/#@-`, and values must be non-empty. After camel-case normalization, names must not conflict with each other or with the user attribute names in the assertion (the mapped names, or `sub`, `email` and `name` when nothing is mapped).



## Responses
### 201
The SAML application was created successfully.

#### Body: application/json (object)
- **tenantId** (string)

- **id** (string)

- **name** (string)

- **description** (string | null)

- **type** (string)

- **customData** (object)
  arbitrary

- **isThirdParty** (boolean)

- **appLevelAccessControlEnabled** (boolean)

- **createdAt** (number)

- **attributeMapping** (object)

- **entityId** (string | null)

- **acsUrl** (object | null)

- **encryption** (object | null)
  Validator function

- **authnRequestConfig** (object | null)
  Validator function

- **nameIdFormat** (string)

- **staticAttributes** (object)


### 400
Invalid request body, or a static attribute name conflicts with another attribute.

### 401
Unauthorized

### 403
Forbidden

### 422
Validation error. The ACS URL is invalid or other validation errors.


[Powered by Bump.sh](https://bump.sh)
