> ## Documentation Index
> Fetch the complete documentation index at: https://www.algolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Undo the dismissal of a suggestion

> Restores a suggestion that a user dismissed, so it's no longer marked as dismissed for that user.

This is a **beta feature** according to [Algolia's Terms of Service ("Beta Services")](https://www.algolia.com/policies/terms/).

**Required ACL:** `search`


## OpenAPI

````yaml specs/suggested-actions.yml post /2/suggested-actions/{suggestionID}:undoDismiss
openapi: 3.1.0
info:
  title: Suggested Actions API
  summary: >-
    The Suggested Actions API returns recommended actions that can improve your
    search
  description: >
    Suggested Actions are recommendations, such as turning on a feature, that
    can improve the search experience of an Algolia application.


    ## Base URLs


    Base URLs for the Suggested Actions API:


    - `https://sact.us.algolia.com`

    - `https://sact.eu.algolia.com`


    Use the URL that matches the region of your application.


    **All requests must use HTTPS.**


    ## Authentication


    Add these headers to authenticate requests:


    - `x-algolia-application-id`. Your Algolia application ID.

    - `x-algolia-api-key`. An API key with the necessary permissions to make the
    request.


    You can find your application ID and API key in the [Algolia
    dashboard](https://dashboard.algolia.com/account/api-keys).


    ## Response status and errors


    Response bodies are JSON objects.


    Successful responses return `2xx` statuses. Client errors return `4xx`
    statuses. Server errors return `5xx` statuses.

    Error responses have a `message` property with more information.


    ## Version


    The current version of the Suggested Actions API is version 2, indicated by
    the `/2/` in each endpoint's URL.
  version: 1.0.0
servers:
  - url: https://sact.{region}.algolia.com
    description: The region where your Algolia application is hosted.
    variables:
      region:
        description: The region where your Algolia application is hosted.
        enum:
          - us
          - eu
        default: us
security:
  - appId: []
    apiKey: []
tags:
  - name: suggestions
    x-displayName: Suggestions
    description: Retrieve, create and dismiss suggested actions for an application.
paths:
  /2/suggested-actions/{suggestionID}:undoDismiss:
    post:
      tags:
        - suggestions
      summary: Undo the dismissal of a suggestion
      description: >-
        Restores a suggestion that a user dismissed, so it's no longer marked as
        dismissed for that user.
      operationId: undoSuggestionDismissal
      parameters:
        - $ref: '#/components/parameters/SuggestionID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserParams'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmptyResponse'
        '400':
          $ref: '#/components/responses/BadRequest-2'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
      x-codeSamples:
        - lang: javascript
          label: JavaScript
          source: >-
            // Initialize the client

            // Replace 'us' with your Algolia Application Region

            const client = suggestedActionsClient('ALGOLIA_APPLICATION_ID',
            'ALGOLIA_API_KEY', 'us');


            // Call the API

            const response = await client.undoSuggestionDismissal({
              suggestionID: '76710f1b-8231-42e5-b0d1-f43aac618e15',
              userParams: { userId: '42' },
            });



            // print the response

            console.log(response);
        - lang: cURL
          label: curl
          source: |-
            curl --request POST \
              --url https://sact.us.algolia.com/2/suggested-actions/fbdf5a53-161e-4460-98ad-0e39408d8689:undoDismiss \
              --header 'accept: application/json' \
              --header 'content-type: application/json' \
              --header 'x-algolia-api-key: ALGOLIA_API_KEY' \
              --header 'x-algolia-application-id: ALGOLIA_APPLICATION_ID' \
              --data '{"userId":"lorem"}'
components:
  parameters:
    SuggestionID:
      name: suggestionID
      in: path
      required: true
      description: Unique identifier of the suggestion.
      schema:
        type: string
        format: uuid
  schemas:
    UserParams:
      type: object
      additionalProperties: false
      required:
        - userId
      properties:
        userId:
          type: string
          minLength: 1
          description: ID of the user, such as a dashboard user ID.
    EmptyResponse:
      type: object
      additionalProperties: false
      description: Empty response body.
    Error:
      type: object
      description: Error returned by the Suggested Actions API.
      required:
        - status
        - message
      properties:
        message:
          type: string
          description: Description of the error.
        status:
          type: integer
          description: HTTP status code.
  responses:
    BadRequest-2:
      description: Bad request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            status: 400
            message: Bad request.
    Unauthorized:
      description: Unauthorized.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            status: 401
            message: Unauthorized.
    Forbidden:
      description: Forbidden.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            status: 403
            message: Forbidden.
    NotFound:
      description: Not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            status: 404
            message: Not found.
  securitySchemes:
    appId:
      type: apiKey
      in: header
      name: x-algolia-application-id
      description: Your Algolia application ID.
    apiKey:
      type: apiKey
      in: header
      name: x-algolia-api-key
      description: >
        Your Algolia API key with the necessary permissions to make the request.

        Permissions are controlled through access control lists (ACL) and access
        restrictions.

        The required ACL to make a request is listed in each endpoint's
        reference.

````