# Quickstart

Move one project notification out of chat and into FYInbox for people and agents with a source API key and a single HTTP request.

## Before you start

- Create a source in the dashboard and copy its API key when it is shown. The secret is displayed once.
- Set FYINBOX_URL to the dashboard origin and FYINBOX_API_KEY to that source key.
- Keep the key on the server or in a secret store. Never embed it in browser code, a public repository, or a notification payload.

## Send the notification

```bash
#!/usr/bin/env bash
set -euo pipefail

: "${FYINBOX_URL:?Set FYINBOX_URL to your FYInbox origin}"
: "${FYINBOX_API_KEY:?Set FYINBOX_API_KEY to a source API key}"

curl --fail-with-body --silent --show-error \
  --request POST \
  --url "${FYINBOX_URL%/}/api/v1/notifications" \
  --header "Authorization: Bearer $FYINBOX_API_KEY" \
  --header "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "title": "Deployment finished",
  "body": "billing-api is healthy in production.",
  "severity": "success",
  "tags": ["production", "deploy"],
  "source": "billing-api",
  "externalId": "deploy-abc123",
  "deduplicationKey": "deploy:billing-api:abc123",
  "metadata": {
    "environment": "production",
    "commit": "abc123"
  },
  "actions": [
    {
      "id": "open-deploy",
      "type": "link",
      "label": "Open deployment",
      "href": "https://example.com/deployments/abc123",
      "style": "primary"
    }
  ]
}
JSON
```

> **Replace the event identity.** Use your own externalId and deduplicationKey. A retry with the same deduplicationKey returns the original notification instead of creating another one.

## Read the response

A new notification returns HTTP 201 with { id, created: true }. A deduplicated retry returns HTTP 200 with the same id and created: false. The notification is then available in the authenticated inbox.

- [Authentication](/docs/authentication)
- [Deduplication](/docs/deduplication)
- [OpenAPI 3.1](/openapi.json)
