add tags to swagger
This commit is contained in:
@@ -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