Zoho IM_Session API

The IM_Session API from Zoho — 2 operation(s) for im_session.

Documentation

Specifications

Code Examples

Other Resources

OpenAPI Specification

zoho-im-session-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Helpcenter IM_Session API
  version: 1.0.0
tags:
- name: IM_Session
paths:
  /api/v1/im/sessions:
    get:
      tags:
      - IM_Session
      summary: List Sessions
      description: This API lists all sessions
      operationId: getSessions
      parameters:
      - name: modifiedAfter
        in: query
        description: After which modified date conversations should be included. Enter a date in the ISO date format of yyyy-MM-ddThh:mm:ss.SSSZ.
        required: false
        style: form
        explode: true
        schema:
          type:
          - string
          - 'null'
          description: After which modified date conversations should be included. Enter a date in the ISO date format of yyyy-MM-ddThh:mm:ss.SSSZ.
          maxLength: 100
          minLength: 0
          pattern: (((19|20)\d\d)[-/.]{1}(0?[1-9]|1[012])[-/.]{1}(0?[1-9]|[12][0-9]|3[01])(T)([01]?[0-9]|2[0-3]):[0-5]?[0-9]:[0-5]?[0-9]([/.][\d]{0,3})?(Z))
      - name: agentId
        in: query
        description: Filter conversations assigned to an agent
        required: false
        style: form
        explode: true
        schema:
          type:
          - string
          - 'null'
          - integer
          format: int64
          description: Filter conversations assigned to an agent
          pattern: ([0-9]+)
      - name: contactId
        in: query
        description: Filter conversations of a contact
        required: false
        style: form
        explode: true
        schema:
          type:
          - string
          - 'null'
          - integer
          format: int64
          description: Filter conversations of a contact
          pattern: ([0-9]+)
      - name: profileId
        in: query
        description: Filter conversations of a profile
        required: false
        style: form
        explode: true
        schema:
          type:
          - string
          - 'null'
          - integer
          format: int64
          description: Filter conversations of a profile
          pattern: ([0-9]+)
      - $ref: '#/components/parameters/departmentId'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/from'
      - name: assigneeFilter
        in: query
        description: Assignment status filter for the conversations. Allowed values are @MINE@, @UNASSIGNED@ ,@NONE@ ,@BOT@
        required: false
        style: form
        explode: true
        schema:
          type:
          - string
          - 'null'
          description: Assignment status filter for the conversations. Allowed values are @MINE@, @UNASSIGNED@ ,@NONE@ ,@BOT@
          enum:
          - MINE
          - UNASSIGNED
          - NONE
          maxLength: 100
          minLength: 0
      - name: createdBefore
        in: query
        description: Before which date conversations should be included. Enter a date in the ISO date format of yyyy-MM-ddThh:mm:ss.SSSZ.
        required: false
        style: form
        explode: true
        schema:
          type:
          - string
          - 'null'
          description: Before which date conversations should be included. Enter a date in the ISO date format of yyyy-MM-ddThh:mm:ss.SSSZ.
          maxLength: 100
          minLength: 0
          pattern: (((19|20)\d\d)[-/.]{1}(0?[1-9]|1[012])[-/.]{1}(0?[1-9]|[12][0-9]|3[01])(T)([01]?[0-9]|2[0-3]):[0-5]?[0-9]:[0-5]?[0-9]([/.][\d]{0,3})?(Z))
      - name: createdAfter
        in: query
        description: After which date conversations should be included. Enter a date in the ISO date format of yyyy-MM-ddThh:mm:ss.SSSZ.
        required: false
        style: form
        explode: true
        schema:
          type:
          - string
          - 'null'
          description: After which date conversations should be included. Enter a date in the ISO date format of yyyy-MM-ddThh:mm:ss.SSSZ.
          maxLength: 100
          minLength: 0
          pattern: (((19|20)\d\d)[-/.]{1}(0?[1-9]|1[012])[-/.]{1}(0?[1-9]|[12][0-9]|3[01])(T)([01]?[0-9]|2[0-3]):[0-5]?[0-9]:[0-5]?[0-9]([/.][\d]{0,3})?(Z))
      - $ref: '#/components/parameters/channelId'
      - name: status
        in: query
        description: Status filter for the conversations. Allowed values are @OPEN@, @ON_PROGRESS@ ,@ON_HOLD@ ,@BLOCKED@
        required: false
        style: form
        explode: true
        schema:
          type:
          - 'null'
          - object
          additionalProperties: false
          description: Status filter for the conversations. Allowed values are @OPEN@, @ON_PROGRESS@ ,@ON_HOLD@ ,@BLOCKED@
      - $ref: ./Common.json#/components/parameters/orgId
      responses:
        '204':
          $ref: ./Common.json#/components/responses/emptyResponse
        '200':
          $ref: '#/components/responses/getSessions'
      security:
      - iam-oauth2-schema:
        - Desk.InstantMessages.READ
      x-audience:
      - external-public
  /api/v1/im/sessions/{id}:
    get:
      tags:
      - IM_Session
      summary: Get a session
      description: This API fetches details of an session.
      operationId: getSession
      parameters:
      - $ref: '#/components/parameters/id'
      - $ref: ./Common.json#/components/parameters/orgId
      responses:
        '404':
          $ref: ./Common.json#/components/responses/urlNotFoundErrorResponse
        '200':
          $ref: '#/components/responses/getSession'
        '422':
          $ref: ./Common.json#/components/responses/multipleUnprocessEntityResponse
        '400':
          $ref: ./Common.json#/components/responses/badRequestErrorResponse
      security:
      - iam-oauth2-schema:
        - Desk.InstantMessages.READ
      x-audience:
      - external-public
