> ## Documentation Index
> Fetch the complete documentation index at: https://dialnexa.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Classify Agent Blueprint

> Classify an agent blueprint to get a type recommendation from structured business and call requirements.

Read only

Classify an agent blueprint to get a type recommendation from structured business and call requirements. This operation does not create or publish an agent.

## Before you begin

* Send a valid workspace API key.
* Supply the blueprint fields you know. Each field is optional; text fields allow 4000 characters each, while `language` allows 120.

## Classify Agent Blueprint Request

```json theme={null}
{"primary_goal": "Book a callback", "language": "English"}
```

## Verify the result

The current route returns HTTP `201` with `data.shape`, `data.pipeline`, `data.confidence`, `data.evidence`, `data.needsTiebreak`, and `data.features`. Shapes are `spa`, `cfa`, and `ivr`; pipelines are `cascaded` and `s2s`. Compare the evidence with the intended call before choosing a type.

## Errors and recovery

`400` means a field has the wrong type or exceeds its length limit. For `401`, correct the API key. The service uses a rule-based recommendation if its model-assisted step fails. Recommendations can change between requests; retrying does not create duplicate agents.

## Related endpoints

* [Recommend Agent Type](https://dialnexa.com/docs/api-reference/v1/agent-builder/recommend-type.md)
* [Agent Builder](https://dialnexa.com/docs/agents/ai-agent-builder.md#choose-the-suggested-agent-type)
* [Create Agent](https://dialnexa.com/docs/api-reference/v1/agents/create.md)


## OpenAPI

````yaml POST /v1/agent-builder/classify-shape
openapi: 3.0.0
info:
  title: DialNexa API
  description: Public `/v1` REST API for the DialNexa voice AI platform.
  version: 1.0.0
servers:
  - url: https://api.dialnexa.com
    description: DialNexa production API
security:
  - bearer: []
tags:
  - name: Agents
  - name: Batch Calls
  - name: Calls
  - name: Knowledge Base
  - name: Languages
  - name: LLMs
  - name: Phone Numbers
  - name: Organization Folders
  - name: Transcribers
  - name: Webhooks
  - name: Voices
  - name: Workflows
  - name: Workflow Leads
  - name: Authentication
  - name: Agent Builder
  - name: Agent Evaluations
paths:
  /v1/agent-builder/classify-shape:
    post:
      tags:
        - Agent Builder
      summary: Classify Agent Blueprint
      description: >-
        Recommends an agent type from structured blueprint answers. No agent is
        created or published. Uses a model-assisted recommendation with
        rule-based fallback when the model is unavailable.
      operationId: classifyAgentBlueprint
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                company_and_offering:
                  type: string
                  maxLength: 4000
                target_customer:
                  type: string
                  maxLength: 4000
                primary_goal:
                  type: string
                  maxLength: 4000
                success_criteria:
                  type: string
                  maxLength: 4000
                information_to_collect:
                  type: string
                  maxLength: 4000
                objections_and_faqs:
                  type: string
                  maxLength: 4000
                agent_tone:
                  type: string
                  maxLength: 4000
                additional_context:
                  type: string
                  maxLength: 4000
                language:
                  type: string
                  maxLength: 120
            examples:
              request:
                value:
                  primary_goal: Book a callback
                  language: English
      responses:
        '201':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: boolean
                  statusCode:
                    type: integer
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      shape:
                        type: string
                        enum:
                          - spa
                          - cfa
                          - ivr
                      pipeline:
                        type: string
                        enum:
                          - cascaded
                          - s2s
                      confidence:
                        type: number
                        minimum: 0
                        maximum: 1
                      evidence:
                        type: array
                        items:
                          type: string
                      needsTiebreak:
                        type: boolean
                      features:
                        type: object
                        additionalProperties: true
                  timestamp:
                    type: string
                    format: date-time
                required:
                  - success
                  - error
                  - statusCode
                  - message
                  - data
                  - timestamp
              examples:
                success:
                  value:
                    success: true
                    error: false
                    statusCode: 201
                    message: Success
                    data:
                      shape: spa
                      pipeline: cascaded
                      confidence: 0.8
                      evidence:
                        - One focused call objective.
                      needsTiebreak: false
                      features:
                        collectCount: 2
                        collectIsMandatory: false
                        faqCount: 3
                        successIsProcedural: false
                        hasRoutingIntent: false
                        hasProcedureIntent: false
                        hasJudgementIntent: true
                        wantsNaturalness: true
                        hasComplianceConstraint: false
                        languageIsEnglish: true
                        decisionPointCount: 0
                    timestamp: '2026-09-07T06:00:00.000Z'
        '400':
          description: A blueprint field has an invalid type or exceeds its length limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                error:
                  value:
                    statusCode: 400
                    error: true
                    success: false
                    data: []
                    message: >-
                      primary_goal must be shorter than or equal to 4000
                      characters
                    errors:
                      - >-
                        primary_goal must be shorter than or equal to 4000
                        characters
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                error:
                  value:
                    statusCode: 401
                    error: true
                    success: false
                    data: []
                    message: Invalid API key
                    errors: []
      security:
        - bearer: []
components:
  schemas:
    ErrorResponse:
      type: object
      description: Error body on endpoints without response filtering.
      properties:
        statusCode:
          type: integer
          example: 404
        error:
          type: boolean
          enum:
            - true
        success:
          type: boolean
          enum:
            - false
        data:
          oneOf:
            - type: object
              properties:
                code:
                  type: string
                  description: Machine-readable refusal code.
            - type: array
              items: {}
          description: >-
            For a coded refusal, an object with code and the details listed for
            that code. Otherwise an empty array.
        message:
          type: string
        errors:
          type: array
          items:
            type: string
          description: Validation messages for a 400. Empty for other errors.
        validation_errors:
          type: array
          description: >-
            Present when uploaded rows fail number validation (batch and
            workflow lead uploads): one group per distinct error.
          items:
            type: object
            properties:
              error:
                type: string
              rows:
                type: array
                items:
                  type: integer
                description: Row numbers with this error.
              phone_numbers:
                type: array
                items:
                  type: string
        invalid_row_count:
          type: integer
          description: 'Present with validation_errors: how many rows failed.'
      required:
        - statusCode
        - error
        - success
        - data
        - message
        - errors
  securitySchemes:
    bearer:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.