> ## Documentation Index
> Fetch the complete documentation index at: https://resq-dependabot-github-actions-github-actions-478e18be3d.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Records a new event on the blockchain.



## OpenAPI

````yaml /specs/infrastructure.json post /blockchain/events
openapi: 3.1.0
info:
  title: resq-api
  description: ''
  license:
    name: Apache-2.0
    identifier: Apache-2.0
  version: 0.1.0
servers: []
security: []
tags:
  - name: resq-backend
    description: ResQ Infrastructure API
  - name: auth
    description: Authentication endpoints
  - name: incidents
    description: Incident management endpoints
  - name: evidence
    description: Evidence management endpoints
  - name: blockchain
    description: Blockchain query endpoints
  - name: solana
    description: Solana program endpoints (PoD + airspace)
paths:
  /blockchain/events:
    post:
      tags:
        - blockchain
      summary: Records a new event on the blockchain.
      operationId: record_event
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecordBlockchainEventRequest'
        required: true
      responses:
        '200':
          description: Event recorded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionResponse'
components:
  schemas:
    RecordBlockchainEventRequest:
      type: object
      required:
        - event_type
        - timestamp
      properties:
        event_id:
          type: string
        event_type:
          type: string
        timestamp:
          type: integer
          format: int64
        location:
          type: object
          properties:
            latitude:
              type: number
            longitude:
              type: number
            altitude:
              type: number
        evidence_cid:
          type: string
        drone_id:
          type: string
        metadata:
          type: object
          additionalProperties: true
    TransactionResponse:
      type: object
      description: Response for transaction status.
      required:
        - tx_hash
        - status
        - gas_consumed
      properties:
        block_height:
          type:
            - integer
            - 'null'
          format: int64
          description: Block height at which the transaction was included.
          minimum: 0
        error_message:
          type:
            - string
            - 'null'
          description: Error message if the transaction failed.
        gas_consumed:
          type: integer
          format: int64
          description: Gas consumed by the transaction.
          minimum: 0
        status:
          type: string
          description: Transaction status (e.g. "confirmed", "pending", "failed").
        tx_hash:
          type: string
          description: On-chain transaction hash.

````