Skip to content
  • Auto
  • Light
  • Dark
Get Started

Create

Create
post/v2/vals

Create a new val

Body Parameters
namestring
minLength1
maxLength48
privacyenum
"public" OR "unlisted" OR "private"
Hide ParametersShow Parameters
"public"
"unlisted"
"private"
descriptionstring
optional
maxLength64
Returns
idstringauthorobjectcreatedAtstringdescriptionstringimageUrlstringlinksobjectnamestringprivacyenumVal
curl https://api.val.town/v2/vals \
    -H 'Content-Type: application/json' \
    -d '{
      "name": "myVal",
      "privacy": "public"
    }'
200 Example
{
  "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "author": {
    "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "username": "username"
  },
  "createdAt": "2019-12-27T18:11:19.117Z",
  "description": "description",
  "imageUrl": "imageUrl",
  "links": {
    "html": "https://example.com",
    "self": "https://example.com"
  },
  "name": "name",
  "privacy": "public"
}