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

# Analyze Text Endpoint

> Analyze the text from the landing page and determine which action to take.

# Analyze Text Endpoint

Analyzes text from the landing page to determine which action to take.

## Request Body

| Field | Type   | Required | Description     |
| ----- | ------ | -------- | --------------- |
| text  | string | Yes      | Text to analyze |

## Responses

| Status | Description      | Content Type     |
| ------ | ---------------- | ---------------- |
| 200    | Analysis results | application/json |
| 422    | Validation Error | application/json |

## Response Schema

```json theme={null}
{
  "understood": true,
  "message": "Text was understood",
  "redirect_url": "/shipment"
}
```

| Field         | Type    | Description                               |
| ------------- | ------- | ----------------------------------------- |
| understood    | boolean | Whether the text was understood           |
| message       | string  | Response message                          |
| redirect\_url | string  | Optional URL to redirect to (can be null) |


## OpenAPI

````yaml POST /analyze-landing-text
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /analyze-landing-text:
    post:
      summary: Analyze Text Endpoint
      description: >-
        Analyze the text from the landing page and determine which action to
        take.
      operationId: analyze_text_endpoint_analyze_landing_text_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TextAnalysisRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TextAnalysisResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TextAnalysisRequest:
      properties:
        text:
          type: string
          title: Text
      type: object
      required:
        - text
      title: TextAnalysisRequest
    TextAnalysisResponse:
      properties:
        understood:
          type: boolean
          title: Understood
        message:
          type: string
          title: Message
        redirect_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Redirect Url
      type: object
      required:
        - understood
        - message
      title: TextAnalysisResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````