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

# Criar curso como rascunho

> Cria um curso e salva como rascunho (status: "draft")



## OpenAPI

````yaml https://raw.githubusercontent.com/prefeitura-rio/app-go-api/refs/heads/main/docs/openapi-v3.json post /api/v1/courses/draft
openapi: 3.0.0
info:
  description: API de serviços para aplicativos da Prefeitura do Rio
  title: API Go
  termsOfService: http://swagger.io/terms/
  contact:
    name: API Support
    url: https://iplan.rio
    email: frederico.zolio@prefeitura.rio
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.0'
servers:
  - url: https://services.pref.rio/go
    description: Production
  - url: https://services.staging.app.dados.rio/go
    description: Staging
security:
  - BearerAuth: []
paths:
  /api/v1/courses/draft:
    post:
      tags:
        - courses
      summary: Criar curso como rascunho
      description: 'Cria um curso e salva como rascunho (status: "draft")'
      requestBody:
        $ref: '#/components/requestBodies/models.Curso'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ErrorResponse'
      security:
        - bearerAuth: []
components:
  requestBodies:
    models.Curso:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/models.Curso'
      description: Dados do curso
      required: true
  schemas:
    models.ErrorResponse:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
    models.Curso:
      type: object
      properties:
        accessibility:
          description: Accessibility field - free text field for frontend
          type: string
        auto_approve_enrollments:
          description: >-
            Auto-approve enrollments - when true, new enrollments are
            automatically approved instead of pending
          type: boolean
          example: false
        carga_horaria:
          type: integer
        certificacao_oferecida:
          type: boolean
        contato_duvidas:
          type: string
        course_management_type:
          $ref: '#/components/schemas/models.CourseManagementType'
        cover_image:
          type: string
        created_at:
          type: string
        data_inicio:
          type: string
        data_limite_inscricoes:
          type: string
        data_termino:
          type: string
        description:
          type: string
        enrollment_end_date:
          type: string
        enrollment_start_date:
          type: string
        expected_results:
          type: string
        external_partner_contact:
          type: string
        external_partner_logo_url:
          type: string
        external_partner_name:
          type: string
        external_partner_url:
          type: string
        facilitator:
          type: string
        formacao_link:
          type: string
        formato_aula:
          $ref: '#/components/schemas/models.FormatoAula'
        has_certificate:
          description: Optional fields matching specification
          type: boolean
        id:
          type: integer
        instituicao_id:
          type: integer
        institutional_logo:
          type: string
        is_external_partner:
          description: External partner fields
          type: boolean
        is_visible:
          description: >-
            Visibility field - controls if course appears in public listings
            (default: true)

            Used for in-person courses that require manual enrollment and should
            not appear in public course lists
          type: boolean
          example: true
        link_inscricao:
          type: string
        local_realizacao:
          type: string
        material_used:
          type: string
        methodology:
          type: string
        modalidade:
          $ref: '#/components/schemas/models.Modalidade'
        numero_vagas:
          type: integer
        objectives:
          type: string
        organization:
          type: string
        orgao_id:
          description: Legacy and additional fields (optional)
          type: string
        pre_requisitos:
          description: Unified field for prerequisites - using single JSON tag
          type: string
        program_content:
          type: string
        resources_used:
          type: string
        status:
          $ref: '#/components/schemas/models.StatusCurso'
        target_audience:
          type: string
        teaching_material:
          type: string
        theme:
          type: string
        title:
          description: Core fields (always required)
          type: string
        turno:
          $ref: '#/components/schemas/models.Turno'
        updated_at:
          type: string
        workload:
          type: string
    models.CourseManagementType:
      type: string
      enum:
        - OWN_ORG
        - EXTERNAL_MANAGED_BY_ORG
        - EXTERNAL_MANAGED_BY_PARTNER
      x-enum-varnames:
        - CourseManagementOwnOrg
        - CourseManagementExternalManagedByOrg
        - CourseManagementExternalManagedByPartner
    models.FormatoAula:
      type: string
      enum:
        - GRAVADO
        - AO_VIVO
      x-enum-varnames:
        - FormatoAulaGravado
        - FormatoAulaAoVivo
    models.Modalidade:
      type: string
      enum:
        - Presencial
        - Semipresencial
        - Remoto
        - PRESENCIAL
        - ONLINE
        - HIBRIDO
        - LIVRE_FORMACAO_ONLINE
      x-enum-varnames:
        - ModalidadePresencial
        - ModalidadeSemipresencial
        - ModalidadeRemoto
        - ModalidadePresencialLegacy
        - ModalidadeOnline
        - ModalidadeHibrido
        - ModalidadeLivreFormacaoOnline
    models.StatusCurso:
      type: string
      enum:
        - draft
        - opened
        - closed
        - canceled
        - CRIADO
        - ABERTO
        - ENCERRADO
      x-enum-varnames:
        - StatusCursoDraft
        - StatusCursoOpened
        - StatusCursoClosed
        - StatusCursoCanceled
        - StatusCursoCriado
        - StatusCursoAberto
        - StatusCursoEncerrado
    models.Turno:
      type: string
      enum:
        - MANHA
        - TARDE
        - NOITE
        - INTEGRAL
        - LIVRE
      x-enum-varnames:
        - TurnoManha
        - TurnoTarde
        - TurnoNoite
        - TurnoIntegral
        - TurnoLivre
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````