curl https://app.tryafk.com/api/v1/users \
-H "Authorization: Bearer $KIP_PARTNER_KEY" \
-H "Content-Type: application/json" \
-d '{"email": "ada@acme.com", "first_name": "Ada", "last_name": "Lovelace", "external_id": "cus_8f2k"}'
const res = await fetch("https://app.tryafk.com/api/v1/users", {
method: "POST",
headers: { authorization: `Bearer ${process.env.KIP_PARTNER_KEY}`, "content-type": "application/json" },
body: JSON.stringify({ email: customer.email, first_name: customer.firstName, external_id: customer.id }),
});
const { user, api_key } = await res.json();
{
"user": { "id": "usr_01k8...", "email": "ada@acme.com", "first_name": "Ada", "last_name": "Lovelace", "external_id": "cus_8f2k" },
"created": true,
"account": "company",
"company": { "status": "created", "brain": { "id": "brn_01k8...", "kind": "company", "slug": "acme" } },
"brains": {
"personal": { "id": "brn_01k8...", "kind": "personal", "slug": "ada-lovelace" },
"company": { "id": "brn_01k8...", "kind": "company", "slug": "acme" }
},
"api_key": "kipm_01k8...",
"brain_ready": false
}
{ "error": { "code": "user_exists" } }
Partners
Create a user
Sign your customer up to Kip from your app, the way Google sign-in does.
POST
/
api
/
v1
/
users
curl https://app.tryafk.com/api/v1/users \
-H "Authorization: Bearer $KIP_PARTNER_KEY" \
-H "Content-Type: application/json" \
-d '{"email": "ada@acme.com", "first_name": "Ada", "last_name": "Lovelace", "external_id": "cus_8f2k"}'
const res = await fetch("https://app.tryafk.com/api/v1/users", {
method: "POST",
headers: { authorization: `Bearer ${process.env.KIP_PARTNER_KEY}`, "content-type": "application/json" },
body: JSON.stringify({ email: customer.email, first_name: customer.firstName, external_id: customer.id }),
});
const { user, api_key } = await res.json();
{
"user": { "id": "usr_01k8...", "email": "ada@acme.com", "first_name": "Ada", "last_name": "Lovelace", "external_id": "cus_8f2k" },
"created": true,
"account": "company",
"company": { "status": "created", "brain": { "id": "brn_01k8...", "kind": "company", "slug": "acme" } },
"brains": {
"personal": { "id": "brn_01k8...", "kind": "personal", "slug": "ada-lovelace" },
"company": { "id": "brn_01k8...", "kind": "company", "slug": "acme" }
},
"api_key": "kipm_01k8...",
"brain_ready": false
}
{ "error": { "code": "user_exists" } }
For partners: your app creates a Kip account for each of its customers, then asks and recalls as them. See Kip in your app for the whole flow.
The call is idempotent per email: call it on every sign-in of your customer and you get the same user and key back.
You vouch for the email. Only send addresses your app has verified.
If your customer later signs in to AFK with Google themselves, the account becomes theirs: your key for it stops working and the call answers
Authorization
Authorization: Bearer kipp_..., your partner key. It opens this endpoint only. Create one on API keys.
What gets created
| The email is | The user gets |
|---|---|
A work email, first of its domain (ada@acme.com) | A personal brain and a new company brain for acme.com |
| A work email, domain created by you earlier | A personal brain, joined to that company brain |
A consumer mailbox (gmail.com, outlook.com, icloud.com …) | A personal brain only |
| A work email at a company already in Kip from elsewhere | A personal brain only. company.status is requires_google_sign_in: the company admits members by verified Google Workspace sign-in only. |
409 user_exists. A company brain you created takes only the users you create; people who sign in with Google Workspace at that domain do not join it.
Body
string
required
Your customer’s verified email.
string
Up to 100 characters. Kept only if the user has not set their own.
string
Up to 100 characters.
string
A display name, if you don’t have first and last names.
string
Your own id for this customer, up to 200 printable characters. One external id is one user.
Response
201 for a new user, 200 when the user already existed.
object
id, email (lowercased), first_name, last_name, external_id.boolean
True when this call created the user.
"company" | "personal"
company when the user belongs to a company brain.object | null
status (created, joined or requires_google_sign_in) and brain. Null for a consumer mailbox.object
personal and company, each { id, kind, slug } or null.string
The user’s key,
kipm_.... Use it as the bearer for Ask, Recall, Read memory and Remember. Store it on your server, encrypted, against your customer.boolean
Whether the user’s Kip has started. A new Kip takes about a minute; until then calls answer
503 brain_starting.curl https://app.tryafk.com/api/v1/users \
-H "Authorization: Bearer $KIP_PARTNER_KEY" \
-H "Content-Type: application/json" \
-d '{"email": "ada@acme.com", "first_name": "Ada", "last_name": "Lovelace", "external_id": "cus_8f2k"}'
const res = await fetch("https://app.tryafk.com/api/v1/users", {
method: "POST",
headers: { authorization: `Bearer ${process.env.KIP_PARTNER_KEY}`, "content-type": "application/json" },
body: JSON.stringify({ email: customer.email, first_name: customer.firstName, external_id: customer.id }),
});
const { user, api_key } = await res.json();
{
"user": { "id": "usr_01k8...", "email": "ada@acme.com", "first_name": "Ada", "last_name": "Lovelace", "external_id": "cus_8f2k" },
"created": true,
"account": "company",
"company": { "status": "created", "brain": { "id": "brn_01k8...", "kind": "company", "slug": "acme" } },
"brains": {
"personal": { "id": "brn_01k8...", "kind": "personal", "slug": "ada-lovelace" },
"company": { "id": "brn_01k8...", "kind": "company", "slug": "acme" }
},
"api_key": "kipm_01k8...",
"brain_ready": false
}
{ "error": { "code": "user_exists" } }
Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_email, invalid_request | Fix the body. Unknown fields are refused. |
| 401 | invalid_partner_key | The partner key is wrong or revoked. |
| 409 | user_exists | This email signed up to Kip another way, through another partner, or has since signed in to Kip themselves. You can’t get their key. |
| 409 | external_id_taken | You already used this external_id for a different email. |

