---
title: Updates a Testimonial defined by id.
slug: updates-a-testimonial-defined-by-id
docTags: 
createdAt: 2025-08-10T07:26:32.596Z
---

{
  "id": "0CmOWNNQluF2Ikc9HJ3O1",
  "type": "api-oas-v2",
  "data": {
    "method": "PUT",
    "url": "https://api.usetrust.app/v1/testimonial/{id}",
    "servers": [],
    "name": "Updates a Testimonial defined by id.",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "id",
          "type": "string",
          "description": ""
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "TestimonialInput",
          "schema": [
            {
              "name": "workspaceId",
              "kind": "optional",
              "type": "string",
              "description": "The workspace id for a registered workspace (use GET of Workspaces API endpoint first)",
              "example": "9d885046-f7bf-401e-8f02-83e261553f5b"
            },
            {
              "name": "firstname",
              "kind": "optional",
              "type": "string",
              "description": "First name of testimonial giver",
              "example": "Adrian"
            },
            {
              "name": "lastname",
              "kind": "optional",
              "type": "string",
              "description": "Last name of testimonial giver",
              "example": "Dray"
            },
            {
              "name": "title",
              "kind": "optional",
              "type": "string",
              "description": "Title of testimonial",
              "example": "Adrian Dray"
            },
            {
              "name": "subtitle",
              "kind": "optional",
              "type": "string",
              "description": "Subtitle of testimonial",
              "example": "GDPR Expert, Adrian Dray Consulting"
            },
            {
              "name": "company",
              "kind": "optional",
              "type": "string",
              "description": "Company of testimonial giver",
              "example": "Adrian Dray Consulting"
            },
            {
              "name": "email",
              "kind": "optional",
              "type": "string",
              "description": "Email address of testimonial giver",
              "example": "adrian@email.com"
            },
            {
              "name": "imageUrl",
              "kind": "optional",
              "type": "string",
              "description": "URL to image",
              "example": "https://dealmaker.blob.core.windows.net/images/t_0a9ab71cd20f4bf1b11130e71479743d/silhouette_male.png"
            },
            {
              "name": "testimonialText",
              "kind": "optional",
              "type": "string",
              "description": "Text of the testimonial",
              "example": "Always fantastic support. I love that Trust keep bringing out brilliant features on a recent basis that makes me and my clients go 'Wow'"
            },
            {
              "name": "externalVideoHtml",
              "kind": "optional",
              "type": "string",
              "description": "HTML of embeddable video (Youtube, Facebook, vimeo, ...",
              "example": ""
            },
            {
              "name": "videoToken",
              "kind": "optional",
              "type": "string",
              "description": "Token of uploaded video. Required when using an uploaded video along with 'VideoUrl'",
              "example": "r1ac3a4cfe79f3896fce25bffbe16dd3"
            },
            {
              "name": "videoUrl",
              "kind": "optional",
              "type": "string",
              "description": "URL of uploaded video. Required when using an uploaded video along with 'VideoToken'",
              "example": "https://video-cdn-eu-west-1.ziggeo.com/v1/applications/r1ac3a4cfe79f3896fce25bffbe16dd3/videos/r127c94ce5906ee6f636f6a582d77194/video.mp4"
            },
            {
              "name": "socialMediaProfiles",
              "kind": "optional",
              "type": "array",
              "description": "Array of string of social media profile URLs",
              "example": "[\"https://www.facebook.com/trusttestimonials\",\"https://www.linkedin.com/company/trust-platform\"]",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "",
              "itemDefault": ""
            },
            {
              "name": "stars",
              "kind": "optional",
              "type": "number<float>",
              "description": "Amount of given stars",
              "example": 5
            },
            {
              "name": "gaveConsent",
              "kind": "optional",
              "type": "boolean",
              "description": "Did testimonial giver gave consent to publish it?",
              "example": true
            },
            {
              "name": "consentDateTime",
              "kind": "optional",
              "type": "string<date-time>",
              "description": "Date and time when testimonial giver gave consent to publish it",
              "example": "\"2022-05-11T06:23:29.023\""
            },
            {
              "name": "published",
              "kind": "optional",
              "type": "boolean",
              "description": "Is testimonial published to show via any widget?",
              "example": true
            }
          ],
          "modelRef": "#/components/schemas/TestimonialInput",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "basic",
          "name": "basic",
          "kind": "optional",
          "type": "http",
          "description": "Basic Authentication header",
          "scheme": "basic"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Updated testimonial.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "TestimonialApiDb",
            "schema": [
              {
                "name": "id",
                "kind": "optional",
                "type": "string<uuid>",
                "example": ""
              },
              {
                "name": "workspaceId",
                "kind": "optional",
                "type": "string<uuid>",
                "example": ""
              },
              {
                "name": "created",
                "kind": "optional",
                "type": "string<date-time>",
                "example": ""
              },
              {
                "name": "firstname",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "lastname",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "title",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "subtitle",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "company",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "email",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "imageUrl",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "testimonialText",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "externalVideoHtml",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "videoVideoUrl",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "socialMediaProfiles",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "stars",
                "kind": "optional",
                "type": "number<float>",
                "example": ""
              },
              {
                "name": "gaveConsent",
                "kind": "optional",
                "type": "boolean",
                "example": ""
              },
              {
                "name": "consentDateTime",
                "kind": "optional",
                "type": "string<date-time>",
                "example": ""
              },
              {
                "name": "published",
                "kind": "optional",
                "type": "boolean",
                "example": ""
              },
              {
                "name": "questionsAndAnswers",
                "kind": "optional",
                "type": "string",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/TestimonialApiDb",
            "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": "8Jxjj5G2qWjZ0pVf6OHAt",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PUT \\\n     --url https://api.usetrust.app/v1/testimonial/{id} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "5vmXdg7TK3DaADjcnVL1R",
          "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}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "DGp7CuggHzFB4-fRdyrhB",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.usetrust.app/v1/testimonial/{id}\")\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": "kZUlvuj9NvMUUv4X2Fawp",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.usetrust.app/v1/testimonial/{id}\"\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": "NFYhVy_lDtBnrlMLGqzMi",
          "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}\", Method.Put);\nrequest.AddHeader(\"accept\", \"application/json\");\nrequest.AddHeader(\"content-type\", \"application/json\");\nRestResponse response = await client.ExecuteAsync(request);\nConsole.WriteLine(response.Content);"
        }
      ],
      "selectedLanguageId": "8Jxjj5G2qWjZ0pVf6OHAt"
    },
    "results": {
      "languages": [
        {
          "id": "XJCqSHK65h0N5ih3am_rc",
          "language": "200",
          "code": "// Updated testimonial.\n{\n  \"id\": \"\",\n  \"workspaceId\": \"\",\n  \"created\": \"\",\n  \"firstname\": \"\",\n  \"lastname\": \"\",\n  \"title\": \"\",\n  \"subtitle\": \"\",\n  \"company\": \"\",\n  \"email\": \"\",\n  \"imageUrl\": \"\",\n  \"testimonialText\": \"\",\n  \"externalVideoHtml\": \"\",\n  \"videoVideoUrl\": \"\",\n  \"socialMediaProfiles\": \"\",\n  \"stars\": \"\",\n  \"gaveConsent\": false,\n  \"consentDateTime\": \"\",\n  \"published\": false,\n  \"questionsAndAnswers\": \"\"\n}"
        },
        {
          "id": "hKNH_BI2_TORotK1Q-Fcr",
          "language": "400",
          "code": "// Bad Request\n\"\""
        },
        {
          "id": "5Q884PDc9_hLzVKxZgqVg",
          "language": "404",
          "code": "// Not Found\n\"\""
        },
        {
          "id": "MsXPjiUwuQgA_zoUIv8PZ",
          "language": "500",
          "code": "// Internal Server Error\n\"\""
        }
      ],
      "selectedLanguageId": "XJCqSHK65h0N5ih3am_rc"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}