# Quickstart

Go from a new account to a delivered email. You need access to the DNS settings of a domain you own.

## Create a Workspace

Sign in with your email, Google or GitHub. Onboarding asks what you send and creates your workspace. A workspace holds your domains, contacts and team.

## Add a Domain

Open Domains and add the domain you send from. A subdomain such as send.acme.dev keeps your sending reputation apart from your main domain. Add the DNS records it shows, and Inboxjot marks the domain verified when it finds them. See [Domains](https://inboxjot.com/docs/domains.md) for each record.

## Create an API Key

Open API Keys and click Create API Key. Pick Sending access if the key only sends email. Copy the key and store it as `INBOXJOT_API_KEY`. You see it only once.

## Install the SDK

Install the SDK for your language. It reads `INBOXJOT_API_KEY` from the environment.

```bash Node.js
npm install inboxjot
```

```bash Rust
cargo add inboxjot
```

```bash Go
go get github.com/inboxjot/inboxjot-go
```

```bash Python
pip install inboxjot
```

## Send an Email

Send an email with a from address on your verified domain.

```bash cURL
curl -X POST https://api.inboxjot.com/v1/emails \
  -H "Authorization: Bearer $INBOXJOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "Acme <hello@send.acme.dev>",
    "to": "riti@example.com",
    "subject": "Welcome to Acme",
    "text": "Thanks for signing up."
  }'
```

```javascript Node.js
import { Inboxjot } from 'inboxjot';

const inboxjot = new Inboxjot();

const { id } = await inboxjot.emails.send({
  from: 'Acme <hello@send.acme.dev>',
  to: 'riti@example.com',
  subject: 'Welcome to Acme',
  text: 'Thanks for signing up.',
});
```

```rust Rust
use inboxjot::{Inboxjot, SendEmail};

let client = Inboxjot::from_env()?;

let email = client
    .emails()
    .send(&SendEmail {
        from: Some("Acme <hello@send.acme.dev>".into()),
        to: vec!["riti@example.com".into()],
        subject: Some("Welcome to Acme".into()),
        text: Some("Thanks for signing up.".into()),
        ..Default::default()
    })
    .await?;
```

```go Go
client := inboxjot.NewClient("")

email, err := client.Emails.Send(ctx, inboxjot.SendEmailParams{
	From:    "Acme <hello@send.acme.dev>",
	To:      []string{"riti@example.com"},
	Subject: "Welcome to Acme",
	Text:    "Thanks for signing up.",
})
```

```python Python
from inboxjot import Inboxjot

inboxjot = Inboxjot()

email = inboxjot.emails.send(
    {
        "from": "Acme <hello@send.acme.dev>",
        "to": "riti@example.com",
        "subject": "Welcome to Acme",
        "text": "Thanks for signing up.",
    }
)
```

The API answers `202 Accepted` with the email id.

## Listen for Events

Open Webhooks and add an endpoint to get a request when the email is delivered, opened or bounces. See [Webhooks](https://inboxjot.com/docs/webhooks.md) to verify each request.
