---
title: List synonyms
slug: graph/api/list-synonyms
docTags: 
createdAt: 2026-08-28T18:28:55.472Z
---

{
  "id": "Mhqn_mL6dDu5QwnHtTaOf",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://cg.optimizely.com/resources/synonyms",
    "servers": [
      {
        "url": "https://cg.optimizely.com/resources/synonyms"
      }
    ],
    "name": "List synonyms",
    "description": "Get synonyms for a given slot",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "language_routing",
          "type": "string",
          "description": ""
        },
        {
          "kind": "optional",
          "name": "source_routing",
          "type": "string",
          "description": ""
        },
        {
          "kind": "optional",
          "name": "synonym_slot",
          "type": "string",
          "description": "",
          "default": "one",
          "enum": [
            "one",
            "two"
          ]
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "epi-hmac",
          "name": "Authorization",
          "kind": "optional",
          "type": "apiKey",
          "description": "<p>HMAC authentication (<code>epi-hmac xxx</code>)</p>",
          "in": "header"
        },
        {
          "id": "Basic",
          "name": "Basic",
          "kind": "optional",
          "type": "http",
          "description": "HMAC credentials",
          "scheme": "basic"
        },
        {
          "id": "Bearer",
          "name": "Bearer",
          "kind": "optional",
          "type": "http",
          "description": "JWT token",
          "scheme": "bearer"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Ok",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>This Fetch API interface represents the response to a request.</p>\n<p><a href=\"https://developer.mozilla.org/docs/Web/API/Response\" target=\"_blank\">MDN Reference</a></p>",
            "customType": "Response",
            "schema": [],
            "modelRef": "#/components/schemas/Response",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "L4_WgURchZkaCIIUztwzU",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url 'https://cg.optimizely.com/resources/synonyms?synonym_slot=one' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "RVOqH6TH7ZSCCw2pls6z0",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://cg.optimizely.com/resources/synonyms?synonym_slot=one\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "LJbu0XXvGlHkFmBAYTXWo",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://cg.optimizely.com/resources/synonyms?synonym_slot=one\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "eRbhjcFsSHEM-8vgcbqNp",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://cg.optimizely.com/resources/synonyms?synonym_slot=one\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "L4_WgURchZkaCIIUztwzU"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Ok\n{}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}