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

# Create template

> Create a new template



## OpenAPI

````yaml post /v1.0/{company_id}/emailtemplates
openapi: 3.0.0
info:
  title: HireHive API reference
  termsOfService: https://www.hirehive.com/terms/
  contact:
    email: support@hirehive.com
  version: v1.0
servers:
  - url: https://api.hirehive.com
security:
  - bearerAuth: []
paths:
  /v1.0/{company_id}/emailtemplates:
    post:
      tags:
        - EmailTemplates
      operationId: EmailTemplates_CreateEmailTemplate
      parameters:
        - name: company_id
          in: path
          required: true
          schema:
            type: string
            format: string
          x-position: 1
      requestBody:
        x-name: request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEmailTemplateRequest'
        required: true
        x-position: 2
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SingleResponseOfEmailTemplateDto'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
components:
  schemas:
    CreateEmailTemplateRequest:
      type: object
      additionalProperties: false
      required:
        - name
        - subject
        - body
        - stage
        - language
        - private
      properties:
        name:
          type: string
          description: The name of the template
          minLength: 1
        subject:
          type: string
          description: The email subject of the template
          minLength: 1
        body:
          type: string
          description: The email body of the template
          minLength: 1
        sub_stage_id:
          type: string
          description: The pipeline stage associated with the template
          format: int32
          nullable: true
        stage:
          $ref: '#/components/schemas/ParentStage'
          description: The pipeline stage associated with the template
        language:
          $ref: '#/components/schemas/LanguageName'
          description: The language of the template
        user_id:
          type: string
          description: The userid of the creator if this is a private template
          format: int32
          nullable: true
        private:
          type: boolean
          description: Private templates are only visible to their creator
    SingleResponseOfEmailTemplateDto:
      type: object
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/EmailTemplateDto'
    ValidationProblemDetails:
      type: object
      additionalProperties:
        nullable: true
      properties:
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
    ParentStage:
      type: string
      description: ''
      x-enumNames:
        - Rejected
        - New
        - Screening
        - Interviewing
        - Offered
        - Hired
      enum:
        - rejected
        - new
        - screening
        - interviewing
        - offered
        - hired
    LanguageName:
      type: string
      description: ''
      x-enumNames:
        - English
        - French
        - Dutch
        - German
        - Italian
        - Portuguese
        - Spanish
        - Swedish
        - Georgian
        - Ukrainian
      enum:
        - english
        - french
        - dutch
        - german
        - italian
        - portuguese
        - spanish
        - swedish
        - georgian
        - ukrainian
    EmailTemplateDto:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          format: int32
          nullable: true
        company_id:
          type: string
          format: int32
        name:
          type: string
          description: The name of the template
        subject:
          type: string
          description: The email subject of the template
        body:
          type: string
          description: The email body of the template
        type_id:
          $ref: '#/components/schemas/EmailTemplateTypes'
        sub_stage_id:
          type: string
          description: The pipeline stage associated with the template
          format: int32
          nullable: true
        stage:
          $ref: '#/components/schemas/ParentStage'
          description: The pipeline stage associated with the template
          nullable: true
        language:
          $ref: '#/components/schemas/LanguageDto2'
          description: The language of the template
        user_id:
          type: string
          description: The userid of the creator if this is a private template
          format: int32
          nullable: true
        private:
          type: boolean
          description: Private templates are only visible to their creator
        auto_response_default:
          type: boolean
          description: >-
            A boolean to indicate if this template is the default auto-responder
            for the selected language
    EmailTemplateTypes:
      type: string
      description: ''
      x-enumNames:
        - ApplicationEmail
        - ReferralsEmail
      enum:
        - application_email
        - referrals_email
    LanguageDto2:
      type: object
      additionalProperties: false
      properties:
        name:
          type: string
        code:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````