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

# Cancel Server Backfill Ticket

> Cancel a server backfill ticket.

## Error codes

This operation may return the following PlayFab errors:

| Error | Code |
| --- | --- |
| MatchmakingEntityInvalid | 2001 |
| MatchmakingQueueNotFound | 2016 |
| MatchmakingRequestTypeMismatch | 2058 |
| MatchmakingTicketAlreadyCompleted | 2029 |
| MatchmakingTicketNotFound | 2018 |
| MatchmakingUnauthorized | 2056 |




## OpenAPI

````yaml /services/playfab/api-references/rest/multiplayer/multiplayer.openapi.json post /Match/CancelServerBackfillTicket
openapi: 3.0.0
info:
  version: '260922'
  title: PlayFab Multiplayer API
  description: >-
    API methods for managing multiplayer servers. API methods for managing
    parties. The lobby service helps players group together to play multiplayer
    games. It is often used as a rendezvous point for players to share
    connection information. The TrueSkill service helps titles to estimate a
    player's skill based on their match results. The player skill values from
    this service are commonly used by a matchmaking service to provide players
    with balanced matches.
  termsOfService: https://playfab.com/terms/
  contact:
    url: https://community.playfab.com/index.html
  license:
    name: Apache 2.0
    url: https://github.com/PlayFab/API_Specs/blob/master/LICENSE
servers:
  - url: https://{titleId}.playfabapi.com
    description: PlayFab title endpoint
    variables:
      titleId:
        default: your_title_id
        description: Your PlayFab title ID (hex).
security: []
tags:
  - name: Lobby
    description: ''
  - name: Matchmaking
    description: Matchmaking APIs
  - name: Matchmaking Admin
    description: Matchmaking Admin APIs
  - name: MultiplayerServer
    description: Multiplayer Server APIs
  - name: PubSub
    description: PlayFab PubSub APIs
  - name: TrueSkill
    description: TrueSkill APIs
  - name: TrueSkill Admin
    description: TrueSkill Admin APIs
paths:
  /Match/CancelServerBackfillTicket:
    post:
      tags:
        - Matchmaking
      summary: Cancel Server Backfill Ticket
      description: |
        Cancel a server backfill ticket.

        ## Error codes

        This operation may return the following PlayFab errors:

        | Error | Code |
        | --- | --- |
        | MatchmakingEntityInvalid | 2001 |
        | MatchmakingQueueNotFound | 2016 |
        | MatchmakingRequestTypeMismatch | 2058 |
        | MatchmakingTicketAlreadyCompleted | 2029 |
        | MatchmakingTicketNotFound | 2018 |
        | MatchmakingUnauthorized | 2056 |
      operationId: CancelServerBackfillTicket
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelServerBackfillTicketRequest'
        description: >-
          Only servers can cancel a backfill ticket. The ticket can be in three
          different states when it is cancelled. 1: the ticket is matching. If
          the ticket is cancelled, it will stop matching. 2: the ticket is
          matched. A matched ticket cannot be cancelled. 3: the ticket is
          already cancelled and nothing happens. There may be race conditions
          between the ticket getting matched and the server making a
          cancellation request. The server must handle the possibility that the
          cancel request fails if a match is found before the cancellation
          request is processed. We do not allow resubmitting a cancelled ticket.
          Create a new ticket instead.
      responses:
        '200':
          $ref: '#/components/responses/CancelServerBackfillTicketResult'
        '400':
          $ref: '#/components/responses/ApiErrorWrapper'
      security:
        - EntityToken: []
components:
  schemas:
    CancelServerBackfillTicketRequest:
      description: >-
        Only servers can cancel a backfill ticket. The ticket can be in three
        different states when it is cancelled. 1: the ticket is matching. If the
        ticket is cancelled, it will stop matching. 2: the ticket is matched. A
        matched ticket cannot be cancelled. 3: the ticket is already cancelled
        and nothing happens. There may be race conditions between the ticket
        getting matched and the server making a cancellation request. The server
        must handle the possibility that the cancel request fails if a match is
        found before the cancellation request is processed. We do not allow
        resubmitting a cancelled ticket. Create a new ticket instead.
      type: object
      properties:
        CustomTags:
          description: >-
            The optional custom tags associated with the request (e.g. build
            number, external trace identifiers, etc.).
          type: object
        QueueName:
          description: The name of the queue the ticket is in.
          type: string
        TicketId:
          description: The Id of the ticket to find a match for.
          type: string
      required:
        - TicketId
        - QueueName
      example:
        TicketId: 1c4b0daa-150e-47ae-9923-d770c0f9b07c
        QueueName: custom123
    CancelServerBackfillTicketResult:
      type: object
      properties: {}
      example: {}
    ApiErrorWrapper:
      description: The basic wrapper around every failed API response
      type: object
      properties:
        code:
          description: Numerical HTTP code
          type: integer
        status:
          description: String HTTP code
          type: string
        error:
          description: Playfab error code
          type: string
        errorCode:
          description: Numerical PlayFab error code
          type: integer
        errorMessage:
          description: Description for the PlayFab errorCode
          type: string
        errorDetails:
          description: Detailed description of individual issues with the request object
          type: object
      required:
        - code
        - errorCode
  responses:
    CancelServerBackfillTicketResult:
      description: ''
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: integer
                description: >-
                  The Http status code. If X-ReportErrorAsSuccess header is set
                  to true, this will report the actual http error code.
              status:
                type: string
                description: The Http status code as a string.
              data:
                $ref: '#/components/schemas/CancelServerBackfillTicketResult'
            example:
              code: 200
              status: OK
              data: {}
    ApiErrorWrapper:
      description: This is the outer wrapper for all responses with errors
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorWrapper'
  securitySchemes:
    EntityToken:
      type: apiKey
      in: header
      name: X-EntityToken
      description: >-
        This API requires an Entity Session Token, available from the Entity
        GetEntityToken method.

````

## Related topics

- [Cancel Server Backfill Ticket](/services/playfab/api-references/rest/multiplayer/matchmaking/cancel-server-backfill-ticket.md)
- [Using Server Backfill Tickets - REST API](/services/playfab/multiplayer/matchmaking/backfill-tickets.md)
- [PlayFab Release Notes 2020](/services/playfab/release-notes/2020.md)
- [Cancel All Server Backfill Tickets For Player](/services/playfab/api-references/rest/multiplayer/matchmaking/cancel-all-server-backfill-tickets-for-player.md)
- [Using Server Backfill Tickets - Multiplayer SDK](/services/playfab/multiplayer/matchmaking/backfill-tickets-multiplayer-sdk.md)
