Skip to content
Browse articles
Get started

Quickstart

Create a public key, identify a user and start a conversation with curl in five minutes.

Agent44Updated 2 min read

On this page

This walks through the API with curl, so you can see a message arrive in your inbox before you write any app code. Every request here is one your app (or the web messenger) makes for real.

1. Create an app and its key#

  1. In your workspace, open Settings › Apps and choose Add app. Pick the platform you're building for.

  2. Open the app and create a public SDK key. Copy it now: the full key is only shown once. It starts with a44_pub_.

The examples below use a44_pub_YOUR_KEY. Replace it with your key.

2. Identify a user#

Tell agent44 who the user is. Use your own user id, one that can't be guessed (see Identity and security).

curl -X POST https://api.agent44.ai/v1/identify \
  -H "Authorization: Bearer a44_pub_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"external_user_id": "usr_7f3a9c2e41", "email": "maya@example.com", "name": "Maya", "attributes": {"plan": "pro"}}'

The answer is 204 No Content. The user now shows in Users with their email, name and attributes, and the setup checklist sees that your key works. A request with no ids at all (-d '{}') is just a ping: it marks the key as used and saves nothing.

3. Start a conversation#

Requests that act for a user name them in a header: X-A44-User-Id for a signed-in user, or X-A44-Anonymous-Id for a visitor you haven't identified.

curl -X POST https://api.agent44.ai/v1/conversations \
  -H "Authorization: Bearer a44_pub_YOUR_KEY" \
  -H "X-A44-User-Id: usr_7f3a9c2e41" \
  -H "Content-Type: application/json" \
  -d '{"body": "Restore purchases does nothing on my phone."}'

The answer is 201 with the conversation and its messages:

{
  "conversation": {
    "id": "6f1c2b4e-0d6a-4f7e-9a51-3c2d8e7b9f10",
    "subject": null,
    "status": "open",
    "channel": "sdk",
    "created_at": "2026-11-21T09:41:02.123456+00:00",
    "last_message_at": "2026-11-21T09:41:02.123456+00:00",
    "last_message_preview": "Restore purchases does nothing on my phone.",
    "last_message_author": "user",
    "unread": false,
    "rating": null,
    "rating_requested": false
  },
  "messages": [
    {
      "id": "9a2b…",
      "author": "user",
      "author_name": null,
      "author_avatar_url": null,
      "body": "Restore purchases does nothing on my phone.",
      "attachments": [],
      "sources": [],
      "created_at": "2026-11-21T09:41:02.123456+00:00"
    }
  ]
}

Open your Inbox: the conversation is there. If the AI agent is on (Settings › Inbox › AI agent), it may already be answering.

4. Read the reply#

Reply from the inbox, then fetch the messages newer than the last one you have:

curl "https://api.agent44.ai/v1/conversations/6f1c2b4e-0d6a-4f7e-9a51-3c2d8e7b9f10?since=2026-11-21T09:41:02.123456%2B00:00" \
  -H "Authorization: Bearer a44_pub_YOUR_KEY" \
  -H "X-A44-User-Id: usr_7f3a9c2e41"

Send since exactly as the API gave you the last created_at (URL-encode the +). Apps poll this while the conversation is on screen; the web messenger does every 4 seconds. Send the ETag back as If-None-Match and you get a 304 when nothing changed.

5. Mark it read#

curl -X POST https://api.agent44.ai/v1/conversations/6f1c2b4e-0d6a-4f7e-9a51-3c2d8e7b9f10/read \
  -H "Authorization: Bearer a44_pub_YOUR_KEY" \
  -H "X-A44-User-Id: usr_7f3a9c2e41"

This clears unread and stops the "you have a reply" email for what the user has seen.

Next steps#

Did this answer your question?