Salesforce Service Cloud Contacts API

Operations for managing contact records

OpenAPI Specification

salesforce-service-cloud-contacts-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Salesforce Service Cloud Salesforce Chat REST Accounts Contacts API
  description: REST API for managing live chat sessions between agents and visitors in Salesforce Service Cloud. Enables initiating chat sessions, sending and receiving messages, and monitoring chat activity.
  version: '59.0'
  contact:
    name: Salesforce Developer Support
    url: https://developer.salesforce.com/support
  termsOfService: https://www.salesforce.com/company/legal/agreements/
servers:
- url: https://{hostname}/chat/rest
  description: Chat REST API Endpoint
  variables:
    hostname:
      default: d.la1-c1-ia4.salesforceliveagent.com
      description: Your Live Agent endpoint hostname
security:
- apiKey: []
tags:
- name: Contacts
  description: Operations for managing contact records
paths:
  /sobjects/Contact:
    get:
      operationId: getContactInfo
      summary: Salesforce Service Cloud Get Contact object metadata
      description: Retrieves basic metadata and recently created contacts for the Contact sObject type.
      tags:
      - Contacts
      responses:
        '200':
          description: Contact object metadata
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SObjectBasicInfo'
    post:
      operationId: createContact
      summary: Salesforce Service Cloud Create a new contact
      description: Creates a new contact record associated with customer service interactions.
      tags:
      - Contacts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContactInput'
      responses:
        '201':
          description: Contact created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateResponse'
components:
  schemas:
    ContactInput:
      type: object
      properties:
        FirstName:
          type: string
          description: Contact first name
        LastName:
          type: string
          description: Contact last name
        Email:
          type: string
          format: email
          description: Contact email address
        Phone:
          type: string
          description: Contact phone number
        AccountId:
          type: string
          description: ID of the associated account
      required:
      - LastName
    SObjectBasicInfo:
      type: object
      properties:
        objectDescribe:
          type: object
          description: Object metadata
        recentItems:
          type: array
          items:
            type: object
          description: Recently created or updated records
    CreateResponse:
      type: object
      properties:
        id:
          type: string
          description: ID of the created record
        success:
          type: boolean
          description: Whether the operation succeeded
        errors:
          type: array
          items:
            type: object
          description: List of errors if any
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-LIVEAGENT-API-VERSION
      description: Live Agent API version header
externalDocs:
  description: Chat REST API Developer Guide
  url: https://developer.salesforce.com/docs/atlas.en-us.live_agent_rest.meta/live_agent_rest/