add tags to swagger
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
---
|
||||
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);
|
||||
```
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
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);
|
||||
```
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
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);
|
||||
```
|
||||
@@ -0,0 +1,61 @@
|
||||
---
|
||||
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);
|
||||
```
|
||||
Reference in New Issue
Block a user