Skip to main content
POST
/
api
/
v1
/
custom-fields
curl --request POST \
  --url https://api.railmail.app/api/v1/custom-fields \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "key": "company",
  "displayName": "Company",
  "type": "TEXT",
  "isRequired": false
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "key": "<string>",
  "displayName": "<string>",
  "description": "<string>",
  "type": "<string>",
  "status": "<string>",
  "isSystem": true,
  "isRequired": true,
  "defaultValue": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "archivedAt": "2023-11-07T05:31:56Z"
}

Authorizations

X-API-Key
string
header
required

Project-scoped API key, format rm_(live|test)_... . May also be sent as Authorization: Bearer rm_....

Body

application/json
key
string
required
displayName
string
required
Maximum string length: 100
type
enum<string>
required
Available options:
TEXT,
LONG_TEXT,
NUMBER,
DECIMAL,
BOOLEAN,
DATE,
DATETIME,
EMAIL,
URL,
PHONE,
SELECT,
MULTI_SELECT
description
string | null
Maximum string length: 500
isRequired
boolean | null
defaultValue
string | null
options
object[] | null

Required for SELECT and MULTI_SELECT.

Response

Custom field created

id
string<uuid>
key
string
displayName
string
description
string | null
type
string
status
string
isSystem
boolean
isRequired
boolean
defaultValue
string | null
createdAt
string<date-time>
updatedAt
string<date-time>
archivedAt
string<date-time> | null