Users

Update the authenticated user's profile (partial; OTP-gated for sensitive fields)

Department-only payloads apply in a single call (200 user). Payloads containing first_name / last_name / contact_number enter a two-call OTP flow against update_user: empty code returns a challenge (data.type = "challenge", 201) carrying expiration_at/resend_at/factor; populated code verifies the OTP and applies the patch (data.type = "user", 200). Empty strings on contact_number/department clear the column; empty strings on first_name/last_name are rejected (NOT NULL). A non-empty contact_number must be an E.164 number with any country code (e.g. +639171234567) — anything else returns 422. login_notification is intentionally NOT here — see PATCH /v1/users/login_notification.

patch/v1/users

Request

  • Base URL
    https://identity-api.paymongo.com
  • URL
    https://identity-api.paymongo.com/v1/users
  • Auth
    HTTP bearer

Request body

Example request

{
  "data": {
    "attributes": {
      "code": "123456",
      "contact_number": "+639171234567",
      "department": "owner_management",
      "factor": "email",
      "first_name": "Juan",
      "last_name": "dela Cruz"
    }
  }
}

Response

Applied (department-only payload, or OTP-verified apply branch)

has_moreboolean

Example response

{
  "data": {
    "attributes": {
      "department": "owner_management",
      "email": "juan@example.com",
      "login_notification": true,
      "organization_id": "org_123",
      "user_contact_number": "+639171234567",
      "user_first_name": "Juan",
      "user_last_name": "dela Cruz"
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.