Commentary by: Robert S. Cooper, Esq.

Fortune

By now the ugly, racist exchange that one Airbnb host in North Carolina had with a prospective guest last month is well-known. So too is a pending lawsuit that Airbnb faces from another customer who says he was denied lodging because of race in 2015.

Although the peer-to-peer home rental company has swung into action, forcefully denouncing the racism of the North Carolina host, booting him from the service and promising reforms in the way its host businesses operate, the incident exposes the gray zones in the rules that guide the gig economy. If you’re renting out a room in your apartment, are you legally obliged to abide by the same anti-discrimination rules that businesses must observe?

In its anti-discrimination policy, Airbnb demands that all users “comply with local laws and regulations” including federal anti-discrimination laws. However, there’s a reason many of these users might not be held accountable: An old set of exemptions, meant primarily to protect small rooming houses, means anti-discrimination laws don’t necessarily apply when someone is renting five rooms or fewer in their own home, or when owners are renting out apartments in dwellings they occupy with four units or fewer.

The gig economy has transformed many traditional business sectors, forcing regulators to play catch-up. Such businesses are typified not only by Airbnb, but all other lodging share companies, ridesharing companies including Uber and Lyft, and a broader swath of businesses including the grocery delivery service Instacart, or freelance worker sites like TaskRabbit, where workers can be summoned simply by using an app. All of these sites rely on scores of independent contractors who are, in effect, sole proprietors running their own companies.

“As sharing economy businesses become a more important part of the economy, it is important to assure that all people can participate in it, regardless of race, or [inclusion in] other protected categories,” says Joshua Rosenthal, an attorney with the NAACP Legal Defense and Educational Fund, in New York.

Nevertheless, it’s still a matter of evolving case law, Rosenthal says, and the courts have yet to weigh in on how lodging share sites like Airbnb will ultimately be governed by the various non-discrimination laws.

Certainly the housing rental sector has its own set of rules. In fact, there are four federal laws that affect you if you offer your home or other property up to the public for short-term rentals. Most of them stem from the various civil rights acts that have been passed since the mid-19th century. But, as a host, your obligations don’t stop there. You must also conform to the various state and local laws where you do business. In some cases, such as in California and Washington, D.C., those laws can be more strict than federal ones, legal experts say.

Here are the four federal laws that apply to you:

—    Title II of the Civil Rights of 1964 prohibits discrimination in any public accommodation based on race, color, religion or national origin. Examples of public accommodations are hotels, restaurants, bars, or movie theaters. This law casts a broad net to include all commerce, not just the business of housing.

—    Title VIII of the Civil Rights Act of 1968, or the Fair Housing Act (FHA). This prohibits discrimination in housing specifically, usually for longer-term rentals and sales. It casts a broader net than Title II, including in its protections not only for race, color, religion and national origin, but also for sex and family condition. Airbnb says loud and clear on its website that it adheres to Title VIII.

—    The Americans With Disabilities Act (ADA) is similar to Title II. Passed in 1990, it extends protected status in employment, public transportation, and public accommodations to people with both mental and physical disabilities. Adherence to the law could entail creating special access ramps for people in wheelchairs or allowing seeing eye dogs, even if your housing policy forbids pets. Airbnb says it adheres to this law as well.

—    Sections 1981 and 1982. These clauses from the Civil Rights Act of 1866 prohibit discrimination based on race, specifically with regard to making and enforcing contracts and relating to purchasing, selling, or leasing property. Generally speaking, these sections would apply to all peer-to-peer lodging transactions, legal experts say.

As with anything legal, there are exemptions and other fine points that can cause confusion. Here are some scenarios for share renters that will assist you in getting a clearer picture of how the various laws apply to you.

Renting an apartment, or a room in your home or apartment

If you’re renting an entire apartment, you’d be exempt from the Federal Housing Act (FHA) provided you are the owner living in a building with four units or less.

Similarly, if you’re renting a room, the FHA also says you may choose whatever kind of roommate you want, provided you are also the owner living in a building with four units or less. The law says you may not advertise that you are looking for a roommate of a particular race or religion, for example, but some states allow you to specify a gender for shared living spaces.

You’d be exempt from Title II as well, as long as you’re renting five rooms or less.

Still, some legal experts say it’s best to conform fully with the anti-discrimination laws, regardless. “Americans don’t want businesses to discriminate against anyone,” says Robert Cooper, co-chair of the labor and employment practice of Buchalter Nemer, a law firm based in Los Angeles, California. He adds racist conduct obviously hurts business, which is why it’s such a big concern for Airbnb. Also, some states, notably California, don’t have carve-outs for number of rooms. So you have to know your local laws, too.

The Americans With Disabilities Act (ADA) is not likely to apply to renting out space in a private home or apartment. The ADA is likely to apply to large apartment buildings. The law has an exemption for owner-occupied lodgings with five rooms or fewer.

Renting out a vacation property or secondary home

Typically sales and rentals of a single-family home aren’t covered by the FHA, provided the owner doesn’t have more than three such homes at one time, and the sale isn’t advertised or handled by an agent or broker. Yet legal experts say the FHA could apply here, because Airbnb is helping as an agent for a short term rental.

“If it’s a separate property, such as a vacation rental, and you don’t live in the property, the FHA covers you,” says Tom Spiggle, founder of Spiggle Law Firm, which specializes in discrimination law, based in Arlington, VA.

The ADA is not likely to apply to this scenario if you’re offering a private home. It would apply if you’re offering a short-term rental in a large apartment dwelling, for example with more than five rooms for rent.

Airbnb’s role

With these dos and don’ts in mind, it’s also important to point out that Airbnb has been criticized by some legal experts for its mandatory arbitration clause, which all customers who want to use the service agree to, which prevents customers from seeking relief through court trials, or via class actions.

The arbitration clause — a tactic used by many businesses — seems to take the teeth out of Airbnb’s claims about discrimination, some legal experts say, because it prevents Airbnb customers from taking effective legal action.

“You can really prove a pattern or practice of discrimination [through a class action] and show it is systemic,” says Joanne Doroshow, executive director at the Center for Justice and Democracy at New York Law School. “It is hard to do that if it is just an individual.”

The lawsuit filed by the Airbnb user who claims to have been discriminated against last year is seeking class-action status, meaning the court will have to determine whether the case can proceed.

For its part, Airbnb is taking action to further address discrimination, according to company spokesman Nick Papas, including access to training to eliminate unconscious bias for Airbnb hosts and employees, enhanced training for its customer service reps to alert them to potential discrimination, and the use of machine learning and other technology to enforce anti-discrimination policies.

Airbnb is also offering something called Instant Book, which 550,000 hosts globally currently use, Papas says, which allows its renters to offer rooms on demand without host approval. (Typically, customers make requests to rent rooms or other properties after creating profiles that include photos of themselves.)

“We are in the process of reviewing every aspect of our platform as we work to help eliminate bias and racial discrimination,” Papas said in an email. “Our focus is creating a platform that both promotes security and assures the fair treatment of all.”