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

# Obtener Token

> Authenticate your application using client credentials to obtain an access token.

The returned token should be included in the `Authorization` header of subsequent requests:
```
Authorization: Bearer <access_token>
```

Tokens expire after the duration specified in `expires_at`. Request a new token before expiration.



## OpenAPI

````yaml POST /v1/auth
openapi: 3.0.2
info:
  title: Neuracall API
  description: >-

    ## Overview


    The Neuracall API provides powerful call analysis capabilities for contact
    centers and customer service teams.

    Submit audio recordings and receive detailed analysis including:


    - **Transcription**: Accurate speech-to-text conversion

    - **Quality Scoring**: Automated evaluation against customizable criteria

    - **Insights & Keywords**: AI-extracted conversation highlights

    - **Statistics**: Aggregated performance metrics


    ## Authentication


    All API endpoints (except `/v1/auth`) require a Bearer token. Obtain your
    token using the Authentication endpoint with your client credentials.


    ```

    Authorization: Bearer <your_access_token>

    ```


    ## Support


    For questions or issues, contact support@neuracall.com
        
  contact:
    name: Neuracall Support
    url: https://neuracall.com/support
    email: support@neuracall.com
  license:
    name: Proprietary
    url: https://neuracall.com/license
  version: 1.0.0
servers: []
security: []
tags:
  - name: Authentication
    description: >-
      Obtain access tokens to authenticate your application. Required before
      making other API calls.
  - name: Analysis Models
    description: >-
      Manage analysis models that define evaluation criteria and scoring
      parameters for call analysis.
  - name: Model Categories
    description: >-
      Manage categories within analysis models. Categories group related
      evaluation variables and help organize the scoring structure.
  - name: Model Variables
    description: >-
      Manage evaluation variables within analysis models. Variables define
      specific scoring criteria used during call analysis.
  - name: Model Metadata
    description: >-
      Manage metadata fields within analysis models. Metadata defines additional
      information required when submitting calls for analysis (e.g., campaign,
      department).
  - name: Call Analysis
    description: >-
      Submit audio recordings for analysis and retrieve results including
      transcriptions, scores, and insights.
  - name: Statistics
    description: >-
      Retrieve aggregated statistics and performance metrics from analyzed calls
      for dashboards and reporting.
paths:
  /v1/auth:
    post:
      tags:
        - Authentication
      summary: Obtain an access token
      description: >-
        Authenticate your application using client credentials to obtain an
        access token.


        The returned token should be included in the `Authorization` header of
        subsequent requests:

        ```

        Authorization: Bearer <access_token>

        ```


        Tokens expire after the duration specified in `expires_at`. Request a
        new token before expiration.
      operationId: Authenticate_v1_auth_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthResponse'
        '401':
          description: Invalid credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    AuthRequest:
      title: AuthRequest
      required:
        - client_id
        - client_secret
      type: object
      properties:
        client_id:
          title: Client Id
          type: string
          description: Your application's client ID provided by Neuracall
          example: nc_client_a1b2c3d4e5f6g7h8
        client_secret:
          title: Client Secret
          type: string
          description: >-
            Your application's client secret. Keep this secure and never expose
            it publicly
          example: nc_secret_x9y8z7w6v5u4t3s2
      description: Request body for authentication
      example:
        client_id: nc_client_a1b2c3d4e5f6g7h8
        client_secret: nc_secret_x9y8z7w6v5u4t3s2
    AuthResponse:
      title: AuthResponse
      required:
        - access_token
        - expires_at
        - client_id_audience
      type: object
      properties:
        access_token:
          title: Access Token
          type: string
          description: >-
            JWT access token to include in the Authorization header of
            subsequent requests
          example: >-
            eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL25ldXJhY2FsbC5hdXRoMC5jb20vIn0...
        expires_at:
          title: Expires At
          type: integer
          description: >-
            Unix timestamp (seconds) when the token expires. Request a new token
            before this time
          example: 1735689600
        client_id_audience:
          title: Client Id Audience
          type: string
          description: The audience identifier for this token
          example: https://api.neuracall.com/call-analysis
        scope:
          title: Scope
          type: string
          description: Space-separated list of granted permission scopes
          example: >-
            read:call-analysis-requests write:call-analysis-request
            read:call-analysis-audio
      description: Authentication response containing access token and metadata
      example:
        access_token: >-
          eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL25ldXJhY2FsbC5hdXRoMC5jb20vIn0...
        expires_at: 1735689600
        client_id_audience: https://api.neuracall.com/call-analysis
        scope: >-
          read:call-analysis-requests write:call-analysis-request
          read:call-analysis-audio read:call-analysis-transcription
          read:prompt-template write:prompt-template read:call-analysis-stats
    ErrorResponse:
      title: ErrorResponse
      required:
        - code
        - message
      type: object
      properties:
        code:
          title: Code
          type: string
          description: Error code for programmatic handling
          example: 001-001-0001
        path:
          title: Path
          type: string
          description: Field path for validation errors
          example: body.external_id
        message:
          title: Message
          type: string
          description: Human-readable error message
          example: The requested resource was not found
      description: Standard error response format for API errors
      example:
        code: 001-001-0001
        message: The requested resource was not found
    HTTPValidationError:
      title: HTTPValidationError
      type: object
      properties:
        detail:
          title: Detail
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
    ValidationError:
      title: ValidationError
      required:
        - loc
        - msg
        - type
      type: object
      properties:
        loc:
          title: Location
          type: array
          items:
            anyOf:
              - type: string
              - type: integer
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string

````