Contacts

List Contacts

GET /api/contacts/

Parameters

Parameter Name
Required
Type
Description

inbox

string

Deprecated: Use inboxes instead

inboxes

string

Conversation platform ID (used to filter contacts from a specific inbox)

page

integer

A page number within the paginated result set.

pageSize

integer

Number of results to return per page.

query

string

Search by name or source ID

search

string

Full-text search

Code Examples

# API Call Example (Shell)
curl -X GET "https://api.maiagent.ai/api/contacts/?inbox=550e8400-e29b-41d4-a716-446655440000&inboxes=example&page=1&pageSize=1&query=example&search=example" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# Please replace YOUR_API_KEY and verify the request data before execution.

Response Body

Status Code: 200

Response Schema Example

Response Example Value


Create Contact

POST /api/contacts/

Code Example

Response Body

Status Code: 201

Response Schema Example

Response Example Value


Get Contact Details

GET /api/contacts/{id}/

Parameters

Parameter Name
Required
Type
Description

id

string

A UUID string identifying this Contact.

Code Examples

Response Body

Status Code: 200

Response Schema Example

Response Example Value


Update Contact

PUT /api/contacts/{id}/

Parameters

Parameter Name
Required
Type
Description

id

string

A UUID string identifying this Contact.

Request Body

Request Parameters

Field
Type
Required
Description

name

string

No

Contact name

inboxes

array[object]

No

List of inboxes (new format)

inbox

object

No

Single inbox (old format, for backward compatibility)

inbox.id

string (uuid)

Yes

Inbox ID

avatar

string

No

Avatar URL

sourceId

string

No

Source ID

queryMetadata

string

No

Query metadata

Request Structure Example

Request Example Value

Code Examples

Response Body

Status Code: 200

Response Schema Example

Response Example Value


Update Contact

PATCH /api/contacts/{id}/

Parameters

Parameter Name
Required
Type
Description

id

string

A UUID string identifying this Contact.

Request Body

Request Parameters

Field
Type
Required
Description

name

string

No

Contact name

inboxes

array[object]

No

List of inboxes (new format)

inbox

object

No

Single inbox (old format, for backward compatibility)

inbox.id

string (uuid)

Yes

Inbox ID

avatar

string

No

Avatar URL

sourceId

string

No

Source ID

queryMetadata

string

No

Query metadata

Request Structure Example

Request Example Value

Code Examples

Response Body

Status Code: 200

Response Schema Example

Response Example Value


Delete Contact

DELETE /api/contacts/{id}/

Parameters

Parameter Name
Required
Type
Description

id

string

A UUID string identifying this Contact.

Code Examples

Response

Status Code
Description

204

No response body

400

The contact still has associated conversations and cannot be deleted


Last updated

Was this helpful?