Skip to content

Change the organization's ways in

PUT
/api/settings/sign-in-methods
curl --request PUT \
--url https://forge.example.com/api/settings/sign-in-methods \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "password": true, "microsoft": true, "google": true, "apple": true, "version": 1, "passkey": true, "requireSecondStep": true, "apiKeys": true, "apiKeyMaximumDays": 1 }'

A forbidden way stops at the next sign-in. The password can be turned off only once an administrator has an authenticator app. requireSecondStep makes everyone have an authenticator app or a passkey: a session without one may only set one up, from its next renewal. apiKeys off refuses every API key of the organization at once; apiKeyMaximumDays bounds the life of keys made from now on. A field of these three left out keeps what is set. Send the version you read, 0 while nothing was saved. A stale one answers 409 with currentVersion, the version it has now. For administrators.

Media typeapplication/json
object
password
required
boolean
microsoft
required
boolean
google
required
boolean
apple
required
boolean
version
required
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
passkey
boolean
default: true
requireSecondStep
null | boolean
apiKeys
null | boolean
apiKeyMaximumDays
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/

OK

Media typeapplication/json
object
password
required
boolean
microsoft
required
boolean
google
required
boolean
apple
required
boolean
passkey
required
boolean
offered
required
Array<string>
requireSecondStep
boolean
withoutSecondStep
integer | string format: int32
0 /^-?(?:0|[1-9]\d*)$/
apiKeys
boolean
apiKeyMaximumDays
integer | string format: int32
default: 366 /^-?(?:0|[1-9]\d*)$/
version
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/

Example

{
"requireSecondStep": false,
"withoutSecondStep": 0,
"apiKeys": false,
"apiKeyMaximumDays": 366
}

A refusal or an error, as a problem document. A model or draft you may not see answers 404, as one that does not exist.

Media typeapplication/problem+json
object
type
string
title
string
status
integer
detail
string
instance
string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}