contactapi

llms.txt Get API key

An open-source API to save contacts. Send a POST with an email and any other fields you want, and they get saved as-is.

Endpoints

POST /v1/contacts secret or publishable

Create a contact. If the email already exists the contact is updated rather than duplicated.

Body
emailrequiredThe contact's email, used as the unique key.
*optionalAny other JSON fields such as name, plan or source are saved as-is.
Request
{ "email": "ada@example.com", "name": "Ada", "plan": "pro" }
Response 201
{
  "id": "con_a1b2",
  "email": "ada@example.com",
  "name": "Ada",
  "plan": "pro",
  "created_at": "2026-07-04T10:00:00Z",
  "updated_at": "2026-07-04T10:00:00Z"
}
GET /v1/contacts secret

List your contacts, sorted by created_at, newest first.

Query
pageoptionalWhich page to return, starting at 1. Defaults to 1.
page_sizeoptionalHow many contacts per page, 1–100. Defaults to 20.
Request
GET /v1/contacts?page=1&page_size=20
Response 200
{
  "data": [
    {
      "id": "con_a1b2",
      "email": "ada@example.com",
      "name": "Ada",
      "plan": "pro",
      "created_at": "2026-07-04T10:00:00Z",
      "updated_at": "2026-07-04T10:00:00Z"
    }
  ],
  "page": 1,
  "page_size": 20,
  "total": 137,
  "total_pages": 7
}

total is the full contact count across all pages; total_pages is ceil(total / page_size). There are more pages while page < total_pages.

GET /v1/contacts/:id secret

Fetch a single contact by id.

Response 200
{
  "id": "con_a1b2",
  "email": "ada@example.com",
  "name": "Ada",
  "plan": "pro",
  "created_at": "2026-07-04T10:00:00Z",
  "updated_at": "2026-07-04T10:00:00Z"
}
PATCH /v1/contacts/:id secret

Update a contact by sending only the fields you want to change.

Request
{ "plan": "enterprise" }
Response 200
{
  "id": "con_a1b2",
  "email": "ada@example.com",
  "name": "Ada",
  "plan": "enterprise",
  "updated_at": "2026-07-04T11:30:00Z"
}
DELETE /v1/contacts/:id secret

Delete a contact.

Response 200
{ "id": "con_a1b2", "deleted": true }

Authentication

The base URL is https://contactapi.dev and every request carries your key in a header.

Authorization: Bearer YOUR_KEY
ck_secret_…Use this on your backend. It has full access to every endpoint above.
ck_pub_…Use this in a browser. It can only create contacts and is locked to your domains.