---
title: Assigns a Testimonial (id) to a wiget (widgetId).
slug: assigns-a-testimonial-id-to-a-wiget-widgetid
docTags: 
createdAt: 2025-08-10T07:26:32.596Z
---

{
  "id": "UkLXsY-4Tz_HAnVdRXcjt",
  "type": "api-oas-v2",
  "data": {
    "method": "PUT",
    "url": "https://api.usetrust.app/v1/testimonial/{id}/assign-widget/{widgetId}",
    "servers": [],
    "name": "Assigns a Testimonial (id) to a wiget (widgetId).",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "id",
          "type": "string",
          "description": "The testimonial defined by its id in format of a Guid."
        },
        {
          "kind": "required",
          "name": "widgetId",
          "type": "string",
          "description": "The widget defined by its widgetId in format of a Guid."
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "basic",
          "name": "basic",
          "kind": "optional",
          "type": "http",
          "description": "Basic Authentication header",
          "scheme": "basic"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "202",
        "description": "Accepted",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "string",
            "description": "",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Bad Request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "string",
            "description": "",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "Not Found",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "string",
            "description": "",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "Internal Server Error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "string",
            "description": "",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "DF0mDluARgUJMbMEVpP8-",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PUT \\\n     --url https://api.usetrust.app/v1/testimonial/{id}/assign-widget/{widgetId} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "IzjEd7U_49bkhI0Rps9fd",
          "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: 'PUT',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.usetrust.app/v1/testimonial/{id}/assign-widget/{widgetId}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "JLoeVFfUNdcHPE1W5Nspl",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.usetrust.app/v1/testimonial/{id}/assign-widget/{widgetId}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "3SWrpgQwDVpe5wSPjt_kc",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.usetrust.app/v1/testimonial/{id}/assign-widget/{widgetId}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        },
        {
          "id": "U3Ouv-TmIXiX76KU69IDa",
          "language": "csharp",
          "label": "C#",
          "code": "var options = new RestClientOptions(\"https://api.usetrust.app\")\n{\n   MaxTimeout = -1,\n};\nvar client = new RestClient(options);\nvar request = new RestRequest(\"/v1/testimonial/{id}/assign-widget/{widgetId}\", Method.Put);\nrequest.AddHeader(\"accept\", \"application/json\");\nrequest.AddHeader(\"content-type\", \"application/json\");\nRestResponse response = await client.ExecuteAsync(request);\nConsole.WriteLine(response.Content);"
        }
      ],
      "selectedLanguageId": "DF0mDluARgUJMbMEVpP8-"
    },
    "results": {
      "languages": [
        {
          "id": "9lYiox_T69j5qIDM1OUjV",
          "language": "200",
          "code": ""
        },
        {
          "id": "BOv01NlEOGz_pEU62dxKx",
          "language": "202",
          "code": "// Accepted\n\"\""
        },
        {
          "id": "Zh86jor9p7Qn25GqIl_n2",
          "language": "400",
          "code": "// Bad Request\n\"\""
        },
        {
          "id": "ibA2-sjOPl2HnEhG03A6P",
          "language": "404",
          "code": "// Not Found\n\"\""
        },
        {
          "id": "hP19nnJ8HDVdbDJURKJcr",
          "language": "500",
          "code": "// Internal Server Error\n\"\""
        }
      ],
      "selectedLanguageId": "9lYiox_T69j5qIDM1OUjV"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}