Gainsight CS CTA API
The Call To Action (CTA) API enables creating and updating CTAs, fetching CTA details, and retrieving CTA configurations through Cockpit REST APIs for managing customer success actions.
The Call To Action (CTA) API enables creating and updating CTAs, fetching CTA details, and retrieving CTA configurations through Cockpit REST APIs for managing customer success actions.
openapi: 3.1.0
info:
title: Gainsight CS CTA API
description: >-
The Call To Action (CTA) API enables creating and updating CTAs, fetching
CTA details, and retrieving CTA configurations through Cockpit REST APIs
for managing customer success actions.
version: '1.0'
contact:
name: Gainsight Support
url: https://support.gainsight.com
email: [email protected]
termsOfService: https://www.gainsight.com/terms-of-service/
externalDocs:
description: CTA API Documentation
url: https://support.gainsight.com/gainsight_nxt/API_and_Developer_Docs/Cockpit_API/Call_To_Action_(CTA)_API_Documentation
servers:
- url: https://{domain}.gainsightcloud.com/v1
description: Gainsight CS Production
variables:
domain:
default: customer
description: Customer-specific domain prefix
tags:
- name: CTA Configuration
description: Retrieve CTA type and reason configurations
- name: CTAs
description: Create and manage Calls to Action
security:
- apiKey: []
paths:
/ctas:
post:
operationId: createCTA
summary: Gainsight Create a CTA
description: Create a new Call to Action record in the Cockpit.
tags:
- CTAs
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CTAInput'
responses:
'200':
description: CTA created successfully
content:
application/json:
schema:
type: object
properties:
result:
type: boolean
data:
$ref: '#/components/schemas/CTA'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
/ctas/{ctaId}:
get:
operationId: getCTA
summary: Gainsight Get a CTA
description: Retrieve a specific CTA by its identifier.
tags:
- CTAs
parameters:
- $ref: '#/components/parameters/ctaId'
responses:
'200':
description: CTA details returned
content:
application/json:
schema:
type: object
properties:
result:
type: boolean
data:
$ref: '#/components/schemas/CTA'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
put:
operationId: updateCTA
summary: Gainsight Update a CTA
description: Update an existing CTA record.
tags:
- CTAs
parameters:
- $ref: '#/components/parameters/ctaId'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CTAInput'
responses:
'200':
description: CTA updated successfully
content:
application/json:
schema:
type: object
properties:
result:
type: boolean
data:
$ref: '#/components/schemas/CTA'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
/ctas/search:
post:
operationId: searchCTAs
summary: Gainsight Search CTAs
description: Search for CTA records using filter criteria.
tags:
- CTAs
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SearchRequest'
responses:
'200':
description: Search results returned
content:
application/json:
schema:
type: object
properties:
result:
type: boolean
data:
type: object
properties:
records:
type: array
items:
$ref: '#/components/schemas/CTA'
totalCount:
type: integer
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
/ctas/config/types:
get:
operationId: getCTATypes
summary: Gainsight Get CTA types
description: Retrieve the list of configured CTA types.
tags:
- CTA Configuration
responses:
'200':
description: CTA types returned
content:
application/json:
schema:
type: object
properties:
result:
type: boolean
data:
type: array
items:
$ref: '#/components/schemas/CTAType'
'401':
$ref: '#/components/responses/Unauthorized'
/ctas/config/reasons:
get:
operationId: getCTAReasons
summary: Gainsight Get CTA reasons
description: Retrieve the list of configured CTA reasons.
tags:
- CTA Configuration
parameters:
- name: typeId
in: query
description: Filter reasons by CTA type ID
schema:
type: string
responses:
'200':
description: CTA reasons returned
content:
application/json:
schema:
type: object
properties:
result:
type: boolean
data:
type: array
items:
$ref: '#/components/schemas/CTAReason'
'401':
$ref: '#/components/responses/Unauthorized'
/ctas/config/priorities:
get:
operationId: getCTAPriorities
summary: Gainsight Get CTA priorities
description: Retrieve the list of configured CTA priorities.
tags:
- CTA Configuration
responses:
'200':
description: CTA priorities returned
content:
application/json:
schema:
type: object
properties:
result:
type: boolean
data:
type: array
items:
$ref: '#/components/schemas/CTAPriority'
'401':
$ref: '#/components/responses/Unauthorized'
/ctas/config/statuses:
get:
operationId: getCTAStatuses
summary: Gainsight Get CTA statuses
description: Retrieve the list of configured CTA statuses.
tags:
- CTA Configuration
responses:
'200':
description: CTA statuses returned
content:
application/json:
schema:
type: object
properties:
result:
type: boolean
data:
type: array
items:
$ref: '#/components/schemas/CTAStatus'
'401':
$ref: '#/components/responses/Unauthorized'
components:
securitySchemes:
apiKey:
type: apiKey
name: accessKey
in: header
description: Gainsight CS REST API access key
parameters:
ctaId:
name: ctaId
in: path
required: true
description: CTA unique identifier
schema:
type: string
responses:
Unauthorized:
description: Authentication failed or access key is missing
BadRequest:
description: Invalid request body or parameters
NotFound:
description: The requested resource was not found
schemas:
SearchRequest:
type: object
properties:
select:
type: array
items:
type: string
where:
type: object
properties:
conditions:
type: array
items:
type: object
properties:
name:
type: string
value: {}
operator:
type: string
enum:
- EQ
- NE
- GT
- GTE
- LT
- LTE
- CONTAINS
- IN
- NOT_IN
expression:
type: string
limit:
type: integer
offset:
type: integer
CTA:
type: object
properties:
Gsid:
type: string
description: CTA unique identifier
Name:
type: string
description: CTA name
CompanyId:
type: string
description: Associated company Gsid
CompanyName:
type: string
description: Associated company name
TypeId:
type: string
description: CTA type identifier
TypeName:
type: string
description: CTA type name
ReasonId:
type: string
description: CTA reason identifier
ReasonName:
type: string
description: CTA reason name
PriorityId:
type: string
description: Priority level identifier
StatusId:
type: string
description: Status identifier
StatusName:
type: string
description: Status name
OwnerId:
type: string
description: Assigned owner user ID
OwnerName:
type: string
description: Assigned owner name
DueDate:
type: string
format: date
description: Due date for the CTA
ClosedDate:
type: string
format: date
description: Date the CTA was closed
Comments:
type: string
description: CTA comments
Source:
type: string
description: CTA source
PlaybookId:
type: string
description: Associated playbook ID
CreatedDate:
type: string
format: date-time
description: Record creation timestamp
ModifiedDate:
type: string
format: date-time
description: Last modification timestamp
CTAInput:
type: object
required:
- CompanyId
- TypeId
- ReasonId
- PriorityId
- StatusId
properties:
Name:
type: string
description: CTA name
CompanyId:
type: string
description: Associated company Gsid
TypeId:
type: string
description: CTA type identifier
ReasonId:
type: string
description: CTA reason identifier
PriorityId:
type: string
description: Priority level identifier
StatusId:
type: string
description: Status identifier
OwnerId:
type: string
description: Assigned owner user ID
DueDate:
type: string
format: date
description: Due date
Comments:
type: string
description: Comments
PlaybookId:
type: string
description: Playbook to associate
CTAType:
type: object
properties:
id:
type: string
description: Type identifier
name:
type: string
description: Type name
isDefault:
type: boolean
description: Whether this is the default type
CTAReason:
type: object
properties:
id:
type: string
description: Reason identifier
name:
type: string
description: Reason name
typeId:
type: string
description: Associated CTA type ID
CTAPriority:
type: object
properties:
id:
type: string
description: Priority identifier
name:
type: string
description: Priority name
order:
type: integer
description: Display order
CTAStatus:
type: object
properties:
id:
type: string
description: Status identifier
name:
type: string
description: Status name
isClosed:
type: boolean
description: Whether this status represents a closed state