Middle-earth API

Form a fellowship

POST/fellowships

Forms a new fellowship from existing members and gives it a first quest.

Request

Header parameters

  • Idempotency-Key string

    Any unique string. Retrying with the same key returns the original fellowship instead of forming a second one.

Bodyapplication/json

  • name string Required

    Name of the fellowship.

  • member_ids array of strings Required

    Members to include.

    Every member must be active and not already part of another fellowship, or the request fails with 409.

  • quest object <Quest> Required

Example request

cURL
curl -X POST 'https://api.middle-earth.example/v3/fellowships' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "The Fellowship of the Ring",
  "member_ids": [
    "mem_frodo",
    "mem_samwise",
    "mem_gandalf",
    "mem_aragorn"
  ],
  "quest": {
    "title": "Destroy the One Ring",
    "destination": "Mount Doom",
    "deadline_days": 180
  }
}'

Response

Fellowship formed.

Body

  • id string Required

    Unique identifier.

  • name string Required

    Display name.

  • members array of objects <Member> Required

  • quest object <Quest> Required

  • status string

    Current state of the fellowship.

    Allowed valuesformingtravellingsplitdisbandedvictorious

Example response

application/json

Json
{
  "id": "string",
  "name": "string",
  "members": [
    {
      "id": "string",
      "name": "string",
      "race": "hobbit",
      "status": "active",
      "skills": [
        "string"
      ],
      "home": {
        "name": "string",
        "settlement": "string",
        "parent": null
      },
      "traits": {
        "kind": "hobbit",
        "second_breakfasts": 0,
        "pipe_weed_brand": "string"
      },
      "created_at": "2024-01-01T00:00:00Z"
    }
  ],
  "quest": {
    "title": "string",
    "destination": "string",
    "deadline_days": 365
  },
  "status": "forming"
}