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

# Update an account relationship



## OpenAPI

````yaml put /v1/accounts/relationships/{id}
openapi: 3.0.0
info:
  title: Thena Platform
  description: The Thena Platform API description
  version: '1.0'
  contact: {}
servers:
  - url: https://platform.thena.ai
    description: production
security:
  - bearerAuth: []
tags:
  - name: Thena Platform APIs
    description: ''
paths:
  /v1/accounts/relationships/{id}:
    put:
      tags:
        - Accounts
      summary: Update an account relationship
      operationId: AccountRelationshipActionController_updateAccountRelationship
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAccountRelationshipDto'
      responses:
        '200':
          description: Operation successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountRelationshipResponseDto'
        '401':
          description: User is not authenticated!
        '403':
          description: User does not have access to this resource!
        '404':
          description: Resource not found!
        '429':
          description: Too many requests!
        '500':
          description: Something went wrong!
        '503':
          description: This service/resource is currently unavailable.
components:
  schemas:
    UpdateAccountRelationshipDto:
      type: object
      properties:
        relationshipType:
          type: string
          description: The identifier of the relationship type attribute
          example: RELATIONSHIP_TYPE_PARENT
      required:
        - relationshipType
    AccountRelationshipResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The identifier of the relationship
          example: AR123
        accountId:
          type: string
          description: The identifier of the primary account of the relationship
        account:
          type: string
          description: The name of the primary account of the relationship
        relatedAccountId:
          type: string
          description: The identifier of the related account of the relationship
        relatedAccount:
          type: string
          description: The name of the related account of the relationship
        relationshipType:
          description: Relationship type
          allOf:
            - $ref: '#/components/schemas/AccountRelationshipTypeResponseDto'
        createdAt:
          type: string
          description: The creation date of the relationship
        updatedAt:
          type: string
          description: Last update date of the relationship
      required:
        - id
        - accountId
        - account
        - relatedAccountId
        - relatedAccount
        - relationshipType
        - createdAt
        - updatedAt
    AccountRelationshipTypeResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The identifier of the relationship type
          example: ART123
        name:
          type: string
          description: The name of the relationship type
          example: Parent
        inverseRelationshipId:
          type: string
          description: The identifier of the inverse relationship type
          example: ART124
        inverseRelationship:
          type: string
          description: The name of the inverse relationship type
          example: Subsidiary
        createdAt:
          format: date-time
          type: string
          description: The creation date of the relationship type
        updatedAt:
          format: date-time
          type: string
          description: Last update date of the relationship type
      required:
        - id
        - name
        - inverseRelationshipId
        - inverseRelationship
        - createdAt
        - updatedAt
  securitySchemes:
    bearerAuth:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Enter the bearer token

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.