openapi: 3.1.0
info:
title: Freshdesk REST Agents Satisfaction Ratings API
description: The Freshdesk REST API (v2) provides programmatic access to helpdesk data and operations within Freshdesk, a customer support platform by Freshworks. It exposes endpoints for managing tickets, contacts, companies, agents, groups, conversations, products, email configurations, SLA policies, business hours, time entries, satisfaction ratings, solution categories, solution folders, solution articles, and more. The API uses JSON for request and response payloads, supports API key-based authentication, and follows RESTful conventions for CRUD operations.
version: '2.0'
contact:
name: Freshdesk Support
url: https://support.freshdesk.com/
termsOfService: https://www.freshworks.com/terms/
servers:
- url: https://{domain}.freshdesk.com/api/v2
description: Freshdesk Production Server
variables:
domain:
default: yourdomain
description: Your Freshdesk subdomain, e.g. if your helpdesk URL is acme.freshdesk.com, use acme.
security:
- basicAuth: []
tags:
- name: Satisfaction Ratings
description: View customer satisfaction survey ratings on tickets.
paths:
/tickets/{ticket_id}/satisfaction_ratings:
post:
operationId: createSatisfactionRating
summary: Create a satisfaction rating
description: Creates a satisfaction rating for the specified ticket.
tags:
- Satisfaction Ratings
parameters:
- $ref: '#/components/parameters/ticketId'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SatisfactionRatingCreate'
responses:
'201':
description: Satisfaction rating created successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/SatisfactionRating'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
/surveys/satisfaction_ratings:
get:
operationId: listSatisfactionRatings
summary: List all satisfaction ratings
description: Retrieves all satisfaction ratings across tickets, with optional filters for date range and satisfaction score.
tags:
- Satisfaction Ratings
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/perPage'
- name: created_since
in: query
description: Return ratings created since the given date-time.
schema:
type: string
format: date-time
responses:
'200':
description: Successfully retrieved satisfaction ratings.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/SatisfactionRating'
'401':
$ref: '#/components/responses/Unauthorized'
components:
responses:
Unauthorized:
description: Authentication failed or credentials were not provided.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
BadRequest:
description: The request is invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
NotFound:
description: The requested resource was not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
schemas:
SatisfactionRatingCreate:
type: object
required:
- rating
properties:
rating:
type: integer
description: Satisfaction rating value.
feedback:
type: string
description: Written feedback from the customer.
SatisfactionRating:
type: object
properties:
id:
type: integer
format: int64
description: Unique identifier of the satisfaction rating.
survey_id:
type: integer
format: int64
description: ID of the associated survey.
ticket_id:
type: integer
format: int64
description: ID of the rated ticket.
user_id:
type: integer
format: int64
description: ID of the user who provided the rating.
agent_id:
type: integer
format: int64
description: ID of the agent on the ticket.
group_id:
type: integer
format: int64
nullable: true
description: ID of the group on the ticket.
rating:
type: integer
description: Satisfaction rating value.
feedback:
type: string
nullable: true
description: Written feedback from the customer.
created_at:
type: string
format: date-time
description: Timestamp when the rating was created.
updated_at:
type: string
format: date-time
description: Timestamp when the rating was last updated.
Error:
type: object
properties:
description:
type: string
description: Human-readable error description.
errors:
type: array
items:
type: object
properties:
field:
type: string
description: Field that caused the error.
message:
type: string
description: Error message for the field.
code:
type: string
description: Error code.
parameters:
page:
name: page
in: query
description: Page number for paginated results.
schema:
type: integer
minimum: 1
default: 1
perPage:
name: per_page
in: query
description: Number of results per page (max 100).
schema:
type: integer
minimum: 1
maximum: 100
default: 30
ticketId:
name: ticket_id
in: path
required: true
description: Unique identifier of the ticket.
schema:
type: integer
format: int64
securitySchemes:
basicAuth:
type: http
scheme: basic
description: Freshdesk uses API key-based authentication. Pass your API key as the username with any string (e.g. X) as the password using HTTP Basic Authentication.
externalDocs:
description: Freshdesk API Documentation
url: https://developers.freshdesk.com/api/