update the commit id in docs.json
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
"AgentBots",
|
||||
"Users"
|
||||
],
|
||||
"openapi": "https://raw.githubusercontent.com/chatwoot/chatwoot/90c600acd94cfe2f5c41d5cedebdec9534cba2d7/swagger/tag_groups/platform_swagger.json"
|
||||
"openapi": "https://raw.githubusercontent.com/chatwoot/chatwoot/3b421917058c6761aa138044fe518dacdca75e89/swagger/tag_groups/platform_swagger.json"
|
||||
},
|
||||
{
|
||||
"group": "Application API",
|
||||
@@ -52,7 +52,7 @@
|
||||
"Automation Rule",
|
||||
"Help Center"
|
||||
],
|
||||
"openapi": "https://raw.githubusercontent.com/chatwoot/chatwoot/90c600acd94cfe2f5c41d5cedebdec9534cba2d7/swagger/tag_groups/application_swagger.json"
|
||||
"openapi": "https://raw.githubusercontent.com/chatwoot/chatwoot/3b421917058c6761aa138044fe518dacdca75e89/swagger/tag_groups/application_swagger.json"
|
||||
},
|
||||
{
|
||||
"group": "Client API",
|
||||
@@ -62,7 +62,7 @@
|
||||
"Conversations API",
|
||||
"Messages API"
|
||||
],
|
||||
"openapi": "https://raw.githubusercontent.com/chatwoot/chatwoot/90c600acd94cfe2f5c41d5cedebdec9534cba2d7/swagger/tag_groups/client_swagger.json"
|
||||
"openapi": "https://raw.githubusercontent.com/chatwoot/chatwoot/3b421917058c6761aa138044fe518dacdca75e89/swagger/tag_groups/client_swagger.json"
|
||||
},
|
||||
{
|
||||
"group": "Other APIs",
|
||||
@@ -70,7 +70,7 @@
|
||||
"includeTags": [
|
||||
"CSAT Survey Page"
|
||||
],
|
||||
"openapi": "https://raw.githubusercontent.com/chatwoot/chatwoot/90c600acd94cfe2f5c41d5cedebdec9534cba2d7/swagger/tag_groups/other_swagger.json"
|
||||
"openapi": "https://raw.githubusercontent.com/chatwoot/chatwoot/3b421917058c6761aa138044fe518dacdca75e89/swagger/tag_groups/other_swagger.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+1
-1
@@ -92,7 +92,7 @@ services:
|
||||
environment:
|
||||
- POSTGRES_DB=chatwoot
|
||||
- POSTGRES_USER=postgres
|
||||
- POSTGRES_PASSWORD=postgres
|
||||
- POSTGRES_PASSWORD=
|
||||
|
||||
redis:
|
||||
image: redis:alpine
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
---
|
||||
title: 'Application API'
|
||||
description: 'API endpoints for managing application-level resources'
|
||||
---
|
||||
|
||||
# Application API
|
||||
|
||||
The Application API provides endpoints for managing application-level resources in Chatwoot, including contacts, conversations, inboxes, messages, and more.
|
||||
|
||||
<Note>
|
||||
These APIs require a user API access token (`userApiKey`) for authentication.
|
||||
</Note>
|
||||
|
||||
## Available Endpoints
|
||||
|
||||
The Application API includes endpoints for:
|
||||
|
||||
- **Account AgentBots** - Managing agent bots within accounts
|
||||
- **Agents** - Managing agents
|
||||
- **Canned Responses** - Managing canned responses
|
||||
- **Contacts** - Managing contacts
|
||||
- **Conversations** - Managing conversations
|
||||
- **Custom Attributes** - Managing custom attributes
|
||||
- **Custom Filters** - Managing custom filters
|
||||
- **Inboxes** - Managing inboxes
|
||||
- **Integrations** - Managing integrations
|
||||
- **Messages** - Managing messages
|
||||
- **Profile** - Managing user profile
|
||||
- **Reports** - Generating reports
|
||||
- **Teams** - Managing teams
|
||||
- **Webhooks** - Managing webhooks
|
||||
- **Automation Rules** - Managing automation rules
|
||||
- **Help Center** - Managing help center
|
||||
|
||||
## Authentication
|
||||
|
||||
Application API endpoints require the user API access token:
|
||||
|
||||
```bash
|
||||
curl -X GET "https://app.chatwoot.com/api/v1/accounts/{account_id}/inboxes" \
|
||||
-H "api_access_token: your_user_api_token"
|
||||
```
|
||||
|
||||
## Rate Limiting
|
||||
|
||||
Application API requests are subject to rate limiting. Implement appropriate retry logic in your applications.
|
||||
|
||||
## OpenAPI Specification
|
||||
|
||||
The complete OpenAPI specification for the Application API is available below:
|
||||
|
||||
<Card title="OpenAPI Specification" icon="file-code" href="/api-reference/application">
|
||||
View the complete OpenAPI specification for the Application API
|
||||
</Card>
|
||||
|
||||
## Code Examples
|
||||
|
||||
```javascript
|
||||
// Example: Fetching all inboxes in an account
|
||||
const response = await fetch('https://app.chatwoot.com/api/v1/accounts/1/inboxes', {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'api_access_token': 'your_user_api_token'
|
||||
}
|
||||
});
|
||||
|
||||
const data = await response.json();
|
||||
console.log(data);
|
||||
```
|
||||
@@ -1,55 +0,0 @@
|
||||
---
|
||||
title: 'Client API'
|
||||
description: 'API endpoints for client applications'
|
||||
---
|
||||
|
||||
# Client API
|
||||
|
||||
The Client API provides endpoints for client applications to interact with Chatwoot, including managing contacts, conversations, and messages.
|
||||
|
||||
<Note>
|
||||
Some of these APIs may not require authentication, while others may use alternative authentication methods.
|
||||
</Note>
|
||||
|
||||
## Available Endpoints
|
||||
|
||||
The Client API includes endpoints for:
|
||||
|
||||
- **Contacts API** - APIs for managing contacts from client applications
|
||||
- **Conversations API** - APIs for managing conversations from client applications
|
||||
- **Messages API** - APIs for managing messages from client applications
|
||||
|
||||
## Authentication
|
||||
|
||||
Authentication requirements vary by endpoint. Refer to the specific endpoint documentation for details.
|
||||
|
||||
## Rate Limiting
|
||||
|
||||
Client API requests are subject to rate limiting. Implement appropriate retry logic in your applications.
|
||||
|
||||
## OpenAPI Specification
|
||||
|
||||
The complete OpenAPI specification for the Client API is available below:
|
||||
|
||||
<Card title="OpenAPI Specification" icon="file-code" href="/api-reference/client">
|
||||
View the complete OpenAPI specification for the Client API
|
||||
</Card>
|
||||
|
||||
## Code Examples
|
||||
|
||||
```javascript
|
||||
// Example: Creating a contact using the Client API
|
||||
const response = await fetch('https://app.chatwoot.com/public/api/v1/inboxes/{inbox_identifier}/contacts', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
name: 'John Doe',
|
||||
email: 'john@example.com'
|
||||
})
|
||||
});
|
||||
|
||||
const data = await response.json();
|
||||
console.log(data);
|
||||
```
|
||||
@@ -1,45 +0,0 @@
|
||||
---
|
||||
title: 'Other APIs'
|
||||
description: 'Additional API endpoints'
|
||||
---
|
||||
|
||||
# Other APIs
|
||||
|
||||
This section covers additional API endpoints in Chatwoot that don't fit neatly into the other categories.
|
||||
|
||||
## Available Endpoints
|
||||
|
||||
The Other APIs include endpoints for:
|
||||
|
||||
- **CSAT Survey Page** - APIs for CSAT survey functionality
|
||||
|
||||
## Authentication
|
||||
|
||||
Authentication requirements vary by endpoint. Refer to the specific endpoint documentation for details.
|
||||
|
||||
## Rate Limiting
|
||||
|
||||
API requests are subject to rate limiting. Implement appropriate retry logic in your applications.
|
||||
|
||||
## OpenAPI Specification
|
||||
|
||||
The complete OpenAPI specification for the Other APIs is available below:
|
||||
|
||||
<Card title="OpenAPI Specification" icon="file-code" href="/api-reference/other">
|
||||
View the complete OpenAPI specification for the Other APIs
|
||||
</Card>
|
||||
|
||||
## Code Examples
|
||||
|
||||
```javascript
|
||||
// Example: Retrieving survey responses
|
||||
const response = await fetch('https://app.chatwoot.com/survey/responses/{conversation_uuid}', {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
|
||||
const data = await response.json();
|
||||
console.log(data);
|
||||
```
|
||||
@@ -1,61 +0,0 @@
|
||||
---
|
||||
title: 'Platform API'
|
||||
description: 'API endpoints for managing platform-level resources'
|
||||
---
|
||||
|
||||
# Platform API
|
||||
|
||||
The Platform API provides endpoints for managing platform-level resources in Chatwoot, including accounts, account users, agent bots, and users.
|
||||
|
||||
<Note>
|
||||
These APIs require a platform app API access token (`platformAppApiKey`) for authentication.
|
||||
</Note>
|
||||
|
||||
## Available Endpoints
|
||||
|
||||
The Platform API includes endpoints for:
|
||||
|
||||
- **Accounts** - Creating, updating, retrieving, and deleting accounts
|
||||
- **Account Users** - Managing users within accounts
|
||||
- **AgentBots** - Creating and managing agent bots at the platform level
|
||||
- **Users** - Creating, updating, retrieving, and deleting users
|
||||
|
||||
## Authentication
|
||||
|
||||
Platform API endpoints require the platform app API access token:
|
||||
|
||||
```bash
|
||||
curl -X GET "https://app.chatwoot.com/platform/api/v1/accounts" \
|
||||
-H "api_access_token: your_platform_app_api_token"
|
||||
```
|
||||
|
||||
## Rate Limiting
|
||||
|
||||
Platform API requests are subject to rate limiting. Implement appropriate retry logic in your applications.
|
||||
|
||||
## OpenAPI Specification
|
||||
|
||||
The complete OpenAPI specification for the Platform API is available below:
|
||||
|
||||
<Card title="OpenAPI Specification" icon="file-code" href="/api-reference/platform">
|
||||
View the complete OpenAPI specification for the Platform API
|
||||
</Card>
|
||||
|
||||
## Code Examples
|
||||
|
||||
```javascript
|
||||
// Example: Creating a new account using the Platform API
|
||||
const response = await fetch('https://app.chatwoot.com/platform/api/v1/accounts', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'api_access_token': 'your_platform_app_api_token'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
name: 'New Account'
|
||||
})
|
||||
});
|
||||
|
||||
const data = await response.json();
|
||||
console.log(data);
|
||||
```
|
||||
@@ -1,44 +0,0 @@
|
||||
---
|
||||
title: 'Authentication'
|
||||
description: 'Learn how to authenticate with the Chatwoot API'
|
||||
---
|
||||
|
||||
# Authentication
|
||||
|
||||
All API requests to Chatwoot require authentication. Chatwoot uses API access tokens for authentication.
|
||||
|
||||
## API Access Tokens
|
||||
|
||||
### User API Access Token
|
||||
|
||||
This token can be obtained from your profile page in the Chatwoot dashboard. It provides access to endpoints based on your user permission levels.
|
||||
|
||||
```bash
|
||||
curl -X GET "https://app.chatwoot.com/api/v1/profile" \
|
||||
-H "api_access_token: your_api_access_token"
|
||||
```
|
||||
|
||||
### Agent Bot API Access Token
|
||||
|
||||
This token should be provided by a system admin or obtained via the Rails console. It can be used to build bot integrations and can only access limited APIs.
|
||||
|
||||
### Platform App API Access Token
|
||||
|
||||
This token can be obtained by the system admin after creating a platform app. It should be used to provision agent bots, accounts, users, and their roles.
|
||||
|
||||
## Adding Authentication to Requests
|
||||
|
||||
Include your API access token in the request header:
|
||||
|
||||
```bash
|
||||
curl -X GET "https://app.chatwoot.com/api/v1/accounts/{account_id}/inboxes" \
|
||||
-H "api_access_token: your_api_access_token"
|
||||
```
|
||||
|
||||
## Security Best Practices
|
||||
|
||||
- Keep your API access tokens secure
|
||||
- Rotate your tokens periodically
|
||||
- Use HTTPS for all API requests
|
||||
- Only grant the minimum required permissions
|
||||
- Don't expose tokens in client-side code
|
||||
@@ -1,60 +0,0 @@
|
||||
---
|
||||
title: 'Error Handling'
|
||||
description: 'Learn about error responses from the Chatwoot API'
|
||||
---
|
||||
|
||||
# Error Handling
|
||||
|
||||
When using the Chatwoot API, you may encounter various error responses. This guide helps you understand and handle these errors effectively.
|
||||
|
||||
## HTTP Status Codes
|
||||
|
||||
Chatwoot APIs use standard HTTP status codes to indicate the success or failure of a request:
|
||||
|
||||
| Status Code | Description |
|
||||
|-------------|-------------|
|
||||
| 200 OK | The request was successful |
|
||||
| 201 Created | The resource was successfully created |
|
||||
| 400 Bad Request | The request was invalid or cannot be served |
|
||||
| 401 Unauthorized | Authentication failed or user doesn't have permissions |
|
||||
| 403 Forbidden | The authenticated user doesn't have access to the requested resource |
|
||||
| 404 Not Found | The requested resource doesn't exist |
|
||||
| 422 Unprocessable Entity | The request was well-formed but was unable to be followed due to semantic errors |
|
||||
| 429 Too Many Requests | Too many requests, rate limiting applied |
|
||||
| 500 Internal Server Error | Something went wrong on our servers |
|
||||
|
||||
## Error Response Format
|
||||
|
||||
Error responses include a JSON object with an error message:
|
||||
|
||||
```json
|
||||
{
|
||||
"error": "Invalid login credentials"
|
||||
}
|
||||
```
|
||||
|
||||
## Common Error Scenarios
|
||||
|
||||
### Authentication Errors
|
||||
|
||||
- **401 Unauthorized**: Invalid or missing API access token
|
||||
- **403 Forbidden**: Insufficient permissions for the requested operation
|
||||
|
||||
### Resource Errors
|
||||
|
||||
- **404 Not Found**: The requested resource does not exist
|
||||
- **422 Unprocessable Entity**: The request contained invalid data
|
||||
|
||||
### Rate Limiting
|
||||
|
||||
- **429 Too Many Requests**: You've exceeded the API rate limits
|
||||
|
||||
## Handling Errors
|
||||
|
||||
When building integrations with Chatwoot, always:
|
||||
|
||||
1. Check HTTP status codes
|
||||
2. Parse error messages
|
||||
3. Implement appropriate retry logic
|
||||
4. Log errors for debugging
|
||||
5. Provide meaningful error messages to users
|
||||
@@ -1,33 +0,0 @@
|
||||
---
|
||||
title: 'Chatwoot API Documentation'
|
||||
description: 'Welcome to the Chatwoot API Documentation'
|
||||
---
|
||||
|
||||
# Introduction to Chatwoot API
|
||||
|
||||
Chatwoot provides comprehensive API endpoints to manage and integrate with all aspects of the platform. Use these APIs to create custom integrations, automate workflows, and build on top of Chatwoot.
|
||||
|
||||
## Getting Started
|
||||
|
||||
To use the Chatwoot API, you'll need:
|
||||
|
||||
1. A Chatwoot account
|
||||
2. An API access token (obtained from your profile page)
|
||||
3. Basic understanding of RESTful APIs and HTTP requests
|
||||
|
||||
## API Organization
|
||||
|
||||
Our APIs are organized into several logical groups:
|
||||
|
||||
- **Platform API** - For managing platform-level resources like accounts, users, and agent bots
|
||||
- **Application API** - For working with application-level resources like contacts, conversations, and inboxes
|
||||
- **Client API** - For client applications to interact with Chatwoot
|
||||
- **Other APIs** - Additional functionality like CSAT surveys
|
||||
|
||||
## Authentication
|
||||
|
||||
All API requests require authentication. See the [Authentication](/authentication) section for details.
|
||||
|
||||
## Rate Limiting
|
||||
|
||||
API requests are subject to rate limiting. Please implement appropriate retry logic in your applications.
|
||||
Reference in New Issue
Block a user