Create SAML application secret

POST /api/saml-applications/{id}/secrets

Create a new signing certificate for the SAML application.

Path parameters

  • id string Required

    The unique identifier of the saml application.

application/json

Body Required

  • lifeSpanInYears integer Required

    The lifetime of the certificate in years (minimum 1 year).

    Minimum value is 1.

Responses

  • 201 application/json

    The signing certificate was created successfully.

    Hide response attributes Show response attributes object
    • id string Required

      Minimum length is 1, maximum length is 21.

    • certificate string Required

      Minimum length is 1.

    • createdAt number Required
    • expiresAt number Required
    • active boolean Required
    • fingerprints object Required

      Additional properties are allowed.

      Hide fingerprints attribute Show fingerprints attribute object
      • sha256 object Required

        Additional properties are allowed.

        Hide sha256 attributes Show sha256 attributes object
  • Invalid request body.

  • Unauthorized

  • Forbidden

  • The SAML application was not found.

POST /api/saml-applications/{id}/secrets
curl \
 --request POST https://[tenant_id].logto.app/api/saml-applications/{id}/secrets \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"lifeSpanInYears":42}'
Request examples
{
  "lifeSpanInYears": 42
}
Response examples (201)
{
  "id": "string",
  "certificate": "string",
  "createdAt": 42.0,
  "expiresAt": 42.0,
  "active": true,
  "fingerprints": {
    "sha256": {
      "formatted": "string",
      "unformatted": "string"
    }
  }
}