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

# Creates a webhook subscription

> Creates a new webhook subscription for the specified events



## OpenAPI

````yaml /specs/fuelboss/fuelboss-api.json post /v1/webhooks
openapi: 3.1.1
info:
  title: FuelBoss API
  description: >-
    REST API providing a powerful and easy way to manage your companies
    nominations and operations.
  termsOfService: https://www.ofiniti.com/legal/platform-service-terms
  contact:
    name: Support Team
    email: itops@ofiniti.com
  version: 1.15.1
servers:
  - url: https://api.demo.fuelboss.net
    description: Demo (sandbox for testing and integration development)
  - url: https://api.fuelboss.net
    description: Production
security:
  - bearerAuth: []
tags:
  - name: OAuth
  - name: Nominations
  - name: Entity management
  - name: Operations
  - name: Common
  - name: Webhooks
  - name: Webhook events
paths:
  /v1/webhooks:
    post:
      tags:
        - Webhooks
      summary: Creates a webhook subscription
      description: Creates a new webhook subscription for the specified events
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/FuelBoss.Api.Contracts.Webhooks.CreateWebhookSubscriptionRequest
              description: Request body for creating a webhook subscription.
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/FuelBoss.Api.Contracts.Webhooks.WebhookSubscriptionResponse
                description: A webhook subscription belonging to your company.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    format: uri
                  title:
                    type: string
                  status:
                    type: integer
                  detail:
                    type: string
                  instance:
                    type: string
                    format: uri
                  timestamp:
                    type: string
                    format: date-time
                  trace_id:
                    type: string
                description: >-
                  RFC 9457 Problem Details response - fully compliant with
                  latest standard

                  https://tools.ietf.org/html/rfc9457
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    format: uri
                  title:
                    type: string
                  status:
                    type: integer
                  detail:
                    type: string
                  instance:
                    type: string
                    format: uri
                  timestamp:
                    type: string
                    format: date-time
                  trace_id:
                    type: string
                description: >-
                  RFC 9457 Problem Details response - fully compliant with
                  latest standard

                  https://tools.ietf.org/html/rfc9457
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    format: uri
                  title:
                    type: string
                  status:
                    type: integer
                  detail:
                    type: string
                  instance:
                    type: string
                    format: uri
                  timestamp:
                    type: string
                    format: date-time
                  trace_id:
                    type: string
                description: >-
                  RFC 9457 Problem Details response - fully compliant with
                  latest standard

                  https://tools.ietf.org/html/rfc9457
