API reference · Access & roles

Credentials

POST Set a credential the caller does not yet have

POST /credential

Registers a credential of the given type - a PIN, most often - for the authenticated caller. Unlike PUT /credential this takes no old value, because there is nothing to replace, and no user identifier, because the session already says who the caller is. Setting a type the caller already holds is a conflict, not an overwrite: use PUT /credential to change one that exists, or the reset flow if the current value is unknown.

Headers

NameNotes
AuthorizationBearer token
X-TenantYour tenant
X-Environmenttest or live
Content-Typeapplication/json

Example

Request body: SetCredentialRequest · Response: Void

curl -X POST "https://api.bridgemoni.com/credential" \
  -H "Authorization: Bearer $BRIDGEMONI_TOKEN" \
  -H "X-Tenant: $BRIDGEMONI_TENANT" \
  -H "X-Environment: $BRIDGEMONI_ENV" \
  -H "Content-Type: application/json" \
  -d '{
    "secretType": "PIN",
    "secret": "text"
  }'

Responses

StatusWhen
200Credential set successfully
409A credential of this type is already registered for the caller

PUT Change a credential using its current value

PUT /credential

Lets a caller who still knows their current credential value replace it with a new one, identifying themselves by msisdn/username/emailAddress rather than a Bearer/Basic Authorization header - most commonly used right after a login attempt fails because the credential has expired, since unlike the normal authentication path this deliberately accepts an expired-but-correct value.

Headers

NameNotes
AuthorizationBearer token
X-TenantYour tenant
X-Environmenttest or live
Content-Typeapplication/json

Example

Request body: ChangeCredentialRequest · Response: Void

curl -X PUT "https://api.bridgemoni.com/credential" \
  -H "Authorization: Bearer $BRIDGEMONI_TOKEN" \
  -H "X-Tenant: $BRIDGEMONI_TENANT" \
  -H "X-Environment: $BRIDGEMONI_ENV" \
  -H "Content-Type: application/json" \
  -d '{
    "msisdn": "+2348012345678",
    "username": "ada.obi",
    "emailAddress": "ada@example.com",
    "secretType": "PIN",
    "oldSecret": "text",
    "newSecret": "text"
  }'

Responses

StatusWhen
200Credential changed successfully
400The request named no user - supply one of msisdn, username or emailAddress
401The supplied old value does not match the stored credential
404No user exists for the given identifier, or no credential of the given type is registered for it
500The credential is blocked

POST Complete a credential reset

POST /credential/reset

Validates the supplied OTP against the OTP identified by the given reference, and replaces the credential it was generated for with the supplied new value. Fails after 5 incorrect attempts or once the OTP expires (10 minutes after generation).

Headers

NameNotes
AuthorizationBearer token
X-TenantYour tenant
X-Environmenttest or live
Content-Typeapplication/json

Example

Request body: CompleteCredentialResetRequest · Response: Void

curl -X POST "https://api.bridgemoni.com/credential/reset" \
  -H "Authorization: Bearer $BRIDGEMONI_TOKEN" \
  -H "X-Tenant: $BRIDGEMONI_TENANT" \
  -H "X-Environment: $BRIDGEMONI_ENV" \
  -H "Content-Type: application/json" \
  -d '{
    "otpReference": "b3f1c2d4-5e6a-4b7c-8d9e-0f1a2b3c4d5e",
    "otp": "482913",
    "newSecret": "text"
  }'

Responses

StatusWhen
200Credential reset completed successfully
400The OTP does not match, or has expired
404No OTP exists for the given reference, or it has already been used

POST Initiate a credential reset

POST /credential/reset/otp

Identifies the user by msisdn and/or emailAddress, generates a 6-digit OTP valid for 10 minutes, and publishes a CredentialResetInitiatedEvent so it can be dispatched to the user's mobile number or email address. Works for any credential type the user already has registered, for example PASSWORD or PIN. Does not return the OTP itself, but returns a reference identifying it, to be supplied back on the complete call.

Headers

NameNotes
AuthorizationBearer token
X-TenantYour tenant
X-Environmenttest or live
Content-Typeapplication/json

Example

Request body: InitiateCredentialResetRequest · Response: InitiateCredentialResetResponse

curl -X POST "https://api.bridgemoni.com/credential/reset/otp" \
  -H "Authorization: Bearer $BRIDGEMONI_TOKEN" \
  -H "X-Tenant: $BRIDGEMONI_TENANT" \
  -H "X-Environment: $BRIDGEMONI_ENV" \
  -H "Content-Type: application/json" \
  -d '{
    "msisdn": "+2348012345678",
    "emailAddress": "ada@example.com",
    "secretType": "PIN"
  }'

Responses

StatusWhen
200Credential reset initiated successfully
404No user exists for the given identifier, or no credential of the given type is registered for it

POST Unblock a blocked credential

POST /credential/unblock

Clears the failed-attempt counter on a user's credential and returns it to ACTIVE if it was BLOCKED, so the owner can authenticate again. Needed because a credential that has reached the limit of consecutive failed attempts re-arms its lockout on every further attempt, so a client retrying on a timer never escapes it unaided. This does not change the credential value and does not extend its expiry: an unblocked credential whose value is unknown still needs the reset flow, and an expired one still needs to be changed.

Headers

NameNotes
AuthorizationBearer token
X-TenantYour tenant
X-Environmenttest or live
Content-Typeapplication/json

Example

Request body: UnblockCredentialRequest · Response: GenericResponseVoid

curl -X POST "https://api.bridgemoni.com/credential/unblock" \
  -H "Authorization: Bearer $BRIDGEMONI_TOKEN" \
  -H "X-Tenant: $BRIDGEMONI_TENANT" \
  -H "X-Environment: $BRIDGEMONI_ENV" \
  -H "Content-Type: application/json" \
  -d '{
  "msisdn": "+2348000000000",
  "username": "string",
  "emailAddress": "ada@example.com",
  "secretType": "PIN"
}'

Responses

StatusWhen
200Credential unblocked successfully
400The request named no user - supply one of msisdn, username or emailAddress
404No user exists for the given identifier, or no credential of the given type is registered for it

Generated from the OpenAPI document. Branch on the HTTP status: there is no machine-readable error code on the wire. Errors