Happily.ai Get an API key

Build a recognition bot

Let people send recognition from wherever they already work: Slack, Microsoft Teams, or your own internal tool. This recipe shows how to send coins to individuals, teams, cohorts, or everyone.

Endpoint

POST /1/recognition/{member_email}

The member_email in the path is the sender. The recipients go in the body.

Recipients

The recipients field is flexible:

Form Example
Single email "jordan@acme.com"
Comma-separated list "jordan@acme.com,sam@acme.com"
Array of emails ["jordan@acme.com", "sam@acme.com"]
Everyone "ALL_MEMBERS"
Team ID "t123456789"
Cohort ID "c123456789"
Note

Unknown individual recipients fail the request with a 503. Unknown teams or cohorts are skipped silently. Validate sender and recipient emails against your directory first for the cleanest experience.

Send recognition

curl -X POST "https://api.happily.ai/prod/1/recognition/sam@acme.com" \
  -H "x-api-key: $HAPPILY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "recipients": ["jordan@acme.com"],
    "amount": 5,
    "for": "Saved the launch with a last-minute hotfix ๐Ÿš€",
    "type": "coin",
    "display_feed": true
  }'
async function sendRecognition({ sender, recipients, amount, reason, showInFeed = true }) {
  const res = await fetch(
    `https://api.happily.ai/prod/1/recognition/${encodeURIComponent(sender)}`,
    {
      method: "POST",
      headers: {
        "x-api-key": process.env.HAPPILY_API_KEY,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        recipients,
        amount,
        for: reason,
        type: "coin",
        display_feed: showInFeed,
      }),
    }
  );
  if (!res.ok) throw new Error(`Recognition failed: ${res.status}`);
  return res.json();
}

// From a Slack slash command handler:
await sendRecognition({
  sender: "sam@acme.com",
  recipients: ["jordan@acme.com"],
  amount: 5,
  reason: "Saved the launch with a last-minute hotfix ๐Ÿš€",
});
import os, requests
from urllib.parse import quote

def send_recognition(sender, recipients, amount, reason, show_in_feed=True):
    res = requests.post(
        f"https://api.happily.ai/prod/1/recognition/{quote(sender)}",
        headers={"x-api-key": os.environ["HAPPILY_API_KEY"]},
        json={
            "recipients": recipients,
            "amount": amount,
            "for": reason,
            "type": "coin",
            "display_feed": show_in_feed,
        },
    )
    res.raise_for_status()
    return res.json()

send_recognition("sam@acme.com", ["jordan@acme.com"], 5, "Saved the launch ๐Ÿš€")

Response

The created recognition is echoed back, with to listing each resolved recipient:

{
  "statusCode": 200,
  "amount": 5,
  "company": "company_abc123",
  "createdate": "2026-06-04 14:32:10",
  "for": "Saved the launch with a last-minute hotfix ๐Ÿš€",
  "share": true,
  "status": false,
  "to": [{ "email": "jordan@acme.com", "name": "Jordan D", "type": "user" }],
  "total": 5,
  "type": "coin",
  "when": "2026-06-04 14:32:10"
}

Recognize a whole team or everyone

# An entire team by ID
curl -X POST "https://api.happily.ai/prod/1/recognition/sam@acme.com" \
  -H "x-api-key: $HAPPILY_API_KEY" -H "Content-Type: application/json" \
  -d '{ "recipients": "t123456789", "amount": 3, "for": "Design team shipped the rebrand", "type": "coin", "display_feed": true }'

# Everyone in the company
curl -X POST "https://api.happily.ai/prod/1/recognition/sam@acme.com" \
  -H "x-api-key: $HAPPILY_API_KEY" -H "Content-Type: application/json" \
  -d '{ "recipients": "ALL_MEMBERS", "amount": 1, "for": "Thank you all for a great quarter!", "type": "coin", "display_feed": true }'

Reading recognition a member received

To show a leaderboard or a personal feed, list received recognition by member or team:

curl "https://api.happily.ai/prod/1/recognition?email=jordan@acme.com&page=1&limit=50" \
  -H "x-api-key: $HAPPILY_API_KEY"

The response contains a recognitions array and a pagination object. See Pagination.

Tip

Set display_feed: false for private or manager-to-report recognition that shouldn't appear in the public company feed.

Next steps