For AI agents: markdown of this page — /docs-content-en/entities/bizproc-templates/fields.md documentation index — /llms.txt

Template fields

GET /v1/bizproc-templates/fields

Returns the field schema of a business process template: the type of each field, whether it is writable, and whether it is required on creation. The response describes the schema and does not query the contents of the templates in your Bitrix24 account.

Examples

The schema can be read only with an authorization key — both examples send the authorization key and the Authorization: Bearer header. The session token is issued by OAuth authorization, is valid for 24 hours, and cannot be renewed — Passing the key.

curl — OAuth application

Terminal
curl -X GET "https://vibecode.bitrix24.com/v1/bizproc-templates/fields" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/bizproc-templates/fields', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { success, data } = await res.json()
console.log(Object.keys(data.fields))

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata.fields Typeobject DescriptionField schema: the key is the field name, the value is its description
Fielddata.fields.<field>.type Typestring DescriptionValue type: number, string, array, datetime, boolean
Fielddata.fields.<field>.readonly Typeboolean Descriptiontrue — the field is filled by the system and is not passed in write requests
Fielddata.fields.<field>.writeOnly Typeboolean Descriptiontrue — the field is accepted on write but never returned in responses
Fielddata.fields.<field>.notReturned Typeboolean Descriptiontrue — the field name is absent from every read response and unsupported in select
Fielddata.fields.<field>.required Typeboolean DescriptionPresent only for fields that are required on creation
Fielddata.batch Typearray DescriptionEntity operations available in POST /v1/batch

Schema composition:

Field Type RO Description
Fieldid Typenumber RORO DescriptionTemplate identifier
FieldmoduleId Typestring RO DescriptionModule the template is bound to: lists, crm, disk, bizproc
Fieldentity Typestring RO DescriptionDocument object inside the module, for example BizprocDocument
FielddocumentType Typearray RO DescriptionDocument type as three elements — module, object, type
FieldtemplateData Typearray RO DescriptionTemplate file — file name and base64 content. Required on creation, never returned in read responses
FieldautoExecute Typenumber RO DescriptionAuto-start condition: 0 — no auto-start, 1 — on document creation, 2 — on change, 3 — on creation and change
Fieldname Typestring RO DescriptionTemplate name
Fielddescription Typestring RO DescriptionTemplate description
Fieldmodified Typedatetime RORO DescriptionDate of the last change
FieldisModified Typeboolean RORO DescriptionWhether the template was edited after the file was uploaded
FielduserId Typenumber RO DescriptionAuthor of the last change. List: GET /v1/users

Response example

JSON
{
  "success": true,
  "data": {
    "fields": {
      "id": { "type": "number", "readonly": true },
      "moduleId": { "type": "string", "readonly": false },
      "entity": { "type": "string", "readonly": false },
      "documentType": { "type": "array", "readonly": false },
      "templateData": { "type": "array", "readonly": false, "writeOnly": true, "notReturned": true, "required": true },
      "autoExecute": { "type": "number", "readonly": false },
      "name": { "type": "string", "readonly": false },
      "description": { "type": "string", "readonly": false },
      "modified": { "type": "datetime", "readonly": true },
      "isModified": { "type": "boolean", "readonly": true },
      "userId": { "type": "number", "readonly": false }
    },
    "batch": ["create", "update", "delete"]
  }
}

Error response example

403 — the request was sent with an API key:

JSON
{
  "success": false,
  "error": {
    "code": "OAUTH_REQUIRED",
    "message": "bizproc-templates require an OAuth app key (vibe_app_*) with an Authorization: Bearer session — a personal vibe_api_* key lacks the per-user OAuth context Bitrix24 needs for these methods. Create an OAuth app (POST /v1/apps) and retry with its key. On this 403 switch keys — do NOT delete or recreate the app (that discards anything already registered under it, e.g. a bizproc robot you just registered)."
  }
}

Errors

HTTP Code Description
HTTP403 CodeOAUTH_REQUIRED DescriptionThe request was sent with an API key. The schema is available only to an authorization key
HTTP401 CodeTOKEN_MISSING DescriptionAuthorization key without the Authorization: Bearer header
HTTP401 CodeWRONG_AUTH_SCHEME DescriptionThe authorization key was sent in the Authorization: Bearer header. The key goes in X-Api-Key, while Authorization: Bearer carries the session token
HTTP401 CodeINVALID_SESSION DescriptionThe session token has expired or is invalid — authorize again
HTTP403 CodeSCOPE_DENIED DescriptionThe key lacks the bizproc scope
HTTP429 CodeRATE_LIMITED DescriptionRate limit exceeded: 300 requests per minute per portal. All API keys of the portal share one limit. The current limit is returned in the x-ratelimit-limit header. Retry after the delay in the Retry-After header

For the full list of common API errors, see Errors.

Known specifics

A readonly: false mark does not mean the field can be changed. An update applies only name, description, autoExecute, and templateData — see Update a template. The other fields without a readonly mark — moduleId, entity, documentType, userId — are set when the file is uploaded, and a request to change them returns 200 with no effect.

The absence of a readonly mark does not mean the field can be read. templateData has readonly: false, but the field is not returned in the list or through select — it is write-only.

The required: true mark is set on templateData only, although an upload requires three fields. The schema reflects the check performed on the Vibecode side: without templateData the request is rejected immediately with the MISSING_REQUIRED_FIELDS code. A missing name or documentType passes that check and is rejected one step later, with the BITRIX_ERROR code. The full list of required upload fields is on the Upload a template page.

See also