Skip to content
campaiDeveloper
campai.com

Booking · Tournaments

POST/{organizationId}/{mandateId}/booking/tournaments

Create tournament

Creates a tournament in a mandate with its name, days, place, categories and number of fields. It starts as a draft without teams, format and schedule, and nobody but the staff sees it until it is published.

Permissions

Send an API key of the organization in the path, using the X-API-Key header.

Permission checks in detail
Required permissions
  • mandate.read
  • tournament.insert

Request

Path parameters

  • organizationIdidrequired
  • mandateIdidrequired

Body

Content-Type: application/json

  • namestringrequired

    1–60 characters

  • descriptionstring

    at most 140 characters · default ""

  • daysobject[]required

    1–14 items

    2 properties
    • datestringrequired
    • startobjectrequired
      2 properties
      • hoursintegerrequired

        0–23

      • minutesintegerrequired

        0–59

  • timezonestringrequired

    at least 1 characters

  • placeobjectnullable
    5 properties
    • typestringrequired
      resource address online
    • resourceobject
      6 properties
      • siteidrequired
      • siteNamestringrequired

        at least 1 characters

      • siteAddressobjectrequired
        7 properties
        • countrystringrequired
        • statestring
        • zipstringrequired

          at most 10 characters

        • citystringrequired

          at most 45 characters

        • addressLinestringrequired

          at most 45 characters

        • details1string

          at most 45 characters

        • details2string

          at most 45 characters

      • resourceidrequired
      • resourceNamestringrequired
      • quantityinteger

        default 1

    • addressobject
      7 properties
      • countrystringrequired
      • statestring
      • zipstringrequired

        at most 10 characters

      • citystringrequired

        at most 45 characters

      • addressLinestringrequired

        at most 45 characters

      • details1string

        at most 45 characters

      • details2string

        at most 45 characters

    • locationobjectnullable
      2 properties
      • latitudenumberrequired

        -90–90

      • longitudenumberrequired

        -180–180

    • onlineobject
      2 properties
      • urlstring · urirequired

        at most 300 characters

      • instructionsstringrequired

        at most 400 characters

  • participantTypestring

    default "team"

    team person
  • divisionsobject[]required

    1–24 items

    3 properties
    • namestringrequired

      1–40 characters

    • shortNamestringrequired

      1–8 characters

    • colorstringrequired
  • fieldCountinteger

    1–32 · default 1

  • colorstring

    default ""

  • tagsstring[]

    at most 10 items · each 1–40 characters

  • imageobjectnullable
    2 properties
    • fileNamestring

      at most 128 characters

    • resourcestringrequired
Request
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
  --request POST 'https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/YOUR_MANDATE_ID/booking/tournaments' \
  --header 'X-API-Key: YOUR_API_KEY'

No request that worked has been recorded yet, so the body is not shown.

Response

200 Successful response

Content-Type: application/json

  • _idid
Response200
{
  "_id": "000000000000000000000001"
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.