For the complete documentation index, see llms.txt. This page is also available as Markdown.

Customers

Manage customer information

List customers

get
/api/v1/customers

Returns all customers.

Authorizations
x-api-keystringRequired

Your API key (obtain from dashboard)

Query parameters
pagenumber · min: 1Optional

Page number (1-based)

Default: 1Example: 1
sizenumber · min: 1 · max: 100Optional

Number of items per page

Default: 10Example: 10
searchstringOptional

Search by customer name, email, or phone

Example: john@example.com
emailstringOptional

Filter by exact email address

Example: john@example.com
phonestringOptional

Filter by exact phone number

Example: +2348012345678
telegramIdstringOptional

Filter by exact Telegram ID

Example: 123456789
Responses
200Success
application/json
successbooleanRequired

Indicates if the request was successful

Example: true
messagestringRequired

Response message

Example: Success
get/api/v1/customers
GET /api/v1/customers HTTP/1.1
Host: api.coincircuit.io
x-api-key: YOUR_API_KEY
Accept: */*
200Success
{
  "success": true,
  "message": "Success",
  "data": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "firstName": "John",
      "lastName": "Doe",
      "email": "customer@example.com",
      "phone": "+1234567890",
      "telegramId": "123456789",
      "metadata": {
        "source": "website",
        "referrer": "google"
      },
      "createdAt": "2024-01-15T10:30:00.000Z",
      "updatedAt": "2024-01-15T10:30:00.000Z"
    }
  ],
  "meta": {
    "page": 1,
    "size": 10,
    "total": 42,
    "totalPages": 5
  }
}

Create customer

post
/api/v1/customers

Creates a new customer. If a customer with the same email, phone, or telegram ID already exists, it will be updated instead.

Authorizations
x-api-keystringRequired

Your API key (obtain from dashboard)

Body
firstNamestringOptional

First name of the customer

Example: John
lastNamestringOptional

Last name of the customer

Example: Doe
emailstringOptional

Email address of the customer

Example: customer@example.com
phonestringOptional

Phone number of the customer

Example: +1234567890
telegramIdstringOptional

Telegram user ID if customer is linked via Telegram

Example: 123456789
metadataobjectOptional

Additional metadata for the customer

Example: {"source":"website","referrer":"google"}
Responses
201Success
application/json
successbooleanRequired

Indicates if the request was successful

Example: true
messagestringRequired

Response message

Example: Success
post/api/v1/customers
POST /api/v1/customers HTTP/1.1
Host: api.coincircuit.io
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 165

{
  "firstName": "John",
  "lastName": "Doe",
  "email": "customer@example.com",
  "phone": "+1234567890",
  "telegramId": 123456789,
  "metadata": {
    "source": "website",
    "referrer": "google"
  }
}
{
  "success": true,
  "message": "Success",
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "firstName": "John",
    "lastName": "Doe",
    "email": "customer@example.com",
    "phone": "+1234567890",
    "telegramId": "123456789",
    "metadata": {
      "source": "website",
      "referrer": "google"
    },
    "createdAt": "2024-01-15T10:30:00.000Z",
    "updatedAt": "2024-01-15T10:30:00.000Z"
  }
}

Retrieve customer

get
/api/v1/customers/{id}

Returns the customer for the given ID.

Authorizations
x-api-keystringRequired

Your API key (obtain from dashboard)

Path parameters
idstring · uuidRequired

Customer UUID

Responses
200Success
application/json
successbooleanRequired

Indicates if the request was successful

Example: true
messagestringRequired

Response message

Example: Success
get/api/v1/customers/{id}
GET /api/v1/customers/{id} HTTP/1.1
Host: api.coincircuit.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "success": true,
  "message": "Success",
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "firstName": "John",
    "lastName": "Doe",
    "email": "customer@example.com",
    "phone": "+1234567890",
    "telegramId": "123456789",
    "metadata": {
      "source": "website",
      "referrer": "google"
    },
    "createdAt": "2024-01-15T10:30:00.000Z",
    "updatedAt": "2024-01-15T10:30:00.000Z"
  }
}

Update customer

patch
/api/v1/customers/{id}

Updates the customer.

Authorizations
x-api-keystringRequired

Your API key (obtain from dashboard)

Path parameters
idstring · uuidRequired

Customer UUID

Body
firstNamestringOptional

First name of the customer

Example: John
lastNamestringOptional

Last name of the customer

Example: Doe
emailstringOptional

Email address of the customer

Example: customer@example.com
phonestringOptional

Phone number of the customer

Example: +1234567890
telegramIdstringOptional

Telegram user ID if customer is linked via Telegram

Example: 123456789
Responses
200Success
application/json
successbooleanRequired

Indicates if the request was successful

Example: true
messagestringRequired

Response message

Example: Success
patch/api/v1/customers/{id}
PATCH /api/v1/customers/{id} HTTP/1.1
Host: api.coincircuit.io
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 113

{
  "firstName": "John",
  "lastName": "Doe",
  "email": "customer@example.com",
  "phone": "+1234567890",
  "telegramId": 123456789
}
{
  "success": true,
  "message": "Success",
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "firstName": "John",
    "lastName": "Doe",
    "email": "customer@example.com",
    "phone": "+1234567890",
    "telegramId": "123456789",
    "metadata": {
      "source": "website",
      "referrer": "google"
    },
    "createdAt": "2024-01-15T10:30:00.000Z",
    "updatedAt": "2024-01-15T10:30:00.000Z"
  }
}

Last updated

Was this helpful?