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

# Score conversation

> Send conversational message data from any source for AXIS scoring and analysis



## OpenAPI

````yaml /api-reference/openapi.json post /v1/assess
openapi: 3.0.0
info:
  description: API for CraftCX conversation scoring and analysis
  title: CraftCX API
  version: 1.0.0
servers:
  - url: https://api.craftcx.com
security: []
paths:
  /v1/assess:
    post:
      tags:
        - Score Conversation
      summary: Score conversation
      description: >-
        Send conversational message data from any source for AXIS scoring and
        analysis
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                messages:
                  type: array
                  items:
                    type: object
                    properties:
                      ai_tool:
                        type: string
                        enum:
                          - custom
                          - fin
                          - front
                          - frontAutopilot
                          - frontAutopilotResolve
                          - gorgias
                          - hubspot
                          - hubspotCustomerAgent
                          - parahelp
                          - zendesk
                          - zeus
                        description: >-
                          Optional AI tool or provider label for AI-authored
                          messages. If omitted for a resolved AI Agent, CraftCX
                          may use the AI Agent's configured tool.
                        example: custom
                      author:
                        oneOf:
                          - type: object
                            properties:
                              external_id:
                                type: string
                                minLength: 1
                                description: >-
                                  Stable contact/customer ID from the source
                                  system. Required for contact authors.
                                example: cus_123
                              name:
                                type: string
                                minLength: 1
                                description: >-
                                  Display name for this provider identity. The
                                  latest non-empty value becomes its canonical
                                  display name.
                                example: Jane Customer
                              type:
                                type: string
                                enum:
                                  - contact
                                description: External customer or end user.
                                example: contact
                            required:
                              - external_id
                              - type
                            description: External customer or end user author.
                            title: Contact
                          - type: object
                            properties:
                              external_id:
                                type: string
                                minLength: 1
                                description: >-
                                  Stable teammate/user ID from the source
                                  system. Required for teammate authors.
                                example: tea_123
                              name:
                                type: string
                                minLength: 1
                                description: >-
                                  Display name for this provider identity. The
                                  latest non-empty value becomes its canonical
                                  display name.
                                example: Jason
                              type:
                                type: string
                                enum:
                                  - teammate
                                description: >-
                                  Human teammate, support agent, or internal
                                  staff member.
                                example: teammate
                            required:
                              - external_id
                              - type
                            description: >-
                              Human teammate, support agent, or internal staff
                              member author.
                            title: Teammate
                          - type: object
                            properties:
                              external_id:
                                type: string
                                minLength: 1
                                description: >-
                                  Stable external ID for a CraftCX AI Agent
                                  record. This should match the `external_id`
                                  used when creating the AI Agent. Provide
                                  either `id` or `external_id` for AI authors.
                                example: billing-agent
                              id:
                                type: string
                                minLength: 1
                                description: >-
                                  CraftCX AI Agent ID. Provide either `id` or
                                  `external_id` for AI authors. Use the [Create
                                  AI
                                  Agent](/api-reference/agents#create-ai-agent)
                                  endpoint to create an AI Agent and get the ID.
                                example: pfh0haxfpzowht3oi213cqos
                              name:
                                type: string
                                minLength: 1
                                description: >-
                                  Display name for this provider identity. The
                                  latest non-empty value becomes its canonical
                                  display name.
                                example: Billing Bot
                              type:
                                type: string
                                enum:
                                  - ai
                                description: >-
                                  AI agent, bot, or automated assistant whose
                                  messages should be scored.
                                example: ai
                            required:
                              - type
                            description: AI agent, bot, or automated assistant author.
                            title: AI Agent
                          - type: object
                            properties:
                              external_id:
                                type: string
                                minLength: 1
                                description: >-
                                  Optional source-system ID for the system actor
                                  or automation.
                                example: automation_rule_123
                              name:
                                type: string
                                minLength: 1
                                description: >-
                                  Display name for this provider identity. The
                                  latest non-empty value becomes its canonical
                                  display name.
                                example: Zendesk Automation
                              type:
                                type: string
                                enum:
                                  - system
                                description: >-
                                  System event, automation, workflow, or
                                  source-system notification.
                                example: system
                            required:
                              - type
                            description: >-
                              System event, automation, workflow, or
                              source-system notification author.
                            title: System
                          - type: object
                            properties:
                              name:
                                type: string
                                minLength: 1
                                description: >-
                                  Optional import label. It is not stored
                                  because mixed transcript items have no
                                  individual provider identity.
                                example: Uploaded transcript
                              type:
                                type: string
                                enum:
                                  - mixed
                                description: >-
                                  Use when the item contains a transcript with
                                  multiple unresolved actors and the sender
                                  cannot be reliably split into individual
                                  authors.
                                example: mixed
                            required:
                              - type
                            description: Transcript item with multiple unresolved authors.
                            title: Mixed
                        description: >-
                          The author of the message or comment. Use `contact`
                          for external customers, `teammate` for human
                          teammates, `ai` for AI agents, `system` for system
                          events, and `mixed` when the item contains a
                          transcript with multiple unresolved authors.
                      content:
                        type: string
                        minLength: 1
                        description: >-
                          The plain text body to score or include as context.
                          Preserve enough content for CraftCX to evaluate the
                          conversation accurately.
                        example: Hello, I need help with billing.
                      external_id:
                        type: string
                        minLength: 1
                        description: >-
                          Stable message or comment ID from the source system.
                          Must be unique within the same source, ticket, and
                          kind.
                        example: msg_123
                      kind:
                        type: string
                        enum:
                          - message
                          - comment
                        default: message
                        description: >-
                          Use `message` for customer-facing transcript items and
                          `comment` for internal notes or helpdesk comments.
                        example: message
                      timestamp:
                        type: integer
                        description: >-
                          Unix epoch timestamp in milliseconds for when this
                          message or comment was created in the source system.
                          Required so imported transcripts keep their original
                          order.
                        example: 1783089291730
                    required:
                      - author
                      - content
                      - external_id
                      - timestamp
                  minItems: 1
                  maxItems: 50
                  description: >-
                    Conversation transcript items in chronological order. Each
                    item requires `external_id`, `kind`, `content`, `author`,
                    and `timestamp`. Use `kind=comment` for internal notes.
                  example:
                    - author:
                        external_id: cus_123
                        name: Jane Customer
                        type: contact
                      content: Why was I charged twice?
                      external_id: msg_1
                      kind: message
                      timestamp: 1783088291730
                    - ai_tool: custom
                      author:
                        external_id: billing-agent
                        name: Billing Bot
                        type: ai
                      content: I can help with billing.
                      external_id: msg_2
                      kind: message
                      timestamp: 1783088440817
                    - author:
                        external_id: tea_123
                        name: Jason
                        type: teammate
                      content: Escalated to billing for license review.
                      external_id: note_1
                      kind: comment
                      timestamp: 1783089090110
                source:
                  type: string
                  minLength: 1
                  default: custom
                  description: >-
                    Source system for this import. Defaults to custom. CraftCX
                    uses source to namespace message external_id values. Ticket
                    imports use source_account_id when supplied, otherwise
                    source.
                  example: zendesk
                source_account_id:
                  type: string
                  minLength: 1
                  description: >-
                    Stable account ID within the source system, such as a
                    Zendesk subdomain or HubSpot Hub ID. When supplied, CraftCX
                    uses it with ticket_id to identify imports and reject
                    duplicates. Adding or changing source_account_id later
                    creates a separate import namespace from earlier requests.
                  example: acme-support
                subject:
                  type: string
                  description: >-
                    Optional ticket or conversation subject from the source
                    system.
                  example: Billing question
                ticket_id:
                  type: string
                  minLength: 1
                  description: >-
                    Stable ticket or conversation ID from the source system.
                    CraftCX rejects duplicate imports for the same
                    source_account_id and ticket_id, falling back to source when
                    source_account_id is omitted.
                  example: ticket_123
              required:
                - messages
                - ticket_id
      responses:
        '202':
          description: |2-

                    The ingested event receipt. Note; we aim to 
                    respond as quickly as possible, so we return a 202 Accepted 
                    status code, and process the event asynchronously.
          content:
            application/json:
              schema:
                type: object
                properties:
                  external_ticket_id:
                    type: string
                    description: The ticket ID from the source system.
                    example: ticket_123
                  id:
                    type: string
                    description: The CraftCX ticket ID for the accepted import.
                    example: pfh0haxfpzowht3oi213cqos
                  source:
                    type: string
                    description: The source namespace used for import identity.
                    example: zendesk
                  status:
                    type: string
                    enum:
                      - accepted
                    description: The import receipt status.
                    example: accepted
                required:
                  - external_ticket_id
                  - id
                  - source
                  - status
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: >-
                      A human-readable explanation specific to this occurrence
                      of the problem.
                  status:
                    type: number
                    enum:
                      - 400
                    description: >-
                      The HTTP status code generated by the origin server for
                      this occurrence of the problem.
                  title:
                    type: string
                    description: A short, human-readable summary of the problem type.
                  type:
                    type: string
                    format: uri
                    default: about:blank
                required:
                  - status
                  - title
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: >-
                      A human-readable explanation specific to this occurrence
                      of the problem.
                  status:
                    type: number
                    enum:
                      - 401
                    description: >-
                      The HTTP status code generated by the origin server for
                      this occurrence of the problem.
                  title:
                    type: string
                    description: A short, human-readable summary of the problem type.
                  type:
                    type: string
                    format: uri
                    default: about:blank
                required:
                  - status
                  - title
        '404':
          description: The resource was not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: >-
                      A human-readable explanation specific to this occurrence
                      of the problem.
                  status:
                    type: number
                    enum:
                      - 404
                    description: >-
                      The HTTP status code generated by the origin server for
                      this occurrence of the problem.
                  title:
                    type: string
                    description: A short, human-readable summary of the problem type.
                  type:
                    type: string
                    format: uri
                    default: about:blank
                required:
                  - status
                  - title
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: >-
                      A human-readable explanation specific to this occurrence
                      of the problem.
                  status:
                    type: number
                    enum:
                      - 409
                    description: >-
                      The HTTP status code generated by the origin server for
                      this occurrence of the problem.
                  title:
                    type: string
                    description: A short, human-readable summary of the problem type.
                  type:
                    type: string
                    format: uri
                    default: about:blank
                required:
                  - status
                  - title
        '413':
          description: Request entity too large
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: >-
                      A human-readable explanation specific to this occurrence
                      of the problem.
                  status:
                    type: number
                    enum:
                      - 413
                    description: >-
                      The HTTP status code generated by the origin server for
                      this occurrence of the problem.
                  title:
                    type: string
                    description: A short, human-readable summary of the problem type.
                  type:
                    type: string
                    format: uri
                    default: about:blank
                required:
                  - status
                  - title
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: >-
                      A human-readable explanation specific to this occurrence
                      of the problem.
                  status:
                    type: number
                    enum:
                      - 500
                    description: >-
                      The HTTP status code generated by the origin server for
                      this occurrence of the problem.
                  title:
                    type: string
                    description: A short, human-readable summary of the problem type.
                  type:
                    type: string
                    format: uri
                    default: about:blank
                required:
                  - status
                  - title

````