Get an SPA Type v 3.0 crm.smartprocess.get

Choose a tool for developing with an AI agent:

  • use Alaio Vibecode to build an app for Bitrix24 from a task description without knowing any programming language. The agent writes the code and deploys the app to a server, with no manual hosting setup
  • use the MCP server to develop a REST API integration in your own project. The agent refers to the official REST documentation

Scope: crm

Who can execute the method: a CRM administrator, an administrator of this SPA, a user with permission to read its items, or a user with the "Manage Smart Process Automation" permission

This method belongs to REST 3.0. The call specifics and response format of the new API version are described in the REST 3.0 overview.

The crm.smartprocess.get method returns the settings of an SPA type by its entityTypeId.

Method Parameters

Required parameters are marked with *

Name
type

Description

entityTypeId*
integer

SPA type ID, for example, 1038. The value is greater than 0.

Type IDs are returned by the crm.smartprocess.list method

The method always returns all fields of the type, including the relations links, the linkedUserFields bindings to custom fields, and the primaryCustomSectionId and customSectionIds digital workplaces. The method ignores the select parameter without returning an error. To retrieve only some of the fields, use the crm.smartprocess.list method with a filter by entityTypeId and the select parameter.

The method name is written in lowercase: crm.smartprocess.get. For the name crm.smartProcess.get, the method returns the "Method Not Found" error.

Code Examples

How to Use Examples in Documentation

The new API call differs by adding the /api/ segment to the request URL:

https://{installation_address}/rest/api/{user_id}/{webhook_token}/crm.smartprocess.get

The examples retrieve the settings of the SPA type with entityTypeId = 1038. Replace it with the ID of your type from the crm.smartprocess.list response.

curl -X POST \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"entityTypeId":1038}' \
        https://**put_your_bitrix24_address**/rest/api/**put_your_user_id_here**/**put_your_webhook_here**/crm.smartprocess.get
        
curl -X POST \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"entityTypeId":1038,"auth":"**put_access_token_here**"}' \
        https://**put_your_bitrix24_address**/rest/api/crm.smartprocess.get
        

CRM methods are not yet included in the list of REST 3.0 methods known to $b24.actions.v3.call.make: such a call returns the SDK error JSSDK_CORE_METHOD_NOT_SUPPORT_IN_API_V3. Call the method through the REST 3.0 HTTP client — $b24.getHttpClient(ApiVersion.v3).call.

import { ApiVersion, Text } from '@bitrix24/b24jssdk'
        import type { B24Frame } from '@bitrix24/b24jssdk'
        
        declare const $b24: B24Frame
        
        type SmartProcessGetResult = {
          item: {
            entityTypeId: number
            title: string
            isCategoriesEnabled: boolean
            isStagesEnabled: boolean
            [key: string]: unknown
          }
        }
        
        try {
          const response = await $b24.getHttpClient(ApiVersion.v3).call<SmartProcessGetResult>(
            'crm.smartprocess.get',
            {
              entityTypeId: 1038,
            },
            Text.getUuidRfc4122()
          )
        
          if (!response.isSuccess) {
            console.error(response.getErrorMessages().join('; '))
          } else {
            const item = response.getData()!.result.item
            console.info('Smart process type:', item.entityTypeId, item.title)
          }
        } catch (error) {
          // Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
          console.error(error)
        }
        

CRM methods are not yet included in the list of REST 3.0 methods known to $b24.actions.v3.call.make. Call the method through the REST 3.0 HTTP client — $b24.getHttpClient(B24Js.ApiVersion.v3).call.

