> This is part 1 of 2 of the full documentation (pages 1–100 of 187).
> The content is paginated: fetch every part to see all of it.
> Next part: https://developers.socialboards.com/docs/llms-full.txt/1
> Page index: https://developers.socialboards.com/docs/llms.txt

> Agents can also search and read this documentation through its [MCP server](https://developers.socialboards.com/docs/~gitbook/mcp).

# Developer hub

Socialboards is a customer interaction platform delivered by [Zisson AS](https://www.zisson.com/)[.](https://socialboards.com)

Our platform lets collect, respond and analyze customer support tickets across multiple channels, such as social media, email, chat and webforms.

### GDPR compliance

As Socialboards is a customer support tool, our data contains personal information which is subject to the General Data Protection Regulation (GDPR).

When you use our APIs and Webhooks, our business terms require that you have an appropriate legal basis to collect and process User information. Under GDPR and other EU data protection regulations, you are required to obtain end User consent before sending data via our platform. Thus, you need to ensure that your implementation meets these consent requirements.

## What this documentation covers

This documentation targets developers who want to communicate programmatically with the Socialboards platform. You'll find all the documentation you need to use [webhooks](https://developers.socialboards.com/docs/apis/tickets/webhooks/webhooks-reference#getting-started) and api's to integrate ticketing and faq's into your own or 3rd party applications.

[In the security section](https://developers.socialboards.com/docs/security/introduction), we've also covered subjects such as datacenter- and network-security, application and product security, and an overview of our dataprocessors/subcontractors.

## Getting access to the platform

If you don't have a user for our platform yet you can contact us at <https://www.zisson.com/contact-us/> to get an invite.

If you have an account you can also invite more members to the platform yourself via your Socialboards settings page. Note that these actions require you to have administrator privileges.

### All set? Let's start integrating!

If you're all set you can move on to getting started with the [Ticket API](https://developers.socialboards.com/docs/apis/tickets).


# Ticket API

Integrate ticket handling in 3rd party systems.

Welcome to our API reference for the Ticket API. This documentation includes information about how to ..

* [create a Socialboards account](https://socialboards.com/en/free-trial/)
* [use authentication headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers)
* [create tickets](https://developers.socialboards.com/docs/apis/tickets/tickets)
* [handle categories](https://developers.socialboards.com/docs/apis/tickets/categories)
* [handle custom fields](https://developers.socialboards.com/docs/apis/tickets/custom-fields)
* [work with webhooks](https://developers.socialboards.com/docs/apis/tickets/webhooks)

If you have little or no experience with Socialboards, you might find the[ Glossary](https://developers.socialboards.com/docs/apis/tickets/glossary) useful, which explains key components of an Inbox and how they function.

For information about changes to our APIs, check out the [changelog](https://developers.socialboards.com/docs/updates/changelog).

Need help? Please contact us at <https://www.zisson.com/contact-us/> if you have trouble gaining account access, or have questions.


# Getting Started

This document explains how to successfully call the Socialboards Ticket API.

### Before you start

* You'll need access to a Socialboards account. If you don't have one already, please contact us at <https://www.zisson.com/contact-us/>.\\
* Read through our [Guidelines](https://developers.socialboards.com/docs/apis/tickets/getting-started/guidelines-and-data-privacy) on how to we expect you to handle data privacy.

####


# Guidelines and data privacy

We're thrilled that you're getting ready to build great integrations with our platform 🚀please follow these guidelines - with special emphasis on securing our customers' data - to comply with Socialboards policies and GDPR regulations.

**Keeping our customers' data secure is our #1 priority.** We go to considerable lengths to ensure that all data sent to and from Socialboards is handled securely, and we expect the same from you.

1. You must have a valid data protection agreement with the data controller in which you collect data from.\\
2. You must have appropriate measures in place to protect any information you receive from Socialboards against unauthorized access or use.\\
3. You must be able to meet the requirements of the European Union's General Data Protection Regulation (GDPR) for any data you process which falls within the scope of the legislation and fulfill subject access requests as required. \\
4. In addition to breach notifications required under GDPR, you'll notify Socialboards of any personal data breaches within 72 hours of becoming aware of a breach.\\
5. You must grant Socialboards permission to audit your data processing activities. This can include independently produced audit reports.

Now that our lawyers have said their legal bits, lets get into building some integrations 😄


# Authorization

Supported versions

Authorization uses pairs of `Access` and `Refresh` tokens. Access token is short-lived and can be generated by using a refresh token. The detailed description how to obtain a new token you can find in this [document](https://developers.socialboards.com/docs/apis/tickets/authorization-headers/access-tokens-v2).

This version of API requires only one authorization header, you don't need to specify the `Community` header.\
Authorization header with access token must look like:\
\
`Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJjaWQiOi...`

{% hint style="info" %}
For more information about Inboxes, check out the [Glossary](https://developers.socialboards.com/docs/apis/tickets/glossary).
{% endhint %}


# Access tokens

Generating and obtaining tokens for Ticket api

## Tokens

The second version of the Ticket API supports authorization scheme with refresh + access tokens. To work with it you'll need to use access and refresh tokens.

* Access tokens is short-lived token (an hour) and they allow your app to access the Ticket API.
* Refresh tokens allow you to create new access tokens. They must be saved in a secure place.

All API endpoints require an access token, so each time you access an endpoint, your request must have one.

### Usage scheme

All refresh tokens must be stored and used in secure way. Refresh tokens supposed to be used from your server to create new access tokens (server to server call) which can be transferred to your client's application and then client's application can call the Ticket API.

![](https://2431752220-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtYGNIjppwv_B_BcVqC%2F-M11Y8qigw3zMZ5uEptt%2F-M11_L9DcHO5BMmT-wHr%2Fimage.png?alt=media\&token=0472a5f0-8e07-441b-b71b-2e4713819e05)

So when your client's application needs to call the Ticket API, it can use existed access token or calls your server side application, to get a new access token. The server side application can return active access token or obtain a new one from the Ticket API.

### How to Get a Refresh Token

Open Settings by clicking on your user’s avatar in the top right corner of inbox and choosing “Settings”.

![](https://lh3.googleusercontent.com/mdh4CyiMxx7Ij_4tJ_aL8z91BRgvxDPF2lebkmgIspR5D5PE9gvfXSDyQlhaU0eqJ_XWMMERbm-40eLeGUGk2E8njwFeIjWXf-csoVYhseAaC2TSmBP_UJoVaXUgpRMHLMQuEXAG)

![](https://lh5.googleusercontent.com/aOoIaPy3W0MdnvHQEvZNoyZOx9YhX6pqktIOSrmh4SNgp36rpIF1e5qmUHaI8eTD5sRpPdQTI_8baqKTCi94kx234ehiw1SntTfGus2YPhYa-mYPPib_ogS4-lyc4WkSKB7J89Pj)

Open “Installation” tab.

![](https://lh5.googleusercontent.com/zw0jzcVrDPdH5aHNBAfLUFV15CusgE_jbRCgkhsFP0y0S5eWumTnPaMSdW_vvDB1QKwxxWcNyXI1CI3GpzfJFXv5XYQxQC2TJi9r2VasMkEvLTRADnFZtCU2TCAuXwVEmav_rhNT)

Open “Public API” tab.

![](https://lh4.googleusercontent.com/Ip2oXHhzBKJ2oDU_iLsn5stiyD04xENKUw-qQwgbnWZwZN5fMOwGa1yIWdar5-UNRBYBlB616c_GGYohLWFtQQwD9hTFz1s7uEApQMq-JeU2Zjp_MtSKwF-dTdSiRTHhm4IWN7VD)

On this page you can see your Client ID and create/delete your refresh tokens.\
Client ID and one of our refresh tokens are required to create short-lived access tokens.

During creating a new refresh token you will need to specify the name for this token, it could describe purposes for which do you want to use this token.

![](https://2431752220-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtYGNIjppwv_B_BcVqC%2F-M0rQhM_8IvpYaa3wCXW%2F-M0rXO1_lcDHl3MC8Nug%2Fimage.png?alt=media\&token=663d09e5-7f35-46e6-b62e-b55961955c88)

To create new access token you need to send the following request:

```
POST https://api.socialboards.com/token
```

Obtaining new access tokens requires specifying 3 parameters: `client_id`, `refresh_token`, `grant_type`

A body of this particular request should be sent in `x-www-form-urlencoded` data format.

#### Parameters

| Name           |  Type  | Required | Comments                        |
| -------------- | :----: | :------: | ------------------------------- |
| grant\_type    | string |    yes   | Must be set to 'refresh\_token' |
| refresh\_token | string |    yes   | One of your refresh tokens      |
| client\_id     | string |    yes   | Your Client ID                  |

#### Response

```
{
    "access_token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJjaWQiOiIxIiwidHlwZSI6IkNvbW11bml0eSIsIm5iZiI6MTU4MjU1ODU1MiwiZXhwIjoxNTgyNTYyMTUyLCJpc3MiOiJzb2NpYWxib2FyZHMuY29tIiwiYXVkIjoiZjUyNWExNzAtOWM4OS00MGI3LWE2ODctNjczZWZkN2YyMThiIn0.rXiErxy4IlvhNs10Ovwg61mAa4cX36_E2Rw3nghD0R7KfxuIkeXBmQgPagqfEL1gk6d-W5pNQ_py2h3p23zM_g",
    "token_type": "bearer",
    "expires_in": 3599,
    "refresh_token": "c5ngLXd0zVrgN6U7jdAw2EOGd9fj0GkZEFOvdd6yEHo="
}
```

`access_token` from the response can be used as Bearer token to call endpoints.

You need to set it into `Authorization` header in the following way:\
\
`Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJjaWQiOi...`


# Categories

#### Available operations with categories:

* [Get Category By Id](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/get-category-by-id)
* [Get Full Community Category List](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/get-community-category-list)
* [Get Subcategories by Parent Id](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/get-subcategories-by-parent-id)

{% hint style="info" %}
For more information about Categories and their function, check out the [Glossary](https://developers.socialboards.com/docs/apis/tickets/glossary#categories).
{% endhint %}


# Custom Fields

#### Available operations with custom fields:

* [Add Custom Field](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/add-custom-field)
* [Delete Custom Field](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/delete-custom-field)
* [Get Custom Field](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/get-custom-field)
* [Get Full Community Custom Field List](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/get-community-custom-fields)
* [Update Custom Field](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/update-custom-field)

{% hint style="info" %}
For more information about Custom Fields and their function, check out the [Glossary](https://developers.socialboards.com/docs/apis/tickets/glossary#custom-fields).
{% endhint %}


# Action Log

#### Available operations with ticket action log:

* [Get Ticket Log](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/get-ticket-log)


# Notes

#### Available operations with notes:

* [Add Note To Ticket](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/add-note-to-ticket)
* [Update Note](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/update-note)
* [Delete Note](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/delete-note)


# Replies

#### Available operations with replies:

* [Create Reply](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/create-reply)
* [List Replies](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/list-replies)


# Tags

#### Available operations with tags:

* [List Tags](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/list-tags)
* [Replace Ticket Tags](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/replace-ticket-tags)
* [Replace Reply Tags](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/replace-reply-tags)

{% hint style="info" %}
For more information about Tags, check out the [Glossary](https://developers.socialboards.com/docs/apis/tickets/glossary#Tags).
{% endhint %}


# Tickets

#### Available operations with tickets:

* [Create Ticket](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/create-ticket)
* [Get Ticket by Id](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/get-ticket-by-id)
* [Get Ticket Log](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/get-ticket-log)
* [List Tickets](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/list-tickets)
* [List Ticket Ids By Field Ids](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/list-ticket-ids-by-field-ids)
* [Update Ticket Assignee](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/update-ticket-assignee)
* [Update Ticket Category](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/update-ticket-category)
* [Update Ticket Custom Field Value](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/update-ticket-custom-field-value)
* [Update Ticket Status](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/update-ticket-status)

{% hint style="info" %}
For more information about Tickets, check out the [Glossary](https://developers.socialboards.com/docs/apis/tickets/glossary#tickets).
{% endhint %}


# Teammates

#### Available operations with teammates:

* [Get All Teammates](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/get-all-teammates)


# User Groups

#### Available operations with user groups:

* [Get All User Groups for Community](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/get-all-community-user-groups)


# Widgets

#### Available operations with widgets:

* [Get Widget Schedule List](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/get-widget-schedule-list)


# Webhooks

Webhooks allows you to receive real-time HTTP notifications of changes to specific objects in Socialboards. For example, we could send you a notification when new ticket comes into the system or whenever they reply came to the existing ticket. This prevents you from having to query the API for changes that may or may not have happened.

{% hint style="warning" %}
Make sure you have the [appropriate legal basis](https://developers.socialboards.com/docs/apis/tickets/getting-started/guidelines-and-data-privacy) to collect and process client data before using webhooks.
{% endhint %}

### **Objects and Events**

There are many types of objects in the Socialboards, such as Ticket objects and Reply objects, so whenever you configure a Webhook you must first choose an object type. Different objects support different events, so make sure you [subscribe to events](https://developers.socialboards.com/docs/apis/tickets/webhooks/configure-the-webhooks) for that object type. Whenever such an event happens, we'll send you a notification.

Notifications are sent to you as HTTP POST requests and contain a JSON payload for that event. For example, let's say you set up a “Ticket” Webhook and subscribed to “Status changed” event. If the ticket’s status is changed from “pending” to “open”, we'll send you a notification that would look like this:

{% code lineNumbers="true" fullWidth="true" %}

```json
{
	"CommunityName": "yourCompany",
	"EventType": "ticket_status_change",
	"TicketId": 4478963
	"Events": [
		{
			"InboxLink": "https://inbox.socialboards.com/yourCompany/tickets?ticketId=4478963",
			"PreviousTicketStatus": "open",
			"Ticket": {
				"Author": {
					"CustomIdentifier": null,
					"Id": "35692164-bfaa-4c49-a23c-ecfa618f7d20",
					"Name": "Robert Baker",
					"Image": null,
					"Email": "robert78baker@gmail.com",
					"Status": "client",
					"IsBot": false
				},
				"Category": {
					"Id": 15721,
					"Name": "Other cases",
					"Parents": []
				},
				"CreationTime": "2019-12-17T08:03:48.318717+01:00",
				"DetailedSource": "web_website",
				"Id": 4478963,
				"LastThreadElementCreationTime": "2019-12-17T08:10:03.8181291+01:00",
				"LockedBy": null,
				"Message": "I want to take my cat to a vet",
				"OriginalLink": null,
				"Properties": {
					"IsAnonymized": false,
					"IsMuted": false,
					"HasAttachments": false,
					"HasDraft": false,
					"IsAssignedToBot": false,
					"IsDeleted": false,
					"IsExpired": false,
					"IsHidden": false,
					"IsLocked": false,
					"IsSpam": false,
					"IsSensitive": false
				},
				"ReplyCount": 1,
				"Sentiment": "question",
				"Source": "web",
				"SourceName": null,
				"Status": "pending",
				"Title": "Cat is ill",
				"HtmlMessage": "I want to take my cat to a vet"
			},
			"TicketId": 4478963
		}
	]
}


```

{% endcode %}

### HTTPS Servers

Webhooks are sent using HTTPS, so your server must be able to receive and process HTTPS requests, and it must have a valid TLS/SSL certificate installed. Self-signed certificates are not supported.

### **Setup**

To use Webhooks, you will need to set up an endpoint on a secure (HTTPS) server, then add and configure the Webhooks product in your inbox settings. The rest of these documents explain how to complete both of these steps.


# Getting Started

Setting up any Webhook requires you to:

1. Access to a Socialboards account. If you don't have one, [create a Socialboards account here](https://socialboards.com/en/free-trial/)
2. [Create an Endpoint ](https://developers.socialboards.com/docs/apis/tickets/webhooks/create-endpoint)on a secure server that can process HTTPS requests
3. [Configure the Webhooks ](https://developers.socialboards.com/docs/apis/tickets/webhooks/configure-the-webhooks)product in your community settings
4. [Testing your webhooks](https://developers.socialboards.com/docs/apis/tickets/webhooks/testing-your-webhooks) setup by 3rd party service


# Create Endpoint

Your endpoint must be able to process two types of HTTPS requests: Verification Requests and Event Notifications. Since both requests use HTTPs, your server must have a valid TLS or SSL certificate correctly configured and installed. Self-signed certificates are not supported.

The sections below explain what will be in each type of request and how to respond to them.

**Verification Requests**

Anytime you configure the Webhooks product in your community settings page, we'll send a GET request to your endpoint URL. Verification requests include the following query string parameters, appended to the end of your endpoint URL. They will look something like this:

```
GET https://www.your_domain_name.com/webhooks?
  challenge=2135675231&
  verifyToken=someverificationtoken
```

**Validating Verification Requests**

Whenever your endpoint receives a verification request, it must:

* Verify that the *`verifyToken`* value matches the string you set in the **Verify Token** field when you configure the Webhooks product in your community settings.

  (you will set up this token during configuring webhooks).
* Respond body should should contain `challenge` value.

#### Event Notifications

When you configure your Webhooks product, you will subscribe to specific events on an object type (e.g., the status change event on the ticket object). Whenever such event happened, we will send your endpoint a POST request with a JSON payload describing the change. For example, let's say you set up a “Ticket”

Webhook and subscribed to “Status changed” event. If ticket’s status was changed from “open” to “pending”, we'd send you a notification that would look like this:

```json
{
	"CommunityName": "yourCompany",
	"EventType": "ticket_status_change",
	"Events": [
		{
			"InboxLink": "https://inbox.socialboards.com/yourCompany/tickets?ticketId=4478963",
			"PreviousTicketStatus": "open",
			"Ticket": {
				"Author": {
					"CustomIdentifier": null,
					"Id": "35692164-bfaa-4c49-a23c-ecfa618f7d20",
					"Name": "Robert Baker",
					"Image": null,
					"Email": "robert78baker@gmail.com",
					"Status": "client",
					"IsBot": false
				},
				"Category": {
					"Id": 15721,
					"Name": "Other cases",
					"Parents": []
				},
				"CreationTime": "2019-12-17T08:03:48.318717+01:00",
				"DetailedSource": "web_website",
				"Id": 4478963,
				"LastThreadElementCreationTime": "2019-12-17T08:10:03.8181291+01:00",
				"LockedBy": null,
				"Message": "I want to take my cat to a vet",
				"OriginalLink": null,
				"Properties": {
					"IsAnonymized": false,
					"IsMuted": false,
					"HasAttachments": false,
					"HasDraft": false,
					"IsAssignedToBot": false,
					"IsDeleted": false,
					"IsExpired": false,
					"IsHidden": false,
					"IsLocked": false,
					"IsSpam": false,
					"IsSensitive": false
				},
				"ReplyCount": 1,
				"Sentiment": "question",
				"Source": "web",
				"SourceName": null,
				"Status": "pending",
				"Title": "Cat is ill",
				"HtmlMessage": "I want to take my cat to a vet"
			},
			"TicketId": 4478963
		}
	]
}

```

**Payload Contents**

We format all payloads with JSON, so you can parse the payload using common JSON parsing methods or packages.

{% hint style="info" %}
We do not store any Webhook event notification data that we send you, so be sure to capture and store any payload content that you want to keep.
{% endhint %}

The structure of the JSON body you receive, will look like this:

```json
{
	"CommunityName": "yourCompany",
	"EventType": "note_deletion",
	"Events": [
		{
			"NoteId": 182605
		}
	]
}
```

More info about event payload structure you can get in the [following document.](https://developers.socialboards.com/docs/apis/tickets/reference/webhook-payload)

#### Responding to Event Notifications

Your endpoint should respond to all Event Notifications with 200 OK HTTPS. Your endpoint should respond to all webhook events in 20 seconds or less.


# Configure the Webhooks

Open Inbox.\
Open Settings by clicking on your user’s avatar in the top right corner of inbox and choosing “Settings”.

![](https://lh3.googleusercontent.com/mdh4CyiMxx7Ij_4tJ_aL8z91BRgvxDPF2lebkmgIspR5D5PE9gvfXSDyQlhaU0eqJ_XWMMERbm-40eLeGUGk2E8njwFeIjWXf-csoVYhseAaC2TSmBP_UJoVaXUgpRMHLMQuEXAG)

![](https://lh5.googleusercontent.com/aOoIaPy3W0MdnvHQEvZNoyZOx9YhX6pqktIOSrmh4SNgp36rpIF1e5qmUHaI8eTD5sRpPdQTI_8baqKTCi94kx234ehiw1SntTfGus2YPhYa-mYPPib_ogS4-lyc4WkSKB7J89Pj)

open General settings tab.

![](https://lh6.googleusercontent.com/CdQm-n82SwTyK2y0SO1RPm6-ZuBSWV-uTX4PG1eyptT2iwjugDrULp5fRUv_DuiKiXhr_gpKjlMLb_Fs869OLeKoUn6x-JEA7ifZRF0F5lNF5oFHEatij8XCNj4XafvfRq-b8Rp9)

open Webhooks tab.

![](https://lh3.googleusercontent.com/wN5vwyYracxeXEHnZ5HhXea7KQLf8tEJcKpaQ3Lng8cID11tU1aTVhHzA4pUUqQ3TTMC_3jqTuJR0YhUfEGavTRAqFtRXVhnDgXkLIBg6ESz79e_RO0KQJ-NxwpUYIbD1LrrINtk)

press subscribe switcher on event type you need.

![](https://lh4.googleusercontent.com/HNMpeAEeYWWTO_b_JgOaMb7nADhuQqsHESXg2TKo5YR8bh0XyWc1c_kKDmKzDHTcK_zslPJK2234hUNldSwfKUW69YaXTkl_BI0Fk9xig0Prg4FMJPJBiU3yRWeK6Lt8-6xQsjFe)

Fill the fields and click on button “Verify and Save”.\\

![](https://lh5.googleusercontent.com/LIRV26igaiKoSDY6uYHgpJLSHUcTrKQmH_dJ6kI-Z9zLHRR_fqYCW00kVkD0GPUjKnbOHnstrI74GWcLx7Po4hpRVyJAThGyH3lhuwx9KSFsmzLUxv_X27M-uVq-o87nwFQI5nLw)


# Testing your webhooks

Easy testing of webhooks using webhook.site

## Introduction

With Webhook.site, you can easily test HTTP webhooks and other types of HTTP requests.

Upon visiting the app, you get a random URL to send your requests and webhooks to, and they’re all logged in the app – instantly. Check it out at [https://webhook.site](https://webhook.site/).

{% hint style="danger" %}
Please note that you ONLY use this external service (webhook.site) for testing purposes, to keep your customers' data secure and GDPR compliant.
{% endhint %}

### Step 1 - creating a service

Simply navigate your browser to [https://webhook.site](https://webhook.site/) to create the receiving web service.

![](https://2431752220-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtYGNIjppwv_B_BcVqC%2F-LyU24KOxbulqY28Wbqf%2F-LyUIlIuXIUzEGJUCJio%2Fimage.png?alt=media\&token=01cfedf3-7066-482e-8331-9009b3dee859)

A URL you can use for your webhook will be generated automatically, and displayed as shown in the screenshot below. The service is listening for your Socialboards webhook posts, waiting for its first request.

![](https://2431752220-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtYGNIjppwv_B_BcVqC%2F-LyU24KOxbulqY28Wbqf%2F-LyUItKsw-CBsbdvLoP3%2Fimage.png?alt=media\&token=72dcfb64-b81e-46c7-8966-b98cad5d4c31)

### Step 2 - Activate webhooks in your Socialboard

Navigate to Configuration > Company > General settings > Webhooks, and activate the webhook(s) you want to test. In this example we'll use the "New ticket" webhook.

![](https://2431752220-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtYGNIjppwv_B_BcVqC%2F-LyU24KOxbulqY28Wbqf%2F-LyUKHxES_ijBav1Jipy%2Fimage.png?alt=media\&token=59c0f2c2-d2c8-4417-be03-ef537846ab56)

In the modal window, enter the URL you copied in step 1, along with a callback random variable.

![](https://2431752220-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtYGNIjppwv_B_BcVqC%2F-LyU24KOxbulqY28Wbqf%2F-LyUJa0kIuuSFNjM_hLF%2Fimage.png?alt=media\&token=d9eb4655-fd46-494d-aedb-393700ede219)

### Step 3 - test the webhook by submitting a new ticket

Send a new ticket to any channel connected to your Socialboard. Within a second or two, your webhook.site service presents the JSON it received from your ticket.

![](https://2431752220-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtYGNIjppwv_B_BcVqC%2F-LyU24KOxbulqY28Wbqf%2F-LyUKdOVNNWNo9Dpk_Mz%2Fimage.png?alt=media\&token=79c622b7-d097-4fd9-8926-534becbe078f)


# Reference

* [Endpoints](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints)
* [Objects](https://developers.socialboards.com/docs/apis/tickets/reference/objects)
* [Events](https://developers.socialboards.com/docs/apis/tickets/reference/events)
* [Enumerations](https://developers.socialboards.com/docs/apis/tickets/reference/enumerations)


# Endpoints

## Ticket API endpoints list

### Authorization

* [Get access token v2](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/access-token-v2)

### Categories

* [Get Category By Id](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/get-category-by-id)
* [Get Full Community Category List](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/get-community-category-list)
* [Get Subcategories by Parent Id](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/get-subcategories-by-parent-id)

### Custom Fields

* [Add Custom Field](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/add-custom-field)
* [Delete Custom Field](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/delete-custom-field)
* [Get Custom Field](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/get-custom-field)
* [Get Full Community Custom Field List](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/get-community-custom-fields)
* [Update Custom Field](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/update-custom-field)

### Notes

* [Add Note to Ticket](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/add-note-to-ticket)
* [Update Note](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/update-note)
* [Delete Note](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/delete-note)

### Tags

* [List tags](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/list-tags)

### Tickets

* [Create Ticket](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/create-ticket)
* [Get Ticket by Id](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/get-ticket-by-id)
* [Get Ticket Log](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/get-ticket-log)
* [List Tickets](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/list-tickets)
* [List Ticket Ids By Field Ids](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/list-ticket-ids-by-field-ids)
* [Replace Ticket Tags](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/replace-ticket-tags)
* [Update Ticket Assignee](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/update-ticket-assignee)
* [Update Ticket Category](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/update-ticket-category)
* [Update Ticket Custom Field Value](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/update-ticket-custom-field-value)
* [Update Ticket Status](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/update-ticket-status)

### Ticket replies

* [Create Reply](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/create-reply)
* [List Replies](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/list-replies)
* [Replace Reply Tags](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/replace-reply-tags)

### Teammates

* [Get All Teammates](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/get-all-teammates)

### Widgets

* [Get Widget Schedule List](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/get-widget-schedule-list)

### User Groups

* [Get All User Groups for Community](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/get-all-community-user-groups)


# Get Access Token v2

Obtaining access tokens for using in requests to API

#### Request

```
POST https://api.socialboards.com/token
```

#### Form Data Parameters

| Name           |  Type  | Required | Comments                        |
| -------------- | :----: | :------: | ------------------------------- |
| grant\_type    | string |    yes   | Must be set to 'refresh\_token' |
| refresh\_token | string |    yes   | One of your refresh tokens      |
| client\_id     | string |    yes   | Your Client ID                  |

`refresh_token` and `client_id` could be found on your settings page

#### Response

```json
{
    "access_token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJjaWQiOiIxIiwidHlwZSI6IkNvbW11bml0eSIsIm5iZiI6MTU4MjU1ODU1MiwiZXhwIjoxNTgyNTYyMTUyLCJpc3MiOiJzb2NpYWxib2FyZHMuY29tIiwiYXVkIjoiZjUyNWExNzAtOWM4OS00MGI3LWE2ODctNjczZWZkN2YyMThiIn0.rXiErxy4IlvhNs10Ovwg61mAa4cX36_E2Rw3nghD0R7KfxuIkeXBmQgPagqfEL1gk6d-W5pNQ_py2h3p23zM_g",
    "token_type": "bearer",
    "expires_in": 3599,
    "refresh_token": "c5ngLXd0zVrgN6U7jdAw2EOGd9fj0GkZEFOvdd6yEHo="
}
```


# Get Full Community Category List

{% hint style="warning" %}
All API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### Request

```
GET /categories
```

#### Query Parameters

This endpoint doesn't require query parameters.

#### Response

```javascript
{
    "data": [
        {
            "children": [
                {
                    "children": [],
                    "autoArchive": false,
                    "canBeChosen": true,
                    "isHidden": false,
                    "isMuted": false,
                    "parentId": 35798,
                    "id": 35799,
                    "name": "FAQ"
                },
                {
                    "children": [
                        {
                            "children": [
                                {
                                    "children": [],
                                    "autoArchive": false,
                                    "canBeChosen": true,
                                    "isHidden": false,
                                    "isMuted": false,
                                    "parentId": 35801,
                                    "id": 35802,
                                    "name": "Ticket details"
                                }
                            ],
                            "autoArchive": false,
                            "canBeChosen": true,
                            "isHidden": false,
                            "isMuted": false,
                            "parentId": 35800,
                            "id": 35801,
                            "name": "Tickets"
                        }
                    ],
                    "autoArchive": false,
                    "canBeChosen": true,
                    "isHidden": false,
                    "isMuted": false,
                    "parentId": 35798,
                    "id": 35800,
                    "name": "Inbox"
                },
                {
                    "children": [],
                    "autoArchive": false,
                    "canBeChosen": true,
                    "isHidden": false,
                    "isMuted": false,
                    "parentId": 35798,
                    "id": 35803,
                    "name": "Admin page"
                },
                {
                    "children": [],
                    "autoArchive": false,
                    "canBeChosen": true,
                    "isHidden": false,
                    "isMuted": false,
                    "parentId": 35798,
                    "id": 35804,
                    "name": "GDPR AR portal"
                }
            ],
            "autoArchive": false,
            "canBeChosen": true,
            "isHidden": false,
            "isMuted": false,
            "parentId": null,
            "id": 35798,
            "name": "Products"
        },
        {
            "children": [
                {
                    "children": [],
                    "autoArchive": false,
                    "canBeChosen": true,
                    "isHidden": false,
                    "isMuted": false,
                    "parentId": 35611,
                    "id": 35795,
                    "name": "ACME Corp"
                },
                {
                    "children": [],
                    "autoArchive": false,
                    "canBeChosen": true,
                    "isHidden": false,
                    "isMuted": false,
                    "parentId": 35611,
                    "id": 35797,
                    "name": "Dunder Mifflin Paper Co"
                },
                {
                    "children": [],
                    "autoArchive": false,
                    "canBeChosen": true,
                    "isHidden": false,
                    "isMuted": false,
                    "parentId": 35611,
                    "id": 35796,
                    "name": "Pawtucket Brewery"
                }
            ],
            "autoArchive": false,
            "canBeChosen": true,
            "isHidden": false,
            "isMuted": false,
            "parentId": null,
            "id": 35611,
            "name": "Customers"
        },
        {
            "children": [],
            "autoArchive": false,
            "canBeChosen": true,
            "isHidden": false,
            "isMuted": false,
            "parentId": null,
            "id": 35806,
            "name": "Other cases"
        }
    ],
    "errorCode": -1,
    "errorText": null
}
```

`Data` field has type array of [Category ](https://developers.socialboards.com/docs/apis/tickets/reference/objects/category)objects.


# Get Subcategories by Parent Id

{% hint style="warning" %}
All API requests should contain[ authorization headers.](https://developers.socialboards.com/docs/apis/tickets/authorization-headers)
{% endhint %}

#### Request

```
GET /categories/{parentId}/subcategories?includeHidden={includeHidden}
```

#### Query Parameters

<table><thead><tr><th>Name</th><th width="100">Type</th><th width="100">Required</th><th>Comments</th></tr></thead><tbody><tr><td>parentId</td><td>integer</td><td>no</td><td>Id of category which subcategories you want to receive. Without this parameter response will contain root categories</td></tr><tr><td>includeHidden</td><td>boolean</td><td>no</td><td>if set to <code>true</code> response will contain hidden categories. Default value is <code>false</code></td></tr></tbody></table>

#### Response

```json
{
    "data": [
        {
            "autoArchive": false,
            "canBeChosen": true,
            "isHidden": false,
            "isMuted": false,
            "parentId": 35611,
            "id": 35795,
            "name": "ACME Corp"
        },
        {
            "autoArchive": false,
            "canBeChosen": true,
            "isHidden": false,
            "isMuted": false,
            "parentId": 35611,
            "id": 35797,
            "name": "Dunder Mifflin Paper Co"
        },
        {
            "autoArchive": false,
            "canBeChosen": true,
            "isHidden": false,
            "isMuted": false,
            "parentId": 35611,
            "id": 35796,
            "name": "Pawtucket Brewery"
        }
    ],
    "errorCode": -1,
    "errorText": null
}
```

`Data` field has type array of [Category ](https://developers.socialboards.com/docs/apis/tickets/reference/objects/category)objects.


# Get Category By Id

{% hint style="warning" %}
All API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### Request

```
GET /categories/{categoryId}
```

#### Query Parameters

<table><thead><tr><th>Name</th><th width="100">Type</th><th width="100">Required</th><th>Comments</th></tr></thead><tbody><tr><td>categoryId</td><td>integer</td><td>yes</td><td>Id of category you want to receive</td></tr></tbody></table>

#### Response

```json
{
    "data": {
        "children": [
            {
                "children": [],
                "autoArchive": false,
                "canBeChosen": true,
                "isHidden": false,
                "isMuted": false,
                "parentId": 35611,
                "id": 35795,
                "name": "ACME Corp"
            },
            {
                "children": [],
                "autoArchive": false,
                "canBeChosen": true,
                "isHidden": false,
                "isMuted": false,
                "parentId": 35611,
                "id": 35797,
                "name": "Dunder Mifflin Paper Co"
            },
            {
                "children": [],
                "autoArchive": false,
                "canBeChosen": true,
                "isHidden": false,
                "isMuted": false,
                "parentId": 35611,
                "id": 35796,
                "name": "Pawtucket Brewery"
            }
        ],
        "autoArchive": false,
        "canBeChosen": true,
        "isHidden": false,
        "isMuted": false,
        "parentId": null,
        "id": 35611,
        "name": "Customers"
    },
    "errorCode": -1,
    "errorText": null
}
```

`Data` field has type of [Category ](https://developers.socialboards.com/docs/apis/tickets/reference/objects/category)object.


# Get Full Community Custom Field List

{% hint style="warning" %}
All API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### Request

```
GET /customFields
```

#### Query Parameters

This endpoint doesn't require query parameters.

#### Response

```json
{
    "data": [
        {
            "assignedCategoryIds": [],
            "defaultValue": null,
            "id": 26703,
            "isHidden": false,
            "isRequired": false,
            "isSensitiveData": false,
            "name": "Client Id",
            "placeholder": "Client Id",
            "possibleValues": [],
            "type": "text_input"
        },
        {
            "assignedCategoryIds": [],
            "defaultValue": null,
            "id": 26706,
            "isHidden": false,
            "isRequired": false,
            "isSensitiveData": false,
            "name": "Purchase date",
            "placeholder": "Purchase date",
            "possibleValues": [],
            "type": "date"
        },
        {
            "assignedCategoryIds": [],
            "defaultValue": "AGDER",
            "id": 26705,
            "isHidden": false,
            "isRequired": false,
            "isSensitiveData": false,
            "name": "Shop region",
            "placeholder": "region",
            "possibleValues": [
                {
                    "id": 16505,
                    "order": 0,
                    "value": "AGDER"
                },
                {
                    "id": 16506,
                    "order": 1,
                    "value": "INNLANDET"
                }
            ],
            "type": "region"
        }
    ],
    "errorCode": -1,
    "errorText": null
}
```

`Data` field has type array of [Custom Field](https://developers.socialboards.com/docs/apis/tickets/reference/objects/custom-field) objects.


# Add Custom Field

{% hint style="warning" %}
All API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### Request

```
POST /customFields
```

#### Query Parameters

This endpoint doesn't require query parameters.

**Request Body**

Request body should contain [custom field](https://developers.socialboards.com/docs/apis/tickets/reference/objects/custom-field) object. The `id` field should be equal to 0 or left unset.

If the `value` field is set it will be ignored.

```json
{
    "assignedCategoryIds": null,
    "defaultValue": null,
    "id": 0,
    "isHidden": false,
    "isRequired": false,
    "isSensitiveData": false,
    "name": "Client Comment",
    "placeholder": "Client Comment",
    "possibleValues": null,
    "type": "text_input"
}
```

#### Response

```json
{
    "data": {
        "assignedCategoryIds": [],
        "defaultValue": null,
        "id": 26707,
        "isHidden": false,
        "isRequired": false,
        "isSensitiveData": false,
        "name": "Client Comment",
        "placeholder": "Client Comment",
        "possibleValues": [],
        "type": "text_input"
    },
    "errorCode": -1,
    "errorText": null
}
```

`Data` field has type of [Custom Field](https://developers.socialboards.com/docs/apis/tickets/reference/objects/custom-field) object.


# Get Custom Field

{% hint style="warning" %}
All API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### Request

```
GET /customFields/{CustomFieldId}
```

#### Query Parameters

<table><thead><tr><th>Name</th><th width="100">Type</th><th width="100">Required</th><th>Comments</th></tr></thead><tbody><tr><td>CustomFieldId</td><td>integer</td><td>yes</td><td>The id of the custom field to retrieve</td></tr></tbody></table>

#### Response

```json
{
    "data": {
        "assignedCategoryIds": [],
        "defaultValue": null,
        "id": 26707,
        "isHidden": false,
        "isRequired": false,
        "isSensitiveData": false,
        "name": "Client Comment",
        "placeholder": "Client Comment",
        "possibleValues": [],
        "type": "text_input"
    },
    "errorCode": -1,
    "errorText": null
}
```

`Data` field has type of [Custom Field](https://developers.socialboards.com/docs/apis/tickets/reference/objects/custom-field) object.


# Get All Teammates

{% hint style="warning" %}
All API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### Request

```
GET /Teammates
```

#### Query Parameters

<table><thead><tr><th>Name</th><th width="100">Type</th><th width="100">Required</th><th>Comments</th></tr></thead><tbody><tr><td>group</td><td>integer</td><td>no</td><td>Users group id you want to retrieve. If not specified, all users within the community will be returned</td></tr></tbody></table>

#### Response

```json
{
    "data": [
        {
            "name": "Robert Baker",
            "email": "RobertBaker@gmail.com",
            "role": "admin"
        },
        {
            "name": "William Shakespeare",
            "email": "williamshakespeare@domain.com",
            "role": "read_only_user"
        }
    ],
    "errorCode": -1,
    "errorText": null
}
```

`Data` field will contain an array of [Teammate](https://developers.socialboards.com/docs/apis/tickets/reference/objects/teammate) objects.


# Get All User Groups for Community

{% hint style="warning" %}
All API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### Request

```
GET /UserGroups
```

#### Query Parameters

This endpoint doesn't require query parameters.

#### Response

```json
{
    "data": [
        {
            "id": 1,
            "name": "First group"
        },
        {
            "id": 2,
            "name": "Second group"
        }
    ],
    "errorCode": -1,
    "errorText": null
}
```

`Data` field will contain an array of [User group](https://developers.socialboards.com/docs/apis/tickets/reference/objects/user-group) objects.


# Update Custom Field

{% hint style="warning" %}
All API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### Request

```
PATCH /customFields/{CustomFieldId}
```

#### Query Parameters

<table><thead><tr><th>Name</th><th width="100">Type</th><th width="100">Required</th><th>Comments</th></tr></thead><tbody><tr><td>CustomFieldId</td><td>integer</td><td>yes</td><td>Id of custom field you want to update</td></tr></tbody></table>

**Request Body**

Body of request should contain[ Custom field](https://developers.socialboards.com/docs/apis/tickets/reference/objects/custom-field) model serialized to JSON.

```json
{
    "assignedCategoryIds": [],
    "defaultValue": "Everything fine",
    "id": 26707,
    "isHidden": false,
    "isRequired": false,
    "isSensitiveData": false,
    "name": "Client Comment",
    "placeholder": "Client Comment",
    "possibleValues": null,
    "type": "text_input"
}
```

#### Response

```json
{
    "data": {
        "assignedCategoryIds": [],
        "defaultValue": "Everything fine",
        "id": 26707,
        "isHidden": false,
        "isRequired": false,
        "isSensitiveData": false,
        "name": "Client Comment",
        "placeholder": "Client Comment",
        "possibleValues": [],
        "type": "text_input"
    },
    "errorCode": -1,
    "errorText": null
}
```

`Data` field has type of [Custom Field](https://developers.socialboards.com/docs/apis/tickets/reference/objects/custom-field) object.


# Delete Custom Field

{% hint style="warning" %}
All API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### Request

```
DELETE /customFields/{CustomFieldId}
```

#### Query Parameters

<table><thead><tr><th>Name</th><th width="100">Type</th><th width="100">Required</th><th>Comments</th></tr></thead><tbody><tr><td>CustomFieldId</td><td>integer</td><td>yes</td><td>Id of custom field you want to delete</td></tr></tbody></table>

#### Response

```json
{
  "data": {},
  "errorCode": -1,
  "errorText": null
}
```


# Create Ticket

{% hint style="warning" %}
All API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### Request

```
POST /tickets
```

#### Query Parameters.

This endpoint doesn't require query parameters.

#### Request Body

```json
{
    "assigneeId": "43b8adc7-755d-2be3-afb1-b6a462631977",
    "attachments": [
        {
            "url": "https://your.attachment.url/filename.png",
            "name": "filename.png"
        }
    ],
    "categoryId": 15597,
    "cc": [
        "ann_smith@gmail.com"
    ],
    "creator": {
        "name": "Bill Smith",
        "email": "bill_smith@gmail.com",
        "customIdentifier": null,
        "image": null,
        "phoneNumber": null
    },
    "customFields": [
        {
            "id": 42623,
            "value": "Oslo"
        }
    ],
    "message": "Hello I want to buy a new car, how can I get a price list?",
    "sentiment": "question",
    "tags": [],
    "title": "New car price list."
}
```

Body of request should contain the following model serialized to JSON.

| Field          | Type                                                                                                                                   | Comments                                                                                                                                                                                                                                         |
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| attachments    | array of [Base Attachment](https://developers.socialboards.com/docs/apis/tickets/reference/objects/base-attachment) models             | Ticket Attachments                                                                                                                                                                                                                               |
| assigneeId     | string                                                                                                                                 | <p>Unique teammate ticket assignee Id. Set to null if the ticket does not have any assignee.<br>You can obtain a list of teammates through the <a href="https://developers.socialboards.com/docs/apis/tickets/teammates">Teammates route</a></p> |
| categoryId     | nullabe integer                                                                                                                        | Unique Id of category ticket should belong to. If value is `null` ticket will be created uncategorized                                                                                                                                           |
| cc             | array of strings                                                                                                                       | CC emails of ticket. Team member replies will be sent not only to ticket author but also to these emails                                                                                                                                         |
| creator        | [Ticket Creator](https://developers.socialboards.com/docs/apis/tickets/reference/objects/ticket-creator) model                         | Model contains ticket creator data.                                                                                                                                                                                                              |
| customFields   | array of [Custom Field Id and Value](https://developers.socialboards.com/docs/apis/tickets/reference/objects/base-custom-field) models | List of models containing custom field ids and values                                                                                                                                                                                            |
| isHtml         | boolean                                                                                                                                | <p>If <code>true</code> indicates that message content should be processed as HTML with tags, classes and attributes.</p><p>By default is <code>true</code></p>                                                                                  |
| message        | string                                                                                                                                 | Ticket message                                                                                                                                                                                                                                   |
| sentiment\[^1] | string                                                                                                                                 | Sentiment of ticket. Can be `question`, `praise`, `suggestion`, `complaint`                                                                                                                                                                      |
| sourceName     | string                                                                                                                                 | Name of ticket source. Can have any string as value (for example page or channel name)                                                                                                                                                           |
| tags           | array of string                                                                                                                        | Ticket tags' names                                                                                                                                                                                                                               |
| title          | string                                                                                                                                 | Title of the ticket                                                                                                                                                                                                                              |

#### Response

```json
{
  "data": 4484636,
  "errorCode": -1,
  "errorText": null
}
```

`Data` field will contain ticket Id (type integer).


# List Tickets

{% hint style="warning" %}
All API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### Request

```url
POST /tickets/list
```

#### Query Parameters.

This endpoint doesn't require query parameters.

#### Request Body

```json
{
    "categoryId": 33527,
    "customFields": [
        {
            "key": 18464,
            "value": "Option 2"
        }
    ],
    "from": "2020-01-01T00:00:00+00:00",
    "orderBy": "last_thread_activity_desc",
    "skip": 0,
    "source": "web",
    "status": "open",
    "take": 100,
    "to": "2020-03-02T00:00:00+00:00",
    "ticketIds": [
        4484636,
        4484618,
        4478963
    ]
}
```

Body of request should contain the following model serialized to JSON.

| Field        | Type                                                                                                                                    | Required | Comments                                                                                                                                                                              |
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| categoryId   | nullabe integer                                                                                                                         | no       | Unique Id of category ticket should belong to. If value is `null` uncategorized tickets will be selected                                                                              |
| customFields | array of [Custom Field Id and Value](https://developers.socialboards.com/docs/apis/tickets/reference/objects/custom-field-value) models | no       | List of models containing custom field ids and values. If array contains several custom fields, tickets must have all of them to be selected in result                                |
| from         | string                                                                                                                                  | no       | Min creation time of tickets shown in results. string containing DateTime with offset, in the following format: "2020-02-27T12:28:02.6019432+01:00"                                   |
| orderBy      | string                                                                                                                                  | no       | Order of tickets in the list. Can be one of [TicketListOrderBy](https://developers.socialboards.com/docs/apis/tickets/reference/enumerations/ticket-list-order-by) enumeration values |
| skip         | integer                                                                                                                                 | no       | Amount of tickets should be skipped from the result                                                                                                                                   |
| source       | string                                                                                                                                  | no       | Source of tickets. Can be one of [TicketSource](https://developers.socialboards.com/docs/apis/tickets/reference/enumerations/ticket-source) enumeration values                        |
| status       | string                                                                                                                                  | no       | Ticket status. Can be one of [TicketStatus](https://developers.socialboards.com/docs/apis/tickets/reference/enumerations/ticket-status) enumeration values                            |
| take         | int                                                                                                                                     | no       | Max ammount of tickets shown in results. Max value is 50. default: 25                                                                                                                 |
| ticketIds    | array of integers                                                                                                                       | no       | ids of tickets to select from results. It can be used to fetch tickets by id(s)                                                                                                       |
| to           | string                                                                                                                                  | no       | Max creation time of tickets shown in results. string containing DateTime with offset, in the following format: "2020-02-27T12:28:02.6019432+01:00"                                   |

```json
{
    "data": [
        {
            "id": 4484636,
            "title": "New car price list.",
            "message": "Hello I want to buy a new car, how can I get a price list?",
            "htmlMessage": "Hello I want to buy a new car, how can I get a price list?",
            "attachments": [],
            "author": {
                "customIdentifier": null,
                "id": "7c0a344a-c369-4e27-9840-88257a56e835",
                "name": "Bill Smith",
                "image": null,
                "email": "bill_smith@gmail.com",
                "status": "client",
                "isBot": false
            },
            "category": {
                "id": 15597,
                "name": "Customers"
            },
            "creationTime": "2019-12-18T18:00:03.6368531+00:00",
            "customFields": [],
            "lastThreadElementCreationTime": "2019-12-18T18:00:03.6368531+00:00",
            "lockedBy": null,
            "originalLink": null,
            "properties": {
                "isAnonymized": false,
                "isMuted": false,
                "hasAttachments": true,
                "hasDraft": false,
                "isAssignedToBot": false,
                "isDeleted": false,
                "isExpired": true,
                "isHidden": false,
                "isLocked": false,
                "isSpam": false,
                "isSensitive": false
            },
            "replyCount": 0,
            "sentiment": "question",
            "source": "web",
            "detailedSource": "web_website",
            "sourceName": null,
            "status": "open",
            "tags": [
                "urgent"
            ]
        },
        {
            "id": 4484618,
            "title": "New car price list.",
            "message": "Hello I want to buy a new car, how can I get a price list?",
            "htmlMessage": "Hello I want to buy a new car, how can I get a price list?",
            "attachments": [],
            "author": {
                "customIdentifier": null,
                "id": "7c0a344a-c369-4e27-9840-88257a56e835",
                "name": "Bill Smith",
                "image": null,
                "email": "bill_smith@gmail.com",
                "status": "client",
                "isBot": false
            },
            "category": {
                "id": 15597,
                "name": "Customers"
            },
            "creationTime": "2019-12-18T17:55:52.6381081+00:00",
            "customFields": [],
            "lastThreadElementCreationTime": "2019-12-18T17:55:52.6381081+00:00",
            "lockedBy": null,
            "originalLink": null,
            "properties": {
                "isAnonymized": false,
                "isMuted": false,
                "hasAttachments": true,
                "hasDraft": false,
                "isAssignedToBot": false,
                "isDeleted": false,
                "isExpired": true,
                "isHidden": false,
                "isLocked": false,
                "isSpam": false,
                "isSensitive": false
            },
            "replyCount": 0,
            "sentiment": "question",
            "source": "web",
            "detailedSource": "web_website",
            "sourceName": null,
            "status": "open",
            "tags": []
        },
        {
            "id": 4478963,
            "title": "Cat is ill",
            "message": "I want to take my cat to a vet",
            "htmlMessage": "I want to take my cat to a vet",
            "attachments": [],
            "author": {
                "customIdentifier": null,
                "id": "35692164-bfaa-4c49-a23c-ecfa618f7d20",
                "name": "Robert Baker",
                "image": null,
                "email": "robert78baker@gmail.com",
                "status": "client",
                "isBot": false
            },
            "category": {
                "id": 15721,
                "name": "Other cases"
            },
            "creationTime": "2019-12-17T07:03:48.318717+00:00",
            "customFields": [],
            "lastThreadElementCreationTime": "2019-12-17T07:21:21.5003556+00:00",
            "lockedBy": null,
            "originalLink": null,
            "properties": {
                "isAnonymized": false,
                "isMuted": false,
                "hasAttachments": false,
                "hasDraft": false,
                "isAssignedToBot": false,
                "isDeleted": false,
                "isExpired": true,
                "isHidden": false,
                "isLocked": false,
                "isSpam": false,
                "isSensitive": false
            },
            "replyCount": 3,
            "sentiment": "question",
            "source": "web",
            "detailedSource": "web_website",
            "sourceName": null,
            "status": "open",
            "tags": []
        }
    ],
    "errorCode": -1,
    "errorText": null
}
```

`Data` field will contain an array of [Ticket](https://developers.socialboards.com/docs/apis/tickets/reference/objects/ticket) models.


# List Ticket Ids By Field Ids

{% hint style="warning" %}
All API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### Request

```url
POST /tickets/customFields/values/list
```

#### Query Parameters.

This endpoint doesn't require query parameters.

#### Request Body

```json
{
    "customFieldIds": [
        26690,
        26703,
        26704,
        26706
        
    ],
    "fromTicketCreationTime": "2023-01-15T00:00:00+00:00",
    "isAllFieldsInTicketRequired": true,
    "skip": 0,
    "take": 500,
    "toTicketCreationTime": "2024-01-17T00:00:00+00:00"
}
```

Body of request should contain the following model serialized to JSON.

<table data-full-width="true"><thead><tr><th width="249">Field</th><th width="171">Type</th><th width="166">Required</th><th>Comments</th></tr></thead><tbody><tr><td>customFieldIds</td><td>array of integers</td><td>no</td><td>An array of integers representing Custom Fields Ids. The search will match tickets based on these field ids. By default it is empty and a maximum count of field ids is limited to 50</td></tr><tr><td>fromTicketCreationTime</td><td>string</td><td>no</td><td>A datetime string in ISO 8601 format. Only tickets created after this time will be included in the search. By default it is null</td></tr><tr><td>isAllFieldsInTicketRequired</td><td>boolean</td><td>no</td><td>If true, all specified fields in the search request must be present in a tickets. If false, at least one field must match in a tickets. By default it is false</td></tr><tr><td>skip</td><td>nullable integer</td><td>no</td><td>Specifies the number of tickets to skip in the search results. By default it is 0</td></tr><tr><td>take</td><td>nullable integer</td><td>no</td><td>Specifies the maximum number of tickets to return. By default it is 250 and maximum count to take is limited to 500. The tickets are ordered by Id in ascending order</td></tr><tr><td>toTicketCreationTime</td><td>string</td><td>no</td><td>A datetime string in ISO 8601 format. Only tickets before this time will be included in the search. By default it is null</td></tr></tbody></table>

#### Response

The tickets are ordered by ID in ascending order.

```json
{
    "data": [
        {
            "customFieldValues": [
                {
                    "id": 26690,
                    "value": "Magic Cloudy Shop"
                },
                {
                    "id": 26703,
                    "value": "Arrows with Frozen Darts"
                },
                {
                    "id": 26704,
                    "value": "100"
                },
                {
                    "id": 26706,
                    "value": "2024-01-23"
                }
            ],
            "ticketId": 256245
        }
    ],
    "errorCode": -1,
    "errorText": null
}
```

`Data` field will contain an array of [TicketIdWithFieldValue](https://developers.socialboards.com/docs/apis/tickets/reference/objects/ticket-id-with-field-value) models.


# Get Ticket by Id

{% hint style="warning" %}
All API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### Request

```
GET /tickets/{ticketId}
```

#### Query Parameters.

<table><thead><tr><th>Name</th><th width="100">Type</th><th width="100">Required</th><th>Comments</th></tr></thead><tbody><tr><td>ticketId</td><td>integer</td><td>yes</td><td>Id of ticket you want to receive</td></tr></tbody></table>

#### Response

```json
{
    "data": {
        "id": 4484636,
        "title": "New car price list.",
        "message": "Hello I want to buy a new car, how can I get a price list?",
        "htmlMessage": "Hello I want to buy a new car, how can I get a price list?",
        "author": {
            "customIdentifier": null,
            "id": "7c0a344a-c369-4e27-9840-88257a56e835",
            "name": "Bill Smith",
            "image": null,
            "email": "bill_smith@gmail.com",
            "status": "client",
            "isBot": false
        },
        "category": {
            "id": 15597,
            "name": "Customers"
        },
        "creationTime": "2019-12-18T18:00:03.6368531+00:00",
        "customFields": [],
        "lastThreadElementCreationTime": "2019-12-18T18:00:03.6368531+00:00",
        "lockedBy": null,
        "originalLink": null,
        "properties": {
            "isAnonymized": false,
            "isMuted": false,
            "hasAttachments": true,
            "hasDraft": false,
            "isAssignedToBot": false,
            "isDeleted": false,
            "isExpired": true,
            "isHidden": false,
            "isLocked": false,
            "isSpam": false,
            "isSensitive": false
        },
        "replyCount": 0,
        "sentiment": "question",
        "source": "web",
        "detailedSource": "web_website",
        "sourceName": null,
        "status": "open",
        "tags": [
            "urgent"
        ],
        "attachments": []
    },
    "errorCode": -1,
    "errorText": null
}
```

`Data` field will contain [Ticket](https://developers.socialboards.com/docs/apis/tickets/reference/objects/ticket) model.


# Update Ticket Custom Field Value

{% hint style="warning" %}
All API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### Request

```
PATCH /tickets/{ticketId}/customFields
```

#### Query Parameters

<table><thead><tr><th>Name</th><th width="100">Type</th><th width="100">Required</th><th>Comments</th></tr></thead><tbody><tr><td>ticketId</td><td>integer</td><td>yes</td><td>Id of ticket you want to update</td></tr></tbody></table>

**Request Body**

```json
[
    {
        "customFieldId": 95475,
        "value": "some text"
    },
    {
        "customFieldId": 96340,
        "value": "+74216231562"
    }
]
```

Body of request should contain array of [Custom Field value](https://developers.socialboards.com/docs/apis/tickets/reference/objects/custom-field-value) objects.

#### Response

```json
{
  "data": {},
  "errorCode": -1,
  "errorText": null
}
```


# Update Ticket Assignee

{% hint style="warning" %}
All API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### Request

```
PATCH /tickets/{ticketId}/Assignee
```

#### Query Parameters

<table><thead><tr><th>Name</th><th width="100">Type</th><th width="100">Required</th><th>Comments</th></tr></thead><tbody><tr><td>ticketId</td><td>integer</td><td>yes</td><td>Id of ticket you want to update.</td></tr></tbody></table>

#### Request Body

The request body must contain the model with the Id of the teammate (as `assigneeId`) and the current user assigned to the ticket (as `previousAssigneeId`). Send `assigneeId` as null if you want to set the ticket as unassigned.

You can obtain the list of teammates by requesting the corresponding [teammates endpoint](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/get-all-teammates).

You can retrieve the current assigned user value from the response from [get ticket by id endpoint](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/get-ticket-by-id) (property `lockedBy` in the response object).

```json
{
    "assigneeId": "31aee6af-3e38-40d9-98b1-aa2b9238f24d",
    "previousAssigneeId": "null"
}
```

You cannot assign a user, which is not a part of the team (such as a client, vendor, or read-only user).

<table><thead><tr><th>Name</th><th width="100">Type</th><th width="100">Required</th><th>Comments</th></tr></thead><tbody><tr><td>assigneeId</td><td>Guid</td><td>yes</td><td>Unique Id of a teammate who is assigned to the ticket. Set to <code>null</code> if the ticket should be unassigned</td></tr><tr><td>previousAssigneeId</td><td>Guid</td><td>yes</td><td>Unique Id of the current teammate who is assigned to the ticket. If the ticket is unassigned, the value should be set to <code>null</code></td></tr></tbody></table>

**Response**

```json
{
  "data": {},
  "errorCode": -1,
  "errorText": null
}
```


# Get Ticket Log

{% hint style="warning" %}
All API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### Request

```
POST /tickets/{ticketId}/log
```

#### Query Parameters.

<table><thead><tr><th>Name</th><th width="100">Type</th><th width="100">Required</th><th>Comments</th></tr></thead><tbody><tr><td>ticketId</td><td>integer</td><td>yes</td><td>Id of ticket you want to receive</td></tr><tr><td>take</td><td>integer</td><td>no</td><td>Max ammount of tickets shown in results. Max value is 50. default: 25</td></tr><tr><td>skip</td><td>integer</td><td>no</td><td>Amount of tickets should be skipped from the result</td></tr></tbody></table>

#### Request Body

```json
{
    "action_types": [
        "ticket_status_changed",
        "ticket_read"
    ]
}
```

Body of request should contain the following model serialized to JSON.

| Field         | Type                                                                                                                                              | Comments                                                                            |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| action\_types | array of Ticket [action type enumeration](https://developers.socialboards.com/docs/apis/tickets/reference/enumerations/ticket-action-type) values | Action types needed to be added to results. If empty, all action types are returned |

#### Response

```json
{
    "data": [
        {
            "actionString": "leste saken",
            "actionType": "ticket_read",
            "includedItems": {
                "categories": [],
                "tags": [],
                "users": []
            },
            "user": {
                "customIdentifier": null,
                "id": "7ada8318-adf9-46d1-97ff-81aee80a8415",
                "image": null,
                "name": "Anton Checkhov",
                "email": "Anton@Checkhov.com",
                "status": "team",
                "isBot": false
            },
            "time": "2022-10-28T12:41:36.6267804+00:00"
        },
        {
            "actionString": "endret sakens status fra \"På vent\" til \"Åpen\"",
            "actionType": "ticket_status_changed",
            "includedItems": {
                "categories": [],
                "tags": [],
                "users": []
            },
            "user": {
                "customIdentifier": null,
                "id": "7ada8318-adf9-46d1-97ff-81aee80a8415",
                "image": null,
                "name": "Anton Checkhov",
                "email": "Anton@Checkhov.com",
                "status": "team",
                "isBot": false
            },
            "time": "2022-09-27T23:05:58.7768791+00:00"
        }
    ],
    "errorCode": -1,
    "errorText": null
}
```

`Data` field will contain array of an [Ticket Log](https://developers.socialboards.com/docs/apis/tickets/reference/objects/ticket-log) models.


# Update Ticket Status

{% hint style="warning" %}
All API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### Request

```
PATCH /tickets/{ticketId}/status
```

#### Query Parameters

<table><thead><tr><th>Name</th><th width="100">Type</th><th width="100">Required</th><th>Comments</th></tr></thead><tbody><tr><td>ticketId</td><td>integer</td><td>yes</td><td>Id of ticket you want to update</td></tr></tbody></table>

**Request Body**

```
"open"
```

Body of request should contain one of [Ticket Status](https://developers.socialboards.com/docs/apis/tickets/reference/enumerations/ticket-status) enumeration values.

{% hint style="danger" %}
not\_completed ticket status cannot be set to ticket. It can be used only for [listing tickets](https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/list-tickets).
{% endhint %}

#### Response

```json
{
  "data": {},
  "errorCode": -1,
  "errorText": null
}
```


# Update Ticket Category (Obsolete)

{% hint style="warning" %}
All API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### Request

```
PATCH /tickets/{ticketId}/category/{categoryId}
```

#### Query Parameters

|            |         |          |                                   |
| ---------- | ------- | -------- | --------------------------------- |
| Name       | Type    | Required | Comments                          |
| ticketId   | integer | yes      | Id of ticket you want to update.  |
| categoryId | integer | yes      | Id of category you want to set up |

#### Response

```
{
  "data": {},
  "errorCode": -1,
  "errorText": null
}
```

`Data` field will be equal to null.


# Update Ticket Category

{% hint style="warning" %}
All API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### Request

```json
PATCH /tickets/{ticketId}/category
```

#### Query Parameters

<table><thead><tr><th>Name</th><th width="100">Type</th><th width="100">Required</th><th>Comments</th></tr></thead><tbody><tr><td>ticketId</td><td>integer</td><td>yes</td><td>Id of ticket you want to update</td></tr></tbody></table>

### Add or update category

#### Request Body

```json
{
    "id": 23445
}
```

The request body should contain the serialized JSON model with the Id of the specified category.

<table><thead><tr><th>Field</th><th width="100">Type</th><th width="100">Required</th><th>Comments</th></tr></thead><tbody><tr><td>id</td><td>nullable integer</td><td>no</td><td>Id of category you want to set up</td></tr></tbody></table>

### Remove category

To remove a category from the ticket you need to send `null` or empty object as model. Also, it will work for requests without body at all.

#### Request Body

```json
null // or {}
```

#### Response

```json
{
  "data": {},
  "errorCode": -1,
  "errorText": null
}
```


# Create Reply

{% hint style="warning" %}
all API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### Request

```
POST /tickets/{ticketId}/replies
```

#### Query Parameters

<table><thead><tr><th>Name</th><th width="100">Type</th><th width="100">Required</th><th>Comments</th></tr></thead><tbody><tr><td>ticketId</td><td>integer</td><td>yes</td><td>Id of ticket you want to create reply in</td></tr></tbody></table>

#### Request Body

{% code lineNumbers="true" %}

```json
{
    "attachments": [
        {
            "url": "https://your.attachment.url/filename.png",
            "name": "filename.png"
        }
    ],
    "author": {
        "email": "staffEmailLogin@domain.com",
    },
    "isDraft": false,
    "isHtml": false,
    "isTicketNeededToBeCompleted": false,
    "message": "new reply text",
    "parentReplyId": null,
    "suppressTicketStatusAutoupdate": true
}
```

{% endcode %}

Body of request should contain the following model serialized to JSON.

<table><thead><tr><th width="296">Field</th><th width="172.33333333333331">Type</th><th>Comments</th></tr></thead><tbody><tr><td>attachments</td><td>array of <a href="https://developers.socialboards.com/docs/apis/tickets/reference/objects/base-attachment">Base Attachment</a> models</td><td>Reply attachments</td></tr><tr><td>author</td><td><a href="https://developers.socialboards.com/docs/apis/tickets/reference/objects/reply-note-creator">Reply Creator</a> model</td><td>Reply creator info</td></tr><tr><td>isDraft</td><td>boolean</td><td>If <code>true</code> draft of reply will be created instead.</td></tr><tr><td>isHtml</td><td>boolean</td><td>If <code>true</code> indicates that message content should be processed as HTML with tags, classes and attributes</td></tr><tr><td>isTicketNeededToBeCompleted</td><td>boolean</td><td>If <code>true</code> ticket status will be set to <code>completed</code> after a reply creation</td></tr><tr><td>message</td><td>string</td><td>Reply content</td></tr><tr><td>parentReplyId</td><td>nullable integer</td><td>If <code>null</code> reply of the 1st level will be created. Should contain reply Id of parent if subreply needs to be created</td></tr><tr><td>suppressTicketStatusAutoupdate</td><td>boolean</td><td>if <code>true</code> ticket status won't be updated automatically after adding a reply</td></tr></tbody></table>

#### Response

```json
{
	"data": {
		"attachments": [],
		"author": {
			"customIdentifier": null,
			"id": "0da5a9e8-90ef-403f-873c-e20e4d298558",
			"name": "Staff name",
			"image": "",
			"email": "staffEmailLogin@domain.com",
			"status": "team",
			"isBot": false
		},
		"ccEmails": [],
		"creationTime": "2020-03-05T17:58:23.0186292+00:00",
		"htmlMessage": "new reply text",
		"id": 156372820,
		"level": 0,
		"message": "new reply text",
		"parentReplyId": null,
		"properties": {
			"isByTeam": true,
			"isDraft": false,
			"isHidden": false
		},
		"ticketId": 443484636,
		"toEmails": []
	},
	"errorCode": -1,
	"errorText": null
}
```

`Data` field will contain [Reply](https://developers.socialboards.com/docs/apis/tickets/reference/objects/reply) model.


# List Replies

{% hint style="warning" %}
All API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### Request

```
GET /tickets/{ticketId}/replies
```

#### Query Parameters

<table><thead><tr><th>Name</th><th width="100">Type</th><th width="100">Required</th><th>Comments</th></tr></thead><tbody><tr><td>ticketId</td><td>integer</td><td>yes</td><td>Id of ticket you want to get replies</td></tr></tbody></table>

#### Response

```json
{
	"data": [
		{
			"attachments": [],
			"author": {
				"customIdentifier": null,
				"id": "dd5a1056-98c7-4e32-9bc3-1c5aa25cf403",
				"name": "Anonymous user",
				"image": null,
				"email": null,
				"status": "client",
				"isBot": false
			},
			"ccEmails": [],
			"creationTime": "2021-12-15T23:57:26.8940447+00:00",
			"htmlMessage": "Anonymisert innhold",
			"id": 26960194,
			"level": 0,
			"message": "Anonymisert innhold",
			"parentReplyId": null,
			"properties": {
				"isByTeam": false,
				"isDraft": false,
				"isHidden": false
			},
			"ticketId": 13316792,
			"toEmails": []
		}
	],
	"errorCode": -1,
	"errorText": null
}
```

`Data` field will contain an array of [Reply](https://developers.socialboards.com/docs/apis/tickets/reference/objects/reply) models.


# Add Note To Ticket

{% hint style="warning" %}
All API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### Request

```
POST /tickets/{ticketId}/notes
```

#### Query Parameters

<table><thead><tr><th>Name</th><th width="100">Type</th><th width="100">Required</th><th>Comments</th></tr></thead><tbody><tr><td>ticketId</td><td>integer</td><td>yes</td><td>Id of ticket you want to create note in</td></tr></tbody></table>

#### Request Body

```json
{
	"attachments": [
		{
			"isContentPart": null,
			"name": "filename.png",
			"url": "https://your.attachment.url/filename.png"
		}
	],
	"author": {
		"email": "staffEmailLogin@domain.com"
	},
	"htmlMessage": null,
	"message": "Note text"
}
```

Body of request should contain the following model serialized to JSON.

| Field       | Type                                                                                                                       | Comments          |
| ----------- | -------------------------------------------------------------------------------------------------------------------------- | ----------------- |
| attachments | array of [Base Attachment](https://developers.socialboards.com/docs/apis/tickets/reference/objects/base-attachment) models | Note attachments  |
| author      | [Note Creator](https://developers.socialboards.com/docs/apis/tickets/reference/objects/reply-note-creator) model           | Note creator info |
| htmlMessage | string                                                                                                                     | Note html content |
| message     | string                                                                                                                     | Note content      |

#### Response

```json
{
	"data": {
		"id": 297991,
		"message": "Note text",
		"htmlMessage": null,
		"attachments": [],
		"author": {
			"customIdentifier": null,
			"id": "0da5a9e8-90ef-403f-873c-e20e4d298558",
			"name": "Staff name",
			"image": "",
			"email": "staffEmailLogin@domain.com",
			"status": "team",
			"isBot": false
		},
		"mentionedUsers": [],
		"creationTime": "2020-03-05T18:34:51.2599354+00:00"
	},
	"errorCode": -1,
	"errorText": null
}
```

`Data` field will contain [Note](https://developers.socialboards.com/docs/apis/tickets/reference/objects/note) model.


# Update Note

{% hint style="warning" %}
All API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### **Request**

```
PATCH /tickets/{ticketId}/notes/{noteId}
```

#### Query Parameters

<table><thead><tr><th>Name</th><th width="100">Type</th><th width="100">Required</th><th>Comments</th></tr></thead><tbody><tr><td>ticketId</td><td>integer</td><td>yes</td><td>Id of ticket note added in</td></tr><tr><td>noteId</td><td>integer</td><td>yes</td><td>Id of note you want to update</td></tr></tbody></table>

#### Request Body

```json
{
	"attachments": [
		{
			"isContentPart": null,
			"name": "filename.png",
			"url": "https://your.attachment.url/filename.png"
		}
	],
	"htmlMessage": null,
	"message": "Updated note text"
}
```

Body of request should contain the following model serialized to JSON.

| Field       | Type                                                                                                                       | Comments          |
| ----------- | -------------------------------------------------------------------------------------------------------------------------- | ----------------- |
| attachments | array of [Base Attachment](https://developers.socialboards.com/docs/apis/tickets/reference/objects/base-attachment) models | Reply attachments |
| htmlMessage | string                                                                                                                     | Note html content |
| message     | string                                                                                                                     | Note content      |

```json
{
	"data": {
		"id": 297991,
		"message": "Updated note text",
		"htmlMessage": null,
		"attachments": [],
		"author": {
			"customIdentifier": null,
			"id": "0da5a9e8-90ef-403f-873c-e20e4d298558",
			"name": "Staff name",
			"image": "",
			"email": "staffEmailLogin@domain.com",
			"status": "team",
			"isBot": false
		},
		"mentionedUsers": [],
		"creationTime": "2020-03-05T18:34:51.2599354+00:00"
	},
	"errorCode": -1,
	"errorText": null
}
```

`Data` field will contain updated [Note](https://developers.socialboards.com/docs/apis/tickets/reference/objects/note) model.


# Delete Note

{% hint style="warning" %}
All API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### Request

```
DELETE /tickets/{ticketId}/notes/{noteId}
```

#### Query Parameters

<table><thead><tr><th>Name</th><th width="100">Type</th><th width="100">Required</th><th>Comments</th></tr></thead><tbody><tr><td>ticketId</td><td>integer</td><td>yes</td><td>Id of ticket note added in</td></tr><tr><td>noteId</td><td>integer</td><td>yes</td><td>Id of note you want to delete</td></tr></tbody></table>

#### Response

```json
{
  "data": {},
  "errorCode": -1,
  "errorText": null
}
```


# List tags

{% hint style="warning" %}
All API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### Request

```
GET /tags
```

#### Query Parameters

This endpoint doesn't require query parameters.

#### Response

```json
{
    "data": [
        {
            "id": 1386,
            "text": "Email"
        },
        {
            "id": 1387,
            "text": "Important"
        },
        {
            "id": 1388,
            "text": "VIP"
        }
    ],
    "errorCode": -1,
    "errorText": null
}
```

`Data` field will contain an array of [Tag](https://developers.socialboards.com/docs/apis/tickets/reference/objects/tag) models.


# Replace Ticket Tags

{% hint style="warning" %}
All API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### Request

```
PUT /tickets/{ticketId}/tags
```

#### Query Parameters

<table><thead><tr><th>Name</th><th width="100">Type</th><th width="100">Required</th><th>Comments</th></tr></thead><tbody><tr><td>ticketId</td><td>integer</td><td>yes</td><td>Id of ticket you want to replace tags</td></tr></tbody></table>

#### Request Body

Body of request should contain the following array of [Tag](https://developers.socialboards.com/docs/apis/tickets/reference/objects/tag) models serialized to JSON.

```json
[
    {
        "id": 1386,
        "text": "Email"
    },
    {
        "id": 1387,
        "text": "Important"
    }
]
```

#### Response

```json
{
  "data": {},
  "errorCode": -1,
  "errorText": null
}
```


# Replace Reply Tags

{% hint style="warning" %}
All API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### Request

```
PUT /tickets/{ticketId}/replies/{replyId}/tags
```

#### Query Parameters

<table><thead><tr><th>Name</th><th width="100">Type</th><th width="100">Required</th><th>Comments</th></tr></thead><tbody><tr><td>ticketId</td><td>integer</td><td>yes</td><td>Id of ticket you want to replace tags</td></tr><tr><td>replyId</td><td>integer</td><td>yes</td><td>Id of reply you want to replace tags</td></tr></tbody></table>

#### Request Body

Body of request should contain the following array of [Tag](https://developers.socialboards.com/docs/apis/tickets/reference/objects/tag) models serialized to JSON.

```json
[
    {
        "id": 1386,
        "text": "Email"
    },
    {
        "id": 1387,
        "text": "Important"
    }
]
```

#### Response

```json
{
  "data": {},
  "errorCode": -1,
  "errorText": null
}
```


# Get Widget Schedule List

{% hint style="warning" %}
All API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### Request

```
GET /widgets/{widgetId}/schedule
```

#### Query Parameters

<table><thead><tr><th>Name</th><th width="100">Type</th><th width="100">Required</th><th>Comments</th></tr></thead><tbody><tr><td>widgetId</td><td>integer</td><td>yes</td><td>Id of widget you want schedule to</td></tr></tbody></table>

#### Response

```json
{
	"communityId": 15,
	"customTimes": {
		"monday": [
			{
				"startAt": "00:01:00",
				"endAt": "18:00:00"
			}
		],
		"tuesday": [
			{
				"startAt": "00:01:00",
				"endAt": "18:00:00"
			}
		],
		"wednesday": [
			{
				"startAt": "00:01:00",
				"endAt": "18:00:00"
			}
		],
		"thursday": [
			{
				"startAt": "00:01:00",
				"endAt": "18:00:00"
			}
		],
		"friday": [
			{
				"startAt": "00:01:00",
				"endAt": "18:00:00"
			}
		],
		"saturday": [
			{
				"startAt": "18:30:00",
				"endAt": "19:00:00"
			}
		],
		"sunday": [
			{
				"startAt": "18:30:00",
				"endAt": "19:00:00"
			}
		]
	},
	"timePeriod": 3,
	"widgetId": 706
}
```

Response field will contain [Widget Schedule](https://developers.socialboards.com/docs/apis/tickets/reference/objects/widget-schedule) objects.


# API Request Result

All responses will contain the following common properties, but the contents and structure of each responses varies depending on the endpoint, you used.

Example:

```json
{
	"errorCode": -1,
	"errorText": null,
	"data": {}
}
```

| Field     | Type    | Comments                                                                                                             |
| --------- | ------- | -------------------------------------------------------------------------------------------------------------------- |
| data      | object  | Contains the result of the request execution. It may be null if no data is returned for this request                 |
| errorCode | integer | The error code generated during the execution of the request. If the request was successful, the value will be `-1`  |
| errorText | string  | The error message generated during the execution of the request. If request was successful, the value will be `null` |


# Webhook Payload

All payloads will contain the following common properties, but the contents and structure of each payload varies depending on the event, you are subscribed to. Refer to each [event’s reference document](https://developers.socialboards.com/docs/apis/tickets/reference/events) to see which fields will be included.

Example:

```json
{
    "CommunityName": "communityName",
    "EventType": "event_name",
    "Events": [],
    "TicketId": 0
}
```

| Field         | Type    | Comments                                                                                                                           |
| ------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| CommunityName | string  | Name of the socialboards inbox in which the tickets, replies and notes enters the system                                           |
| Event type    | string  | Type of happened event. See [Events](https://developers.socialboards.com/docs/apis/tickets/reference/events) page for more details |
| Events        | Array   | Event payload (structure depends on event type)                                                                                    |
| TicketId      | integer | Id of a ticket caused this event.                                                                                                  |


# Objects

* [Base Attachment](https://developers.socialboards.com/docs/apis/tickets/reference/objects/base-attachment)
* [Category](https://developers.socialboards.com/docs/apis/tickets/reference/objects/category)
* [Custom Field](https://developers.socialboards.com/docs/apis/tickets/reference/objects/custom-field)
* [Custom Field Id with Value](https://developers.socialboards.com/docs/apis/tickets/reference/objects/base-custom-field)
* [Custom Field Possible Value](https://developers.socialboards.com/docs/apis/tickets/reference/objects/custom-field-possible-value)
* [Custom Field Value](https://developers.socialboards.com/docs/apis/tickets/reference/objects/custom-field-value)
* [Custom Times Widget Schedule](https://developers.socialboards.com/docs/apis/tickets/reference/objects/custom-times-widget-schedule)
* [Note](https://developers.socialboards.com/docs/apis/tickets/reference/objects/note)
* [Reply](https://developers.socialboards.com/docs/apis/tickets/reference/objects/reply)
* [Reply / Note Creator](https://developers.socialboards.com/docs/apis/tickets/reference/objects/reply-note-creator)
* [Reply Properties](https://developers.socialboards.com/docs/apis/tickets/reference/objects/reply-properties)
* [Schedule Time](https://developers.socialboards.com/docs/apis/tickets/reference/objects/schedule-time)
* [Tag](https://developers.socialboards.com/docs/apis/tickets/reference/objects/tag)
* [Teammate](https://developers.socialboards.com/docs/apis/tickets/reference/objects/teammate)
* [Ticket](https://developers.socialboards.com/docs/apis/tickets/reference/objects/ticket)
* [Ticket Action Included Items](https://developers.socialboards.com/docs/apis/tickets/reference/objects/ticket-action-included-items)
* [Ticket Creator](https://developers.socialboards.com/docs/apis/tickets/reference/objects/ticket-creator)
* [Ticket Id with Field Value](https://developers.socialboards.com/docs/apis/tickets/reference/objects/ticket-id-with-field-value)
* [Ticket Log](https://developers.socialboards.com/docs/apis/tickets/reference/objects/ticket-log)
* [Ticket Properties](https://developers.socialboards.com/docs/apis/tickets/reference/objects/ticket-properties)
* [User](https://developers.socialboards.com/docs/apis/tickets/reference/objects/user)
* [User Group](https://developers.socialboards.com/docs/apis/tickets/reference/objects/user-group)
* [Widget Schedule](https://developers.socialboards.com/docs/apis/tickets/reference/objects/widget-schedule)


# Base Attachment

#### **Example**

```json
{
    "url": "https://your.attachment.url/filename.png",
    "name": "filename.png"
}
```

#### Fields

| Field | Type   | Comments        |
| ----- | ------ | --------------- |
| url   | string | Attachment url  |
| name  | string | Attachment name |


# Category

#### **Example**

```json
{
    "autoArchive": false,
    "canBeChosen": true,
    "isHidden": false,
    "isMuted": false,
    "parentId": null,
    "id": 15597,
    "name": "Customers"
}
```

#### Fields

| Field       | Type             | Comments                                                                                                                  |
| ----------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------- |
| autoArchive | boolean          | If `true` ticket with such category will be automatically archived after creation                                         |
| canBeChosen | boolean          | If `true` ticket with such category can be created. If `false` client should choose one of subcategories to create ticket |
| id          | integer          | Unique Id of category                                                                                                     |
| isHidden    | boolean          | If `true` category should be hidden from public ticket forms                                                              |
| isMuted     | boolean          | If `true` ticket with such category will not generate email, browser or other notification after creation                 |
| name        | string           | Name of the category                                                                                                      |
| parentId    | nullable integer | Id parent category. Value is set to `null` for root categories                                                            |


# Custom Field

#### **Example**

```json
{
      "assignedCategoryIds": [],
      "defaultValue": null,
      "id": 42623,
      "isHidden": false,
      "isRequired": false,
      "isSensitiveData": false,
      "name": "Shop region",
      "order": 1,
      "placeholder": "region",
      "possibleValues": 
      [
        {
          "order": 1,
          "value": "Østfold"
        },
        {
          "order": 2,
          "value": "Akershus"
        },
        {
          "order": 3,
          "value": "Oslo"
        }
      ],
      "type": "region",
      "value": null
}
```

#### Fields

| Field               | Type                                                                                                                                   | Comments                                                                                                                                                                                                                                        |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| assignedCategoryIds | array of integers                                                                                                                      | Ids of categories which tickets should contain this field (Obsolete)                                                                                                                                                                            |
| defaultValue        | string                                                                                                                                 | string containing default value. Format of string depends on field type (correct formats can be checked in this [document](https://developers.socialboards.com/docs/apis/tickets/reference/enumerations/custom-field-types-and-values-formats)) |
| id                  | integer                                                                                                                                | Unique Id of custom field                                                                                                                                                                                                                       |
| isHidden            | boolean                                                                                                                                | If `true` custom field should be hidden from public ticket forms                                                                                                                                                                                |
| isRequired          | boolean                                                                                                                                | If `true` fulfilling this field is required for ticket with categories field assigned to                                                                                                                                                        |
| isSensitiveData     | boolean                                                                                                                                | If `true` field values will be deleted after ticket anonymization due to GDPR                                                                                                                                                                   |
| name                | string                                                                                                                                 | Name of custom field                                                                                                                                                                                                                            |
| order               | integer                                                                                                                                | Order of showing on web forms or other public places. (fields with less number will be shown before fields with bigger)                                                                                                                         |
| placeholder         | string                                                                                                                                 | Text of placeholder of field                                                                                                                                                                                                                    |
| possibleValues      | array of [Possible Values](https://developers.socialboards.com/docs/apis/tickets/reference/objects/custom-field-possible-value) models | Array of possible value for custom field                                                                                                                                                                                                        |
| type                | string                                                                                                                                 | Type of custom field (ex. "text\_input", "email", "date") List of all possible type can be found in this [document](https://developers.socialboards.com/docs/apis/tickets/reference/enumerations/custom-field-types-and-values-formats)         |
| value               | string                                                                                                                                 | String containing value. Format of string depends on field type (correct formats can be checked in this [document](https://developers.socialboards.com/docs/apis/tickets/reference/enumerations/custom-field-types-and-values-formats))         |


# Custom Field Id with Value

#### **Example**

```json
{
    "id": 42623,
    "name": "City",
    "value": "Oslo"
}
```

#### Fields

| Field | Type    | Comments                                                                                                                                                                                                                                |
| ----- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id    | integer | Unique Id of custom field                                                                                                                                                                                                               |
| name  | string  | Name of custom field                                                                                                                                                                                                                    |
| value | string  | string containing value. Format of string depends on field type (correct formats can be checked in this [document](https://developers.socialboards.com/docs/apis/tickets/reference/enumerations/custom-field-types-and-values-formats)) |


# Custom Field Possible Value

#### **Example**

```json
{
    "order": 20,
    "value": "Finnmark"
}
```

#### Fields

| Field | Type   | Comments                                                                                                                                                                                                                                |
| ----- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| order | int    | Fields display order. Values with less number will be shown before values with bigger order number                                                                                                                                      |
| value | string | string containing value. Format of string depends on field type (correct formats can be checked in this [document](https://developers.socialboards.com/docs/apis/tickets/reference/enumerations/custom-field-types-and-values-formats)) |


# Custom Field Value

#### **Example**

```json
{
    "customFieldId":95475,
    "value":"some text"
}
```

#### Fields

| Field         | Type    | Comments                                                                                                                                                                                                                                |
| ------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| customFieldId | integer | Unique Id of custom field                                                                                                                                                                                                               |
| value         | string  | string containing value. Format of string depends on field type (correct formats can be checked in this [document](https://developers.socialboards.com/docs/apis/tickets/reference/enumerations/custom-field-types-and-values-formats)) |


# Custom Times Widget Schedule

Object represents custom schedule of events on specified days of week.

#### **Example**

```json
{
    "monday": 
    [
        {
            "startAt": "00:01:00",
            "endAt": "18:00:00"
        }
    ],
    "tuesday": 
    [
        {
            "startAt": "00:01:00",
            "endAt": "18:00:00"
        }
    ],
    "wednesday": 
    [
        {
            "startAt": "00:01:00",
            "endAt": "18:00:00"
        }
    ],
    "thursday": 
    [
        {
            "startAt": "00:01:00",
            "endAt": "18:00:00"
        }
    ],
    "friday": 
    [
        {
            "startAt": "00:01:00",
            "endAt": "18:00:00"
        }
    ],
    "saturday": 
    [
        {
            "startAt": "18:30:00",
            "endAt": "19:00:00"
        }
    ],
    "sunday": 
    [
        {
            "startAt": "18:30:00",
            "endAt": "19:00:00"
        }
    ]
}
```

#### Fields

| Field     | Type                                                                                                                  | Comments                                  |
| --------- | --------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
| monday    | array of [ScheduleTime](https://developers.socialboards.com/docs/apis/tickets/reference/objects/schedule-time) models | Represents of schedules work in Monday    |
| tuesday   | array of [ScheduleTime](https://developers.socialboards.com/docs/apis/tickets/reference/objects/schedule-time) models | Represents of schedules work in Tuesday   |
| wednesday | array of [ScheduleTime](https://developers.socialboards.com/docs/apis/tickets/reference/objects/schedule-time) models | Represents of schedules work in Wednesday |
| thursday  | array of [ScheduleTime](https://developers.socialboards.com/docs/apis/tickets/reference/objects/schedule-time) models | Represents of schedules work in Thursday  |
| friday    | array of [ScheduleTime](https://developers.socialboards.com/docs/apis/tickets/reference/objects/schedule-time) models | Represents of schedules work in Friday    |
| saturday  | array of [ScheduleTime](https://developers.socialboards.com/docs/apis/tickets/reference/objects/schedule-time) models | Represents of schedules work in Saturday  |
| sunday    | array of [ScheduleTime](https://developers.socialboards.com/docs/apis/tickets/reference/objects/schedule-time) models | Represents of schedules work in Sunday    |


# Note

#### **Example**

```json
{
	"data": {
		"id": 718030,
		"message": "Internal note from PublicAPI",
		"htmlMessage": null,
		"attachments": [
			{
				"isContentPart": false,
				"name": "Postman attach",
				"url": "https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png"
			}
		],
		"author": {
			"customIdentifier": null,
			"email": "support_agent007@socialboards.com",
			"id": "513840d3-a2fb-4b16-8381-9afeb6cf5993",
			"image": null,
			"isBot": false,
			"name": "Support Agent 007",
			"status": "team"
		},
		"mentionedUsers": [],
		"creationTime": "2023-12-07T15:16:42.3741435+00:00"
	},
	"errorCode": -1,
	"errorText": null
}
```

#### Fields

| Field          | Type                                                                                                                       | Comments                                                         |
| -------------- | -------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| attachments    | array of [Base Attachment](https://developers.socialboards.com/docs/apis/tickets/reference/objects/base-attachment) models | Note attachments                                                 |
| author         | [User](https://developers.socialboards.com/docs/apis/tickets/reference/objects/user) model                                 | Note creator info                                                |
| creationTime   | string                                                                                                                     | Note creation time. Represent datetime string in ISO 8601 format |
| htmlMessage    | string                                                                                                                     | Note html content                                                |
| id             | integer                                                                                                                    | Note unique id                                                   |
| mentionedUsers | array of [User](https://developers.socialboards.com/docs/apis/tickets/reference/objects/user) models                       | Users mentioned in note                                          |
| message        | string                                                                                                                     | Note content                                                     |


# Reply

#### **Example**

```json
{
	"data": {
		"attachments": [],
		"author": {
			"customIdentifier": null,
			"id": "0da5a9e8-90ef-403f-873c-e20e4d298558",
			"name": "Staff name",
			"image": "",
			"email": "staffEmailLogin@domain.com",
			"status": "team",
			"isBot": false
		},
		"ccEmails": [],
		"creationTime": "2020-03-05T17:58:23.0186292+00:00",
		"htmlMessage": "new reply text",
		"id": 156372820,
		"level": 0,
		"message": "new reply text",
		"parentReplyId": null,
		"properties": {
			"isByTeam": true,
			"isDraft": false,
			"isHidden": false
		},
        "tags": [],
		"ticketId": 443484636,
		"toEmails": []
	},
	"errorCode": -1,
	"errorText": null
}
```

#### Fields

| Field         | Type                                                                                                                       | Comments                                                            |
| ------------- | -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| attachments   | array of [Base Attachment](https://developers.socialboards.com/docs/apis/tickets/reference/objects/base-attachment) models | Reply attachments                                                   |
| author        | [User](https://developers.socialboards.com/docs/apis/tickets/reference/objects/user) model                                 | Reply creator info                                                  |
| ccEmails      | array of strings                                                                                                           | An array of emails for additional recipients receiving email copies |
| creationTime  | string                                                                                                                     | Reply creation time. Represent datetime string in ISO 8601 format   |
| htmlMessage   | string                                                                                                                     | Reply html content                                                  |
| id            | integer                                                                                                                    | Unique reply id                                                     |
| level         | integer                                                                                                                    | Indicates the hierarchical level of a reply in a ticket thread      |
| message       | string                                                                                                                     | Reply text content                                                  |
| parentReplyId | nullable integer                                                                                                           | Unique id of parent reply. If null the reply is a root reply        |
| properties    | [ReplyProperties](https://developers.socialboards.com/docs/apis/tickets/reference/objects/reply-properties) model          | Properties or attributes associated with a reply                    |
| tags          | array of [Tag](https://developers.socialboards.com/docs/apis/tickets/reference/objects/tag) models                         | Tags associated with a reply                                        |
| ticketId      | integer                                                                                                                    | Unique ticket id                                                    |
| toEmails      | array of strings                                                                                                           | Array of email addresses for primary recipients                     |


# Reply/Note Creator

#### **Example**

```json
{
    "email": "bill_smith@gmail.com",
    "name": "Bill Smith"
}
```

#### Fields

| Field            | Type   | Comments                                                                                                                                                                                                                                                                                                            |
| ---------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| customIdentifier | string | Alternative user identifier (e.g., social security number, account number). Can be used instead of `email` when creating replies. Not supported when this object is used to create notes. The value is trimmed and stored in lowercase, so responses may return it in a different case than provided in the request |
| email            | string | Creator email address                                                                                                                                                                                                                                                                                               |
| name             | string | Creator name. Typically used as the user name if the user does not exist                                                                                                                                                                                                                                            |


# Reply Properties

#### **Example**

```json
{
	"isByTeam": true,
	"isDraft": false,
	"isHidden": false
}
```

#### Fields

| Field    | Type    | Comments                                        |
| -------- | ------- | ----------------------------------------------- |
| isByTeam | boolean | If `true` reply has been created by teammate    |
| isDraft  | boolean | If `true` reply is in draft status              |
| isHidden | boolean | If `true` reply is hidden in SoMe origin source |


# Schedule Time

Object represents a schedule of event.

#### **Example**

```json
{
    "endAt": "18:00:00",
    "startAt": "00:01:00"
}
```

#### Fields

| Field   | Type   | Comments                                                                    |
| ------- | ------ | --------------------------------------------------------------------------- |
| endAt   | string | Represents the specific time when the event ends in the format 'HH:mm:ss'   |
| startAt | string | Represents the specific time when the event begins in the format 'HH:mm:ss' |


# Tag

#### Example

```json
{
    "id": 1386,
    "text": "Email"
}
```

#### Fields

| Field | Type    | Comments      |
| ----- | ------- | ------------- |
| id    | integer | Unique tag Id |
| text  | string  | Tag text      |


# Teammate

#### Example

```json
{
    "email": "RobertBaker@gmail.com",
    "id": "31aee6af-3e38-40d9-98b1-aa2b9238f24d",
    "name": "Robert Baker",
    "role": "admin"
}
```

#### Fields

| Field | Type                                                                                                            | Comments               |
| ----- | --------------------------------------------------------------------------------------------------------------- | ---------------------- |
| email | string                                                                                                          | Teammate email address |
| id    | Guid                                                                                                            | Unique teammate Id     |
| name  | string                                                                                                          | Teammate name          |
| role  | [User role](https://developers.socialboards.com/docs/apis/tickets/reference/enumerations/user-role) enumeration | Teammate role          |


# Ticket

#### **Example**

```json
{
	"id": 255762,
	"title": "New car price list.",
	"message": "Hello I want to buy a new car, how can I get a price list?",
	"htmlMessage": "<div id=\"sb-message-8dbf66986449599\" class=\"sb-html-message\">Hello I want to buy a new car, how can I get a price list?</div>",
	"author": {
		"customIdentifier": null,
		"email": "bill_smith@gmail.com",
		"id": "3561ab34-b6bd-4998-97e6-4ad5a58a89e8",
		"image": null,
		"isBot": false,
		"name": "Bill Smith",
		"status": "client"
	},
	"category": null,
	"creationTime": "2023-12-06T17:42:07.7888252+03:00",
    "customFields": [],
	"lastThreadElementCreationTime": "2023-12-06T17:42:07.7888252+03:00",
	"lockedBy": null,
	"originalLink": null,
	"properties": {
		"isAnonymized": false,
		"isMuted": false,
		"hasAttachments": true,
		"hasDraft": false,
		"isAssignedToBot": false,
		"isDeleted": false,
		"isExpired": false,
		"isHidden": false,
		"isLocked": false,
		"isSpam": false,
		"isSensitive": false
	},
	"replyCount": 0,
	"isMuted": false,
	"sentiment": "question",
	"source": "web",
	"detailedSource": "web_website",
	"sourceName": null,
	"status": "open",
	"tags": [],
	"attachments": [
		{
			"isContentPart": false,
			"name": "filename.png",
			"url": "https://your.attachment.url/filename.png"
		}
	]
}
```

#### Fields

<table><thead><tr><th width="291.3333333333333">Field</th><th>Type</th><th>Comments</th></tr></thead><tbody><tr><td>attachments</td><td>array of <a href="https://developers.socialboards.com/docs/apis/tickets/reference/objects/base-attachment">Base Attachment</a> models</td><td>Ticket attachments</td></tr><tr><td>author</td><td><a href="https://developers.socialboards.com/docs/apis/tickets/reference/objects/user">User</a> model</td><td>Ticket creator</td></tr><tr><td>category</td><td><a href="https://developers.socialboards.com/docs/apis/tickets/reference/objects/category">Category</a> model</td><td>Ticket category. If null ticket has no category</td></tr><tr><td>creationTime</td><td>string</td><td>Indicates the time when the ticket was created. Represent datetime string in ISO 8601 format</td></tr><tr><td>customFields</td><td>array of <a href="https://developers.socialboards.com/docs/apis/tickets/reference/objects/base-custom-field">array of Custom Field Id with Value models</a> models</td><td>Ticket custom fields</td></tr><tr><td>detailedSource</td><td><a href="https://developers.socialboards.com/docs/apis/tickets/reference/enumerations/detailed-ticket-source">Detailed Ticket Source</a> enumeration</td><td>Indicates detailed ticket source</td></tr><tr><td>htmlMessage</td><td>string</td><td>Ticket html content</td></tr><tr><td>id</td><td>integer</td><td>Unique ticket id</td></tr><tr><td>lastThreadElementCreationTime</td><td>string</td><td>Indicates the time when the most recent element in a thread was created. Represent datetime string in ISO 8601 format</td></tr><tr><td>lockedBy</td><td><a href="https://developers.socialboards.com/docs/apis/tickets/reference/objects/user">User</a> model</td><td>Teammate who assigned to the ticket</td></tr><tr><td>message</td><td>string</td><td>Ticket text content</td></tr><tr><td>originalLink</td><td>string</td><td>Permanent link or URL to the post if ticket created from SoMe source; if not, will be null</td></tr><tr><td>properties</td><td><a href="https://developers.socialboards.com/docs/apis/tickets/reference/objects/ticket-properties">Ticket Properties</a> model</td><td>Properties or attributes associated with a ticket</td></tr><tr><td>replyCount</td><td>integer</td><td>Indicates the total count of replies in the ticket</td></tr><tr><td>sentiment</td><td><a href="https://developers.socialboards.com/docs/apis/tickets/reference/enumerations/sentiment">Sentiment</a> enumeration</td><td>Ticket sentiment</td></tr><tr><td>source</td><td><a href="https://developers.socialboards.com/docs/apis/tickets/reference/enumerations/ticket-source">Ticket Source</a> enumeration</td><td>Indicates general ticket source</td></tr><tr><td>sourceName</td><td>string</td><td>Indicates the specific source where ticket from (e.g., page post, mention, group post, review, etc)</td></tr><tr><td>status</td><td><a href="https://developers.socialboards.com/docs/apis/tickets/reference/enumerations/ticket-status">Ticket Status</a> enumeration</td><td>Current ticket status</td></tr><tr><td>tags</td><td>array of strings</td><td>Attached ticket tags</td></tr><tr><td>title</td><td>string</td><td>Ticket title</td></tr></tbody></table>


# Ticket Action Included Items

#### **Example**

```json
{
    "includedItems": {
        "categories": [],
        "tags": [],
        "users": [
            {
                "customIdentifier": null,
                "email": "wandmaster@olivanders.com",
                "id": "841c30d5-6ae4-4df1-939e-04c55aed5e98",
                "image": null,
                "isBot": false,
                "name": "Garrick Ollivander",
                "status": "team"
            }
        ]
    }
}
```

#### Fields

| Field      | Type                                                                                                                                              | Comments                                                  |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
| categories | array of [Category](https://developers.socialboards.com/docs/apis/tickets/reference/objects/category) models                                      | The categories information associated with the log record |
| tags       | array of [Tag](https://github.com/SocialBoards/public-platform-docs/blob/master/apis/tickets/reference/objects/broken-reference/README.md) models | The tags information associated with the log record       |
| users      | array of [User](https://developers.socialboards.com/docs/apis/tickets/reference/objects/user) models                                              | The users information associated with the log record      |


# Ticket Creator

#### **Example**

```json
{
    "customIdentifier": null,
    "email": "bill_smith@gmail.com",
    "image": null,
    "name": "Bill Smith",
    "phoneNumber": null
}
```

Identify the ticket creator using `email` or `customIdentifier`. At least one of `email` or `customIdentifier` must be provided.

#### Fields

| Field            | Type   | Comments                                                                                                   |
| ---------------- | ------ | ---------------------------------------------------------------------------------------------------------- |
| customIdentifier | string | Alternative user identifier (e.g., social security number, account number). Can be used instead of `email` |
| email            | string | Email address of ticket creator                                                                            |
| image            | string | Url of creator's avatar                                                                                    |
| name             | string | Name of person created ticket                                                                              |
| phoneNumber      | string | Phone number of creator                                                                                    |


# Ticket Id with Field Value

#### **Example**

```json
{
    "customFieldValues": [
        {
            "id": 26690,
            "value": "Magic Cloudy Shop"
        },
        {
            "id": 26703,
            "value": "Arrows with Frozen Darts"
        },
        {
            "id": 26704,
            "value": "100"
        },
        {
            "id": 26706,
            "value": "2024-01-23"
        }
    ],
    "ticketId": 256245
}
```

#### Fields

| Field             | Type                                                                                                                                  | Comments                                                                                               |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| customFieldValues | array of [Custom FIeld with Value](https://developers.socialboards.com/docs/apis/tickets/reference/objects/custom-field-value) models | The values of the custom fields associated with the ticket. If the ticket has no fields, will be empty |
| ticketId          | integer                                                                                                                               | Unique ticket id                                                                                       |


# Ticket Log

#### **Example**

```json
{
    "data": [
        {
            "actionString": "changed the status from \"Open\" to \"Pending\"",
            "actionType": "ticket_status_changed",
            "includedItems": {
                "categories": [],
                "tags": [],
                "users": []
            },
            "time": "2023-12-13T22:11:52.9031351+00:00",
            "user": {
                "customIdentifier": null,
                "email": "wandmaster@olivanders.com",
                "id": "841c30d5-6ae4-4df1-939e-04c55aed5e98",
                "image": null,
                "isBot": false,
                "name": "Garrick Ollivander",
                "status": "team"
            }
        },
        {
            "actionString": "sent a reply",
            "actionType": "reply_created",
            "includedItems": {
                "categories": [],
                "tags": [],
                "users": []
            },
            "time": "2023-12-13T22:11:52.7825391+00:00",
            "user": {
                "customIdentifier": null,
                "email": "wandmaster@olivanders.com",
                "id": "841c30d5-6ae4-4df1-939e-04c55aed5e98",
                "image": null,
                "isBot": false,
                "name": "Garrick Ollivander",
                "status": "team"
            }
        },
        {
            "actionString": "changed ticket assignee to {User:841c30d5-6ae4-4df1-939e-04c55aed5e98}",
            "actionType": "ticket_assigned_to_user",
            "includedItems": {
                "categories": [],
                "tags": [],
                "users": [
                    {
                        "email": "wandmaster@olivanders.com",
                        "id": "841c30d5-6ae4-4df1-939e-04c55aed5e98",
                        "image": null,
                        "isBot": false,
                        "name": "Garrick Ollivander",
                        "status": "team"
                    }
                ]
            },
            "time": "2023-12-13T22:11:39.031395+00:00",
            "user": {
                "customIdentifier": null,
                "email": "wandmaster@olivanders.com",
                "id": "841c30d5-6ae4-4df1-939e-04c55aed5e98",
                "image": null,
                "isBot": false,
                "name": "Garrick Ollivander",
                "status": "team"
            }
        },
        {
            "actionString": "read the ticket",
            "actionType": "ticket_read",
            "includedItems": {
                "categories": [],
                "tags": [],
                "users": []
            },
            "time": "2023-12-13T22:01:32.3169513+00:00",
            "user": {
                "customIdentifier": null,
                "email": "wandmaster@olivanders.com",
                "id": "841c30d5-6ae4-4df1-939e-04c55aed5e98",
                "image": null,
                "isBot": false,
                "name": "Garrick Ollivander",
                "status": "team"
            }
        },
        {
            "actionString": "created the ticket",
            "actionType": "ticket_created",
            "includedItems": {
                "categories": [],
                "tags": [],
                "users": []
            },
            "time": "2023-08-03T20:39:35.01+03:00",
            "user": {
                "customIdentifier": null,
                "email": "harrypotter@wizardmail.com",
                "id": "4c115b95-7b5e-42d6-bef8-f58d96c9615d",
                "image": null,
                "isBot": false,
                "name": "Harry Potter",
                "status": "client"
            }
        }
    ],
    "errorCode": -1,
    "errorText": null
}
```

#### Fields

| Field         | Type                                                                                                                                       | Comments                                                                                                                 |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
| actionString  | string                                                                                                                                     | Action log content                                                                                                       |
| actionType    | [ActionType](https://developers.socialboards.com/docs/apis/tickets/reference/enumerations/ticket-action-type) enumeration                  | Action log type                                                                                                          |
| includedItems | [Ticket Action Included Items](https://developers.socialboards.com/docs/apis/tickets/reference/objects/ticket-action-included-items) model | Represents additional details related to action log item. It is used to display extended information about the log event |
| time          | string                                                                                                                                     | Indicates the time when the ticket log element was created. Represent datetime string in ISO 8601 format                 |
| user          | [User](https://developers.socialboards.com/docs/apis/tickets/reference/objects/user) model                                                 | Represents a user who performed an action that resulted in creating a log record                                         |


# Ticket Properties

#### **Example**

```json
{
        "hasAttachments": true,
        "hasDraft": false,
        "isAnonymized": false,
        "isAssignedToBot": false,
        "isDeleted": false,
        "isExpired": false,
        "isHidden": false,
        "isLocked": false,
        "isMuted": false,
        "isSpam": false
}
```

#### Fields

| Field           | Type    | Comments                                                                                                        |
| --------------- | ------- | --------------------------------------------------------------------------------------------------------------- |
| hasAttachments  | boolean | If `true` ticket has attachments                                                                                |
| hasDraft        | boolean | If `true` ticket has drafted replies by any agent                                                               |
| isAnonymized    | boolean | If `true` ticket was anonymized by agents                                                                       |
| isAssignedToBot | boolean | If `true` ticket is assigned to bot                                                                             |
| isDeleted       | boolean | If `true` the ticket is deleted in its original location or source                                              |
| isExpired       | boolean | If `true` the tickets is expired and no longer actual. See Glossary to more information about ticket expiration |
| isHidden        | boolean | If `true` the ticket is hidden in its original location or source                                               |
| isLocked        | boolean | If `true` the ticket is assigned to agent                                                                       |
| isMuted         | boolean | If `true` the ticket is muted by agents                                                                         |
| isSpam          | boolean | If `true` the ticket is marked as spam                                                                          |


# User

**Example**

```json
{
    "customIdentifier": null,
    "email": "john@dow.com",
    "id": "fc2481f6-28a4-4ca7-849a-344fd6ab1b20",
    "image": null,
    "isBot": false,
    "name": "John",
    "status": "client"
}
```

**Fields**

| Field            | Type                                                                                                                          | Comments                                                                                     |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| customIdentifier | string                                                                                                                        | Custom identifier value, if the user was identified by a custom identifier. `null` otherwise |
| email            | string                                                                                                                        | User email address                                                                           |
| id               | Guid                                                                                                                          | User unique id                                                                               |
| image            | string                                                                                                                        | User avatar url                                                                              |
| isBot            | boolean                                                                                                                       | If `true`, it shows that the user is a bot                                                   |
| name             | string                                                                                                                        | User name                                                                                    |
| status           | [User status](https://developers.socialboards.com/docs/apis/external-chat-api/reference/enumerations/user-status) enumeration | User status in a SocialBoards system                                                         |


# User Group

#### **Example**

```json
{
    "id": 1,
    "name": "Second group"
}
```

#### Fields

| Field | Type   | Comments      |
| ----- | ------ | ------------- |
| id    | string | Id of group   |
| name  | string | Name of group |


# Widget Schedule

#### **Example**

```json
{
        "communityId": 15,
        "customTimes": {
            "monday": [
                {
                    "startAt": "00:01:00",
                    "endAt": "18:00:00"
                }
            ],
            "tuesday": [
                {
                    "startAt": "00:01:00",
                    "endAt": "18:00:00"
                }
            ],
            "wednesday": [
                {
                    "startAt": "00:01:00",
                    "endAt": "18:00:00"
                }
            ],
            "thursday": [
                {
                    "startAt": "00:01:00",
                    "endAt": "18:00:00"
                }
            ],
            "friday": [
                {
                    "startAt": "00:01:00",
                    "endAt": "18:00:00"
                }
            ],
            "saturday": [
                {
                    "startAt": "18:30:00",
                    "endAt": "19:00:00"
                }
            ],
            "sunday": [
                {
                    "startAt": "18:30:00",
                    "endAt": "19:00:00"
                }
            ]
        },
        "timePeriod": 3,
        "widgetId": 706
}
```

#### Fields

| Field       | Type                                                                                                                                       | Comments                                                                                                                               |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------- |
| communityId | integer                                                                                                                                    | Unique Id of community which widget belongs                                                                                            |
| customTimes | [Custom times widget schedule](https://developers.socialboards.com/docs/apis/tickets/reference/objects/custom-times-widget-schedule) model | Represent custom schedule of different days of week. If time period has state with value "3" custom times will present; otherwise null |
| timePeriod  | integer                                                                                                                                    | <p>Time period defined which type of schedule used for widget:<br>1: everyday<br>2: only weekdays<br>3: custom schedule</p>            |
| times       | array of [Schedule Time](https://developers.socialboards.com/docs/apis/tickets/reference/objects/schedule-time) models                     | Represent schedule. If time period has state with value "1" or "3" times field will present; otherwise null                            |
| widgetId    | integer                                                                                                                                    | Unique Id of widget                                                                                                                    |


# Events

| Event                                                                                                                     | Trigger                                                    |
| ------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| [ticket\_creation](https://developers.socialboards.com/docs/apis/tickets/reference/events/ticket-creation)                | New ticket comes into the system                           |
| [ticket\_status\_change](https://developers.socialboards.com/docs/apis/tickets/reference/events/ticket-status-change)     | Ticket status is changed (ex. from "Open" to "Closed")     |
| [ticket\_tags\_change](https://developers.socialboards.com/docs/apis/tickets/reference/events/ticket-tags-change)         | Tags were added or deleted from ticket                     |
| [ticket\_category\_change](https://developers.socialboards.com/docs/apis/tickets/reference/events/ticket-category-change) | Category were added, deleted or changed from ticket        |
| [reply\_creation](https://developers.socialboards.com/docs/apis/tickets/reference/events/reply-creation)                  | New repliy is added to an ongoing conversation in a ticket |
| [reply\_update](https://developers.socialboards.com/docs/apis/tickets/reference/events/reply-update)                      | Reply message is updated                                   |
| [reply\_deletion](https://developers.socialboards.com/docs/apis/tickets/reference/events/reply-deletion)                  | Reply is deleted from an ongoing conversation in a ticket  |
| [note\_creation](https://developers.socialboards.com/docs/apis/tickets/reference/events/note-creation)                    | New internal note has been created on a ticket             |
| [note\_update](https://developers.socialboards.com/docs/apis/tickets/reference/events/note-update)                        | An internal note message has been updated                  |
| [note\_deletion](https://developers.socialboards.com/docs/apis/tickets/reference/events/note-deletion)                    | An internal note has been deleted                          |


# Ticket Creation

#### Trigger

New ticket comes into the system.

#### Example

```json
{
    "CommunityName": "yourCompany",
    "EventType": "ticket_creation",
    "TicketId": 4478963,
    "Events": [
        {
            "InboxLink": "https://inbox.socialboards.com/yourCompany/tickets?ticketId=4478963",
            "Ticket": {
                "Attachments": [],
                "Author": {
                    "CustomIdentifier": null,
                    "Id": "35692164-bfaa-4c49-a23c-ecfa618f7d20",
                    "Name": "Robert Baker",
                    "Image": null,
                    "Email": "robert78baker@gmail.com",
                    "Status": "client",
                    "IsBot": false
                },
                "Category": {
                    "Id": 15721,
                    "Name": "Other cases"
                },
                "CreationTime": "2019-12-17T08:03:48.318717+01:00",
                "DetailedSource": "web_website",
                "Id": 4478963,
                "LastThreadElementCreationTime": "2019-12-17T08:03:48.318717+01:00",
                "LockedBy": null,
                "Message": "I want to take my cat to a vet",
                "OriginalLink": null,
                "Properties": {
                    "IsAnonymized": false,
                    "IsMuted": false,
                    "HasAttachments": false,
                    "HasDraft": false,
                    "IsAssignedToBot": false,
                    "IsDeleted": false,
                    "IsExpired": false,
                    "IsHidden": false,
                    "IsLocked": false,
                    "IsSpam": false,
                    "IsSensitive": false
                },
                "ReplyCount": 0,
                "IsMuted": false,
                "Sentiment": "question",
                "Source": "web",
                "SourceName": null,
                "Status": "open",
                "Tags": [],
                "Title": "Cat is ill",
                "HtmlMessage": "I want to take my cat to a vet"
            },
            "TicketId": 4478963,
            "EventTime": "2019-12-17T08:05:48.318717+01:00"
        }
    ]
}
```


# Ticket Status Change

#### Trigger

Status of the ticket is changed. It can happen for example when team member close the ticket. Status will be changed from `pending` to `open`.

#### Example

```json
{
    "CommunityName": "yourCompany",
    "EventType": "ticket_status_change",
    "TicketId": 4478963,
    "Events": [
        {
            "InboxLink": "https://inbox.socialboards.com/yourCompany/tickets?ticketId=4478963",
            "PreviousTicketStatus": "open",
            "Ticket": {
                "Attachments": null,
                "Author": {
                    "CustomIdentifier": null,
                    "Id": "35692164-bfaa-4c49-a23c-ecfa618f7d20",
                    "Name": "Robert Baker",
                    "Image": null,
                    "Email": "robert78baker@gmail.com",
                    "Status": "client",
                    "IsBot": false
                },
                "Category": {
                    "Id": 15721,
                    "Name": "Other cases"
                },
                "CreationTime": "2019-12-17T08:03:48.318717+01:00",
                "DetailedSource": "web_website",
                "Id": 4478963,
                "LastThreadElementCreationTime": "2019-12-17T08:10:03.8181291+01:00",
                "LockedBy": null,
                "Message": "I want to take my cat to a vet",
                "OriginalLink": null,
                "Properties": {
                    "IsAnonymized": false,
                    "IsMuted": false,
                    "HasAttachments": false,
                    "HasDraft": false,
                    "IsAssignedToBot": false,
                    "IsDeleted": false,
                    "IsExpired": false,
                    "IsHidden": false,
                    "IsLocked": false,
                    "IsSpam": false,
                    "IsSensitive": false
                },
                "ReplyCount": 1,
                "IsMuted": false,
                "Sentiment": "question",
                "Source": "web",
                "SourceName": null,
                "Status": "pending",
                "Tags": [],
                "Title": "Cat is ill",
                "HtmlMessage": "I want to take my cat to a vet"
            },
            "TicketId": 4478963,
            "EventTime": "2019-12-17T08:10:03.8181291+01:00"
        }
    ]
}
```


# Ticket Tags Change

#### Trigger

Tickets tags were updated (added new or delete existing).

#### Example

```json
{
    "CommunityName": "yourCompany",
    "EventType": "ticket_tags_change",
    "TicketId": 4478963,
    "Events": [
        {
            "InboxLink": "https://inbox.socialboards.com/yourCompany/tickets?ticketId=4484636",
            "PreviousTicketTags": [],
            "Ticket": {
                "Attachments": null,
                "Author": {
                    "CustomIdentifier": null,
                    "Id": "7c0a344a-c369-4e27-9840-88257a56e835",
                    "Name": "Bill Smith",
                    "Image": null,
                    "Email": "bill_smith@gmail.com",
                    "Status": "client",
                    "IsBot": false
                },
                "Category": {
                    "Id": 15597,
                    "Name": "Customers"
                },
                "CreationTime": "2019-12-18T19:00:03.6368531+01:00",
                "DetailedSource": "web_website",
                "Id": 4484636,
                "LastThreadElementCreationTime": "2019-12-18T19:00:03.6368531+01:00",
                "LockedBy": null,
                "Message": "Hello I want to buy a new car, how can I get a price list?",
                "OriginalLink": null,
                "Properties": {
                    "IsAnonymized": false,
                    "IsMuted": false,
                    "HasAttachments": true,
                    "HasDraft": false,
                    "IsAssignedToBot": false,
                    "IsDeleted": false,
                    "IsExpired": true,
                    "IsHidden": false,
                    "IsLocked": false,
                    "IsSpam": false,
                    "IsSensitive": false
                },
                "ReplyCount": 0,
                "IsMuted": false,
                "Sentiment": "question",
                "Source": "web",
                "SourceName": null,
                "Status": "open",
                "Title": "New car price list.",
                "HtmlMessage": "Hello I want to buy a new car, how can I get a price list?",
                "Tags": [
                    "urgent"
                ]
            },
            "TicketId": 4484636,
            "EventTime": "2019-12-19T09:03:03.6368531+01:00"
        }
    ]
}
```


# Ticket Category Change

#### Trigger

Tickets categories were updated (added new, delete existing or changed to another one).

#### Example

```json
{
    "CommunityName": "yourCompany",
    "EventType": "ticket_category_change",
    "TicketId": 4478963,
    "Events": [
        {
            "InboxLink": "https://inbox.socialboards.com/yourCompany/tickets?ticketId=4484636",
            "PreviousTicketCategoryId": null,
            "Ticket": {
                "Id": 4484636,
                "Title": "New car price list.",
                "Message": "Hello I want to buy a new car, how can I get a price list?",
                "HtmlMessage": "Hello I want to buy a new car, how can I get a price list?",
                "Author": {
                    "CustomIdentifier": null,
                    "Id": "bd909b4a-84fb-46ba-9e0e-581d045ed18d",
                    "Name": "John Dow",
                    "Image": null,
                    "Email": "john@dow.com",
                    "Status": "client",
                    "IsBot": false
                },
                "Category": {
                    "Id": 34016,
                    "Name": "005"
                },
                "CreationTime": "2022-11-09T10:12:59+01:00",
                "LastThreadElementCreationTime": "2022-11-09T10:12:59+01:00",
                "LockedBy": null,
                "OriginalLink": null,
                "Properties": {
                    "IsAnonymized": false,
                    "IsMuted": false,
                    "HasAttachments": true,
                    "HasDraft": false,
                    "IsAssignedToBot": false,
                    "IsDeleted": false,
                    "IsExpired": true,
                    "IsHidden": false,
                    "IsLocked": false,
                    "IsSpam": false,
                    "IsSensitive": false
                },
                "ReplyCount": 0,
                "IsMuted": false,
                "Sentiment": "question",
                "Source": "email",
                "DetailedSource": "email",
                "SourceName": "some@email.com",
                "Status": "open",
                "Tags": [
                    "urgent"
                ],
                "Attachments": null
            },
            "TicketId": 4484636,
            "EventTime": "2022-11-10T13:11:15.7663356+01:00"
        }
    ]
}
```


# Reply Creation

#### Trigger

New reply comes into the system and is added to one of existing ticket.

#### Example

```json
{
    "CommunityName": "yourCompany",
    "EventType": "reply_creation",
    "TicketId": 4478963,
    "Events": [
        {
            "InboxLink": "https://inbox.socialboards.com/yourCompany/tickets?ticketId=4465506",
            "ReplyId": 14674599,
            "Reply": {
                "Attachments": [],
                "Author": {
                    "CustomIdentifier": null,
                    "Id": "c0d17415-bfbe-4604-8db0-1f4cf2e202be",
                    "Name": "Moira Hill",
                    "Image": null,
                    "Email": "moira_hill@socialboards.com",
                    "Status": "team",
                    "IsBot": false
                },
                "CcEmails": [],
                "CreationTime": "2019-12-16T09:42:58.5203241+01:00",
                "HtmlMessage": "Hi Robert!Thank you for your question!Tutorials will be ready soon.I'll write you when they'll be ready.",
                "Id": 14674599,
                "Properties": {
                    "IsByTeam": true,
                    "IsDraft": false,
                    "IsHidden": false
                },
                "Level": 0,
                "Message": "Hi Robert!Thank you for your question!Tutorials will be ready soon.I'll write you when they'll be ready.",
                "ParentReplyId": null,
                "Tags": [],
                "TicketId": 4465506,
                "ToEmails": [
                    "robert78baker@gmail.com"
                ]
            },
            "EventTime": "2019-12-16T09:44:58.5203241+01:00"
        }
    ]
}
```


# Reply Update

#### Trigger

Message of existing reply has been updated .

#### Example

```json
{
    "CommunityName": "yourCompany",
    "EventType": "reply_update",
    "TicketId": 4478963,
    "Events": [
        {
            "EventTime": "2019-12-17T07:37:25.6243545+01:00",
            "InboxLink": "https://inbox.socialboards.com/yourCompany/tickets?ticketId=4465560",
            "ReplyId": 14696589,
            "Reply": {
                "Attachments": [],
                "Author": {
                    "CustomIdentifier": null,
                    "Id": "c0d17415-bfbe-4604-8db0-1f4cf2e202be",
                    "Name": "Moira Hill",
                    "Image": null,
                    "Email": "moira_hill@socialboards.com",
                    "Status": "team",
                    "IsBot": false
                },
                "CcEmails": [],
                "CreationTime": "2019-12-17T07:36:21.6840345+01:00",
                "HtmlMessage": "What kind of cat is it?",
                "Id": 14696589,
                "Level": 0,
                "Message": "What kind of cat is it?",
                "ParentReplyId": null,
                "Properties": {
                    "IsByTeam": true,
                    "IsDraft": false,
                    "IsHidden": false
                },
                "Tags": [],
                "TicketId": 4465560,
                "ToEmails": []
            }
        }
    ]
}
```


# Reply Deletion

#### Trigger

Reply was deleted.

#### Example

```json
{
    "CommunityName": "yourcompany",
    "EventType": "reply_deletion",
    "TicketId": 4465560,
    "Events": [
        {
            "EventTime": "2019-12-17T07:36:21.6840345+01:00",
            "ReplyId": 580140
        }
    ]
}
```


# Note Creation

#### Trigger

New note has been added the ticket in the system.

#### Example

```json
{
    "CommunityName": "yourCompany",
    "EventType": "note_creation",
    "TicketId": 4465560,
    "Events": [
        {
            "EventTime": "2023-05-25T16:22:17.2700491+02:00",
            "NoteId": 182605,
            "Note": {
                "Attachments": [],
                "Author": {
                    "CustomIdentifier": null,
                    "Id": "c0d17415-bfbe-4604-8db0-1f4cf2e202be",
                    "Name": "Moira Hill",
                    "Image": null,
                    "Email": "moira_hill@socialboards.com",
                    "Status": "team",
                    "IsBot": false
                },
                "CreationTime": "2019-12-16T10:18:31.1608321+01:00",
                "HtmlMessage": "<div>SOS! It's really urgent</div>",
                "Id": 182605,
                "MentionedUsers": [],
                "Message": "SOS! It's really urgent"
            }
        }
    ]
}
```


# Note Update

#### Trigger

An internal note message has been updated.

#### Example

```json
{
    "CommunityName": "yourCompany",
    "EventType": "note_update",
    "TicketId": 4465560,
    "Events": [
        {
            "EventTime": "2023-05-25T16:23:19.9632703+02:00",
            "NoteId": 182601,
            "Note": {
                "Attachments": [],
                "Author": {
                    "CustomIdentifier": null,
                    "Id": "c0d17415-bfbe-4604-8db0-1f4cf2e202be",
                    "Name": "Moira Hill",
                    "Image": null,
                    "Email": "moira_hill@socialboards.com",
                    "Status": "team",
                    "IsBot": false
                },
                "CreationTime": "2019-12-16T10:17:54.4210669+01:00",
                "HtmlMessage": "<div>Maybe there is a misprint\nWhat do you think?</div>",
                "Id": 182601,
                "MentionedUsers": [],
                "Message": "Maybe there is a misprint\nWhat do you think?"
            }
        }
    ]
}
```


# Note Deletion

#### Trigger

An internal note has been deleted.

#### Example

```json
{
    "CommunityName": "yourCompany",
    "EventType": "note_deletion",
    "TicketId": 4465560,
    "Events": [
        {
            "EventTime": "2023-05-25T16:23:47.5013987+02:00",
            "NoteId": 182605
        }
    ]
}
```


# Enumerations

* [Custom Field Types and Values Formats](https://developers.socialboards.com/docs/apis/tickets/reference/enumerations/custom-field-types-and-values-formats)
* [Detailed Ticket Source](https://developers.socialboards.com/docs/apis/tickets/reference/enumerations/detailed-ticket-source)
* [Sentiment](https://developers.socialboards.com/docs/apis/tickets/reference/enumerations/sentiment)
* [Ticket Action type](https://developers.socialboards.com/docs/apis/tickets/reference/enumerations/ticket-action-type)
* [Ticket List Order By](https://developers.socialboards.com/docs/apis/tickets/reference/enumerations/ticket-list-order-by)
* [Ticket Source](https://developers.socialboards.com/docs/apis/tickets/reference/enumerations/ticket-source)
* [Ticket Status](https://developers.socialboards.com/docs/apis/tickets/reference/enumerations/ticket-status)
* [User Role](https://developers.socialboards.com/docs/apis/tickets/reference/enumerations/user-role)


# Custom Field Types and Values Formats

#### **Available custom field types and valid string value formats**

| Type            | Value String Format                                  | Example                                             |
| --------------- | ---------------------------------------------------- | --------------------------------------------------- |
| text\_input     | any string                                           | "any text required"                                 |
| text\_area      | any string                                           | "any text required"                                 |
| select          | One of possible values                               | "Option 1"                                          |
| date            | any date formatted string                            | "2019-12-15T21:00:00.000Z"                          |
| check\_list     | names of selected values separated by commas         | "Option 1, Option 2"                                |
| radio           | 1 of possible Values                                 | "Option 1"                                          |
| email\_input    | emails address                                       | "<JohnSmith@gmail.com>"                             |
| number\_input   | Integer                                              | "4584132"                                           |
| region          | 1 of Norway regions                                  | "Nordland"                                          |
| check\_box      | `true` or `false`                                    | "true"                                              |
| mobile\_number  | mobile number                                        | "+9044444444,"                                      |
| address         | string containing address in any format              | "Santa Claus Village, Tähtikuja 1, 96930 Rovaniemi" |
| account\_number | string with norwegian bank account number, 11 digits | "12345678912"                                       |


# Sentiment

#### **Possible values**

* question
* praise
* suggestion
* complaint


# Ticket Action Type

#### **Possible values**

* ticket\_created
* ticket\_read
* post\_hidden
* post\_deleted
* post\_likee\_unlike
* reply\_created
* reply\_edited
* reply\_deleted
* reply\_hidden
* reply\_liked
* ticket\_sentiment\_changed
* ticket\_status\_changed
* ticket\_flag\_spam
* ticket\_importance\_changed
* ticket\_assigned\_to\_category
* ticket\_category\_changed
* ticket\_category\_removed
* ticket\_linked
* note\_comment\_mentioned
* note\_comment\_created
* note\_comment\_edited
* note\_comment\_deleted
* ticket\_flag\_sensitive
* ticket\_tag\_added
* ticket\_tag\_deleted
* ticket\_flag\_muted
* ticket\_new\_access\_internal
* ticket\_new\_access\_external
* reply\_draft\_created
* reply\_draft\_edited
* reply\_draft\_deleted
* ticket\_anonymized
* ticket\_customfield\_edited
* reply\_tag\_added
* reply\_tag\_deleted
* reply\_note\_added
* reply\_note\_edited
* reply\_note\_deleted
* user\_requested\_author\_identification
* ticket\_nps\_sent
* ticket\_nps\_reply\_score
* ticket\_nps\_reply\_subsurvey
* author\_passed\_identification
* ticket\_was\_pinged
* ticket\_sent\_super\_office
* ticket\_assigned\_to\_user
* ticket\_unassigned
* ticket\_forwarded
* this\_ticket\_forwarded
* ticket\_redacted
* reply\_sent\_as\_link
* sending\_to\_zisson\_successful
* sending\_to\_zisson\_failed
* user\_ended\_chat


# Ticket List Order By

**Possible values**

* creation\_time\_asc
* creation\_time\_desc
* last\_thread\_activity\_asc
* last\_thread\_activity\_desc
* last\_any\_activity\_asc
* last\_any\_activity\_desc


# Ticket Source

Possible values

* web
* facebook
* twitter
* instagram
* email
* chat
* youtube
* linkedIn
* google\_my\_business
* trustpilot
* google\_play\_market
* appstore
* whatsapp


# Ticket Status

**Possible values**

* open
* pending
* completed
* not\_completed

{% hint style="warning" %}
not\_completed can be used for listing tickets. Such status cannot be set in ticket.
{% endhint %}


# User Role

#### Possible values

* admin
* manager
* agent
* read\_only\_user
* vendor


# Detailed Ticket Source

#### Possible values

Web

* web\_website
* web\_phone\_call
* web\_in\_person

Facebook

* facebook\_post
* facebook\_image
* facebook\_mention
* facebook\_private\_message
* facebook\_review
* facebook\_event
* facebook\_video
* facebook\_share
* facebook\_group

Twitter

* twitter\_private\_message
* twitter\_mention
* twitter\_account
* twitter\_tag
* twitter\_keyword

Instagram

* instagram\_tag
* instagram\_account
* instagram\_mention
* instagram\_photo\_tag
* instagram\_direct\_message

Email

* email
* email\_outlook\_plugin

Chat

* chat

YouTube

* youtube\_video\_comment
* youtube\_discussion

LinkedIn

* linkedin\_company\_page\_post
* linkedin\_company\_ads

Google My Business

* google\_my\_business\_location\_review
* google\_my\_business\_location\_question

Trustpilot

* trustpilot\_service\_review

Google Play Market

* google\_playmarket\_review

AppStore

* appstore\_review

WhatsApp

* whatsapp\_conversation


# Glossary

### Inbox

An inbox is a common workplace used for handling support tickets across agents and teams.

### Tickets

A support ticket is a service request from an end-user that is received by a ticketing system. Emails are often referred to as support tickets, and in our case, we also define customer messages from other channels a ticket.

### Categories

Categories are a key part of Socialboards. Their mission is to structure your tickets into a meaningful context, as well as giving users access to tickets that is relevant to their position or role in the company.

### Custom fields

Custom fields let you add additional data to tickets in your Socialboards Inbox. You can create a field for anything that’s important to your workflow, team, and company. This lets individuals have clarity on work happening across their organisation, and is also frequently used in reports.

### Channels

By channel, we mean a source of tickets that is connected to your Socialboards inbox. Channels can also have their own sub-channels. For example would Facebook be considered a Channel, and Facebook Messenger a sub-channel.

### Tags

Imagine tags as labels that you can attach to tickets within the Socialboards system.

These tags are like descriptive markers that help categorize or organize the tickets based on their content, ticket creator, or any specific information that's relevant. These markers could say things like "Billing Issue," "Technical Support," "Customer Feedback," or any other relevant information that helps fast distinguish one ticket from another.

Tags also make tickets easier to search. For instance, if someone needs to find all tickets related to "Product Returns," they can simply search for that tag and retrieve all tickets that have been tagged with exactly this tag.

### Ticket Expiration

Ticket expiration time refers to the period during which a ticket remains relevant or needs extra attention from agents since last update time.

This period is flexible and adjustable and can be set within the Inbox Service Level Agreement (SLA) settings for different communication channels and subchannels.




---

[Next Page](https://developers.socialboards.com/docs/llms-full.txt/1)

