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

# Create a training



## OpenAPI

````yaml POST /training/v1/trainings
openapi: 3.0.0
info:
  description: ''
  version: 3.0.0
  title: Sesame Public API
servers:
  - url: https://api-{region}.sesametime.com
    variables:
      region:
        default: eu1
security: []
tags: []
paths:
  /training/v1/trainings:
    post:
      tags:
        - Trainings
      summary: Create a training
      operationId: CreateTraining
      requestBody:
        description: Create a Training
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  example: Nombre de la formación
                description:
                  type: string
                  example: Descripción de la formación
                typeId:
                  type: string
                  format: uuid
                  example: 961b95cf-55d0-4eb6-9b98-20693f50852a
                currency:
                  type: string
                  example: EUR
                amountType:
                  default: per_person
                  enum:
                    - per_course
                    - per_person
                amount:
                  type: number
                  format: float
                  example: 120.5
                durationInHours:
                  type: number
                  format: float
                  example: 1.5
                  description: Duration in hours (decimal)
                durationHours:
                  type: integer
                  example: 1
                  description: Duration hours component (optional, alternative input)
                durationMinutes:
                  type: integer
                  example: 30
                  description: Duration minutes component (optional, alternative input)
                startDate:
                  type: string
                  format: date
                  example: '2024-11-30'
                endDate:
                  type: string
                  format: date
                  example: '2024-12-30'
                bonusable:
                  type: boolean
                  example: false
                trainingEntity:
                  type: string
                  example: Epresa de formación
                bonusPercent:
                  type: number
                  format: integer
                  example: 0
                email:
                  type: string
                  example: email@email.com
                teacher:
                  type: string
                  example: Profesor de la formación
                businessName:
                  type: string
                  example: Razón Social de la empresa formadora
                cif:
                  type: string
                  example: B52603690
                phone:
                  type: string
                  example: +34 695 36 98 80
              required:
                - name
                - typeId
                - durationInHours
                - amount
                - currency
                - amountType
                - startDate
                - endDate
                - trainingEntity
                - bonusable
      responses:
        '200':
          description: Training Object
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        example: 707ee040-4d5b-4e48-abfa-199dcefb37a3
                      name:
                        type: string
                        example: Nombre de la formación
                      description:
                        type: string
                        example: Descripción de la formación
                      durationInHours:
                        type: number
                        format: float
                        example: 1.5
                        description: Duration in hours (decimal)
                      durationHours:
                        type: integer
                        example: 1
                        description: Duration hours component
                      durationMinutes:
                        type: integer
                        example: 30
                        description: Duration minutes component
                      amount:
                        type: number
                        format: integer
                        example: 1200
                      amountType:
                        type: string
                        enum:
                          - per_course
                          - per_person
                      currency:
                        type: string
                        example: EUR
                      startDate:
                        type: number
                        format: date
                        example: '2024-11-29T23:00:00+00:00'
                      endDate:
                        type: number
                        format: date
                        example: '2024-12-29T23:00:00+00:00'
                      trainingEntity:
                        type: string
                        example: Entidad formadora
                  meta:
                    type: object
                    properties:
                      currentPage:
                        type: integer
                        example: 1
                      lastPage:
                        type: integer
                        example: 1
                      total:
                        type: integer
                        example: 1
                      perPage:
                        type: integer
                        example: 1
      security:
        - Bearer: []
components:
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````