-
Notifications
You must be signed in to change notification settings - Fork 393
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
3 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,3 @@ | ||
--- | ||
title: "Create contact" | ||
api: "POST https://api-v2.opencopilot.so/backend/contact/:organization_id" | ||
description: "Create a new contact for a specific Organization ID." | ||
openapi: post /contacts | ||
--- | ||
|
||
<Warning> | ||
This endpoint is protected by the same JWT that the user uses to call other APIs. The response will include data for the specified chatbot, along with other metadata information. | ||
</Warning> | ||
|
||
|
||
You can create a new contact in your organization at Open by calling this endpoint, a contact is a user that can interact with the chatbot, phone AI or email AI, a single contact might have multiple conversations across different channels. | ||
|
||
|
||
|
||
<ParamField path="organization_id" type="string" required> | ||
The unique identifier for the copilot (organization) you want to create a contact for. This is a required parameter. | ||
</ParamField> | ||
|
||
<ParamField body="copilot_id" type="string" default="uuid" required> | ||
The unique identifier for the copilot_id (organization_id) you want to create a contact for. This is a required parameter. | ||
</ParamField> | ||
|
||
<ParamField body="email" type="string" default="string"> | ||
The email address of the contact. | ||
</ParamField> | ||
|
||
<ParamField body="name" type="string" default="string"> | ||
The name of the contact. | ||
</ParamField> | ||
|
||
<ParamField body="phone_number" type="string" default="string"> | ||
The phone number of the contact. | ||
</ParamField> | ||
|
||
<ParamField body="custom_data" type="object" default="{}"> | ||
An object containing any custom data you want to associate with the contact. | ||
</ParamField> | ||
|
||
|
||
<RequestExample> | ||
```bash Example Request | ||
curl --location 'https://api-v2.opencopilot.so/backend/contact/:organization_id' \ | ||
--header 'Authorization: Bearer TOKEN' \ | ||
--header 'Content-Type: application/json' | ||
``` | ||
</RequestExample> | ||
|
||
<ResponseExample> | ||
```json Response | ||
{ | ||
"copilot_id": "6486fa96-80ac-4654-bf71-f793893e8fef", | ||
"email": "[email protected]", | ||
"name": "string", | ||
"phone_number": "string", | ||
"custom_data": "{}", | ||
"created_at": null, | ||
"updated_at": null, | ||
"id": "82e95723-245b-47c0-9cf2-2dd3d3914a40" | ||
} | ||
``` | ||
</ResponseExample> | ||
|
||
<Info> | ||
You can pass any custom data you want to associate with the contact. This data will be returned in the response and can be used for any purpose you want, just make sure it's a valid JSON string object. | ||
</Info> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,3 @@ | ||
--- | ||
title: "Delete a contact" | ||
api: "DELETE https://api-v2.opencopilot.so/backend/contact/:organization_id/:contact_id" | ||
description: "Delete a contact for a specific Organization ID." | ||
openapi: delete /contacts/{contact_id} | ||
--- | ||
|
||
<Warning> | ||
This endpoint is protected by the same JWT that the user uses to call other APIs. The response will include data for the specified chatbot, along with other metadata information. | ||
</Warning> | ||
|
||
|
||
You can delete a contact in your organization at Open by calling this endpoint, a contact is a user that can interact with the chatbot, phone AI or email AI, a single contact might have multiple conversations across different channels. | ||
|
||
<Warning> | ||
**Important**: Deleting a contact will **not** delete any conversations that the contact has had with the copilot. You will need to manually delete any conversations that you want to delete. | ||
</Warning> | ||
|
||
|
||
<ParamField path="organization_id" type="string" required> | ||
The unique identifier for the copilot (organization) you want to create a contact for. This is a required parameter. | ||
</ParamField> | ||
|
||
<ParamField path="contact_id" type="string" required> | ||
The unique identifier for the contact you want to delete. This is a required parameter. | ||
</ParamField> | ||
|
||
|
||
<RequestExample> | ||
```bash Example Request | ||
curl --location 'https://api-v2.opencopilot.so/backend/contact/:organization_id/:contact_id' \ | ||
--header 'Authorization: Bearer TOKEN' \ | ||
--header 'Content-Type: application/json' | ||
``` | ||
</RequestExample> | ||
|
||
<ResponseExample> | ||
```json Response | ||
{ | ||
"message": "contact deleted successfully" | ||
} | ||
``` | ||
</ResponseExample> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,3 @@ | ||
--- | ||
title: "List contacts" | ||
api: "GET https://api-v2.opencopilot.so/backend/contact/:organization_id" | ||
description: "List all contacts for a specific Organization ID." | ||
openapi: post /contacts/query | ||
--- | ||
|
||
<Warning> | ||
This endpoint is protected by the same JWT that the user uses to call other APIs. The response will include data for the specified chatbot, along with other metadata information. | ||
</Warning> | ||
|
||
|
||
You can list all contacts in your organization at Open by calling this endpoint, a contact is a user that can interact with the chatbot, phone AI or email AI, a single contact might have multiple conversations across different channels. | ||
|
||
|
||
<ParamField path="organization_id" type="string" required> | ||
The unique identifier for the copilot (organization) you want to list contacts for. This is a required parameter. | ||
</ParamField> | ||
|
||
|
||
<RequestExample> | ||
```bash Example Request | ||
curl --location 'https://api-v2.opencopilot.so/backend/contact/:organization_id' \ | ||
--header 'Authorization: Bearer TOKEN' \ | ||
--header 'Content-Type: application/json' | ||
``` | ||
</RequestExample> | ||
|
||
<ResponseExample> | ||
```json Response | ||
[ | ||
{ | ||
"copilot_id": "6486fa96-80ac-4654-bf71-f793893e8fef", | ||
"email": "[email protected]", | ||
"name": "string", | ||
"phone_number": "string", | ||
"custom_data": "{}", | ||
"created_at": null, | ||
"updated_at": null, | ||
"id": "82e95723-245b-47c0-9cf2-2dd3d3914a40" | ||
} | ||
] | ||
``` | ||
</ResponseExample> |