---
title: Create a support log
slug: docs/demo/create-a-support-log
description: Learn how to make a successful POST request to an API endpoint with this helpful code example. Gain insights on including headers for accepting and sending JSON data, along with a comprehensive JSON payload containing crucial log-related fields. Enhance y
docTags: 
createdAt: 2022-03-21T20:12:45.000Z
---

{
  "id": "BsA_Iqfk7E1OPzbFy3gBu",
  "data": {
    "url": "https://api.fictive.com/REST/api/accounts/{accountReference}/support-logs",
    "name": "Create a support log",
    "method": "POST",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "accountReference",
          "type": "string",
          "description": ""
        }
      ],
      "queryParameters": [],
      "headerParameters": [
        {
          "kind": "optional",
          "name": "X-TokenId",
          "type": "string",
          "description": "The eSuite Token Id"
        },
        {
          "kind": "optional",
          "name": "X-SessionId",
          "type": "string",
          "description": "The eSuite Session Id"
        },
        {
          "kind": "required",
          "name": "X-Version",
          "type": "string",
          "description": "The eSuite Version"
        },
        {
          "kind": "optional",
          "name": "Origin",
          "type": "string",
          "description": "The eSuite Origin"
        }
      ],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "customerSupportLogEntry",
          "type": "object",
          "schema": [
            {
              "kind": "optional",
              "name": "logType",
              "type": "string<Undefined | ManageOffer | ViewAccount | SystemAccount | Chargeback | Email | PhoneCall | Skype | OtherIm | PaperMail | SupportNote | BackOffice | TextOrSMSMessage | InPerson>",
              "example": ""
            },
            {
              "kind": "optional",
              "name": "logStatus",
              "type": "string<Undefined | Open | Closed>",
              "example": ""
            },
            {
              "kind": "optional",
              "name": "logTitle",
              "type": "string",
              "example": ""
            },
            {
              "kind": "optional",
              "name": "logDetails",
              "type": "string",
              "example": ""
            },
            {
              "kind": "optional",
              "name": "systemAccountId",
              "type": "integer<int32>",
              "example": 0
            },
            {
              "kind": "optional",
              "name": "supportLogReference",
              "type": "string",
              "example": ""
            },
            {
              "kind": "optional",
              "name": "createdDate",
              "type": "string<date-time>",
              "example": ""
            },
            {
              "kind": "optional",
              "name": "lastUpdatedDate",
              "type": "string<date-time>",
              "example": ""
            }
          ],
          "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.CustomerSupportLogEntry",
          "customType": "FictiveGlobal.Api.Rest.Dtos.v1.CustomerSupportLogEntry",
          "isExpanded": true
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "isExpanded": true,
        "statusCode": "204",
        "description": "No Content",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "This endpoint will provide the ability to create a new support log against a specific account",
    "examples": {
      "languages": [
        {
          "id": "PA2oO33IWyZFnOsENvZJl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.fictive.com/REST/api/accounts/{accountReference}/support-logs \\\n     --header 'accept: application/json' \\\n     --header 'x-version: string'"
        },
        {
          "id": "wDliHRdsRJhv--8FDACsz",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-version\", \"string\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.fictive.com/REST/api/accounts/{accountReference}/support-logs\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "roXVQkaJ4JRu23yfLSL-Y",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fictive.com/REST/api/accounts/{accountReference}/support-logs\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-version\"] = \"string\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "hhMOzapIf71x3DTV7gu0x",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.fictive.com/REST/api/accounts/{accountReference}/support-logs\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-version': 'string'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "PA2oO33IWyZFnOsENvZJl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-204",
          "language": "204",
          "code": "// No Content\n"
        }
      ],
      "selectedLanguageId": "response-0-204"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}