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

# Create an event type

> Creates a new event type for a project.



## OpenAPI

````yaml POST /projects/{project_id}/event_types
openapi: 3.1.0
info:
  title: Mangrove - API
  version: 1.1.0
servers:
  - url: https://app.gomangrove.com/api/v1
security:
  - sec0: []
paths:
  /projects/{project_id}/event_types:
    post:
      summary: Create an event type
      description: Creates a new event type for a project.
      operationId: create-event-type
      parameters:
        - name: project_id
          in: path
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                event_type:
                  type: object
                  required:
                    - name
                  properties:
                    name:
                      type: string
                      description: Name of the event type
                    slug:
                      type: string
                      description: URL-friendly identifier for the event type
                    description:
                      type: string
                      description: Description of the event type
                    reusable_in_batches:
                      type: boolean
                      description: >-
                        Whether events of this type can be reused in multiple
                        batches
                    expected_locations:
                      type: string
                      description: Number of expected locations (none, one, two)
                      enum:
                        - none
                        - one
                        - two
                    requires_tracking_id:
                      type: boolean
                      description: Whether events of this type require a tracking ID
                    requires_feedstock:
                      type: boolean
                      description: Whether events of this type require a feedstock
            examples:
              Request Example:
                value:
                  event_type:
                    name: Biochar Production
                    slug: biochar-production
                    description: Event for tracking biochar production
                    reusable_in_batches: false
                    expected_locations: one
                    requires_tracking_id: true
                    requires_feedstock: false
      responses:
        '201':
          description: '201'
          content:
            application/json:
              examples:
                Result:
                  value:
                    id: 3
                    slug: biochar-production
                    name: Biochar Production
                    created_at: '2025-01-15T10:00:00.000Z'
                    updated_at: '2025-01-15T10:00:00.000Z'
                    data_point_types: []
                    requires_locations: true
                    requires_feedstock: false
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  slug:
                    type: string
                  name:
                    type: string
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  data_point_types:
                    type: array
                    items:
                      type: object
                  requires_locations:
                    type: boolean
                  requires_feedstock:
                    type: boolean
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value:
                    status: error
                    statusCode: 400
                    errors:
                      - message: Name can't be blank
              schema:
                type: object
                properties:
                  status:
                    type: string
                  statusCode:
                    type: integer
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
        '404':
          description: '404'
          content:
            application/json:
              examples:
                Result:
                  value:
                    status: error
                    statusCode: 404
                    errors:
                      - message: record not found
              schema:
                type: object
                properties:
                  status:
                    type: string
                  statusCode:
                    type: integer
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: ''

````