Enspace
  1. Fields
Enspace
  • Introduction
  • Authentication
  • Concepts
  • First Steps
  • Workspaces
    • Types
      • Fields
        • List Fields
          GET
        • Create Field
          POST
        • Get Field
          GET
        • Field Updated
          PUT
        • Delete Field
          DELETE
      • Items
        • List Items
        • Create Item
        • Count Items
        • Get Item
        • Update Item
        • Delete item
      • List Types
        GET
      • Count Types
        GET
      • Get specific Type
        GET
      • Create Type
        POST
      • Update Type
        PUT
      • Delete Type
        DELETE
    • Members
      • List Members
      • Count Members
      • Get Member
      • New Member
      • Update Member
      • Remove Member
    • Roles
      • List roles
      • Create role
      • Get specific job title
      • Count positions
      • Update job title
      • Delete role
      • List Role Permissions
      • Add Permission to Role
      • Remove Role Permission
    • Member Groups
      • List groups
      • New group
      • Get group
      • Update group
      • Delete group
      • Add Users
      • Remove Users
    • List Workspaces
      GET
    • Workspace Context
      GET
    • New Workspace
      POST
    • Leave the workspace
      POST
    • Workspace Statistics
      GET
    • Workspace Deletion Preview
      GET
    • Delete Workspace
      DELETE
  • User
    • Audit Logs
    • List API Keys
  1. Fields

Create Field

Em desenvolvimento
Develop Env
https://api-develop.enspace.io
Develop Env
https://api-develop.enspace.io
POST
https://api-develop.enspace.io
/ws/types/{slug}/fields
Responsável:Julio Cordeiro

Create Field#

Adds a new field to an existing Type.

Parameters#

slug (path) - Unique slug of the Type

Request Body#

FieldTypeRequiredDescription
namestringYesField name (e.g., "Product Name")
slugstringYesUnique identifier of the field (e.g., "product_name")
typestringYesField type: text, number, date, select, boolean, email, url
requiredbooleanNoWhether the field is required (default: false)
defaultValuestringNoDefault value of the field
optionsobjectNoAdditional options (used for select fields)
positionintegerNoField position in the order
activebooleanNoWhether the field is active (default: true)

Request Example#

{
  "name": "Category",
  "slug": "category",
  "type": "select",
  "required": true,
  "options": {
    "choices": ["electronics", "clothing", "home"]
  },
  "position": 3
}

Requisição

Authorization
API Key
Adicionar parâmetro em header
x-api-key
Exemplo:
x-api-key: ********************
API Key
Adicionar parâmetro em header
en-workspace
Exemplo:
en-workspace: ********************
or
Parâmetros de Caminho

Parâmetros Bodyapplication/json

Examples

Respostas

🟢201Create
application/json
Field successfully created.
Body

🟠400Invalid request
🟠401Unauthorized
🟠404Record not found
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api-develop.enspace.io/ws/types//fields' \
--header 'x-api-key: <api-key>' \
--header 'en-workspace: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "string",
    "slug": "string",
    "type": "text",
    "required": false,
    "config": {},
    "order": 0
}'
Response Response Example
201 - Exemplo 1
Página anterior
List Fields
Próxima página
Get Field
Built with