<script src="https://unpkg.com/@bitrix24/b24jssdk@1/dist/umd/index.min.js"></script>
        <script>
          async function getSmartProcessType() {
            try {
              const $b24 = await B24Js.initializeB24Frame()
        
              const response = await $b24.getHttpClient(B24Js.ApiVersion.v3).call(
                'crm.smartprocess.get',
                {
                  entityTypeId: 1038,
                },
                B24Js.Text.getUuidRfc4122()
              )
        
              if (!response.isSuccess) {
                console.error(response.getErrorMessages().join('; '))
                return
              }
        
              const item = response.getData().result.item
              console.info('Smart process type:', item.entityTypeId, item.title)
            } catch (error) {
              // Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
              console.error(error)
            }
          }
        
          document.addEventListener('DOMContentLoaded', getSmartProcessType)
        </script>
        

b24pysdk has no ready-made wrappers for CRM methods, and the SDK sends to REST 3.0 only the methods from the Config().api_v3_methods list. Add the method to this list and call it via bitrix_token.call_method with prefer_version=3.

from b24pysdk import Config
        from b24pysdk.errors import BitrixSDKException
        from b24pysdk.errors.v3 import BitrixAPIError
        
        method = "crm.smartprocess.get"
        Config().configure(api_v3_methods=Config().api_v3_methods | {method})
        
        try:
            response = bitrix_token.call_method(
                api_method=method,
                params={"entityTypeId": 1038},
                prefer_version=3,
            )
            item = response["result"]["item"]
            print(item["entityTypeId"], item["title"])
        except BitrixAPIError as error:
            print(
                "Bitrix API error",
                f"code: {error.code}",
                f"message: {error.error.message}",
                sep="\n",
            )
        except BitrixSDKException as error:
            print(f"Bitrix SDK error: {error.message}")
        except Exception as error:
            print(f"Unexpected error: {error}")
        

SDKs do not yet support the /rest/api/ address in calls. Use direct HTTP requests, for example, via curl or fetch.

try {
            $response = $b24Service
                ->core
                ->call(
                    'crm.smartprocess.get',
                    [
                        'entityTypeId' => 1038,
                    ]
                );
        
            $result = $response
                ->getResponseData()
                ->getResult();
        
            print_r($result);
        } catch (Throwable $e) {
            echo $e->getMessage();
        }
        

SDKs do not yet support the /rest/api/ address in calls. Use direct HTTP requests, for example, via curl or fetch.

BX24.callMethod(
            'crm.smartprocess.get',
            {
                entityTypeId: 1038,
            },
            result => {
                if (result.error())
                    console.error(result.error());
                else
                    console.dir(result.data());
            }
        );
        

SDKs do not yet support the /rest/api/ address in calls. Use direct HTTP requests, for example, via curl or fetch.

require_once('crest.php');
        
        $result = CRest::call(
            'crm.smartprocess.get',
            [
                'entityTypeId' => 1038,
            ]
        );
        
        echo '<PRE>';
        print_r($result);
        echo '</PRE>';
        
// client and ctx are already created — see the Go SDK section
        res, err := client.Core().Call(ctx, "crm.smartprocess.get", b24.Params{
        	"entityTypeId": 1038,
        }, b24.WithIdempotent())
        if err != nil {
        	return fmt.Errorf("crm.smartprocess.get: %w", err)
        }
        
        raw, ok := b24.Unwrap(res.Result, "item")
        if !ok {
        	return fmt.Errorf("response has no item key")
        }
        
        var item struct {
        	EntityTypeID        int    `json:"entityTypeId"`
        	Title               string `json:"title"`
        	IsCategoriesEnabled bool   `json:"isCategoriesEnabled"`
        	IsStagesEnabled     bool   `json:"isStagesEnabled"`
        }
        if err := json.Unmarshal(raw, &item); err != nil {
        	return fmt.Errorf("parse response: %w", err)
        }
        fmt.Println(item.EntityTypeID, item.Title)
        

Response Handling

HTTP status: 200

