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

# Create Ticket Relations

> Create multiple ticket relations in a single call.

Returns a result per source ticket indicating success or failure.
NsApiSlow threshold: 5000 ms.
<para />## Experimental: ## This method is experimental, subject to change, and not intended for partners.



## OpenAPI

````yaml /openapi/agent/openapi-v3-TicketAgent.json post /api/v1/Agents/Ticket/CreateTicketRelations
openapi: 3.0.0
info:
  version: v1-Agents
  title: SuperOffice Agent API v1
  description: SuperOffice Agent API - TicketAgent
  contact:
    name: SuperOffice DevNet
    url: https://docs.superoffice.com/en/api/index.html
    email: sdk@superoffice.com
servers:
  - url: http://localhost:56350
  - url: https://localhost:56350
security: []
tags: []
externalDocs:
  description: >-
    The SuperOffice DevNet Community has more documentation, examples, and
    discussion forums.
  url: https://community.superoffice.com/en/developer/
paths:
  /api/v1/Agents/Ticket/CreateTicketRelations:
    post:
      tags:
        - Ticket_Agent
      summary: Create Ticket Relations
      description: "Create multiple ticket relations in a single call.\n\nReturns a result per source ticket indicating success or failure.\r\nNsApiSlow threshold: 5000 ms.\r\n<para />## Experimental: ## This method is experimental, subject to change, and not intended for partners."
      operationId: v1TicketAgent_CreateTicketRelations
      parameters:
        - name: $select
          in: query
          description: >-
            Optional comma separated list of properties to include in the
            result. Other fields are then nulled out to reduce payload size:
            "Name,department,category". Default = show all fields.
          required: false
          schema:
            type: string
        - name: Accept-Language
          in: header
          description: >-
            Convert string references and multi-language values into a specified
            language (iso2) code.
          required: false
          schema:
            type: string
        - name: SO-Language
          in: header
          description: >-
            Convert string references and multi-language values into a specified
            language (iso2) code. Overrides Accept-Language value.
          required: false
          schema:
            type: string
        - name: SO-Culture
          in: header
          description: >-
            Number, date formatting in a specified culture (iso2 language) code.
            Partially overrides SO-Language/Accept-Language value. Ignored if no
            Language set.
          required: false
          schema:
            type: string
        - name: SO-TimeZone
          in: header
          description: >-
            Specify the timezone code that you would like date/time responses
            converted to.
          required: false
          schema:
            type: string
        - name: SO-AppToken
          in: header
          description: >-
            The application token that identifies the partner app. Used when
            calling Online WebAPI from a server.
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.TicketCarriers.CreateTicketRelationsRequest
          text/json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.TicketCarriers.CreateTicketRelationsRequest
          application/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.TicketCarriers.CreateTicketRelationsRequest
          text/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.TicketCarriers.CreateTicketRelationsRequest
          application/x-www-form-urlencoded:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.TicketCarriers.CreateTicketRelationsRequest
          application/json-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.TicketCarriers.CreateTicketRelationsRequest
          application/merge-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.TicketCarriers.CreateTicketRelationsRequest
        description: SourceTicketIds, DestinationTicketId, RelationType, Comment
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.Services.TicketRelationResult
            text/json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.Services.TicketRelationResult
            application/xml:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.Services.TicketRelationResult
            text/xml:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.Services.TicketRelationResult
            application/json-patch+json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.Services.TicketRelationResult
            application/merge-patch+json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.Services.TicketRelationResult
      security:
        - SuperOffice_Password: []
          SuperId_Authentication: []
components:
  schemas:
    SuperOffice.WebApi.v1.Carriers.TicketCarriers.CreateTicketRelationsRequest:
      description: >-
        CreateTicketRelations: Create multiple ticket relations in a single
        call. Returns a result per source ticket indicating success or failure.
      type: object
      properties:
        SourceTicketIds:
          type: array
          items:
            format: int32
            type: integer
        DestinationTicketId:
          format: int32
          type: integer
        RelationType:
          enum:
            - Related
            - Parent
            - Child
          type: string
        Comment:
          type: string
    SuperOffice.CRM.Services.TicketRelationResult:
      description: "Result of a ticket relation operation, indicating success or the reason for failure.\r\n<para />\r\nCarrier object for TicketRelationResult.\r\nServices for the TicketRelationResult Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.ITicketAgent\">Ticket Agent</see>."
      type: object
      properties:
        SourceTicketId:
          format: int32
          description: The id of the source ticket this result applies to.
          type: integer
        IsValid:
          description: True if the operation succeeded; false if it failed.
          type: boolean
        RelationError:
          description: The reason the operation failed, if IsValid is false.
          enum:
            - ParentExists
            - RelationExists
            - SameTicket
          type: string
        ErrorMessage:
          description: >-
            Error message describing why the operation failed, if IsValid is
            false.
          type: string

````

## Related topics

- [SuperOffice.WebApi.Data.Ticket CreateTicketRelationsRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.Ticket_CreateTicketRelationsRequest.md)
- [SuperOffice.WebApi.Agents.TicketAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.TicketAgent.md)
- [SuperOffice.WebApi.Agents.ITicketAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.ITicketAgent.md)
- [WebAPI changes in SuperOffice 12.0](/release-notes/12/api/changes-webapi-12.0.342.0.md)
- [Create Default Ticket Relation Entity](/en/api/reference/restful/agent/ticket_agent/create-default-ticket-relation-entity.md)
- [Create Default Ticket Relation Definition Entity](/en/api/reference/restful/agent/list_agent/create-default-ticket-relation-definition-entity.md)
