### List Installed Skills
Source: https://supportbee.com/docs/api/agent-skills
Run this command in your terminal to view all currently installed Agent Skills.
```bash
npx skills list
```
--------------------------------
### Install SupportBee Skills
Source: https://supportbee.com/docs/api/agent-skills
Use this command to add SupportBee's Agent Skills to your AI coding agent. You can install all skills or specify individual ones.
```bash
npx -y skills add https://supportbee.com
```
```bash
npx -y skills add https://supportbee.com --all
```
```bash
# Claude Code
npx -y skills add https://supportbee.com --agent claude-code --all
# Cursor
npx -y skills add https://supportbee.com --agent cursor --all
# GitHub Copilot
npx -y skills add https://supportbee.com --agent github-copilot --all
```
```bash
npx -y skills add https://supportbee.com -g --all
```
```bash
npx -y skills add https://supportbee.com --skill supportbee-api --all
```
--------------------------------
### User Creation Response (201)
Source: https://supportbee.com/docs/api/reference
Example of a successful response when a user is created. It includes the newly created user's details.
```json
{
"user": {
"id": 1,
"type": "user",
"email": "person2@example.com",
"first_name": "Sarah",
"last_name": "Caring",
"name": "Sarah Caring",
"role": "agent",
"agent": true,
"two_factor_authentication_enabled": true,
"picture": {
"thumb20": "https://secure.gravatar.com/avatar/user.png?r=PG&s=20",
"thumb24": "https://secure.gravatar.com/avatar/user.png?r=PG&s=24",
"thumb32": "https://secure.gravatar.com/avatar/user.png?r=PG&s=32",
"thumb48": "https://secure.gravatar.com/avatar/user.png?r=PG&s=48",
"thumb64": "https://secure.gravatar.com/avatar/user.png?r=PG&s=64",
"thum128": "https://secure.gravatar.com/avatar/user.png?r=PG&s=128",
"thum256": "https://secure.gravatar.com/avatar/user.png?r=PG&s=256"
},
"can_members_access_group_tickets": null,
"email_domains": [ ],
"members_count": 0,
"active_tickets_count": 0,
"requested_tickets_count": 0,
"teams": [ ]
}
}
```
--------------------------------
### Date Formats for API Calls
Source: https://supportbee.com/docs/api/reference
Examples of acceptable date and time formats for API parameters. Dates should be provided in UTC.
```text
2001-02-15T04:05:06+07:00
```
```text
20010215T040506+0700
```
```text
15th Feb 2001 04:05:06 PM
```
```text
2001-02-15
```
```text
20010215
```
--------------------------------
### Update Skills to Latest Version
Source: https://supportbee.com/docs/api/agent-skills
Execute this command to update all installed Agent Skills to their latest available versions.
```bash
npx skills update
```
--------------------------------
### Python Script for SupportBee Tickets
Source: https://supportbee.com/docs/api/agent-skills
This Python script demonstrates how to fetch unanswered tickets from SupportBee using its API and post a summary to a Slack channel. Ensure you have the 'requests' library installed.
```python
import requests
SUPPORTBEE_TOKEN = "your_api_token"
SUPPORTBEE_DOMAIN = "your-company"
SLACK_WEBHOOK = "https://hooks.slack.com/services/..."
# Fetch unanswered tickets from SupportBee
resp = requests.get(
f"https://{SUPPORTBEE_DOMAIN}.supportbee.com/tickets",
headers={
"Authorization": f"Bearer {SUPPORTBEE_TOKEN}",
"Accept": "application/json",
},
params={"archived": "false", "spam": "false"},
)
tickets = resp.json().get("tickets", [])
unanswered = [t for t in tickets if not t.get("current_user_assignee")]
# Post summary to Slack
summary = f"*{len(unanswered)} unanswered tickets*\n"
for ticket in unanswered[:10]:
summary += f"- {ticket['subject']} (#{ticket['id']})\n"
requests.post(SLACK_WEBHOOK, json={"text": summary})
```
--------------------------------
### Get Reports - Average First Response Time
Source: https://supportbee.com/docs/api/reference
Returns data points for the average first response time. This endpoint is available to admins only.
```APIDOC
## GET /reports/avg_first_response_time
### Description
Returns data points for average first response time.
### Method
GET
### Endpoint
https://{company}.supportbee.com/reports/avg_first_response_time
### Parameters
#### Query Parameters
- **user** (integer) - ID of the agent to filter data points on.
- **team** (integer) - ID of the team to filter data points on.
- **label** (string) - Name of the label to filter data points on.
- **since** (Date | DateTime | Timestamp) - Filter data points since this date/time.
#### Header Parameters
- **Accept** (string) - Required. Must be set to "application/json".
```
--------------------------------
### Get Tickets
Source: https://supportbee.com/docs/api/reference
Retrieves a list of tickets from SupportBee. Supports filtering and sorting through various query parameters.
```APIDOC
## GET /tickets
### Description
Retrieves a list of tickets from the company, ordered by their last activity. Supports various query parameters for filtering and sorting.
### Method
GET
### Endpoint
https://{company}.supportbee.com/tickets
### Parameters
#### Query Parameters
- **per_page** (integer) - Optional - Specifies the number of tickets to retrieve. Default: 15. Must be less than 100.
- **page** (integer) - Optional - Specifies the page of tickets to retrieve. Default: 1.
- **archived** (string) - Optional - If true, retrieves only archived tickets. If false, it does not return any archived tickets. If any, includes archived tickets in the result. Default: false.
- **spam** (boolean) - Optional - If true, retrieved tickets contain tickets marked as spam. Default: false.
- **trash** (boolean) - Optional - If true, retrieved tickets contain tickets that are trashed. Default: false.
- **replies** (boolean) - Optional - If true, retrieved tickets contain only tickets with replies. If false, retrieved tickets contain only tickets without replies.
- **max_replies** (integer) - Optional - Specifies the number of replies that a ticket must have. This cannot be used with replies = false.
- **assigned_user** (string) - Optional - If 'me', retrieves only tickets assigned to the current user. If 'agent_id', retrieves only tickets assigned to the Agent with id agent_id. If 'any', retrieves tickets that are assigned to any user. If 'none', retrieves tickets that aren't assigned to any user.
- **assigned_team** (string) - Optional - If 'mine', retrieves only tickets assigned to the teams of the current user. If 'team_id', retrieves only tickets assigned to the team with id team_id. If 'none', retrieves tickets that aren't assigned to any team.
- **label** (string) - Optional - Set to 'label_name', retrieves only the tickets with the label label_name.
- **since** (string) - Optional - Can be used to retrieve tickets whose last activity timestamp is greater than the time specified in this parameter. The last activity timestamp of a ticket is updated whenever there is a new reply or a new comment on the ticket. To retrieve tickets sorted by creation time, instead of last activity, send the sort_by parameter along with the since parameter.
- **until** (string) - Optional - Can be used to retrieve tickets whose last activity timestamp is lesser than the time specified in this parameter. The last activity timestamp of a ticket is updated whenever there is a new reply or a new comment on the ticket. To retrieve tickets sorted by creation time, instead of last activity, send the sort_by parameter along with the until parameter.
- **sort_by** (string) - Optional - If 'last_activity', retrieves tickets sorted by last activity. If 'creation_time', retrieves tickets sorted by creation time. Default: "last_activity".
- **requester_emails** (string) - Optional - Can be used to filter tickets by requester email addresses. Accepts a string of comma separated email addresses.
- **total_only** (boolean) - Optional - Can be used in conjunction with any other parameters to return only the total number of tickets. Default: false.
#### Header Parameters
- **Accept** (string) - Required - Must be set to "application/json". Default: "application/json".
### Responses
#### Success Response (200)
Returns 15 tickets of the company in the order of their last activity.
```
--------------------------------
### Show User Response Sample
Source: https://supportbee.com/docs/api/reference
This JSON object represents a successful response when retrieving user details. It includes comprehensive information about the user's profile, role, and associated data.
```json
{
"user": {
"id": 1,
"type": "user",
"email": "person2@example.com",
"first_name": "Sarah",
"last_name": "Caring",
"name": "Sarah Caring",
"role": "agent",
"agent": true,
"two_factor_authentication_enabled": true,
"picture": {
"thumb20": "https://secure.gravatar.com/avatar/user.png?r=PG&s=20",
"thumb24": "https://secure.gravatar.com/avatar/user.png?r=PG&s=24",
"thumb32": "https://secure.gravatar.com/avatar/user.png?r=PG&s=32",
"thumb48": "https://secure.gravatar.com/avatar/user.png?r=PG&s=48",
"thumb64": "https://secure.gravatar.com/avatar/user.png?r=PG&s=64",
"thum128": "https://secure.gravatar.com/avatar/user.png?r=PG&s=128",
"thum256": "https://secure.gravatar.com/avatar/user.png?r=PG&s=256"
},
"can_members_access_group_tickets": null,
"email_domains": [ ],
"members_count": 0,
"active_tickets_count": 0,
"requested_tickets_count": 0,
"teams": [ ]
}
}
```
--------------------------------
### Get Reports - Replies Count
Source: https://supportbee.com/docs/api/reference
Returns data points for the count of replies. This endpoint is available to admins only.
```APIDOC
## GET /reports/replies_count
### Description
Returns data points for replies' count.
### Method
GET
### Endpoint
https://{company}.supportbee.com/reports/replies_count
### Parameters
#### Query Parameters
- **user** (integer) - ID of the agent to filter data points on.
- **team** (integer) - ID of the team to filter data points on.
- **label** (string) - Name of the label to filter data points on.
- **since** (Date | DateTime | Timestamp) - Filter data points since this date/time.
#### Header Parameters
- **Accept** (string) - Required. Must be set to "application/json".
```
--------------------------------
### Sample Ticket Response (JSON)
Source: https://supportbee.com/docs/api/reference
This is a sample JSON response for a ticket, illustrating its structure and fields.
```json
{
"ticket": {
"id": 1,
"subject": "Welcome to SupportBee",
"replies_count": 0,
"comments_count": 0,
"last_activity_at": "2001-02-15T04:05:06+07:00",
"created_at": "2001-02-15T04:05:06+07:00",
"unanswered": true,
"archived": false,
"spam": false,
"summary": "test -- Regards, Agent",
"source": [
"test@company.com"
],
"cc": [ ],
"bcc": [ ],
"labels": [ ],
"requester": {
"id": 21,
"email": "test@company.com",
"name": "Robert Requester",
"role": "customer",
"agent": false,
"picture": [
{
"thumb20": "https://secure.gravatar.com/avatar/user.png?r=PG&s=20",
"thumb24": "https://secure.gravatar.com/avatar/user.png?r=PG&s=24",
"thumb32": "https://secure.gravatar.com/avatar/user.png?r=PG&s=32",
"thumb48": "https://secure.gravatar.com/avatar/user.png?r=PG&s=48",
"thumb64": "https://secure.gravatar.com/avatar/user.png?r=PG&s=64",
"thum128": "https://secure.gravatar.com/avatar/user.png?r=PG&s=128",
"thum256": "https://secure.gravatar.com/avatar/user.png?r=PG&s=256"
}
]
},
"content": {
"text": "test\n\n-- \nRegards,\nAgent",
"html": "test
--
Regards,
Agent
",
"attachments": [
{
"id": 2,
"created_at": "2001-02-15T04:05:06+07:00",
"filename": "logo.jpg",
"content_type": "image/jpeg; charset=UTF-8; name=logo.jpg",
"url": {
"original": "http://company.example.com/attachments/2",
"thumb": "http://company.example.com/attachments/2?version=thumb"
}
}
]
},
"current_user_asignee": {
"id": 19,
"email": "test@company.com",
"name": "John Doe",
"agent": true,
"picture": [
{
"thumb20": "https://secure.gravatar.com/avatar/user.png?r=PG&s=20",
"thumb24": "https://secure.gravatar.com/avatar/user.png?r=PG&s=24",
"thumb32": "https://secure.gravatar.com/avatar/user.png?r=PG&s=32",
"thumb48": "https://secure.gravatar.com/avatar/user.png?r=PG&s=48",
"thumb64": "https://secure.gravatar.com/avatar/user.png?r=PG&s=64",
"thum128": "https://secure.gravatar.com/avatar/user.png?r=PG&s=128",
"thum256": "https://secure.gravatar.com/avatar/user.png?r=PG&s=256"
}
]
},
"current_team_asignee": {
"id": 1,
"name": "Team 1",
"agent": false,
"picture": [
{
"thumb20": "https://secure.gravatar.com/avatar/user.png?r=PG&s=20",
"thumb24": "https://secure.gravatar.com/avatar/user.png?r=PG&s=24",
"thumb32": "https://secure.gravatar.com/avatar/user.png?r=PG&s=32",
"thumb48": "https://secure.gravatar.com/avatar/user.png?r=PG&s=48",
"thumb64": "https://secure.gravatar.com/avatar/user.png?r=PG&s=64",
"thum128": "https://secure.gravatar.com/avatar/user.png?r=PG&s=128",
"thum256": "https://secure.gravatar.com/avatar/user.png?r=PG&s=256"
}
]
}
}
}
```
--------------------------------
### Get Reports - Tickets Count
Source: https://supportbee.com/docs/api/reference
Returns data points for the count of tickets. This endpoint is available to admins only.
```APIDOC
## GET /reports/tickets_count
### Description
Returns data points for tickets' count.
### Method
GET
### Endpoint
https://{company}.supportbee.com/reports/tickets_count
### Parameters
#### Query Parameters
- **user** (integer) - ID of the agent to filter data points on.
- **team** (integer) - ID of the team to filter data points on.
- **label** (string) - Name of the label to filter data points on.
- **since** (Date | DateTime | Timestamp) - Filter data points since this date/time.
#### Header Parameters
- **Accept** (string) - Required. Must be set to "application/json".
```
--------------------------------
### Hide Launcher and Open on Link Click
Source: https://supportbee.com/docs/email-setup/using-contact-forms
Configure the widget to hide the default launcher and open the contact form when a specific link is clicked. Ensure the link has the 'data-controls-modal' attribute.
```javascript
var hive = new SupportBeeHive({ company: 'muziboodemo' });
hive.init({
widget: 'contact',
forwarding_address_id: 314,
// Add this to your code
launcher: {
hidden: true,
},
});
```
```plaintext
Contact Us
```
--------------------------------
### 200 OK Response Sample for Reply
Source: https://supportbee.com/docs/api/reference
This is a sample JSON response for a successful reply operation, detailing ticket information, replier details, and content.
```json
{
"id": 1,
"created_at": "2001-02-15T04:05:06+07:00",
"summary": "Reply Content",
"cc": [ ],
"bcc": [ ],
"ticket": {
"replies_count": 2,
"comments_count": 0
},
"replier": {
"id": 1,
"email": "person2@example.com",
"name": "Agent Argentus",
"agent": true,
"picture": {
"thumb20": "https://secure.gravatar.com/avatar/user.png?r=PG&s=20",
"thumb24": "https://secure.gravatar.com/avatar/user.png?r=PG&s=24",
"thumb32": "https://secure.gravatar.com/avatar/user.png?r=PG&s=32",
"thumb48": "https://secure.gravatar.com/avatar/user.png?r=PG&s=48",
"thumb64": "https://secure.gravatar.com/avatar/user.png?r=PG&s=64",
"thum128": "https://secure.gravatar.com/avatar/user.png?r=PG&s=128",
"thum256": "https://secure.gravatar.com/avatar/user.png?r=PG&s=256"
}
},
"content": {
"body": "Reply Content",
"html": null,
"attachments": [ ]
}
}
```
--------------------------------
### Create User
Source: https://supportbee.com/docs/api/reference
Creates a new user in SupportBee. Supports JSON payload for user details.
```APIDOC
## POST /users
### Description
Creates a new user in SupportBee.
### Method
POST
### Endpoint
https://{company}.supportbee.com/users
### Request Body
- **user** (object) - Required - User object containing details.
- **email** (string) - Required - The email address of the user.
- **name** (string) - Required - The full name of the user.
- **role** (integer) - Required - The role of the user (e.g., 10 for agent).
- **team_ids** (array) - Optional - List of team IDs the user belongs to.
- **type** (string) - Required - Type of the entity, should be "user".
### Request Example
```json
{
"user": {
"email": "test@example.com",
"name": "Test Name",
"role": 10,
"team_ids": [ ],
"type": "user"
}
}
```
### Response
#### Success Response (201)
Returns the created user object.
- **user** (object) - The created user details.
#### Response Example
```json
{
"user": {
"id": 1,
"type": "user",
"email": "person2@example.com",
"first_name": "Sarah",
"last_name": "Caring",
"name": "Sarah Caring",
"role": "agent",
"agent": true,
"two_factor_authentication_enabled": true,
"picture": {
"thumb20": "https://secure.gravatar.com/avatar/user.png?r=PG&s=20",
"thumb24": "https://secure.gravatar.com/avatar/user.png?r=PG&s=24",
"thumb32": "https://secure.gravatar.com/avatar/user.png?r=PG&s=32",
"thumb48": "https://secure.gravatar.com/avatar/user.png?r=PG&s=48",
"thumb64": "https://secure.gravatar.com/avatar/user.png?r=PG&s=64",
"thum128": "https://secure.gravatar.com/avatar/user.png?r=PG&s=128",
"thum256": "https://secure.gravatar.com/avatar/user.png?r=PG&s=256"
},
"can_members_access_group_tickets": null,
"email_domains": [ ],
"members_count": 0,
"active_tickets_count": 0,
"requested_tickets_count": 0,
"teams": [ ]
}
}
```
```
--------------------------------
### Fetch Ticket Replies API Endpoint
Source: https://supportbee.com/docs/api/reference
Use this GET endpoint to retrieve all replies for a specific ticket. Requires the ticket ID and an 'Accept: application/json' header.
```http
get/tickets/{id}/replies
```
--------------------------------
### 200 OK Response Sample for Fetch Snippets
Source: https://supportbee.com/docs/api/reference
This JSON response lists all snippets for the company, including their ID, creation date, name, tags, and content.
```json
{
"snippets": [
{
"id": 4,
"created_at": "2001-02-15T04:05:06+07:00",
"name": "Facebook Link",
"tags": "facebook, link",
"content": {
"text": "Facebook",
"html": ""
}
}
]
}
```
--------------------------------
### Create Rule Response Sample
Source: https://supportbee.com/docs/api/reference
This JSON indicates a successful creation of a rule, returning the rule's ID.
```json
{
"rule": {
"id": "5_20130430051603"
}
}
```
--------------------------------
### Search Tickets API Endpoint
Source: https://supportbee.com/docs/api/reference
This describes the GET endpoint for searching tickets. It requires a query parameter and accepts optional parameters for pagination and filtering by spam or trash status. The Accept header must be 'application/json'.
```http
GET https://{company}.supportbee.com/tickets/search?query=&per_page=&page=&spam=&trash=
Accept: application/json
```
--------------------------------
### Response Sample: Fetching Teams
Source: https://supportbee.com/docs/api/reference
This JSON response lists the teams available in the company, including their IDs, names, and associated picture URLs.
```json
{
"teams": [
{
"id": 2,
"name": "Team 1",
"picture": {
"thumb20": "https://secure.gravatar.com/avatar/user.png?r=PG&s=20",
"thumb24": "https://secure.gravatar.com/avatar/user.png?r=PG&s=24",
"thumb32": "https://secure.gravatar.com/avatar/user.png?r=PG&s=32",
"thumb48": "https://secure.gravatar.com/avatar/user.png?r=PG&s=48",
"thumb64": "https://secure.gravatar.com/avatar/user.png?r=PG&s=64",
"thum128": "https://secure.gravatar.com/avatar/user.png?r=PG&s=128",
"thum256": "https://secure.gravatar.com/avatar/user.png?r=PG&s=256"
}
}
]
}
```
--------------------------------
### Create a user or customer group
Source: https://supportbee.com/docs/api/reference
Creates a new user or a customer group for the company.
```APIDOC
## POST /users
### Description
Creates a user or customer group for the company.
### Method
POST
### Endpoint
https://{company}.supportbee.com/users
### Header Parameters
- **Accept** (string) - Required - Must be set to application/json.
### Request Body
- **user** (object) - Required - Object containing user details.
- **customer_group** (object) - Required - Object containing customer group details.
*Note: Either 'user' or 'customer_group' must be provided in the request body.
```
--------------------------------
### Response sample for adding a comment
Source: https://supportbee.com/docs/api/reference
This is a sample response when a comment is successfully added to a ticket.
```json
{
"comment": {
"id": 1,
"created_at": "2001-02-15T04:05:06+07:00",
"ticket": {
"replies_count": 0,
"comments_count": 1
},
"commenter": {
"id": 1,
"email": "person2@example.com",
"name": "Agent1",
"agent": true,
"picture": {
"thumb20": "https://secure.gravatar.com/avatar/user.png?r=PG&s=20",
"thumb24": "https://secure.gravatar.com/avatar/user.png?r=PG&s=24",
"thumb32": "https://secure.gravatar.com/avatar/user.png?r=PG&s=32",
"thumb48": "https://secure.gravatar.com/avatar/user.png?r=PG&s=48",
"thumb64": "https://secure.gravatar.com/avatar/user.png?r=PG&s=64",
"thum128": "https://secure.gravatar.com/avatar/user.png?r=PG&s=128",
"thum256": "https://secure.gravatar.com/avatar/user.png?r=PG&s=256"
}
},
"content": {
"text": "test\n\n-- \nRegards,\nAgent",
"html": "test
--
Regards,Agent
",
"attachments": [
{
"id": 2,
"created_at": "2001-02-15T04:05:06+07:00",
"filename": "logo.jpg",
"content_type": "image/jpeg; charset=UTF-8; name=logo.jpg",
"url": {
"original": "http://company.example.com/attachments/2",
"thumb": "http://company.example.com/attachments/2?version=thumb"
}
}
]
}
}
}
```
--------------------------------
### Create Snippet Response (201)
Source: https://supportbee.com/docs/api/reference
This is a sample successful response when a snippet is created. It includes the snippet's ID and creation timestamp.
```json
{
"snippet": {
"id": 4,
"created_at": "2001-02-15T04:05:06+07:00",
"name": "Facebook Link",
"tags": "facebook, link",
"content": {
"text": "Facebook",
"html": ""
}
}
}
```
--------------------------------
### Attachment Response Sample
Source: https://supportbee.com/docs/api/reference
A successful response when creating an attachment, detailing the attachment's ID, creation timestamp, filename, content type, and URLs for different versions.
```json
{
"id": 2,
"created_at": "2001-02-15T04:05:06+07:00",
"filename": "logo.jpg",
"content_type": "image/jpeg; charset=UTF-8; name=logo.jpg",
"url": {
"original": "http://company.example.com/attachments/2",
"thumb": "http://company.example.com/attachments/2?version=thumb"
}
}
```
--------------------------------
### 200 OK Response Sample for Average First Response Time
Source: https://supportbee.com/docs/api/reference
This JSON response provides data points for the average first response time, including values and timestamps.
```json
{
"data_points": [
{
"value": "42",
"timestamp": "1360627200"
}
]
}
```
--------------------------------
### Fetch Emails Response Sample
Source: https://supportbee.com/docs/api/reference
This JSON object represents a sample response when fetching emails, containing a list of forwarding addresses.
```json
{
"forwarding_addresses": [
{
"id": 1,
"forward_to": "rluwmwqanfrivrggh@supportbeemail.com",
"from": "example@example.com",
"name": "Company Inc"
}
]
}
```
--------------------------------
### Create Snippet
Source: https://supportbee.com/docs/api/reference
Creates a new snippet with provided details.
```APIDOC
## Create Snippet
Creates a snippet.
##### Request Body schema: application/json
snippet| object
name| string
tags| string
content| object
text| string
html| string
### Responses
**201**
Snippet created
**400**
Validation errors.
## POST /snippets
### Request Example
```json
{
"snippet": {
"name": "Facebook Link",
"tags": "facebook, link",
"content": {
"text": "Facebook",
"html": ""
}
}
}
```
### Response Example (201)
```json
{
"snippet": {
"id": 4,
"created_at": "2001-02-15T04:05:06+07:00",
"name": "Facebook Link",
"tags": "facebook, link",
"content": {
"text": "Facebook",
"html": ""
}
}
}
```
```
--------------------------------
### Sample Ticket Response (200 OK)
Source: https://supportbee.com/docs/api/reference
This JSON object represents a successful response when retrieving a single ticket. It includes details about the ticket, its requester, content, and assignees.
```json
{
"total": 1,
"current_page": 1,
"per_page": 10,
"total_pages": 1,
"tickets": [
{
"id": 1,
"subject": "Welcome to SupportBee",
"replies_count": 0,
"comments_count": 0,
"last_activity_at": "2001-02-15T04:05:06+07:00",
"created_at": "2001-02-15T04:05:06+07:00",
"unanswered": true,
"archived": false,
"spam": false,
"summary": "test -- Regards, Agent",
"source": [
"test@company.com"
],
"cc": [ ],
"bcc": [ ],
"labels": [ ],
"requester": {
"id": 21,
"email": "test@company.com",
"name": "Robert Requester",
"role": "customer",
"agent": false,
"picture": [
{
"thumb20": "https://secure.gravatar.com/avatar/user.png?r=PG&s=20",
"thumb24": "https://secure.gravatar.com/avatar/user.png?r=PG&s=24",
"thumb32": "https://secure.gravatar.com/avatar/user.png?r=PG&s=32",
"thumb48": "https://secure.gravatar.com/avatar/user.png?r=PG&s=48",
"thumb64": "https://secure.gravatar.com/avatar/user.png?r=PG&s=64",
"thum128": "https://secure.gravatar.com/avatar/user.png?r=PG&s=128",
"thum256": "https://secure.gravatar.com/avatar/user.png?r=PG&s=256"
}
]
},
"content": {
"text": "test\n\n-- \nRegards,\nAgent",
"html": "test
--
Regards,Agent
",
"attachments": [
{
"id": 2,
"created_at": "2001-02-15T04:05:06+07:00",
"filename": "logo.jpg",
"content_type": "image/jpeg; charset=UTF-8; name=logo.jpg",
"url": {
"original": "http://company.example.com/attachments/2",
"thumb": "http://company.example.com/attachments/2?version=thumb"
}
}
]
},
"current_user_asignee": {
"id": 19,
"email": "test@company.com",
"name": "John Doe",
"agent": true,
"picture": [
{
"thumb20": "https://secure.gravatar.com/avatar/user.png?r=PG&s=20",
"thumb24": "https://secure.gravatar.com/avatar/user.png?r=PG&s=24",
"thumb32": "https://secure.gravatar.com/avatar/user.png?r=PG&s=32",
"thumb48": "https://secure.gravatar.com/avatar/user.png?r=PG&s=48",
"thumb64": "https://secure.gravatar.com/avatar/user.png?r=PG&s=64",
"thum128": "https://secure.gravatar.com/avatar/user.png?r=PG&s=128",
"thum256": "https://secure.gravatar.com/avatar/user.png?r=PG&s=256"
}
]
},
"current_team_asignee": {
"id": 1,
"name": "Team 1",
"agent": false,
"picture": [
{
"thumb20": "https://secure.gravatar.com/avatar/user.png?r=PG&s=20",
"thumb24": "https://secure.gravatar.com/avatar/user.png?r=PG&s=24",
"thumb32": "https://secure.gravatar.com/avatar/user.png?r=PG&s=32",
"thumb48": "https://secure.gravatar.com/avatar/user.png?r=PG&s=48",
"thumb64": "https://secure.gravatar.com/avatar/user.png?r=PG&s=64",
"thum128": "https://secure.gravatar.com/avatar/user.png?r=PG&s=128",
"thum256": "https://secure.gravatar.com/avatar/user.png?r=PG&s=256"
}
]
}
}
]
}
```
--------------------------------
### Fetch users and customer groups
Source: https://supportbee.com/docs/api/reference
Retrieves all users and customer groups for the company. Can optionally include invited agents and filter by roles or type.
```json
{
"users": [
{
"id": 1,
"type": "user",
"email": "person2@example.com",
"first_name": "Sarah",
"last_name": "Caring",
"name": "Sarah Caring",
"role": "agent",
"agent": true,
"two_factor_authentication_enabled": true,
"picture": {
"thumb20": "https://secure.gravatar.com/avatar/user.png?r=PG&s=20",
"thumb24": "https://secure.gravatar.com/avatar/user.png?r=PG&s=24",
"thumb32": "https://secure.gravatar.com/avatar/user.png?r=PG&s=32",
"thumb48": "https://secure.gravatar.com/avatar/user.png?r=PG&s=48",
"thumb64": "https://secure.gravatar.com/avatar/user.png?r=PG&s=64",
"thum128": "https://secure.gravatar.com/avatar/user.png?r=PG&s=128",
"thum256": "https://secure.gravatar.com/avatar/user.png?r=PG&s=256"
},
"can_members_access_group_tickets": null,
"email_domains": [ ],
"members_count": 0,
"active_tickets_count": 0,
"requested_tickets_count": 0,
"teams": [ ]
}
]
}
```
--------------------------------
### Create Ticket
Source: https://supportbee.com/docs/api/reference
Allows for the creation of new tickets within SupportBee.
```APIDOC
## Create Ticket
### Description
Allows for the creation of new tickets within SupportBee.
### Request Example
```json
{
"ticket": {
"subject": "Subject",
"requester_name": "John Doe",
"requester_email": "john@example.com",
"cc": [
"Test1 ",
"Test2 "
],
"bcc": [
"Test3 ",
"Test4 "
],
"notify_requester": false,
"content": {
"text": "Creating a ticket",
"html": "Creating a ticket
",
"attachment_ids": [
1240,
1241
]
},
"forwarding_address_id": ""
}
}
```
### Response Example (201)
```json
{
"id": 1,
"subject": "Welcome to SupportBee",
"replies_count": 0,
"comments_count": 0,
"last_activity_at": "2001-02-15T04:05:06+07:00",
"created_at": "2001-02-15T04:05:06+07:00",
"unanswered": true,
"archived": false,
"spam": false,
"summary": "test -- Regards, Agent",
"source": [
"test@company.com"
],
"cc": [],
"bcc": [],
"labels": [],
"requester": {
"id": 21,
"email": "test@company.com",
"name": "Robert Requester",
"role": "customer",
"agent": false,
"picture": [
{
"thumb20": "https://secure.gravatar.com/avatar/user.png?r=PG&s=20",
"thumb24": "https://secure.gravatar.com/avatar/user.png?r=PG&s=24",
"thumb32": "https://secure.gravatar.com/avatar/user.png?r=PG&s=32",
"thumb48": "https://secure.gravatar.com/avatar/user.png?r=PG&s=48",
"thumb64": "https://secure.gravatar.com/avatar/user.png?r=PG&s=64",
"thum128": "https://secure.gravatar.com/avatar/user.png?r=PG&s=128",
"thum256": "https://secure.gravatar.com/avatar/user.png?r=PG&s=256"
}
]
},
"content": {
"text": "test\n\n-- \nRegards,\nAgent",
"html": "test
--
Regards,Agent
",
"attachments": [
{
"id": 2,
"created_at": "2001-02-15T04:05:06+07:00",
"filename": "logo.jpg",
"content_type": "image/jpeg; charset=UTF-8; name=logo.jpg",
"url": {
"original": "http://company.example.com/attachments/2",
"thumb": "http://company.example.com/attachments/2?version=thumb"
}
}
]
},
"current_user_asignee": {
"id": 19,
"email": "test@company.com",
"name": "John Doe",
"agent": true,
"picture": [
{
"thumb20": "https://secure.gravatar.com/avatar/user.png?r=PG&s=20",
"thumb24": "https://secure.gravatar.com/avatar/user.png?r=PG&s=24",
"thumb32": "https://secure.gravatar.com/avatar/user.png?r=PG&s=32",
"thumb48": "https://secure.gravatar.com/avatar/user.png?r=PG&s=48",
"thumb64": "https://secure.gravatar.com/avatar/user.png?r=PG&s=64",
"thum128": "https://secure.gravatar.com/avatar/user.png?r=PG&s=128",
"thum256": "https://secure.gravatar.com/avatar/user.png?r=PG&s=256"
}
]
},
"current_team_asignee": {
"id": 1,
"name": "Team 1",
"agent": false,
"picture": [
{
"thumb20": "https://secure.gravatar.com/avatar/user.png?r=PG&s=20",
"thumb24": "https://secure.gravatar.com/avatar/user.png?r=PG&s=24",
"thumb32": "https://secure.gravatar.com/avatar/user.png?r=PG&s=32",
"thumb48": "https://secure.gravatar.com/avatar/user.png?r=PG&s=48",
"thumb64": "https://secure.gravatar.com/avatar/user.png?r=PG&s=64",
"thum128": "https://secure.gravatar.com/avatar/user.png?r=PG&s=128",
"thum256": "https://secure.gravatar.com/avatar/user.png?r=PG&s=256"
}
]
}
}
```
```
--------------------------------
### Create Email Request Payload Sample
Source: https://supportbee.com/docs/api/reference
This JSON object represents a sample payload for creating a forwarding address, including name, email, and spam filtering options.
```json
{
"forwarding_address": {
"name": "Company Inc",
"email": "example@example.com",
"filter_spam": true,
"use_agent_name": true
}
}
```
--------------------------------
### Create a Ticket Reply
Source: https://supportbee.com/docs/api/reference
Post a reply to a ticket. Admin users can reply on behalf of an agent. Requires an API key header and specific content type.
```json
{
"reply": {
"on_behalf_of": {
"id": 1,
"email": "agent@example.com"
},
"cc": [ ],
"bcc": [ ],
"content": {
"html": "Reply content
",
"text": "Reply content",
"attachment_ids": [ ]
}
}
}
```