# Submit a CSAT rating

`POST /fin/csat`

> This is a subset of the full specification, limited to the `POST /fin/csat` operation.
>
> You can find the full specification here: /_bundle/docs/references/@2.15/rest-api/api.intercom.io.yaml

```yaml
openapi: 3.0.1
info:
  title: Intercom API
  version: '2.15'
  description: This is a subset of the full specification, limited to the `POST /fin/csat` operation.
  contact:
    name: Intercom Developer Hub
    url: https://developers.intercom.com
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
servers:
  - url: https://api.intercom.io
    description: The production API server
  - url: https://api.eu.intercom.io
    description: The european API server
  - url: https://api.au.intercom.io
    description: The australian API server
security:
  - bearerAuth: []
tags:
  - name: Fin Agent
    description: |-
      Access Fin programmatically via the Fin Agent API endpoints.

      To request access to the Fin Agent API, go to **Settings > Integrations > Fin Agent API** in your workspace and tell us about your use case. Once access is granted, **Fin Agent API** appears under **Fin AI Agent > Deploy**.

      Integration centres on the Fin Agent API endpoints — start a conversation with `/fin/start` and continue it with `/fin/reply`, or drive Fin from your own agent with `/fin/capabilities`, `/fin/ask`, `/fin/procedures/{procedure_id}/run`, and `/fin/escalate` — plus a set of events that notify your application of Fin's status and responses. Events are delivered via webhooks. You can also record a customer satisfaction rating with `/fin/csat`.

      **Pricing**

      Conversations you start with `/fin/start` are billed on **outcomes**: you're charged at most once per conversation, and only when Fin reaches a billable outcome such as a resolution. See [Understanding Fin outcomes](https://www.intercom.com/help/en/articles/13513868-understanding-fin-outcomes).

      **Events**

      Configure a webhook endpoint in the Fin Agent API settings to receive events. See the [setup guide](/docs/guides/fin-agent-api/setup) for configuration details.

      - `fin_status_updated` - Fired when Fin's status changes (escalated, resolved, complete)
      - `fin_replied` - Fired when Fin sends a reply to the user
      - `csat_requested` - Fired when Fin asks the user to rate the conversation (submit the choice with `POST /fin/csat`)

      All webhook requests include an `X-Fin-Agent-API-Webhook-Signature` header for request validation.
paths:
  /fin/csat:
    post:
      summary: Submit a CSAT rating
      parameters:
        - name: Intercom-Version
          in: header
          schema:
            $ref: '#/components/schemas/intercom_version'
      tags:
        - Fin Agent
      operationId: submitFinCsat
      description: |-
        Record a customer's satisfaction rating for a conversation, with an optional free-text
        remark.

        Fin decides _when_ to ask for a rating — this reuses the CSAT settings on your Fin
        workflow, not this API. When Fin asks, it fires a `csat_requested` event over webhooks
        carrying the rating options to show the user. Present those options, then submit the
        user's choice here.

        Submitting the same rating again, with no new remark, is a no-op and stays successful,
        so an at-least-once client can safely retry. Submitting a _different_ rating updates the
        stored rating while the update window is still open, and a first remark can be added to
        an already-rated survey. Once a remark has been recorded the rating is locked and can no
        longer be changed.

        To request access to the Fin Agent API, go to **Settings > Integrations > Fin Agent API** in your workspace and tell us about your use case. Once access is granted, **Fin Agent API** appears under **Fin AI Agent > Deploy**.
      responses:
        '200':
          description: Rating recorded successfully
          content:
            application/json:
              examples:
                Successful response:
                  value:
                    conversation_id: ext-123
                    rating: amazing
                    status: rated
              schema:
                type: object
                properties:
                  conversation_id:
                    type: string
                    description: The external ID of the rated conversation.
                    example: ext-123
                  rating:
                    type: string
                    enum:
                      - terrible
                      - bad
                      - ok
                      - good
                      - amazing
                    description: The rating now recorded on the conversation.
                    example: amazing
                  status:
                    type: string
                    enum:
                      - rated
                    description: The result of the submission.
                    example: rated
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                Unauthorized:
                  value:
                    type: error.list
                    request_id: b68959ea-6328-4f70-83cb-e7913dba1542
                    errors:
                      - code: unauthorized
                        message: Access Token Invalid
              schema:
                $ref: '#/components/schemas/error'
        '422':
          description: |
            The rating could not be recorded. Common causes: no conversation exists for the given
            `conversation_id`, Fin never requested a rating for it, the rating window has closed,
            the rating is locked because a remark was already submitted, or `rating` is not one of
            the supported values.
          content:
            application/json:
              examples:
                Conversation not found:
                  value:
                    errors:
                      conversation_id: Conversation not found for the given conversation_id
                No rating requested:
                  value:
                    errors:
                      base: No rating survey found for this conversation
                Rating window closed:
                  value:
                    errors:
                      base: The rating window for this conversation has closed
                Rating locked by a remark:
                  value:
                    errors:
                      base: This rating can no longer be changed because a remark has already been submitted
                Invalid rating:
                  value:
                    errors:
                      rating: Rating isn't an option
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    description: Validation messages keyed by the field they apply to, or `base` for conversation-level failures.
                    example:
                      base: The rating window for this conversation has closed
                    additionalProperties:
                      type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                conversation_id:
                  type: string
                  description: Your external conversation ID — the same ID you started the conversation with, and the one echoed on the `csat_requested` event.
                  example: ext-123
                rating:
                  type: string
                  enum:
                    - terrible
                    - bad
                    - ok
                    - good
                    - amazing
                  description: The rating the user selected — one of the `key` values from the `csat_requested` event's options.
                  example: amazing
                remark:
                  type: string
                  description: Optional free-text comment the user left alongside the rating. Can be added to an already-rated survey, but only once — the rating locks after a remark is recorded.
                  example: Fin solved my problem in seconds.
              required:
                - conversation_id
                - rating
            examples:
              Submit a rating:
                value:
                  conversation_id: ext-123
                  rating: amazing
              Submit a rating with a remark:
                value:
                  conversation_id: ext-123
                  rating: amazing
                  remark: Fin solved my problem in seconds.
components:
  schemas:
    error:
      type: object
      title: Error
      description: The API will return an Error List for a failed request, which will contain one or more Error objects.
      properties:
        type:
          type: string
          description: The type is error.list
          example: error.list
        request_id:
          type: string
          nullable: true
          format: uuid
          description: ''
          example: f93ecfa8-d08a-4325-8694-89aeb89c8f85
        errors:
          type: array
          description: An array of one or more error objects
          items:
            properties:
              code:
                type: string
                description: A string indicating the kind of error, used to further qualify the HTTP response code
                example: unauthorized
              message:
                type: string
                nullable: true
                description: Optional. Human readable description of the error.
                example: Access Token Invalid
              field:
                type: string
                nullable: true
                description: Optional. Used to identify a particular field or query parameter that was in error.
                example: email
            required:
              - code
      required:
        - type
        - errors
    intercom_version:
      description: Intercom API version.</br>By default, it's equal to the version set in the app package.
      type: string
      example: '2.15'
      default: '2.15'
      enum:
        - '1.0'
        - '1.1'
        - '1.2'
        - '1.3'
        - '1.4'
        - '2.0'
        - '2.1'
        - '2.2'
        - '2.3'
        - '2.4'
        - '2.5'
        - '2.6'
        - '2.7'
        - '2.8'
        - '2.9'
        - '2.10'
        - '2.11'
        - '2.12'
        - '2.13'
        - '2.14'
        - '2.15'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
```
