Overview
POST/project/projects/{id}/fieldsproject

Add a custom field (+ a field.created activity)

Create a record in fields.

Auth: bearerAuth — calls run as the authenticated user.

Parameters
  • idpathstring
Request body

application/json · optional

  • keystring
  • labelstring
  • type"text" | "number" | "date" | …
  • optionsoptionalstring[]

    required (non-empty) for a select field; omitted for every other type

  • positionoptionalinteger

    explicit field order; defaults to append (max+1)

Example
{
  "key": "string",
  "label": "string",
  "type": "text",
  "options": [
    "string"
  ],
  "position": 0
}
Responses
201

Created field

  • idstring
  • ecosystemIdstring
  • projectIdstring
  • keystring

    stable identifier, unique within the project

  • labelstring
  • type"text" | "number" | "date" | …
  • optionsoptionalstring[]?

    the choices for a select field (non-empty); null for every other type

  • positioninteger

    field order (ascending)

  • createdAtstring
Example
{
  "id": "string",
  "ecosystemId": "string",
  "projectId": "string",
  "key": "string",
  "label": "string",
  "type": "text",
  "options": [
    "string"
  ],
  "position": 0,
  "createdAt": "string"
}
400

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
401

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
404

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
409

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
Code examples
cURL
curl -X POST "https://api.agenticdeveloperhub.com/project/projects/{id}/fields" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "key": "string",
  "label": "string",
  "type": "text",
  "options": [
    "string"
  ],
  "position": 0
}'
JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/project/projects/{id}/fields", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json"
  },
  body: "{\n  \"key\": \"string\",\n  \"label\": \"string\",\n  \"type\": \"text\",\n  \"options\": [\n    \"string\"\n  ],\n  \"position\": 0\n}",
});
const data = await res.json();