Matchmaking - Create Server Matchmaking Ticket

Create a matchmaking ticket as a server. The matchmaking service automatically starts matching the ticket against other matchmaking tickets.

POST https://titleId.playfabapi.com/Match/CreateServerMatchmakingTicket

Request Header

Name Required Type Description
X-EntityToken True

string

This API requires an Entity Session Token, available from the Entity GetEntityToken method.

Request Body

Name Required Type Description
GiveUpAfterSeconds True

number

How long to attempt matching this ticket in seconds.

Members True

MatchmakingPlayer[]

The users who will be part of this ticket.

QueueName True

string

The Id of a match queue.

CustomTags

object

The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

Responses

Name Type Description
200 OK

CreateMatchmakingTicketResult

400 Bad Request

ApiErrorWrapper

This is the outer wrapper for all responses with errors

Security

X-EntityToken

This API requires an Entity Session Token, available from the Entity GetEntityToken method.

Type: apiKey
In: header

Definitions

Name Description
ApiErrorWrapper

The basic wrapper around every failed API response

CreateMatchmakingTicketResult
CreateServerMatchmakingTicketRequest

The server specifies all the members and their attributes.

EntityKey

Combined entity type and ID structure which uniquely identifies a single entity.

MatchmakingPlayer

A user in a matchmaking ticket.

MatchmakingPlayerAttributes

The matchmaking attributes for a user.

ApiErrorWrapper

The basic wrapper around every failed API response

Name Type Description
code

integer

Numerical HTTP code

error

string

Playfab error code

errorCode

integer

Numerical PlayFab error code

errorDetails

object

Detailed description of individual issues with the request object

errorMessage

string

Description for the PlayFab errorCode

status

string

String HTTP code

CreateMatchmakingTicketResult

Name Type Description
TicketId

string

The Id of the ticket to find a match for.

CreateServerMatchmakingTicketRequest

The server specifies all the members and their attributes.

Name Type Description
CustomTags

object

The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

GiveUpAfterSeconds

number

How long to attempt matching this ticket in seconds.

Members

MatchmakingPlayer[]

The users who will be part of this ticket.

QueueName

string

The Id of a match queue.

EntityKey

Combined entity type and ID structure which uniquely identifies a single entity.

Name Type Description
Id

string

Unique ID of the entity.

Type

string

Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types

MatchmakingPlayer

A user in a matchmaking ticket.

Name Type Description
Attributes

MatchmakingPlayerAttributes

The user's attributes custom to the title.

Entity

EntityKey

The entity key of the matchmaking user.

MatchmakingPlayerAttributes

The matchmaking attributes for a user.

Name Type Description
DataObject

object

A data object representing a user's attributes.

EscapedDataObject

string

An escaped data object representing a user's attributes.

Error Codes

Name Code
MatchmakingAttributeInvalid 2046
MatchmakingEntityInvalid 2001
MatchmakingMemberProfileInvalid 2032
MatchmakingNumberOfPlayersInTicketTooLarge 2044
MatchmakingPlayerAttributesInvalid 2002
MatchmakingPlayerAttributesTooLarge 2043
MatchmakingQueueNotFound 2016
MatchmakingRateLimitExceeded 2054
MatchmakingTicketMembershipLimitExceeded 2055
MatchmakingUnauthorized 2056