components:
  schemas:
    FuelBoss.Api.Contracts.Webhooks.CreateWebhookSubscriptionRequest:
      type: object
      properties:
        url:
          type: string
          description: HTTPS endpoint that webhook events are delivered to.
        eventTypes:
          type: array
          items:
            enum:
              - nomination_cancelled
              - nomination_bunkering_location_changed
              - nomination_fuel_specification_changed
              - nomination_receiver_vessel_changed
              - nomination_supplier_asset_changed
              - operation_started
              - operation_ended
              - nomination_created
              - nomination_draft_upserted
              - nomination_bunkering_start_time_changed
              - nomination_bunkering_end_time_changed
              - nomination_contract_changed
              - nomination_company_entity_changed
              - nomination_counterpart_entity_changed
            type: string
            description: >-
              Event type that a webhook subscription covers. Deliveries carry
              the corresponding

              CloudEvent type string (e.g. `net.fuelboss.nomination.created`) in
              their `type` field.


              Possible values:


              - `nomination_cancelled` — Nomination has been cancelled.

              - `nomination_bunkering_location_changed` — Nomination bunkering
              location has changed.

              - `nomination_fuel_specification_changed` — Nomination fuel
              specification has changed.

              - `nomination_receiver_vessel_changed` — Nomination receiver
              vessel has changed.

              - `nomination_supplier_asset_changed` — Nomination supplier asset
              has changed.

              - `operation_started` — Bunkering operation has started.

              - `operation_ended` — Bunkering operation has ended.

              - `nomination_created` — Nomination has been created.

              - `nomination_draft_upserted` — Draft nomination has been created
              or updated.

              - `nomination_bunkering_start_time_changed` — Nomination estimated
              bunkering start time (the nomination BST) has changed.

              - `nomination_bunkering_end_time_changed` — Nomination estimated
              bunkering end time (estimated time of completion) has changed.

              - `nomination_contract_changed` — Nomination contract has changed.

              - `nomination_company_entity_changed` — Nomination supplier
              company entity has changed.

              - `nomination_counterpart_entity_changed` — Nomination counterpart
              entity has changed.
          description: Event types to subscribe to.
        secret:
          type:
            - 'null'
            - string
          description: >-
            Secret used to compute the HMAC signature sent with each delivery,
            so you can verify the payload originates from FuelBoss.
        headers:
          type:
            - 'null'
            - object
          additionalProperties:
            type: string
          description: >-
            Custom HTTP headers included in every delivery to your endpoint
            (e.g. for authentication). Header values are stored securely and
            never returned.
      additionalProperties: false
      description: Request body for creating a webhook subscription.
    FuelBoss.Api.Contracts.Webhooks.WebhookSubscriptionResponse:
      type: object
      properties:
        id:
          type: string
          description: >-
            System-generated unique identifier of the subscription. Use it to
            delete the subscription.
          format: uuid
        url:
          type: string
          description: HTTPS endpoint that webhook events are delivered to.
        eventTypes:
          type: array
          items:
            enum:
              - nomination_cancelled
              - nomination_bunkering_location_changed
              - nomination_fuel_specification_changed
              - nomination_receiver_vessel_changed
              - nomination_supplier_asset_changed
              - operation_started
              - operation_ended
              - nomination_created
              - nomination_draft_upserted
              - nomination_bunkering_start_time_changed
              - nomination_bunkering_end_time_changed
              - nomination_contract_changed
              - nomination_company_entity_changed
              - nomination_counterpart_entity_changed
            type: string
            description: >-
              Event type that a webhook subscription covers. Deliveries carry
              the corresponding

              CloudEvent type string (e.g. `net.fuelboss.nomination.created`) in
              their `type` field.


              Possible values:


              - `nomination_cancelled` — Nomination has been cancelled.

              - `nomination_bunkering_location_changed` — Nomination bunkering
              location has changed.

              - `nomination_fuel_specification_changed` — Nomination fuel
              specification has changed.

              - `nomination_receiver_vessel_changed` — Nomination receiver
              vessel has changed.

              - `nomination_supplier_asset_changed` — Nomination supplier asset
              has changed.

              - `operation_started` — Bunkering operation has started.

              - `operation_ended` — Bunkering operation has ended.

              - `nomination_created` — Nomination has been created.

              - `nomination_draft_upserted` — Draft nomination has been created
              or updated.

              - `nomination_bunkering_start_time_changed` — Nomination estimated
              bunkering start time (the nomination BST) has changed.

              - `nomination_bunkering_end_time_changed` — Nomination estimated
              bunkering end time (estimated time of completion) has changed.

              - `nomination_contract_changed` — Nomination contract has changed.

              - `nomination_company_entity_changed` — Nomination supplier
              company entity has changed.

              - `nomination_counterpart_entity_changed` — Nomination counterpart
              entity has changed.
          description: Event types the subscription covers.
        createdAtUtc:
          type: string
          description: Timestamp (UTC) when the subscription was created.
          format: date-time
        headerKeys:
          type:
            - 'null'
            - array
          items:
            type: string
          description: >-
            Names of the custom headers configured for the subscription. Header
            values are never returned.
      additionalProperties: false
      description: A webhook subscription belonging to your company.
  securitySchemes:
    bearerAuth:
      type: http
      description: >-
        Access token obtained from the /oauth/token endpoint using your client
        credentials.
      scheme: bearer
      bearerFormat: JWT

````