{
            "result": {
                "item": {
                    "entityTypeId": 1038,
                    "title": "Supplier Requests",
                    "code": "",
                    "createdBy": 1,
                    "updatedBy": 1,
                    "createdTime": "2025-07-01T09:26:42+01:00",
                    "updatedTime": "2026-09-29T12:33:45+01:00",
                    "primaryCustomSectionId": null,
                    "daysBeforeClose": null,
                    "startCatalogFormId": null,
                    "isCategoriesEnabled": true,
                    "isStagesEnabled": true,
                    "isBeginCloseDatesEnabled": true,
                    "isClientEnabled": true,
                    "isUseInUserfieldEnabled": true,
                    "isLinkWithProductsEnabled": true,
                    "isMycompanyEnabled": true,
                    "isDocumentsEnabled": true,
                    "isSourceEnabled": true,
                    "isObserversEnabled": true,
                    "isRecurringEnabled": false,
                    "isRecyclebinEnabled": false,
                    "isAutomationEnabled": false,
                    "isBizProcEnabled": false,
                    "isPaymentsEnabled": false,
                    "isCountersEnabled": true,
                    "isMultifieldsEnabled": false,
                    "isStartCatalogEnabled": false,
                    "isCreateByFormEnabled": false,
                    "isPersonEnabled": false,
                    "isSetOpenPermissions": false,
                    "customSectionIds": [],
                    "description": null,
                    "relations": {
                        "parent": [
                            {
                                "entityTypeId": 3,
                                "isChildrenListEnabled": true,
                                "isPredefined": true
                            },
                            {
                                "entityTypeId": 4,
                                "isChildrenListEnabled": true,
                                "isPredefined": true
                            },
                            {
                                "entityTypeId": 1,
                                "isChildrenListEnabled": false,
                                "isPredefined": false
                            },
                            {
                                "entityTypeId": 14,
                                "isChildrenListEnabled": false,
                                "isPredefined": false
                            },
                            {
                                "entityTypeId": 31,
                                "isChildrenListEnabled": false,
                                "isPredefined": false
                            },
                            {
                                "entityTypeId": 177,
                                "isChildrenListEnabled": false,
                                "isPredefined": false
                            }
                        ],
                        "child": [
                            {
                                "entityTypeId": 39,
                                "isChildrenListEnabled": true,
                                "isPredefined": true
                            }
                        ]
                    },
                    "linkedUserFields": {
                        "CALENDAR_EVENT|UF_CRM_CAL_EVENT": true,
                        "TASKS_TASK|UF_CRM_TASK": true,
                        "TASKS_TASK_TEMPLATE|UF_CRM_TASK": true
                    }
                }
            },
            "time": {
                "start": 1795430922,
                "finish": 1795430922.129126,
                "duration": 0.12912607192993164,
                "processing": 0,
                "date_start": "2026-11-23T11:48:42+01:00",
                "date_finish": "2026-11-23T11:48:42+01:00",
                "operating_reset_at": 1795431480,
                "operating": 0
            }
        }
        

Returned Data

Name
type

Description

result
object

Object with response data

result.item
object

SPA type settings. Field description

time
time

Information about the request execution time

SPA Type Fields

Name
type

Description

entityTypeId
integer

Type ID. It is part of the item method names, for example, crm.smartprocess1038.add

title
string

Type name

code
string

Symbolic code of the type. If the code is not set, an empty string

description
string

Type description, up to 1000 characters. If there is no description, null

createdBy
integer

ID of the user who created the type

updatedBy
integer

ID of the user who last updated the type

createdTime
datetime

Date and time the type was created

updatedTime
datetime

Date and time the type was last updated

primaryCustomSectionId
integer

ID of the primary digital workplace. If the type is not placed in any digital workplaces, null

customSectionIds
integer[]

IDs of all digital workplaces of the type. The primary workplace primaryCustomSectionId comes first. If the type is not placed in any digital workplaces, an empty array

daysBeforeClose
integer

Number of days from creation allotted to an item until completion: from 0 to 365. If no deadline is set, null

startCatalogFormId
integer

ID of the CRM form used to start the process from the "Start workflow" page. If no form is selected, null

isCategoriesEnabled
boolean

