Skip to Content
ZITADEL Docs
APIsCore ResourcesV2SAML

Create Response

Finalize a SAML Request and get the response definition for success or failure. The response must be handled as per the SAML definition to inform the application about the success or failure. On success, the response contains details for the application to obtain the SAMLResponse. This method can only be called once for an SAML request.

Required permissions:

  • session.link
POST
/v2/saml/saml_requests/{saml_request_id}

Path Parameters

saml_request_id*saml_request_id

ID of the SAML Request.

Request Body

application/json
  1. body
error*

Set this field when the authorization flow failed. It creates a response depending on the SP, with the error details set.

Response Body

Success

application/json
  1. response
details?
url?url

URL including the Assertion Consumer Service where the user should be redirected or has to call per POST, depending on the binding. Contains details for the application to obtain the response on success, or error details on failure. Note that this field must be treated as credentials, as the contained SAMLResponse or code can be used on behalve of the user.

post*

Set if the binding is POST-Binding, where the application expects to be called per HTTP POST with the SAMLResponse and RelayState in the form body.

Example Request
curl -X POST 'https://example.com/v2/saml/saml_requests/string' \  -H 'Content-Type: application/json' \  -d '{  "error": {}}'
Example Response200
{  "details": {    "sequence": 0,    "changeDate": "2023-01-15T01:30:15.01Z",    "resourceOwner": "string",    "creationDate": "2023-01-15T01:30:15.01Z"  },  "url": "string",  "post": {    "relayState": "string",    "samlResponse": "string"  }}

Was this page helpful?