> ## 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 evidence on event

> Adds evidence to an event. An event can be associated with multiple pieces of evidence.



## OpenAPI

````yaml POST /projects/{project_id}/events/{event_id}/evidences
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}/events/{event_id}/evidences:
    post:
      summary: Create and add an evidence file to an event
      description: >-
        Adds evidence to an event. An event can be associated with multiple
        pieces of evidence.
      operationId: add-evidence-files-to-an-event
      parameters:
        - name: project_id
          in: path
          schema:
            type: string
          required: true
        - name: event_id
          in: path
          schema:
            type: string
          required: true
          description: >-
            Unique event ID in the `evt_XXXX` syntax. For example:
            `evt_DLnYvzbjSujNAvXE`
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                evidences:
                  type: array
                  items:
                    type: object
                    required:
                      - type
                      - data
                    properties:
                      type:
                        type: string
                        description: Type of evidence. Allowed values - 'file' or 'url'.
                        enum:
                          - file
                          - url
                      data:
                        type: object
                        description: Evidence data, structure depends on the type.
                        properties:
                          file:
                            type: object
                            required:
                              - name
                              - type
                              - base64
                            properties:
                              name:
                                type: string
                                description: Name of the file
                              type:
                                type: string
                                description: MIME type of the file
                              base64:
                                type: string
                                description: Base64-encoded file content
                          link:
                            type: object
                            required:
                              - url
                            properties:
                              name:
                                type: string
                                description: Name of the URL evidence
                              url:
                                type: string
                                description: URL string
            examples:
              File Example:
                value:
                  evidences:
                    - type: file
                      data:
                        file:
                          name: Receipt.pdf
                          type: application/pdf
                          base64: <base64-encoded-content>
                    - type: url
                      data:
                        link:
                          url: https://www.google.com
                          name: Google Homepage
              URL Example:
                value:
                  evidences:
                    - type: url
                      data:
                        link:
                          name: Google Homepage
                          url: https://www.google.com
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    data:
                      - id: 1
                        url: https://app.gomangrove.com/....
                        evidence_type: file
                        name: Receipt.pdf
                      - id: 2
                        url: https://www.google.com
                        evidence_type: url
                        name: Google Homepage
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    url:
                      type: string
                      example: https://app.gomangrove.com/....
                    evidence_type:
                      type: string
                      enum:
                        - file
                        - url
                    name:
                      type: string
                      example: Receipt.pdf
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value:
                    errors:
                      - message: Record not found
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          example: Record not found
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: ''

````