Whether custom pipelines are enabled

isStagesEnabled
boolean

Whether custom stages and kanban are enabled

isBeginCloseDatesEnabled
boolean

Whether the "Start date" and "End date" fields are enabled

isClientEnabled
boolean

Whether the "Customer" field is enabled. When the field is enabled, the type has system links to contacts and companies

isUseInUserfieldEnabled
boolean

Whether the type can be used in a custom field. The fields it is shown in are set by the linkedUserFields object

isLinkWithProductsEnabled
boolean

Whether binding to catalog products is enabled

isMycompanyEnabled
boolean

Whether the "Your company details" field is enabled

isDocumentsEnabled
boolean

Whether document printing is enabled

isSourceEnabled
boolean

Whether the "Source" and "Source information" fields are enabled

isObserversEnabled
boolean

Whether the "Observers" field is enabled

isRecurringEnabled
boolean

Whether recurring items are enabled

isRecyclebinEnabled
boolean

Whether deleted items are moved to the Recycle Bin

isAutomationEnabled
boolean

Whether automation rules and triggers are enabled

isBizProcEnabled
boolean

Whether the workflow designer is enabled

isPaymentsEnabled
boolean

Whether payment acceptance is enabled

isCountersEnabled
boolean

Whether the Activities view mode and counters are enabled

isMultifieldsEnabled
boolean

Whether communication fields are enabled: phone, email, website, messenger

isStartCatalogEnabled
boolean

Whether the type is shown on the "Start workflow" page

isCreateByFormEnabled
boolean

Whether items can be created from a CRM form

isPersonEnabled
boolean

Whether person tracking is enabled

isSetOpenPermissions
boolean

Whether new pipelines become available to everyone

relations
object

Links of the type to other CRM objects. Object description

linkedUserFields
object

Custom fields of other modules in which an item of the type can be selected. Object description

The relations Object

Name
type

Description

parent
object[]

Parent CRM object types: an SPA item can be linked to their items

child
object[]

Child CRM object types: their items can be linked to an SPA item

Link Object

Name
type

Description

entityTypeId
integer

ID of the linked CRM object type, for example, 3 for a contact. System type IDs are returned by the crm.dictionary.entitytype.list method

isChildrenListEnabled
boolean

Whether the list of child items is shown in the parent item form

isPredefined
boolean

Whether the link is a system one. For example, when the "Customer" field is enabled, the links to contacts and companies are system links

The response includes only links to types the user can read.

The linkedUserFields Object

The key is the custom field code, and the value is the true or false flag: whether an SPA item can be selected in this field.

Name
type

Description

CALENDAR_EVENT|UF_CRM_CAL_EVENT
boolean

CRM binding in a calendar event

TASKS_TASK|UF_CRM_TASK
boolean

CRM binding in a task

TASKS_TASK_TEMPLATE|UF_CRM_TASK
boolean

CRM binding in a task template

Error Handling

HTTP status: 400

{
            "error": {
                "code": "BITRIX_REST_V3_EXCEPTION_ENTITYNOTFOUNDEXCEPTION",
                "message": "Entity with ID 0 was not found."
            }
        }
        

Name
type

Description

error.code
string

String error code. Use it to identify the type of exception

error.message
string

Text description of the error

error.validation
array

Array with error details. Present only in data validation errors BITRIX_REST_V3_EXCEPTION_VALIDATION_REQUESTVALIDATIONEXCEPTION

error.validation[].field
string

Name of the field where the validation error occurred

error.validation[].message
string

Description of the error related to the specified field

Possible Error Codes

Type Not Found

Error Code: BITRIX_REST_V3_EXCEPTION_ENTITYNOTFOUNDEXCEPTION

Field

Error description

How to Fix

-

Entity with ID 0 was not found

There is no type with this entityTypeId, it is a system type, for example, 2 for a deal or 31 for an invoice, or the user has no access to the type. Check the ID with the crm.smartprocess.list method. The error message always contains 0, not the passed ID

