Skip to main content
Cloud has the newest features. Some may not be in a release yet; the newest release is Identity & Access Management 7.3.0.

API contract to implement

Download OpenAPI (YAML)Version v1

Base URL: <BASE_URL>

The API contract for flow extension (version v1).

Download the OpenAPI definition (YAML)

Security schemes​

BasicAuth: HTTP basic

BearerAuth: HTTP bearer

ApiKeyAuth: API key in header "X-API-Key"

Other​

handle flow extension events​

POST /

WSO2 Identity Platform sends an HTTP POST request with a JSON envelope to the service at the flow extension step. The service runs its logic and responds with an actionStatus that determines what happens next:

  • SUCCESS: Apply the returned operations and continue the flow.
  • FAILED: Stop the flow for a business or policy reason. The reason is surfaced to the end user as a flow error.
  • ERROR: The service hit a processing or server-side error. Return HTTP 400, 401, or 500; WSO2 Identity Platform aborts the flow.

Values of attributes marked as encrypted in the extension's access configuration travel as JWE compact strings (RSA-OAEP-256 key encryption with A256GCM content encryption): WSO2 Identity Platform encrypts exposed values with the certificate uploaded for the extension, and the service must encrypt returned values for WSO2 Identity Platform.

Request body (required): application/json

Schema: RequestBody

4 properties
NameTypeRequiredDescription
actionTypestringYes

The action type being executed. Always FLOW_EXTENSION for this integration.

Allowed values: FLOW_EXTENSION

eventEventYes

A snapshot of the flow state, carrying context about the flow and the organization. Each field appears only when the corresponding attribute is marked as readable in the extension's access configuration; fields with empty values are omitted.

allowedOperationsarray of AllowedOperationYes

The whitelist of changes the service may emit. If the response references anything outside this whitelist, WSO2 Identity Platform rejects it.

requestIdstringYes

A unique identifier for this invocation.

Responses

CodeDescriptionSchema
200

Returned for both SUCCESS and FAILED outcomes. The actionStatus field in the body indicates which.

one of: SuccessResponse, FailedResponse
400

Bad request. WSO2 Identity Platform treats this as a failure to execute the action and aborts the flow.

ErrorResponse
401

Unauthorized. WSO2 Identity Platform treats this as a failure to execute the action and aborts the flow.

ErrorResponse
500

Internal server error. WSO2 Identity Platform treats this as a failure to execute the action and aborts the flow.

ErrorResponse

Schemas​

RequestBody​

Type: object

The request envelope sent to the external service.

4 properties
NameTypeRequiredDescription
actionTypestringYes

The action type being executed. Always FLOW_EXTENSION for this integration.

Allowed values: FLOW_EXTENSION

eventEventYes

A snapshot of the flow state, carrying context about the flow and the organization. Each field appears only when the corresponding attribute is marked as readable in the extension's access configuration; fields with empty values are omitted.

allowedOperationsarray of AllowedOperationYes

The whitelist of changes the service may emit. If the response references anything outside this whitelist, WSO2 Identity Platform rejects it.

requestIdstringYes

A unique identifier for this invocation.

Event​

Type: object

A snapshot of the flow state, carrying context about the flow and the organization. Each field appears only when the corresponding attribute is marked as readable in the extension's access configuration; fields with empty values are omitted.

4 properties
NameTypeRequiredDescription
flowFlow

The flow being executed.

applicationApplication

The application context.

tenantTenant

The root organization context.

organizationOrganization

The organization context.

Flow​

Type: object

The flow being executed.

4 properties
NameTypeRequiredDescription
flowTypestring

The flow being executed.

Allowed values: REGISTRATION, PASSWORD_RECOVERY, INVITED_USER_REGISTRATION

flowIdstring

The identifier for this single flow execution.

portalUrlstring (uri)

The URL of the WSO2 Identity Platform portal page.

userUser

The user being acted on.

User​

Type: object

The user being acted on.

5 properties
NameTypeRequiredDescription
idstring

The user's unique identifier.

usernamestring

The username, without the user store domain prefix.

userStoreDomainstring

The user store the user belongs to. An empty string ("") denotes the primary user store.

claimsarray of Claim

The current claims of the user.

credentialsobject

The user's credentials, keyed by credential name (for example, password). Each value is a typed credential object, or its JWE compact string when the credential is marked as encrypted.

Credential​

Type: object

A typed credential value.

2 properties
NameTypeRequiredDescription
typestring

The format of the credential value.

Allowed values: PLAIN_TEXT

valuestring

The credential value.

Tenant​

Type: object

The root organization context.

1 property
NameTypeRequiredDescription
domainstring

The domain of the root organization.

Organization​

Type: object

The organization context.

4 properties
NameTypeRequiredDescription
idstring

The organization UUID.

namestring

The organization name.

orgHandlestring

The organization handle.

depthinteger

The depth of the organization in the organization hierarchy.

Claim​

Type: object

A single user claim, represented as a URI and value pair.

2 properties
NameTypeRequiredDescription
uristring

The claim URI.

valueone of: string, array of string

The claim value. A single-valued claim carries a string; a multi-valued claim carries an array of strings. When the claim is marked as encrypted, the value is a JWE compact string; an encrypted multi-valued claim carries a single-element array holding one JWE compact string of the comma-joined values.

Application​

Type: object

The application context.

1 property
NameTypeRequiredDescription
idstring

The application UUID. Only available for flows initiated with the applicationId parameter.

AllowedOperation​

Type: object

An entry that defines a change the service is permitted to make.

2 properties
NameTypeRequiredDescription
opstringYes

The permitted operation. replace creates or replaces a value at one of the listed paths.

Allowed values: replace

pathsarray of string

The paths the operation may target. The service may only target paths listed here.

SuccessResponse​

Type: object

Returned when the service completes successfully.

2 properties
NameTypeRequiredDescription
actionStatusstringYes

Indicates that the operations should be applied and the flow should continue.

Allowed values: SUCCESS

operationsarray of ReplaceOperation

The operations to apply to the flow. Optional; omit it when there is nothing to change but the flow should still proceed.

ReplaceOperation​

Type: object

Creates or replaces a value at the given path.

3 properties
NameTypeRequiredDescription
opstringYes

The operation to perform.

Allowed values: replace

pathstringYes

The path to create or replace, targeting a claim or a credential. Must match one of the paths listed against the replace entry in allowedOperations.

valueone of: string, array of stringYes

The value to set. The claim is created if absent and set to empty if the value is an empty string. When the path is marked as encrypted, the value must be a JWE compact string encrypted for WSO2 Identity Platform; an encrypted multi-valued claim must be a single-element array holding one JWE compact string of the comma-joined values.

FailedResponse​

Type: object

Returned when the service decides, on business or policy grounds, that the flow should not continue.

3 properties
NameTypeRequiredDescription
actionStatusstringYes

Indicates that the flow should stop for a business or policy reason.

Allowed values: FAILED

failureReasonstringYes

A short, user-facing reason for the failure. You can also send an i18n key to show a localized message to the user.

failureDescriptionstringYes

A longer, user-facing description of the failure. You can also send an i18n key to show a localized message to the user.

ErrorResponse​

Type: object

Returned with HTTP 400, 401, or 500 when the service itself fails to process the request.

3 properties
NameTypeRequiredDescription
actionStatusstringYes

Indicates that the service hit a processing or server-side error.

Allowed values: ERROR

errorMessagestringYes

A short error message. Published to diagnostic logs.

errorDescriptionstringYes

A longer description of the error. Published to diagnostic logs.

Was this page helpful?