components:
  responses:
    getSession:
      description: getSession template definitions
      content:
        application/json:
          schema:
            type:
            - 'null'
            - object
            additionalProperties: false
            properties:
              agentId:
                type:
                - string
                - 'null'
                - integer
                format: int64
                pattern: ([0-9]+)
              lastActiveTime:
                type:
                - string
                - 'null'
                maxLength: 100
                minLength: 0
              contactId:
                type:
                - string
                - 'null'
                - integer
                format: int64
                pattern: ([0-9]+)
              subject:
                type:
                - string
                - 'null'
                maxLength: 50000
                minLength: 0
              unreadMessagesCount:
                type:
                - string
                - 'null'
                maxLength: 100
                minLength: 0
              channel:
                type:
                - string
                - 'null'
                maxLength: 100
                minLength: 0
                pattern: ([0-9a-zA-Z_\-\.\$@\?\,\:\'\/\!\P{InBasicLatin}\s])+
              integrationService:
                type:
                - string
                - 'null'
                enum:
                - TELEGRAM
                - TWILIO
                - IM_TALK
                - LINE
                - WECHAT
                - WHATSAPP
                - FACEBOOKMESSENGER
                maxLength: 100
                minLength: 0
              deskAssignee:
                $ref: ./IM_Session.json#/components/schemas/sessionActor
              contactLastActiveTime:
                type:
                - string
                - 'null'
                maxLength: 100
                minLength: 0
              actor:
                $ref: ./IM_Session.json#/components/schemas/sessionActor
              meta:
                $ref: ./IM_Session.json#/components/schemas/meta
              createdTime:
                type:
                - string
                - 'null'
                maxLength: 100
                minLength: 0
              replyStatus:
                type:
                - string
                - 'null'
                enum:
                - ACCEPTED
                - CHANNEL_INACTIVE
                - SESSION_ENDED
                - SESSION_BLOCKED
                - SESSION_EXPIRED
                - UNASSIGNED
                - NOT_AN_ASSIGNEE
                maxLength: 100
                minLength: 0
              messagesCount:
                type:
                - string
                - 'null'
                maxLength: 100
                minLength: 0
              id:
                type:
                - string
                - 'null'
                - integer
                format: int64
                pattern: ([0-9]+)
              agentLastActiveTime:
                type:
                - string
                - 'null'
                maxLength: 100
                minLength: 0
              status:
                type:
                - string
                - 'null'
                enum:
                - CREATED
                - OPEN
                - ON_PROGRESS
                - ON_HOLD
                - ENDED
                - BLOCKED
                - MISSED
                maxLength: 100
                minLength: 0
            required:
            - actor
            - agentId
            - agentLastActiveTime
            - channel
            - contactId
            - contactLastActiveTime
            - createdTime
            - deskAssignee
            - id
            - integrationService
            - lastActiveTime
            - messagesCount
            - meta
            - replyStatus
            - status
            - subject
            - unreadMessagesCount
          examples:
            Valid responses Definitions:
              value:
                agentId: '78412824'
                lastActiveTime: 1711094233000
                contactId: '186543000000451259'
                subject: This is test 2   Abhishek Aich
                unreadMessagesCount: '0'
                channel: TEST_WA_CHANNEL_4
                integrationService: WHATSAPP
                deskAssignee:
                  photoURL: https://desk.zoho.com/api/v1/agents/186543000000190001/photo?orgId=78412359
                  botType: null
                  contactName: null
                  name: Abhishek Aich
                  externalId: null
                  id: '186543000000190001'
                  type: AGENT
                  email: zykler.sales@zylker.com
                contactLastActiveTime: 1711086669000
                actor:
                  photoURL: null
                  botType: null
                  contactName: Abhishek Aich
                  name: Abhishek Aich
                  externalId: '109000000002003'
                  id: '186543000000451285'
                  type: ENDUSER
                  email: null
                meta:
                  DESK_TICKET_ID: '186543000001662116'
                  DESK_TICKET_NUMBER: '480'
                createdTime: 1711085659000
                botId: null
                messagesCount: '10'
                id: '3942000001423083'
                channelId: '3942000001423029'
                agentLastActiveTime: 1711094233000
                status: ON_PROGRESS
    getSessions:
      description: getSessions template definitions
      content:
        application/json:
          schema:
            type:
            - 'null'
            - object
            additionalProperties: false
            properties:
              data:
                $ref: ./IM_Session.json#/components/schemas/listofSessions
              hasMore:
                type:
                - boolean
                - 'null'
            required:
            - data
            - hasMore
          examples:
            Valid responses Definitions:
              value:
                data:
                - agentId: '78412824'
                  lastActiveTime: 1711094233000
                  contactId: '1892000001128052'
                  subject: This is test 2   Abhishek Aich
                  unreadMessagesCount: '0'
                  channel: TEST_WA_CHANNEL_4
                  integrationService: WHATSAPP
                  deskAssignee:
                    photoURL: https://desk.zoho.com/api/v1/agents/1000000000059/photo?orgId=111111
                    botType: null
                    contactName: null
                    name: Alex John
                    externalId: null
                    id: '1000000000059'
                    type: AGENT
                    email: zykler.sales@zylker.com
                  contactLastActiveTime: 1711086669000
                  actor:
                    photoURL: null
                    botType: null
                    contactName: Abhishek Aich
                    name: Abhishek Aich
                    externalId: '109000000002003'
                    id: '1000000000059'
                    type: ENDUSER
                    email: null
                  meta:
                    DESK_TICKET_ID: '1892000000143237'
                    DESK_TICKET_NUMBER: '480'
                  createdTime: 1711085659000
                  replyStatus: SESSION_EXPIRED
                  botId: null
                  messagesCount: '10'
                  id: '3942000001423083'
                  channelId: '3942000001423029'
                  agentLastActiveTime: 1711094233000
                  status: ON_PROGRESS
                - agentId: '78412824'
                  lastActiveTime: 1711094223000
                  contactId: '186543000000451259'
                  subject: This is test 2   Abhishek Aich
                  unreadMessagesCount: '0'
                  channel: SANDBOX
                  integrationService: WHATSAPP
                  deskAssignee:
                    photoURL: https://desk.zoho.com/api/v1/agents/1000000000059/photo?orgId=111111
                    botType: null
                    contactName: null
                    name: Alex John
                    externalId: null
                    id: '1000000000059'
                    type: AGENT
                    email: '@zylker.com'
                  contactLastActiveTime: 1711012260000
                  actor:
                    photoURL: null
                    botType: null
                    contactName: Abhishek Aich
                    name: Abhishek Aich
                    externalId: '109000000002003'
                    id: '1000000000059'
                    type: ENDUSER
                    email: null
                  meta:
                    DESK_TICKET_ID: '186543000001653193'
                    DESK_TICKET_NUMBER: '477'
                  createdTime: 1693819815000
                  replyStatus: SESSION_EXPIRED
                  botId: null
                  messagesCount: '65'
                  id: '3942000000042104'
                  channelId: '3942000000045001'
                  agentLastActiveTime: 1711094223000
                  status: ON_PROGRESS
                - agentId: '78412824'
                  lastActiveTime: 1711085558000
                  contactId: '186543000000451259'
                  subject: Hi good morning
                  unreadMessagesCount: '0'
                  channel: WA_CHANNEL
                  integrationService: WHATSAPP
                  deskAssignee:
                    photoURL: https://desk.zoho.com/api/v1/agents/1000000000059/photo?orgId=111111
                    botType: null
                    contactName: null
                    name: Alex John
                    externalId: null
                    id: '1000000000059'
                    type: AGENT
                    email: zykler.sales@zylker.com
                  contactLastActiveTime: 1711083846000
                  actor:
                    photoURL: null
                    botType: null
                    contactName: Abhishek Aich
                    name: Abhishek Aich
                    externalId: '109000000002003'
                    id: '1000000000059'
                    type: ENDUSER
                    email: null
                  meta:
                    DESK_TICKET_ID: '186543000001662009'
                    DESK_TICKET_NUMBER: '479'
                  createdTime: 1711083846000
                  replyStatus: CHANNEL_DELETED
                  botId: null
                  messagesCount: '5'
                  id: '3942000001422171'
                  channelId: '3942000001422011'
                  agentLastActiveTime: 1711085558000
                  status: ON_PROGRESS
                hasMore: false
  parameters:
    from:
      name: from
      in: query
      description: Index number, starting from which the tickets must be fetched
      required: false
      style: form
      explode: true
      schema:
        type:
        - string
        - 'null'
        - integer
        format: int32
        description: Index number, starting from which the tickets must be fetched
        pattern: ([0-9]+)
    id:
      name: id
      in: path
      required: true
      style: simple
      explode: false
      schema:
        type:
        - string
        - 'null'
        - integer
        format: int64
        pattern: ([0-9]+)
    channelId:
      name: channelId
      in: query
      description: Filter conversations of a channel
      required: false
      style: form
      explode: true
      schema:
        type:
        - string
        - 'null'
        - integer
        format: int64
        description: Filter conversations of a channel
        pattern: ([0-9]+)
    limit:
      name: limit
      in: query
      description: Number of tickets to fetch
      required: false
      style: form
      explode: true
      schema:
        type:
        - string
        - 'null'
        - integer
        format: int32
        description: Number of tickets to fetch
        pattern: ([0-9]+)
    departmentId:
      name: departmentId
      in: query
      description: Filter conversations of all channels in given department
      required: false
      style: form
      explode: true
      schema:
        type:
        - string
        - 'null'
        - integer
        format: int64
        description: Filter conversations of all channels in given department
        pattern: ([0-9]+)
  securitySchemes:
    iam-oauth2-schema:
      $ref: ./Common.json#/components/securitySchemes/iam-oauth2-schema
x-entity: Helpcenter