---
title: Creates an event type
slug: creates-an-event-type
docTags: 
createdAt: 2025-01-28T10:28:11.769Z
---

{
  "id": "FyJDKthzBKHmuRSxhmN_J",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.waydev.co/v2/event_types",
    "name": "Creates an event type",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "kind": "required",
          "name": "Authorization",
          "type": "string",
          "description": "Your PAT generated in Waydev"
        }
      ],
      "queryParameters": [
        {
          "kind": "required",
          "name": "name",
          "type": "string",
          "description": "The name of the event type e.g. zephyr.test"
        },
        {
          "kind": "required",
          "name": "event_type",
          "type": "string",
          "description": "<p>Type of the event. Must be one of: 'code', 'pr', 'ci/cd'.</p>"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful operation",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "401",
        "description": "bad input parameter",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "j09npMwvAcNVVOjv6NBb3",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url 'https://api.waydev.co/v2/event_types?name=string&event_type=string' \\\n     --header 'accept: application/json' \\\n     --header 'authorization: string'"
        },
        {
          "id": "ojHWuykvXJVD_P523ip77",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"authorization\", \"string\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.waydev.co/v2/event_types?name=string&event_type=string\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "Vm_yEPSSHfvmdKh1v9V53",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.waydev.co/v2/event_types?name=string&event_type=string\")\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[\"authorization\"] = \"string\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "9tsnB23_bjhQhTYZTF7rG",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.waydev.co/v2/event_types?name=string&event_type=string\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'authorization': 'string'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "j09npMwvAcNVVOjv6NBb3"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Successful operation\n"
        },
        {
          "id": "response-1-401",
          "language": "401",
          "code": "// bad input parameter\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}