---
title: Status Change
slug: status-change
docTags: 
createdAt: 2023-09-22T04:47:01.073Z
---

:::ApiMethodV2
```json
{
  "name": "Status Change",
  "method": "POST",
  "url": "Your endpoint here",
  "description": "",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "CPZOwr_QNfbTBdbszPZNX",
        "language": "json",
        "code": "{\n      \"share_public\": \"string\",\n      \"read_event\": \"string\",\n      \"source_id\": \"string\",\n      \"destination_id\": \"string\",\n      \"token_id\": \"Integer\",\n      \"tokes_status\": \"string\"\n }",
        "customLabel": ""
      },
      {
        "id": "NLF4WLibBCjgMruA4IkBJ",
        "language": "curl",
        "code": "curl --location --request POST '' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\"share_public\":\"string\",\"read_event\":\"string\",\"source_id\":\"string\",\"destination_id\":\"string\",\"token_id\":\"Integer\",\"tokes_status\":\"string\"}'",
        "customLabel": ""
      },
      {
        "id": "ZsE6Exm4gK6fvSHcmKIX1",
        "language": "nodejs",
        "code": "var request = require('request');\nvar options = {\n   'method': 'POST',\n   'url': '',\n   'headers': {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n   },\n   body: JSON.stringify({\n      \"share_public\": \"string\",\n      \"read_event\": \"string\",\n      \"source_id\": \"string\",\n      \"destination_id\": \"string\",\n      \"token_id\": \"Integer\",\n      \"tokes_status\": \"string\"\n   })\n\n};\nrequest(options, function (error, response) {\n   if (error) throw new Error(error);\n   console.log(response.body);\n});\n",
        "customLabel": ""
      },
      {
        "id": "B9QI1nv_PKkZjB5LzoaF8",
        "language": "javascript",
        "code": "var myHeaders = new Headers();\nmyHeaders.append(\"Accept\", \"application/json\");\nmyHeaders.append(\"Content-Type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"share_public\": \"string\",\n   \"read_event\": \"string\",\n   \"source_id\": \"string\",\n   \"destination_id\": \"string\",\n   \"token_id\": \"Integer\",\n   \"tokes_status\": \"string\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      },
      {
        "id": "HwwetEEWENquHgsXRPza9",
        "language": "python",
        "code": "import requests\nimport json\n\nurl = \"\"\n\npayload = json.dumps({\n   \"share_public\": \"string\",\n   \"read_event\": \"string\",\n   \"source_id\": \"string\",\n   \"destination_id\": \"string\",\n   \"token_id\": \"Integer\",\n   \"tokes_status\": \"string\"\n})\nheaders = {\n   'Accept': 'application/json',\n   'Content-Type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n",
        "customLabel": ""
      },
      {
        "id": "e35pisIaaZTzOYEGj3ld5",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Accept\"] = \"application/json\"\nrequest[\"Content-Type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"share_public\": \"string\",\n   \"read_event\": \"string\",\n   \"source_id\": \"string\",\n   \"destination_id\": \"string\",\n   \"token_id\": \"Integer\",\n   \"tokes_status\": \"string\"\n})\n\nresponse = http.request(request)\nputs response.read_body\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "CPZOwr_QNfbTBdbszPZNX"
  },
  "results": {
    "languages": [
      {
        "id": "DIae5nnK0S932fZFAg5qo",
        "language": "200",
        "customLabel": "",
        "code": "{\n   \"success\": true,\n   \"message\": \"Success\",\n}\n"
      },
      {
        "id": "usE0PjK5xdwTob_6alWkQ",
        "language": "413",
        "customLabel": "",
        "code": "{\n  \"success\": \"false\",\n  \"errors\": {\n    \"code\": \"413\",\n    \"message\": \"Destination ID Unknown\"\n  }\n}"
      },
      {
        "id": "f6OPZsJGc9Dv6zI8Ok6oY",
        "language": "428",
        "code": "{\n  \"success\": \"false\",\n  \"errors\": {\n    \"code\": \"428\",\n    \"message\": \"Token ID doesn't match\"\n  }\n}",
        "customLabel": ""
      },
      {
        "id": "z8tMrMAccWlYIVy1fh0r2",
        "language": "500",
        "code": "{\n  \"success\": \"false\",\n  \"errors\": {\n    \"code\": \"500\",\n    \"message\": \"internal Server Error\"\n  }\n}",
        "customLabel": ""
      },
      {
        "id": "PeLoGQudsOpq11eh4eTxS",
        "language": "502",
        "code": "{\n  \"success\": \"false\",\n  \"errors\": {\n    \"code\": \"502\",\n    \"message\": \"Bad Gateway\"\n  }\n}",
        "customLabel": ""
      },
      {
        "id": "I_K_ewln2wIulWjHRYt9t",
        "language": "503",
        "code": "{\n  \"success\": \"false\",\n  \"errors\": {\n    \"code\": \"503\",\n    \"message\": \"Service Unavailable\"\n  }\n}",
        "customLabel": ""
      },
      {
        "id": "fyeLlLUeFK5YPRGEo9Wwa",
        "language": "504",
        "code": "{\n  \"success\": \"false\",\n  \"errors\": {\n    \"code\": \"504\",\n    \"message\": \"Gateway Timeout\"\n  }\n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "fyeLlLUeFK5YPRGEo9Wwa"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "name": "share_public",
        "kind": "optional",
        "type": "string",
        "description": "Public keys are accessible in your PayDocker account under integration menu.",
        "children": []
      },
      {
        "name": "read_event",
        "kind": "required",
        "type": "string",
        "description": "A condition to allow execution of the action that is connected to the token. The condition would be \"token.status_changed\"",
        "children": []
      },
      {
        "name": "source_id",
        "kind": "required",
        "type": "string",
        "description": "Your PayDocker Account ID assigned upon account creation (e.g. PDR1). It is case sensitive.",
        "children": []
      },
      {
        "name": "destination_id",
        "kind": "required",
        "type": "string",
        "description": "Property ID (e.g. ID 001) generated in your platform. It represents the token recipient.",
        "children": []
      },
      {
        "name": "token_id",
        "kind": "required",
        "type": "Integer",
        "description": "The unique identifier associated with the token that the user is requesting a modification for. (e.g. 2908926013012565)",
        "children": []
      },
      {
        "name": "tokes_status",
        "kind": "optional",
        "type": "string",
        "description": "deleted, freezed, active or disputed (only one is applicable). It is case-sensitive.",
        "children": []
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::

Public keys are accessible in your PayDocker account under integration menu.
