# Check an email address (/docs/api-reference/risk/check-risk-email)

Email intelligence on its own: syntax, disposable domains, whether the domain can receive mail (DNS), role accounts, free providers, the canonical mailbox, typo suggestions and the domain's age (RDAP). Stateless: nothing is stored or counted, so it never flags an address for having been seen before (assessments do). Failed lookups are listed in `degraded`. Sandbox keys see the documented test domains (`@disposable.test`, `@undeliverable.test`, `@new.test`).

`POST https://api.coss.com/v1/risk/email/check`

Authenticate with your API key as a bearer token (`Authorization: Bearer coss_test_…`). Responses are JSON with snake_case fields; errors are `{ error: { type, code, message, param?, issues?, request_id } }` (https://coss.com/docs/api-reference/errors.md).

## Request body

- `email` (string, required, 1-320 characters): The address to check, as given.

## Example request

TypeScript (the `coss` package):

```ts
import { Coss } from "coss";

const coss = new Coss({
  apiKey: process.env.COSS_API_KEY,
  baseUrl: "https://api.coss.com",
});

const { data, error } = await coss.risk.checkEmail("ada@gnail.com");
```

HTTP:

```sh
curl -X POST "https://api.coss.com/v1/risk/email/check" \
  -H "Authorization: Bearer $COSS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "email": "ada@gnail.com"
}'
```

Python:

```python
from coss import Coss

client = Coss()  # api_key= or COSS_API_KEY

client.risk.check_email(
    email="ada@gnail.com",
)
```

Go:

```go
import (
	"context"

	coss "github.com/cosscom/coss-go"
	cossclient "github.com/cosscom/coss-go/client"
)

client := cossclient.NewClient() // option.WithAPIKey(…) or COSS_API_KEY

request := &coss.RiskEmailCheckRequest{
    Email: "ada@gnail.com",
}
client.Risk.CheckEmail(
    context.TODO(),
    request,
)
```

Ruby:

```ruby
require "coss"

client = Coss::Client.new # api_key: or COSS_API_KEY

client.risk.check_email(email: "ada@gnail.com")
```

PHP:

```php
<?php

use Coss\Coss;
use Coss\Risk\Requests\RiskEmailCheckRequest;

$client = new Coss(); // apiKey: or COSS_API_KEY

$client->risk->checkEmail(
    new RiskEmailCheckRequest([
        'email' => 'ada@gnail.com',
    ]),
);
```

Java:

```java
import com.coss.Coss;
import com.coss.resources.risk.requests.RiskEmailCheckRequest;

Coss client = Coss.builder().build(); // .apiKey(…) or COSS_API_KEY

client.risk().checkEmail(
    RiskEmailCheckRequest
        .builder()
        .email("ada@gnail.com")
        .build()
);
```

.NET:

```csharp
using Coss;

var client = new CossClient(); // apiKey: or COSS_API_KEY

await client.Risk.CheckEmailAsync(new RiskEmailCheckRequest { Email = "ada@gnail.com" });
```

## Response 200

What coss.com knows about the address.

- `object` ("risk_email_check", required)
- `email` (string, required): The address checked.
- `valid` (boolean, required): Syntactically valid (the rest assumes it is).
- `domain` (string | null, required): Its domain. `null` when it isn't valid.
- `canonical` (string | null, required): The mailbox with the provider's aliasing folded (dots and `+tags` at Gmail…): two addresses with the same canonical form reach one inbox.
- `disposable` (boolean, required): Whether its domain is a known burner service.
- `deliverability` ("deliverable" | "undeliverable" | "unknown", required): From DNS (MX, A, AAAA). `unknown` when the lookup failed or timed out.
- `role_account` (boolean, required): Whether it's a role mailbox, like `info@`.
- `free_provider` (boolean, required): Whether its domain is a free mailbox provider.
- `suggestion` (string | null, required): The likely intended domain when this one looks like a typo of a popular one.
- `domain_age_days` (integer | null, required): Days since the domain was registered (RDAP); `null` when unknown or not looked up (free providers, disposable domains).
- `degraded` (("email_dns" | "domain_age")[], required): Lookups that failed or timed out (their fields are `unknown`/`null`).

Example:

```json
{
  "object": "risk_email_check",
  "email": "ada@gnail.com",
  "valid": true,
  "domain": "gnail.com",
  "canonical": "ada@gnail.com",
  "disposable": false,
  "deliverability": "deliverable",
  "role_account": false,
  "free_provider": false,
  "suggestion": "gmail.com",
  "domain_age_days": 7300,
  "degraded": []
}
```

## Errors

- `400`: The body is not valid JSON (`invalid_json`). Also when the `Coss-Version` header names an unknown API version (`invalid_api_version`).
- `401`: The API key is missing, invalid, revoked or expired (`authentication_error`).
- `403`: The API key lacks the permission this endpoint needs (`permission_error`), or its organization is suspended (`organization_suspended`).
- `413`: The request body is larger than 5 MB (`payload_too_large`).
- `415`: The body is not sent as `application/json` (`unsupported_media_type`).
- `422`: The body failed validation (`validation_error`, see `issues`).
- `429`: Too many requests with this API key (`rate_limited`), or too many requests with invalid keys from this address (`too_many_failed_authentications`). Retry after `Retry-After` seconds. Successful responses carry `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` (seconds until the limit is fully restored).
- `500`: Unexpected server error (`api_error` / `internal_error`).
- `503`: The API key could not be verified right now; retry (`service_unavailable`).