Request Validation Errors

Error Code: BITRIX_REST_V3_EXCEPTION_VALIDATION_REQUESTVALIDATIONEXCEPTION

Field

Error description

How to Fix

entityTypeId

Required field entityTypeId is missing

Pass entityTypeId. The method does not accept the id parameter

entityTypeId

Field value must be 1 or greater

Pass a positive type ID

entityTypeId

This request requires data type int in field entityTypeId

Pass the ID as a number, for example, 1038

Method Not Found

Error Code: BITRIX_REST_V3_EXCEPTION_METHODNOTFOUNDEXCEPTION, HTTP status: 404

Field

Error description

How to Fix

-

Method crm.smartProcess.get was not found

Write the method name in lowercase: crm.smartprocess.get

Statuses and System Error Codes

HTTP Status: 4xx, 5xx

The errors described below are returned by the REST API itself, not by the logic of a specific method. They can arrive in response to any method.

Status

Code
Error Message

Description

500

INTERNAL_SERVER_ERROR
Internal server error

An internal server error has occurred. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support

500

ERROR_UNEXPECTED_ANSWER
Server returned an unexpected response

The server returned an unexpected response. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support

503

QUERY_LIMIT_EXCEEDED
Too many requests

The request intensity limit has been exceeded

503

BITRIX_REST_V3_EXCEPTION_LIMITER_QUERYTIMELIMITEXCEPTION
Request canceled: query time limit exceeded

The SQL query inside the method ran longer than the SQL query time limit. The Retry-After header contains the limit in seconds

429

OPERATION_TIME_LIMIT
Method is blocked due to operation time limit

The method is blocked because the request resource intensity limit has been exceeded. The block lasts 5 minutes, after which the accumulated execution time of the method is counted from zero

429

BITRIX_REST_V3_EXCEPTION_RATELIMITEXCEPTION
Request was blocked because the limit was exceeded

The same block in REST 3.0 methods. The Retry-After header contains the remaining block time in seconds

401

NO_AUTH_FOUND
Wrong authorization data

The request contains no authorization data: neither an access token nor a webhook code was passed

401

INVALID_REQUEST
Https required

Methods are called over the HTTPS protocol only

401

OVERLOAD_LIMIT
REST API is blocked due to overload

The REST API is blocked due to overload. This is a manual individual block. To have it lifted, contact Bitrix24 technical support

401

ACCESS_DENIED
REST is available only on commercial plans

REST API access is not active for this account. In Bitrix24 Cloud, check the current plan or trial status: Vibe+ plans include REST API access, while Essentials plans do not. A webhook receives a different error message — REST is available only by subscription

403

FEATURE_NOT_AVAILABLE_ON_CURRENT_PLAN
This feature is not available on your current plan.

The Bitrix24 Market application is blocked because the number of installed applications exceeds the plan limit. Events are not delivered to such an application. Applications exempt from the limit are not blocked

401

INVALID_CREDENTIALS
Invalid request credentials

No active webhook with the specified user identifier and secret code was found

404

ERROR_METHOD_NOT_FOUND
Method not found!

No method with this name was found. The name is misspelled, the method does not exist in the REST API, or it is unavailable without the required scope

401

insufficient_scope
The request requires higher privileges than provided by the webhook token

The request requires broader permissions than the token has: for a webhook these are the permissions granted to it, for an application it is the scope. For an application, the error message ends with provided by the access token

401

expired_token
The access token provided has expired

The access token has expired

401

user_access_error
The user does not have access to the application

The application is installed, but the Bitrix24 administrator has granted access to it only to specific users

403

PORTAL_DELETED
Portal was deleted

The public part of the site is closed. To open it on an on-premise installation, disable the "Temporary closure of the public part of the site" option. Path to the setting: Desktop > Settings > Product Settings > Module Settings > Main Module > Temporary closure of the public part of the site

Continue Learning