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

# addLote

> <h2>Cria novo lote.</h2>

<h6 class="label label-success">Response:</h6>
<table class="table table-hover"> <tbody><tr><td>id</td><td>Retorna o Id do lote cadastrado</td></tr> </tbody></table>



## OpenAPI

````yaml /openapi.yaml post /ipbox/api/addLote
openapi: 3.0.0
info:
  title: IPBoX Api Documentation v1.1
  description: >-
    Nesse documento são descritos os comandos presentes na API Rest do IPBoX. Os
    comandos são executados com chamadas POST e com respostas em formato JSON.
  version: 1.0.0
servers:
  - url: https://{baseUrl}
    description: Dominio (e porta, se houver) do servidor IPBoX do cliente
    variables:
      baseUrl:
        default: cliente.ipboxcloud.com.br:9052
        description: >-
          Substitua pelo dominio real do seu servidor IPBoX. A maioria dos
          servidores usa uma porta especifica - inclua-a junto ao dominio (ex.:
          cliente.ipboxcloud.com.br:9052)
security:
  - ApiToken: []
tags:
  - name: Agente
  - name: Ligações
  - name: Prospects
  - name: Agendamentos
  - name: Listas
  - name: Filas
  - name: Lotes
  - name: Relatórios
  - name: Outros
  - name: Times
  - name: Blacklist
  - name: Áudios
  - name: URAs
paths:
  /ipbox/api/addLote:
    post:
      tags:
        - Lotes
      summary: addLote
      description: >-
        <h2>Cria novo lote.</h2>


        <h6 class="label label-success">Response:</h6>

        <table class="table table-hover"> <tbody><tr><td>id</td><td>Retorna o Id
        do lote cadastrado</td></tr> </tbody></table>
      parameters:
        - name: Authorization
          in: header
          schema:
            type: string
          example: '{{token}}'
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/x-www-form-urlencoded
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                descricao:
                  type: string
                  description: Descrição do lote
                  example: descricao
                fila:
                  type: string
                  description: Nome da fila
                  example: fila
                data_inicio:
                  type: string
                  description: Data de início no formato AAAAMMDD
                  example: data_inicio
                data_termino:
                  type: string
                  description: Data de término no formato AAAAMMDD
                  example: data_termino
                prioridade_discagem:
                  type: string
                  description: >-
                    [OPCIONAL] Prioridade de discagem por tipo de número:
                    Nenhuma, CEL COM RES, CEL RES COM, COM CEL RES, COM RES CEL,
                    RES CEL COM ou RES COM CEL. Default: Nenhuma
                  example: prioridade_discagem
                prioridade_novo:
                  type: string
                  description: >-
                    [OPCIONAL] Prioridade de discagem p/ números não
                    trabalhados: Y ou N. Default: N
                  example: prioridade_novo
                max_tentativas_ocupado_erro:
                  type: string
                  description: >-
                    [OPCIONAL] Número máximo de tentativas (Ocupado/Erro).
                    Default: 3
                  example: max_tentativas_ocupado_erro
                tempo_espera_nova_tentativa_ocupado_erro:
                  type: string
                  description: >-
                    [OPCIONAL] Tempo de espera p/ nova tentativa (Ocupado/Erro)
                    em segundos. Default: 600
                  example: tempo_espera_nova_tentativa_ocupado_erro
                max_tentativas_nao_atende:
                  type: string
                  description: >-
                    [OPCIONAL] Número máximo de tentativas (Não atende).
                    Default: 3
                  example: max_tentativas_nao_atende
                tempo_espera_nova_tentativa_nao_atende:
                  type: string
                  description: >-
                    [OPCIONAL] Tempo de espera p/ nova tentativa (Não atende) em
                    segundos. Default: 3600
                  example: tempo_espera_nova_tentativa_nao_atende
                max_tentativas_atendido:
                  type: string
                  description: >-
                    [OPCIONAL] Número máximo de tentativas (Atendido pelo
                    cliente e abandonado). Default: 5
                  example: max_tentativas_atendido
                tempo_espera_nova_tentativa_atendido:
                  type: string
                  description: >-
                    [OPCIONAL] Tempo de espera p/ nova tentativa (Atendido pelo
                    cliente e abandonado) em segundos. Default: 300
                  example: tempo_espera_nova_tentativa_atendido
                mostrar_historico:
                  type: string
                  description: >-
                    [OPCIONAL] Mostrar histórico do prospect p/ o agente: Y ou
                    N. Default: Y
                  example: mostrar_historico
                permite_cadastro_fone:
                  type: string
                  description: >-
                    [OPCIONAL] Permitir cadastro de novo número pelo agente: Y
                    ou N. Default: Y
                  example: permite_cadastro_fone
                peso_lote:
                  type: string
                  description: >-
                    [OPCIONAL] Peso do lote na discagem: 1, 2, 3, 4 ou 5.
                    Default: 3
                  example: peso_lote
                formulario:
                  type: string
                  description: '[OPCIONAL] Nome do formulário. Default: Nenhum'
                  example: formulario
                script:
                  type: string
                  description: '[OPCIONAL] Nome do script. Default: Nenhum'
                  example: script
                mensagem_agente:
                  type: string
                  description: '[OPCIONAL] Mensagem para o agente'
                  example: mensagem_agente
                validar_numero:
                  type: string
                  description: '[OPCIONAL] Validar números ao discar: Y ou N. Default: Y'
                  example: validar_numero
                max_tentativas_validacao:
                  type: string
                  description: >-
                    [OPCIONAL] Número máximo de tentativas de validação.
                    Default: 3
                  example: max_tentativas_validacao
                tempo_espera_nova_tentativa_validacao:
                  type: string
                  description: >-
                    [OPCIONAL] Tempo de espera p/ nova tentativa (Validação) em
                    segundos. Default: 600
                  example: tempo_espera_nova_tentativa_validacao
                validar_local_fixo:
                  type: string
                  description: >-
                    [OPCIONAL] Validar ligação do tipo Local Fixo: Y ou N.
                    Default: Y
                  example: validar_local_fixo
                validar_local_movel:
                  type: string
                  description: >-
                    [OPCIONAL] Validar ligação do tipo Local Móvel: Y ou N.
                    Default: Y
                  example: validar_local_movel
                validar_ddd_fixo:
                  type: string
                  description: >-
                    [OPCIONAL] Validar ligação do tipo DDD Fixo: Y ou N.
                    Default: Y
                  example: validar_ddd_fixo
                validar_ddd_movel:
                  type: string
                  description: >-
                    [OPCIONAL] Validar ligação do tipo DDD Móvel: Y ou N.
                    Default: Y
                  example: validar_ddd_movel
              required:
                - descricao
                - fila
                - data_inicio
                - data_termino
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
components:
  securitySchemes:
    ApiToken:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Token gerado em IPBoX > API > Token. Aceita o token puro, ou com prefixo
        `Bearer ` / `Basic `.

````