Switch approval artifact method
POST
/api/approval-artifacts/{artifactId}/switch-method
Code sample: Shell / cURL
curl --request POST \ --url https://auth.example.com/api/approval-artifacts/example/switch-method \ --header 'Content-Type: application/json' \ --data '{ "method": "email_otp" }'Switch an approval artifact to an allowed fallback completion method and issue a replacement artifact.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” artifactId
required
string
Request Body required
Section titled “Request Body required ”Switch the approval artifact completion method.
Media type application/json
object
method
required
string
Example
{ "method": "email_otp"}Responses
Section titled “ Responses ”Approval artifact method switch result.
Media type application/json
object
replaced_artifact_id
required
string
notification_result
required
artifact
required
object
artifact_id
string
path
string
expires_at
integer format: int64
completion_requirements
required
object
key
additional properties
request_status
required
string
Example
{ "replaced_artifact_id": "apc_old", "notification_result": { "success": true, "method": "email_otp", "delivery_status": "sent", "transport_request_id": "msg_123" }, "artifact": { "artifact_id": "apc_new", "path": "/api/approval-artifacts/apc_new", "expires_at": 1770086400000 }, "completion_requirements": { "mode": "step_up_required", "acceptable_methods": [ "email_otp" ] }, "request_status": "pending"}default
Section titled “default ”Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}