POST /definitions/teams/:definitionId

Description

Create a team using a specified team definition.

It returns the state of the newly created team and the updated player teams.

Resource URL

https://api.playlyfe.com/definitions/team/:definitionId

Method

POST

Scopes

player, game, debug

Parameters

LocationParameter NameDefault ValueDescription
QuerydefinitionIdThe team definition ID from which the team will be created
Request Bodyidauto generatedThe ID of the newly created team instance
Request Bodyaccessstrictest access setting allowed by the definitionThe access setting of the team instance. It can be either public, protected or private

Example

Request
POST https://api.playlyfe.com/definitions/team/national
{
  "id": "globe-trotters",
  "access": "public"
}
Response
{
  "id": "53134a34626c38324c115872",
  "name": "Titans",
  "definition": "immortals",
  "created": "2014-03-02T15:11:48.079Z",
  "version": "ee570372b07a94134e8ccb461340f997",
  "access": "PRIVATE",
  "owner": "morpheus",
  "locked": false,
  "member_count": {
    "God": 1
  },
  "total_members": 1
}