openapi: 3.1.0 info: title: Salesforce Analytics (CRM Analytics) REST Actions Records API description: REST API for accessing and managing CRM Analytics (formerly Tableau CRM / Einstein Analytics) resources including datasets, lenses, dashboards, and dataflows. Enables programmatic access to analytics metadata, query execution, and dashboard management. Uses the Wave API resource at /services/data/vXX.0/wave. version: '63.0' contact: name: Salesforce Developer Support url: https://developer.salesforce.com/support email: developer@salesforce.com license: name: Salesforce API Terms of Use url: https://www.salesforce.com/company/legal/agreements/ servers: - url: https://{instance}.salesforce.com/services/data/v63.0/wave description: Salesforce production or developer instance variables: instance: default: yourInstance description: Your Salesforce instance identifier security: - oauth2: [] - bearerAuth: [] tags: - name: Records description: CRUD operations on individual SObject records paths: /sobjects/{sObjectName}: post: operationId: createRecord summary: Create a new record description: Creates a new record of the specified SObject type. Returns the ID of the newly created record. Required fields must be included in the request body. tags: - Records parameters: - $ref: '#/components/parameters/sObjectName' requestBody: required: true content: application/json: schema: type: object description: Field name-value pairs for the new record. Required fields depend on the SObject type. additionalProperties: true responses: '201': description: Record created successfully content: application/json: schema: $ref: '#/components/schemas/CreateRecordResult' '400': $ref: '#/components/responses/BadRequest' /sobjects/{sObjectName}/{recordId}: get: operationId: getRecord summary: Get a record by ID description: Retrieves a record by its 15-character or 18-character Salesforce ID. Use the optional fields parameter to specify which fields to return; otherwise all accessible fields are returned. tags: - Records parameters: - $ref: '#/components/parameters/sObjectName' - $ref: '#/components/parameters/recordId' - name: fields in: query description: Comma-separated list of field API names to return. Reduces payload size when you only need specific fields. schema: type: string responses: '200': description: Record data content: application/json: schema: $ref: '#/components/schemas/SObjectRecord' '404': $ref: '#/components/responses/NotFound' patch: operationId: updateRecord summary: Update a record description: Updates the specified fields of an existing record. Only include fields you want to change. Fields not included in the request body are not modified. tags: - Records parameters: - $ref: '#/components/parameters/sObjectName' - $ref: '#/components/parameters/recordId' requestBody: required: true content: application/json: schema: type: object description: Field name-value pairs to update on the record. additionalProperties: true responses: '204': description: Record updated successfully '400': $ref: '#/components/responses/BadRequest' '404': $ref: '#/components/responses/NotFound' delete: operationId: deleteRecord summary: Delete a record description: Soft-deletes the record with the specified ID, moving it to the Recycle Bin. The record can be restored from the Recycle Bin within 15 days. tags: - Records parameters: - $ref: '#/components/parameters/sObjectName' - $ref: '#/components/parameters/recordId' responses: '204': description: Record deleted successfully '404': $ref: '#/components/responses/NotFound' components: schemas: CreateRecordResult: type: object properties: id: type: string description: The 18-character ID of the newly created record success: type: boolean description: Whether the create operation succeeded errors: type: array items: $ref: '#/components/schemas/ApiError' SObjectRecord: type: object description: A Salesforce SObject record with attributes metadata and dynamic fields properties: attributes: type: object properties: type: type: string description: The API name of the SObject type url: type: string description: The relative REST API URL for this record required: - type Id: type: string description: The 18-character Salesforce record ID additionalProperties: true ErrorResponse: type: array items: $ref: '#/components/schemas/ApiError' ApiError: type: object properties: message: type: string description: A human-readable description of the error errorCode: type: string description: The Salesforce error code (e.g., INVALID_FIELD, MALFORMED_QUERY, NOT_FOUND) fields: type: array items: type: string description: Fields that caused the error, if applicable responses: BadRequest: description: The request could not be processed due to invalid syntax, missing required fields, or business rule violations content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' NotFound: description: The requested resource was not found. The record may have been deleted or the ID may be invalid. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' parameters: sObjectName: name: sObjectName in: path required: true description: The API name of the SObject type (e.g., Account, Contact, Opportunity, MyCustomObject__c) schema: type: string recordId: name: recordId in: path required: true description: The 15-character or 18-character Salesforce record ID schema: type: string minLength: 15 maxLength: 18 securitySchemes: oauth2: type: oauth2 flows: authorizationCode: authorizationUrl: https://login.salesforce.com/services/oauth2/authorize tokenUrl: https://login.salesforce.com/services/oauth2/token scopes: api: Access and manage your Salesforce data wave_api: Access CRM Analytics REST API resources bearerAuth: type: http scheme: bearer