Endpoints
The Chatasist public REST API (v1). Base URL https://api.chatasist.com.
Obtain an access token
/oauth/tokenUse **`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 --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>"
}List customers
/api/v1/customersParameters
| Name | In | Required | Description |
|---|---|---|---|
| per_page | query | no | Number of records per page (1–100). |
| cursor | query | no | Opaque 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 --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>"
}
}Create customer
/api/v1/customersRequest 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 --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"
}
}Update customer
/api/v1/customers/{customer}Parameters
| Name | In | Required | Description |
|---|---|---|---|
| customer | path | yes |
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 --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"
}
}Delete customer
/api/v1/customers/{customer}Removes the customer from active use for the current organization.
Parameters
| Name | In | Required | Description |
|---|---|---|---|
| customer | path | yes |
Responses
204Operation succeeded; response body is empty.401Authentication required or the access token is not valid.404No matching customer was found.
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.

