Skip to main content
POST
/
api2
/
v1
/
customFields
Create custom field
curl --request POST \
  --url https://cloud.memsource.com/web/api2/v1/customFields \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "allowedEntities": [],
  "name": "<string>",
  "description": "<string>",
  "options": [
    "<string>"
  ],
  "required": true
}
'
{
  "allowedEntities": [],
  "createdAt": "2023-11-07T05:31:56Z",
  "createdBy": {
    "email": "<string>",
    "firstName": "<string>",
    "id": "<string>",
    "lastName": "<string>",
    "uid": "<string>",
    "userName": "<string>"
  },
  "description": "<string>",
  "lastModified": "2023-11-07T05:31:56Z",
  "lastModifiedBy": {
    "email": "<string>",
    "firstName": "<string>",
    "id": "<string>",
    "lastName": "<string>",
    "uid": "<string>",
    "userName": "<string>"
  },
  "name": "<string>",
  "options": {
    "remainingCount": 123,
    "truncatedOptions": [
      {
        "deprecated": true,
        "uid": "<string>",
        "used": true,
        "value": "<string>"
      }
    ]
  },
  "required": true,
  "requiredFrom": "2023-11-07T05:31:56Z",
  "uid": "<string>"
}

Authorizations

Authorization
string
header
required

Get a token from auth/login endpoint and then pass it in the Authorization HTTP header in every subsequent API call. For more information visit our help center.

Body

application/json

Custom field to create

allowedEntities
enum<string>[]
required

Entity (project or job) the custom field can be assigned to. Currently exactly one entity must be supplied

Available options:
PROJECT,
JOB
name
string
required

Name of the custom field, at most 255 characters

Maximum string length: 255
type
enum<string>
required

Type of the custom field

Available options:
MULTI_SELECT,
SINGLE_SELECT,
STRING,
NUMBER,
URL,
DATE
description
string

Description of the custom field, at most 500 characters

Maximum string length: 500
options
string[]

Option values for the field. Required and used only for SINGLE_SELECT and MULTI_SELECT fields; ignored for other types

required
boolean

Whether the custom field must be filled in for its allowed entities

Response

Created

allowedEntities
enum<string>[]

Entities (project or job) the custom field can be assigned to

Available options:
PROJECT,
JOB
createdAt
string<date-time>

Date and time the custom field was created

createdBy
object
description
string

Description of the custom field

lastModified
string<date-time>

Date and time the custom field was last modified

lastModifiedBy
object
name
string

Name of the custom field

options
object
required
boolean

Whether the custom field must be filled in for its allowed entities

requiredFrom
string<date-time>

Date and time from which the custom field is required; null when the field is not required

type
enum<string>

Type of the custom field

Available options:
MULTI_SELECT,
SINGLE_SELECT,
STRING,
NUMBER,
URL,
DATE
uid
string

Unique identifier of the custom field used in API paths