POST
/
v1
/
custom-properties
curl --request POST \
  --url https://api.hyperline.co/v1/custom-properties \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "type": "date",
  "slug": "<string>",
  "entities": [
    "customer"
  ],
  "api_only": true,
  "authorized_values": [
    "<string>"
  ]
}'
{
  "id": "cfi_efnjehRH304",
  "name": "Test custom property",
  "slug": "test_custom_property",
  "type": "date",
  "entities": [
    "customer"
  ],
  "authorized_values": [
    "<string>"
  ],
  "api_only": true,
  "created_at": "2024-01-01T22:00:00Z",
  "updated_at": "2024-01-01T22:00:00Z"
}

Authorizations

Authorization
string
headerrequired

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

Body

application/json
name
string
required
type
enum<string>
required
Available options:
date,
boolean,
number,
text,
select
slug
string
required
entities
enum<string>[]
required
Available options:
customer,
subscription,
product,
plan
api_only
boolean | null
default: false
authorized_values
string[] | null

Response

201 - application/json
id
string
required

Custom property ID.

name
string
required

Custom property name.

slug
string
required

Custom property unique slug.

type
enum<string>
required

Custom property type.

Available options:
date,
boolean,
number,
text,
select
entities
enum<string>[]
required

Entities on which the custom property is available.

Available options:
customer,
subscription,
product,
plan
authorized_values
string[] | null
required

If the custom property is of type select this is the list of available values.

api_only
boolean
default: falserequired

If true the custom property will not be displayed in the interface.

created_at
string
required

Creation date of the custom property.

updated_at
string
required

Update date of the custom property.