Chatasist
Open App
API Reference/Endpoints

Endpoints

The Chatasist public REST API (v1). Base URL https://api.chatasist.com.

post

Obtain an access token

post/oauth/token

Use **`grant_type: client_credentials`** with your **client ID** and **client secret** to receive an **access token** for machine-to-machine access. **`grant_type: refresh_token`** is available when your integration has a valid refresh token. If you do not have one, obtain a new access token with **client_credentials** again.

Request body: application/json (required)

Responses

  • 200Access token (and optional refresh token) returned successfully.
  • 401Client authentication failed or the refresh token is not valid.
cURL
curl --request POST \
--url https://api.chatasist.com/oauth/token \
--header 'Content-Type: application/json' \
--data '{
"grant_type": "client_credentials",
"client_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"client_secret": "<string>",
"scope": "<string>"
}'

Access token (and optional refresh token) returned successfully.

{
  "token_type": "Bearer",
  "expires_in": 123,
  "access_token": "<string>",
  "refresh_token": "<string>"
}
getRequires authentication

List customers

get/api/v1/customers

Parameters

NameInRequiredDescription
per_pagequerynoNumber of records per page (1–100).
cursorquerynoOpaque cursor from `meta.next_cursor` or `meta.prev_cursor` of a previous response. Omit on the first request.

Responses

  • 200Cursor-paginated list of customers.
  • 401Authentication required or the access token is not valid.
cURL
curl --request GET \
--url https://api.chatasist.com/api/v1/customers \
--header 'Authorization: Bearer <token>'

Cursor-paginated list of customers.

{
  "data": [
    {
      "id": 123,
      "created_at": "2024-01-01T00:00:00Z",
      "updated_at": "2024-01-01T00:00:00Z",
      "name": "<string>",
      "email": "<string>",
      "phone_prefix": "<string>",
      "phone": "<string>",
      "country": "<string>",
      "country_name": "<string>",
      "city": "<string>",
      "address_first": "<string>",
      "address_second_line": "<string>",
      "zip": "<string>",
      "bio": "<string>",
      "company": "<string>",
      "position": "<string>",
      "profile_picture_url": "https://example.com"
    }
  ],
  "links": {
    "first": "<string>",
    "last": "<string>",
    "prev": "<string>",
    "next": "<string>"
  },
  "meta": {
    "path": "<string>",
    "per_page": 123,
    "next_cursor": "<string>",
    "prev_cursor": "<string>"
  }
}
postRequires authentication

Create customer

post/api/v1/customers

Request body: application/json (required)

Responses

  • 200Customer created or updated successfully.
  • 401Authentication required or the access token is not valid.
  • 422The request body did not satisfy the documented constraints.
cURL
curl --request POST \
--url https://api.chatasist.com/api/v1/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"email": "user@example.com",
"phone_prefix": "<string>",
"phone": "<string>",
"country": "<string>",
"city": "<string>",
"address_first": "<string>",
"address_second_line": "<string>",
"zip": "<string>",
"bio": "<string>",
"company": "<string>",
"position": "<string>",
"profile_picture_url": "https://example.com"
}'

Customer created or updated successfully.

{
  "data": {
    "id": 123,
    "created_at": "2024-01-01T00:00:00Z",
    "updated_at": "2024-01-01T00:00:00Z",
    "name": "<string>",
    "email": "<string>",
    "phone_prefix": "<string>",
    "phone": "<string>",
    "country": "<string>",
    "country_name": "<string>",
    "city": "<string>",
    "address_first": "<string>",
    "address_second_line": "<string>",
    "zip": "<string>",
    "bio": "<string>",
    "company": "<string>",
    "position": "<string>",
    "profile_picture_url": "https://example.com"
  }
}
putRequires authentication

Update customer

put/api/v1/customers/{customer}

Parameters

NameInRequiredDescription
customerpathyes

Request body: application/json (required)

Responses

  • 200Customer updated successfully.
  • 401Authentication required or the access token is not valid.
  • 404No matching customer was found.
  • 422The request body did not satisfy the documented constraints.
cURL
curl --request PUT \
--url https://api.chatasist.com/api/v1/customers/{customer} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"email": "user@example.com",
"phone_prefix": "<string>",
"phone": "<string>",
"country": "<string>",
"city": "<string>",
"address_first": "<string>",
"address_second_line": "<string>",
"zip": "<string>",
"bio": "<string>",
"company": "<string>",
"position": "<string>",
"profile_picture_url": "https://example.com"
}'

Customer updated successfully.

{
  "data": {
    "id": 123,
    "created_at": "2024-01-01T00:00:00Z",
    "updated_at": "2024-01-01T00:00:00Z",
    "name": "<string>",
    "email": "<string>",
    "phone_prefix": "<string>",
    "phone": "<string>",
    "country": "<string>",
    "country_name": "<string>",
    "city": "<string>",
    "address_first": "<string>",
    "address_second_line": "<string>",
    "zip": "<string>",
    "bio": "<string>",
    "company": "<string>",
    "position": "<string>",
    "profile_picture_url": "https://example.com"
  }
}
deleteRequires authentication

Delete customer

delete/api/v1/customers/{customer}

Removes the customer from active use for the current organization.

Parameters

NameInRequiredDescription
customerpathyes

Responses

  • 204Operation succeeded; response body is empty.
  • 401Authentication required or the access token is not valid.
  • 404No matching customer was found.
cURL
curl --request DELETE \
--url https://api.chatasist.com/api/v1/customers/{customer} \
--header 'Authorization: Bearer <token>'

Operation succeeded; response body is empty.

No response body.