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

# Update a obligation



## OpenAPI

````yaml https://grosh.muathye.com/api/openapi.json put /obligations/{id}
openapi: 3.1.0
info:
  title: Grosh API
  version: 1.0.0
  description: >-
    Contacts, Obligations, Budgeting, and Authentication API for the
    application.
servers:
  - url: https://grosh.muathye.com/api
security:
  - bearerAuth: []
  - cookieAuth: []
paths:
  /obligations/{id}:
    put:
      summary: Update a obligation
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ObligationRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Obligation'
components:
  schemas:
    ObligationRequest:
      type: object
      required:
        - name
        - opened_date
        - original_amount
        - outstanding_amount
        - contact_id
        - account_id
        - currency_id
      properties:
        name:
          type: string
          maxLength: 150
        reference:
          type:
            - string
            - 'null'
          maxLength: 100
        notes:
          type:
            - string
            - 'null'
        opened_date:
          type: string
          format: date
        due_date:
          type:
            - string
            - 'null'
          format: date
        original_amount:
          type: number
          exclusiveMinimum: 0
        outstanding_amount:
          type: number
          minimum: 0
        contact_id:
          type: string
        account_id:
          type: string
        currency_id:
          type: string
    Obligation:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        reference:
          type:
            - string
            - 'null'
        notes:
          type:
            - string
            - 'null'
        opened_date:
          type:
            - string
            - 'null'
          format: date
        due_date:
          type:
            - string
            - 'null'
          format: date
        original_amount:
          type: number
        outstanding_amount:
          type: number
        status:
          type: string
          enum:
            - open
            - settled
        settled_at:
          type:
            - string
            - 'null'
          format: date-time
        contact:
          type: object
          properties:
            id:
              type: string
            name:
              type:
                - string
                - 'null'
        account:
          type: object
          properties:
            id:
              type: string
            name:
              type:
                - string
                - 'null'
            code:
              type:
                - string
                - 'null'
        currency:
          type: object
          properties:
            id:
              type: string
            name:
              type:
                - string
                - 'null'
            code:
              type:
                - string
                - 'null'
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
        deleted_at:
          type:
            - string
            - 'null'
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    cookieAuth:
      type: apiKey
      in: cookie
      name: grosh-session

````