# Receive tender update notifications

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /webhooks/tenders:
    post:
      summary: Receive tender update notifications
      deprecated: false
      description: >-
        This endpoint will be called by TendersAlerts when tenders you're
        following are updated. Note: This is YOUR endpoint that you need to
        implement. TendersAlerts will POST to this URL.
      operationId: receiveTenderUpdate
      tags:
        - Webhook Updates
      parameters:
        - name: X-Webhook-Signature
          in: header
          description: 'HMAC SHA256 signature of the request body (format: sha256=<hash>)'
          required: true
          example: ''
          schema:
            type: string
            examples:
              - sha256=a1b2c3d4e5f6789...
        - name: X-Webhook-Event
          in: header
          description: Event type
          required: true
          example: ''
          schema:
            type: string
            enum:
              - tender.updated
            examples:
              - tender.updated
        - name: X-Account-Id
          in: header
          description: Your TendersAlerts account ID
          required: true
          example: ''
          schema:
            type: string
            examples:
              - '123'
        - name: User-Agent
          in: header
          description: ''
          required: true
          example: ''
          schema:
            type: string
            examples:
              - TendersAlerts-Webhook/1.0
        - name: Authorization
          in: header
          description: ''
          example: Bearer {{api-key}}
          schema:
            type: string
            default: Bearer {{api-key}}
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenderUpdateWebhook'
            examples:
              singleChange:
                value:
                  event: tender.updated
                  timestamp: '2026-04-22T20:52:00Z'
                  account_id: 123
                  tender:
                    id: 45678
                    referenceNumber: RFP-2026-001
                    tenderName: Construction Project
                    tenderName_en: Construction Project
                    status: active
                    submitted_at: '2026-04-15T10:00:00Z'
                    closing_date: '2026-05-15T14:00:00Z'
                    agency:
                      id: 100
                      name: Ministry of Infrastructure
                      name_en: Ministry of Infrastructure
                  changes:
                    - field_name: closing_date
                      old_value: '2026-05-10T14:00:00Z'
                      new_value: '2026-05-15T14:00:00Z'
                      change_summary_ar: تم تمديد تاريخ الإغلاق من 2026-05-10 إلى 2026-05-15
                      change_summary_en: Closing date extended from 2026-05-10 to 2026-05-15
                      change_type: field_updated
                      changed_at: '2026-04-22T20:45:00Z'
                      metadata:
                        field_label_ar: تاريخ الإغلاق
                        field_label_en: Closing Date
                summary: Single field change
      responses:
        '200':
          description: Webhook received and processed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    examples:
                      - success
                x-apidog-orders:
                  - status
                x-apidog-ignore-properties: []
          headers: {}
          x-apidog-name: ''
        '401':
          description: Invalid signature
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    examples:
                      - Invalid signature
                x-apidog-orders:
                  - error
                x-apidog-ignore-properties: []
          headers: {}
          x-apidog-name: ''
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    examples:
                      - Internal server error
                x-apidog-orders:
                  - error
                x-apidog-ignore-properties: []
          headers: {}
          x-apidog-name: ''
      security: []
      x-apidog-folder: Webhook Updates
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/772525/apis/api-33962173-run
components:
  schemas:
    TenderUpdateWebhook:
      type: object
      required:
        - event
        - timestamp
        - account_id
        - tender
        - changes
      properties:
        event:
          type: string
          enum:
            - tender.updated
          description: Event type
          examples:
            - tender.updated
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the webhook was generated
          examples:
            - '2026-04-22T20:52:00Z'
        account_id:
          type: integer
          description: Your TendersAlerts account ID
          examples:
            - 123
        tender:
          $ref: '#/components/schemas/Tender'
        changes:
          type: array
          description: Array of changes that occurred (batched updates)
          items:
            $ref: '#/components/schemas/TenderChange'
          minItems: 1
      x-apidog-orders:
        - event
        - timestamp
        - account_id
        - tender
        - changes
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    TenderChange:
      type: object
      required:
        - field_name
        - change_type
        - changed_at
      properties:
        field_name:
          type: string
          description: Name of the field that changed
          examples:
            - closing_date
        old_value:
          type: string
          description: Previous value (null for new fields)
          examples:
            - '2026-05-10T14:00:00Z'
          nullable: true
        new_value:
          type: string
          description: New value (null for deleted fields)
          examples:
            - '2026-05-15T14:00:00Z'
          nullable: true
        change_summary_ar:
          type: string
          description: Human-readable change summary in Arabic
          examples:
            - تم تمديد تاريخ الإغلاق من 2026-05-10 إلى 2026-05-15
        change_summary_en:
          type: string
          description: Human-readable change summary in English
          examples:
            - Closing date extended from 2026-05-10 to 2026-05-15
        change_type:
          type: string
          enum:
            - field_updated
            - field_added
            - field_removed
            - relation_added
            - relation_removed
          description: Type of change
          examples:
            - field_updated
        changed_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp when this change occurred
          examples:
            - '2026-04-22T20:45:00Z'
        metadata:
          type: object
          description: Additional metadata about the change
          properties:
            field_label_ar:
              type: string
              examples:
                - تاريخ الإغلاق
            field_label_en:
              type: string
              examples:
                - Closing Date
          additionalProperties: true
          x-apidog-orders:
            - field_label_ar
            - field_label_en
          x-apidog-ignore-properties: []
          nullable: true
      x-apidog-orders:
        - field_name
        - old_value
        - new_value
        - change_summary_ar
        - change_summary_en
        - change_type
        - changed_at
        - metadata
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Tender:
      type: object
      description: >-
        Complete tender object with all details and relations. Fields included
        depend on your account API settings.
      properties:
        id:
          type: integer
          examples:
            - 45678
        referenceNumber:
          type: string
          examples:
            - RFP-2026-001
        tenderName:
          type: string
          description: Tender name in Arabic
          examples:
            - مشروع بناء
        tenderName_en:
          type: string
          description: Tender name in English
          examples:
            - Construction Project
        status:
          type: string
          enum:
            - active
            - closed
            - awarded
            - cancelled
          examples:
            - active
        submitted_at:
          type: string
          format: date-time
          examples:
            - '2026-04-15T10:00:00Z'
        closing_date:
          type: string
          format: date-time
          examples:
            - '2026-05-15T14:00:00Z'
        budget:
          type: number
          examples:
            - 1500000
          nullable: true
        currency:
          type: string
          examples:
            - SAR
          nullable: true
        description:
          type: string
          nullable: true
        agency:
          $ref: '#/components/schemas/Agency'
        category:
          $ref: '#/components/schemas/Category'
        region:
          $ref: '#/components/schemas/Region'
      x-apidog-orders:
        - id
        - referenceNumber
        - tenderName
        - tenderName_en
        - status
        - submitted_at
        - closing_date
        - budget
        - currency
        - description
        - agency
        - category
        - region
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Region:
      type: object
      properties:
        id:
          type: integer
          examples:
            - 3
        name:
          type: string
          examples:
            - Riyadh
      x-apidog-orders:
        - id
        - name
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Category:
      type: object
      properties:
        id:
          type: integer
          examples:
            - 5
        name:
          type: string
          examples:
            - Construction
      x-apidog-orders:
        - id
        - name
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Agency:
      type: object
      properties:
        id:
          type: integer
          examples:
            - 100
        name:
          type: string
          description: Agency name in Arabic
          examples:
            - وزارة البنية التحتية
        name_en:
          type: string
          description: Agency name in English
          examples:
            - Ministry of Infrastructure
      x-apidog-orders:
        - id
        - name
        - name_en
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes:
    Tenders Alerts:
      type: bearer
      scheme: bearer
    hmacSignature:
      type: apikey
      in: header
      name: X-Webhook-Signature
      description: >-
        HMAC SHA256 signature of the request body using your webhook secret.
        Format: sha256=<hash>
servers:
  - url: https://api.tendersalerts.com/api/integration
    description: Prod Env
security: []

```
