{
  "opencollection": "1.0.0",
  "info": {
    "name": "Forithmus Challenge Platform 2fa collections API",
    "version": "1.0.0"
  },
  "items": [
    {
      "info": {
        "name": "collections",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List Collections",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/collections",
            "params": [
              {
                "name": "status",
                "value": "",
                "type": "query"
              }
            ]
          },
          "docs": "List public collections."
        },
        {
          "info": {
            "name": "Create Collection",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/collections",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Create Collection"
        },
        {
          "info": {
            "name": "List My Collections",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/collections/mine"
          },
          "docs": "List collections where the user is a member (at collection level)."
        },
        {
          "info": {
            "name": "Get Collection",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/collections/:slug",
            "params": [
              {
                "name": "slug",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Get Collection"
        },
        {
          "info": {
            "name": "Update Collection",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "{{baseUrl}}/collections/:slug",
            "params": [
              {
                "name": "slug",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Update Collection"
        },
        {
          "info": {
            "name": "Delete Collection",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "{{baseUrl}}/collections/:slug",
            "params": [
              {
                "name": "slug",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Delete a collection. Challenges inside are detached (become standalone), not deleted."
        },
        {
          "info": {
            "name": "Get Collection Stats",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/collections/:slug/stats",
            "params": [
              {
                "name": "slug",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Public stats for a collection: aggregated across all child challenges."
        },
        {
          "info": {
            "name": "List Collection Challenges",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/collections/:slug/challenges",
            "params": [
              {
                "name": "slug",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "List Collection Challenges"
        },
        {
          "info": {
            "name": "Add Challenge To Collection",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/collections/:slug/challenges/:challenge_slug",
            "params": [
              {
                "name": "slug",
                "value": "",
                "type": "path"
              },
              {
                "name": "challenge_slug",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Add an existing challenge to a collection. Requires admin on the collection."
        },
        {
          "info": {
            "name": "Join Collection",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/collections/:slug/members/join",
            "params": [
              {
                "name": "slug",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Join a collection. Public = auto-accept, Private = pending approval."
        },
        {
          "info": {
            "name": "Leave Collection",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/collections/:slug/members/leave",
            "params": [
              {
                "name": "slug",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Leave a collection. Removes the user's collection-level membership\nand all child challenge memberships. Admins/hosts cannot leave."
        },
        {
          "info": {
            "name": "List Collection Members",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/collections/:slug/members",
            "params": [
              {
                "name": "slug",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "List all members across the collection and its child challenges.\n\nAggregates members from:\n1. Direct collection memberships (collection_id set)\n2. Child challenge memberships (challenge_id in collection's challenges)\n\nEach user appears once with their highest role and a list of which tasks they joined."
        },
        {
          "info": {
            "name": "Invite Collection Member",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/collections/:slug/members/invite",
            "params": [
              {
                "name": "slug",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Invite a user to the collection by email. Admin/host only."
        },
        {
          "info": {
            "name": "Accept Collection Invite",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/collections/:slug/members/accept-invite",
            "params": [
              {
                "name": "slug",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Accept a collection invitation. Activates membership and joins child challenges."
        },
        {
          "info": {
            "name": "Decline Collection Invite",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/collections/:slug/members/decline-invite",
            "params": [
              {
                "name": "slug",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Decline a collection invitation. Removes the membership."
        },
        {
          "info": {
            "name": "Update Collection Member",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "{{baseUrl}}/collections/:slug/members/:member_user_id",
            "params": [
              {
                "name": "slug",
                "value": "",
                "type": "path"
              },
              {
                "name": "member_user_id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Update a collection member's role or status. Admin/host only."
        },
        {
          "info": {
            "name": "Remove Collection Member",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "{{baseUrl}}/collections/:slug/members/:member_user_id",
            "params": [
              {
                "name": "slug",
                "value": "",
                "type": "path"
              },
              {
                "name": "member_user_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Remove a member from the collection. Admin/host only."
        },
        {
          "info": {
            "name": "List Collection Pages",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/collections/:slug/pages",
            "params": [
              {
                "name": "slug",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "List Collection Pages"
        },
        {
          "info": {
            "name": "Create Collection Page",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/collections/:slug/pages",
            "params": [
              {
                "name": "slug",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Create Collection Page"
        },
        {
          "info": {
            "name": "Update Collection Page",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "{{baseUrl}}/collections/:slug/pages/:page_slug",
            "params": [
              {
                "name": "slug",
                "value": "",
                "type": "path"
              },
              {
                "name": "page_slug",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Update Collection Page"
        },
        {
          "info": {
            "name": "Delete Collection Page",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "{{baseUrl}}/collections/:slug/pages/:page_slug",
            "params": [
              {
                "name": "slug",
                "value": "",
                "type": "path"
              },
              {
                "name": "page_slug",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Delete Collection Page"
        }
      ]
    }
  ],
  "bundled": true
}