Reference / Lifecycle

Add a profile field to the schema.

POST /v1/profile-fields
Secret API key operationId: create_field

Authorization

Server-to-server. Send a secret key as a Bearer token plus the x-application-id header.

Request body · required

  • field_type string required
  • key string required
  • label string required
  • options Value?
  • position integer<int32> int32
  • required boolean

Responses

201 Field created
{
  "data": {
    "field_type": "string",
    "id": "018f3c4a-7b2e-7c1d-9e0a-1f2b3c4d5e6f",
    "key": "string",
    "label": "string",
    "options": {},
    "position": 0,
    "required": false
  },
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "timestamp": "string"
  },
  "success": false
}
409 Key already in use
422 Invalid input

Request

curl -X POST "http://localhost:8080/v1/profile-fields" \
  -H "Content-Type: application/json" \
  -d '{
  "field_type": "string",
  "key": "company_name",
  "label": "Company name",
  "options": {},
  "position": 0,
  "required": false
}'

Try it

live request
POST http://localhost:8080/v1/profile-fields

Request body

application/json