POST
/
{version}
/
users
/
{user}
/
fields
curl --request POST \
  --url https://api.perscom.io/{version}/users/{user}/fields \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "key": "<string>",
  "type": "<string>",
  "cast": "<string>",
  "description": "<string>",
  "placeholder": "<string>",
  "default": "<string>",
  "help": "<string>",
  "required": true,
  "rules": "<string>",
  "readonly": true,
  "hidden": true,
  "options": [
    {}
  ]
}'
{
  "data": {
    "id": 123,
    "name": "<string>",
    "key": "<string>",
    "type": "<string>",
    "cast": "<string>",
    "description": "<string>",
    "placeholder": "<string>",
    "default": "<string>",
    "help": "<string>",
    "required": true,
    "rules": "<string>",
    "readonly": true,
    "hidden": true,
    "options": [
      {}
    ],
    "label": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

version
enum<string>
default:v2
required

The API version to use.

Available options:
v1,
v2
user
integer
required

Body

application/json
name
string
key
string | null
type
string
cast
string | null
description
string | null

Supports HTML.

placeholder
string | null
default
string | null
help
string | null
required
boolean
rules
string | null
readonly
boolean
hidden
boolean
options
object[]

Response

201
application/json
OK
data
object