{
  "openapi": "3.1.0",
  "info": {
    "title": "NameContests API",
    "version": "1.0.0",
    "summary": "Naming contests: browse and read them, suggest and like names, and hold your own.",
    "description": "The REST API of NameContests, a site for holding naming contests. Every operation is also a tool of the MCP server at https://www.namecontests.com/mcp, under the same name.\n\nPublic contests can be read without a key. Everything else acts as a member: send a personal API key (created at https://www.namecontests.com/home/api) or an OAuth access token as `Authorization: Bearer <token>`.\n\nAnswers are JSON: `{ \"ok\": true, \"data\": ... }`, or `{ \"ok\": false, \"error\": { \"code\", \"message\" } }` with a matching HTTP status.",
    "contact": {
      "name": "NameContests",
      "url": "https://www.namecontests.com/contact-us",
      "email": "support@namecontests.com"
    },
    "termsOfService": "https://www.namecontests.com/terms"
  },
  "externalDocs": {
    "description": "Guide for developers and AI agents",
    "url": "https://www.namecontests.com/developers"
  },
  "servers": [
    {
      "url": "https://www.namecontests.com/api/v1"
    }
  ],
  "tags": [
    {
      "name": "contests.read",
      "description": "Read contests, names and comments that you can see"
    },
    {
      "name": "entries.write",
      "description": "Suggest names, like names and post comments as you"
    },
    {
      "name": "contests.write",
      "description": "Create contests and manage the ones you host"
    },
    {
      "name": "account.read",
      "description": "Read your profile and the list of your contests"
    }
  ],
  "paths": {
    "/contests": {
      "get": {
        "operationId": "list_contests",
        "summary": "List public contests",
        "description": "Lists public naming contests on NameContests: open ones that take name ideas now (ending soonest first) or finished ones with their winners. Use it to find a contest to take part in or to see what people are naming. Returns each contest's id, address, title, summary, stage, end date, number of na...",
        "tags": [
          "contests.read"
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "open: contests taking names or in their final poll, ending soonest first. finished: ended ones, most recent first.",
            "schema": {
              "default": "open",
              "type": "string",
              "enum": [
                "open",
                "finished"
              ]
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "description": "Words to look for in the title, summary and topic.",
            "schema": {
              "type": "string",
              "maxLength": 80
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number, from 1.",
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "contests": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Contest id; pass it as `contest` to the other tools."
                              },
                              "url": {
                                "type": "string",
                                "description": "Contest page. Show this link to people."
                              },
                              "title": {
                                "type": "string"
                              },
                              "summary": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "topic": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "host_name": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "unpublished",
                                  "active",
                                  "voting",
                                  "expired",
                                  "closed"
                                ],
                                "description": "unpublished: a draft only its host sees. active: takes names. voting: the final poll among finalists. expired: past its end date, waiting for the host to pick a winner. closed: finished."
                              },
                              "end_date": {
                                "type": "string",
                                "description": "ISO 8601 time in UTC."
                              },
                              "entry_count": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "prize": {
                                "description": "The prize as shown on the site: its value with currency, else its title.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "has_winner": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "id",
                              "url",
                              "title",
                              "summary",
                              "topic",
                              "host_name",
                              "status",
                              "end_date",
                              "entry_count",
                              "prize",
                              "has_winner"
                            ]
                          }
                        },
                        "total": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "page": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "page_size": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "has_more": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "contests",
                        "total",
                        "page",
                        "page_size",
                        "has_more"
                      ]
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "The call was refused or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {},
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "contests.read"
            ]
          }
        ],
        "x-required-scope": "contests.read",
        "x-openai-isConsequential": false
      },
      "post": {
        "operationId": "create_contest",
        "summary": "Create a contest draft",
        "description": "Creates a naming contest for the connected member as a draft that only they can see. Give a title that says what needs a name, a one or two sentence summary, and a brief in `description` (what it is, who it is for, the tone and any must-haves). Nothing is public until set_contest_stage publishes ...",
        "tags": [
          "contests.write"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "description": "What needs a name, for example \"Name our new coffee shop\"."
                  },
                  "summary": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 400,
                    "description": "One or two sentences shown in lists and search results."
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 50000,
                    "description": "The brief in Markdown: what is being named, for whom, and what a good name looks like."
                  },
                  "end_date": {
                    "description": "When the contest stops taking names: an ISO 8601 time with an offset, for example \"2027-01-15T18:00:00Z\", or a date such as \"2027-01-15\" for the end of that day (UTC). At most 60 days ahead. Default: 10 days from now.",
                    "type": "string"
                  },
                  "hosted_by": {
                    "type": "string",
                    "maxLength": 50,
                    "description": "The business or organisation holding the contest, when it is not the member."
                  },
                  "host_website": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "The host's website."
                  },
                  "about_host": {
                    "type": "string",
                    "maxLength": 400,
                    "description": "A few words about the host."
                  },
                  "prize_title": {
                    "type": "string",
                    "maxLength": 50,
                    "description": "The prize in a few words, for example \"Gift card\"."
                  },
                  "prize_value": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 999999999,
                    "description": "What the prize is worth; 0 for no stated value."
                  },
                  "prize_currency": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 3,
                    "description": "ISO 4217 currency code of the prize value, for example \"USD\"."
                  },
                  "prize_description": {
                    "type": "string",
                    "maxLength": 50000,
                    "description": "More about the prize and how the winner gets it."
                  },
                  "video_url": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Address of a YouTube video shown on the contest page."
                  },
                  "is_public": {
                    "default": true,
                    "type": "boolean",
                    "description": "Listed on the site and open to search engines. False keeps it to people who have the link."
                  },
                  "entries_need_approval": {
                    "default": false,
                    "type": "boolean",
                    "description": "Names appear only after the host approves them."
                  },
                  "comments_need_approval": {
                    "default": false,
                    "type": "boolean",
                    "description": "Comments on names appear only after the host approves them."
                  }
                },
                "required": [
                  "title",
                  "summary"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "contest": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Contest id; pass it as `contest` to the other tools."
                            },
                            "url": {
                              "type": "string",
                              "description": "Contest page. Show this link to people."
                            },
                            "title": {
                              "type": "string"
                            },
                            "summary": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "topic": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "host_name": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "unpublished",
                                "active",
                                "voting",
                                "expired",
                                "closed"
                              ],
                              "description": "unpublished: a draft only its host sees. active: takes names. voting: the final poll among finalists. expired: past its end date, waiting for the host to pick a winner. closed: finished."
                            },
                            "end_date": {
                              "type": "string",
                              "description": "ISO 8601 time in UTC."
                            },
                            "entry_count": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "prize": {
                              "description": "The prize as shown on the site: its value with currency, else its title.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "has_winner": {
                              "type": "boolean"
                            },
                            "description": {
                              "description": "The brief: what is being named and what the host wants. Markdown.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "terms": {
                              "description": "The contest's own rules, when the host wrote any.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "is_public": {
                              "type": "boolean",
                              "description": "Listed on the site and open to search engines."
                            },
                            "is_paused": {
                              "type": "boolean",
                              "description": "Paused by the host: no names, likes or comments for now."
                            },
                            "entries_need_approval": {
                              "type": "boolean"
                            },
                            "comments_need_approval": {
                              "type": "boolean"
                            },
                            "published_at": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "description": "ISO 8601 time in UTC."
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "voting_started_at": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "description": "ISO 8601 time in UTC."
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "closed_at": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "description": "ISO 8601 time in UTC."
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "prize_details": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "title": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "amount": {
                                      "description": "Value with currency, for example \"$500\".",
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "description": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "title",
                                    "amount",
                                    "description"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "host": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "url": {
                                  "type": "string"
                                },
                                "is_verified": {
                                  "type": "boolean",
                                  "description": "The site has checked that this member is a real person or business."
                                },
                                "organisation": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "website": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "about": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "url",
                                "is_verified",
                                "organisation",
                                "website",
                                "about"
                              ]
                            },
                            "counts": {
                              "type": "object",
                              "properties": {
                                "entries": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "comments": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991,
                                  "description": "Messages in the contest chat."
                                },
                                "participants": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "likes": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "finalists": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "entries",
                                "comments",
                                "participants",
                                "likes",
                                "finalists"
                              ]
                            },
                            "winner": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "url": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "author_name": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "url",
                                    "name",
                                    "author_name"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "your_rights": {
                              "type": "object",
                              "properties": {
                                "can_submit_entries": {
                                  "type": "boolean"
                                },
                                "can_like": {
                                  "type": "boolean"
                                },
                                "can_comment": {
                                  "type": "boolean"
                                },
                                "can_manage": {
                                  "type": "boolean",
                                  "description": "You host this contest and this connection may manage it."
                                }
                              },
                              "required": [
                                "can_submit_entries",
                                "can_like",
                                "can_comment",
                                "can_manage"
                              ],
                              "description": "What this connection may do in the contest right now."
                            },
                            "latest_updates": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  "text": {
                                    "type": "string"
                                  },
                                  "author": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "description": "Member id."
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "url": {
                                        "type": "string",
                                        "description": "Profile page."
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "name",
                                      "url"
                                    ]
                                  },
                                  "created_at": {
                                    "type": "string",
                                    "description": "ISO 8601 time in UTC."
                                  },
                                  "is_approved": {
                                    "type": "boolean",
                                    "description": "False while it waits for the contest holder."
                                  }
                                },
                                "required": [
                                  "id",
                                  "text",
                                  "author",
                                  "created_at",
                                  "is_approved"
                                ]
                              },
                              "description": "The host's latest announcements, newest first."
                            }
                          },
                          "required": [
                            "id",
                            "url",
                            "title",
                            "summary",
                            "topic",
                            "host_name",
                            "status",
                            "end_date",
                            "entry_count",
                            "prize",
                            "has_winner",
                            "description",
                            "terms",
                            "is_public",
                            "is_paused",
                            "entries_need_approval",
                            "comments_need_approval",
                            "published_at",
                            "voting_started_at",
                            "closed_at",
                            "prize_details",
                            "host",
                            "counts",
                            "winner",
                            "your_rights",
                            "latest_updates"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "What happened and what to do next."
                        }
                      },
                      "required": [
                        "contest",
                        "message"
                      ]
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "The call was refused or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "contests.write"
            ]
          }
        ],
        "x-required-scope": "contests.write",
        "x-openai-isConsequential": true
      }
    },
    "/contests/{contest}": {
      "get": {
        "operationId": "get_contest",
        "summary": "Get a contest",
        "description": "Returns one contest in full: the brief (what is being named and what the host wants), stage, end date, prize, host, counts, the winner when there is one, the host's latest updates, and what this connection may do in it. Read the brief before suggesting names.",
        "tags": [
          "contests.read"
        ],
        "parameters": [
          {
            "name": "contest",
            "in": "path",
            "required": true,
            "description": "Contest id, for example c1a2b3c4.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "contest": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Contest id; pass it as `contest` to the other tools."
                            },
                            "url": {
                              "type": "string",
                              "description": "Contest page. Show this link to people."
                            },
                            "title": {
                              "type": "string"
                            },
                            "summary": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "topic": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "host_name": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "unpublished",
                                "active",
                                "voting",
                                "expired",
                                "closed"
                              ],
                              "description": "unpublished: a draft only its host sees. active: takes names. voting: the final poll among finalists. expired: past its end date, waiting for the host to pick a winner. closed: finished."
                            },
                            "end_date": {
                              "type": "string",
                              "description": "ISO 8601 time in UTC."
                            },
                            "entry_count": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "prize": {
                              "description": "The prize as shown on the site: its value with currency, else its title.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "has_winner": {
                              "type": "boolean"
                            },
                            "description": {
                              "description": "The brief: what is being named and what the host wants. Markdown.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "terms": {
                              "description": "The contest's own rules, when the host wrote any.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "is_public": {
                              "type": "boolean",
                              "description": "Listed on the site and open to search engines."
                            },
                            "is_paused": {
                              "type": "boolean",
                              "description": "Paused by the host: no names, likes or comments for now."
                            },
                            "entries_need_approval": {
                              "type": "boolean"
                            },
                            "comments_need_approval": {
                              "type": "boolean"
                            },
                            "published_at": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "description": "ISO 8601 time in UTC."
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "voting_started_at": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "description": "ISO 8601 time in UTC."
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "closed_at": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "description": "ISO 8601 time in UTC."
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "prize_details": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "title": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "amount": {
                                      "description": "Value with currency, for example \"$500\".",
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "description": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "title",
                                    "amount",
                                    "description"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "host": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "url": {
                                  "type": "string"
                                },
                                "is_verified": {
                                  "type": "boolean",
                                  "description": "The site has checked that this member is a real person or business."
                                },
                                "organisation": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "website": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "about": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "url",
                                "is_verified",
                                "organisation",
                                "website",
                                "about"
                              ]
                            },
                            "counts": {
                              "type": "object",
                              "properties": {
                                "entries": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "comments": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991,
                                  "description": "Messages in the contest chat."
                                },
                                "participants": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "likes": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "finalists": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "entries",
                                "comments",
                                "participants",
                                "likes",
                                "finalists"
                              ]
                            },
                            "winner": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "url": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "author_name": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "url",
                                    "name",
                                    "author_name"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "your_rights": {
                              "type": "object",
                              "properties": {
                                "can_submit_entries": {
                                  "type": "boolean"
                                },
                                "can_like": {
                                  "type": "boolean"
                                },
                                "can_comment": {
                                  "type": "boolean"
                                },
                                "can_manage": {
                                  "type": "boolean",
                                  "description": "You host this contest and this connection may manage it."
                                }
                              },
                              "required": [
                                "can_submit_entries",
                                "can_like",
                                "can_comment",
                                "can_manage"
                              ],
                              "description": "What this connection may do in the contest right now."
                            },
                            "latest_updates": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  "text": {
                                    "type": "string"
                                  },
                                  "author": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "description": "Member id."
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "url": {
                                        "type": "string",
                                        "description": "Profile page."
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "name",
                                      "url"
                                    ]
                                  },
                                  "created_at": {
                                    "type": "string",
                                    "description": "ISO 8601 time in UTC."
                                  },
                                  "is_approved": {
                                    "type": "boolean",
                                    "description": "False while it waits for the contest holder."
                                  }
                                },
                                "required": [
                                  "id",
                                  "text",
                                  "author",
                                  "created_at",
                                  "is_approved"
                                ]
                              },
                              "description": "The host's latest announcements, newest first."
                            }
                          },
                          "required": [
                            "id",
                            "url",
                            "title",
                            "summary",
                            "topic",
                            "host_name",
                            "status",
                            "end_date",
                            "entry_count",
                            "prize",
                            "has_winner",
                            "description",
                            "terms",
                            "is_public",
                            "is_paused",
                            "entries_need_approval",
                            "comments_need_approval",
                            "published_at",
                            "voting_started_at",
                            "closed_at",
                            "prize_details",
                            "host",
                            "counts",
                            "winner",
                            "your_rights",
                            "latest_updates"
                          ]
                        }
                      },
                      "required": [
                        "contest"
                      ]
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "The call was refused or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {},
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "contests.read"
            ]
          }
        ],
        "x-required-scope": "contests.read",
        "x-openai-isConsequential": false
      },
      "patch": {
        "operationId": "update_contest",
        "summary": "Change a contest",
        "description": "Changes fields of a contest the connected member hosts; fields that are not sent keep their values. Use it to refine the brief, change the end date or the prize, or switch approval of names on or off.",
        "tags": [
          "contests.write"
        ],
        "parameters": [
          {
            "name": "contest",
            "in": "path",
            "required": true,
            "description": "Contest id, for example c1a2b3c4.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "summary": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 400
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 50000,
                    "description": "The brief in Markdown: what is being named, for whom, and what a good name looks like."
                  },
                  "end_date": {
                    "type": "string",
                    "description": "When the contest stops taking names: an ISO 8601 time with an offset, for example \"2027-01-15T18:00:00Z\", or a date such as \"2027-01-15\" for the end of that day (UTC). At most 60 days ahead."
                  },
                  "hosted_by": {
                    "type": "string",
                    "maxLength": 50,
                    "description": "The business or organisation holding the contest, when it is not the member."
                  },
                  "host_website": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "The host's website."
                  },
                  "about_host": {
                    "type": "string",
                    "maxLength": 400,
                    "description": "A few words about the host."
                  },
                  "prize_title": {
                    "type": "string",
                    "maxLength": 50,
                    "description": "The prize in a few words, for example \"Gift card\"."
                  },
                  "prize_value": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 999999999,
                    "description": "What the prize is worth; 0 for no stated value."
                  },
                  "prize_currency": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 3,
                    "description": "ISO 4217 currency code of the prize value, for example \"USD\"."
                  },
                  "prize_description": {
                    "type": "string",
                    "maxLength": 50000,
                    "description": "More about the prize and how the winner gets it."
                  },
                  "video_url": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Address of a YouTube video shown on the contest page."
                  },
                  "is_public": {
                    "type": "boolean",
                    "description": "Listed on the site and open to search engines. False keeps it to people who have the link."
                  },
                  "entries_need_approval": {
                    "type": "boolean",
                    "description": "Names appear only after the host approves them."
                  },
                  "comments_need_approval": {
                    "type": "boolean",
                    "description": "Comments on names appear only after the host approves them."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "contest": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Contest id; pass it as `contest` to the other tools."
                            },
                            "url": {
                              "type": "string",
                              "description": "Contest page. Show this link to people."
                            },
                            "title": {
                              "type": "string"
                            },
                            "summary": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "topic": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "host_name": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "unpublished",
                                "active",
                                "voting",
                                "expired",
                                "closed"
                              ],
                              "description": "unpublished: a draft only its host sees. active: takes names. voting: the final poll among finalists. expired: past its end date, waiting for the host to pick a winner. closed: finished."
                            },
                            "end_date": {
                              "type": "string",
                              "description": "ISO 8601 time in UTC."
                            },
                            "entry_count": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "prize": {
                              "description": "The prize as shown on the site: its value with currency, else its title.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "has_winner": {
                              "type": "boolean"
                            },
                            "description": {
                              "description": "The brief: what is being named and what the host wants. Markdown.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "terms": {
                              "description": "The contest's own rules, when the host wrote any.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "is_public": {
                              "type": "boolean",
                              "description": "Listed on the site and open to search engines."
                            },
                            "is_paused": {
                              "type": "boolean",
                              "description": "Paused by the host: no names, likes or comments for now."
                            },
                            "entries_need_approval": {
                              "type": "boolean"
                            },
                            "comments_need_approval": {
                              "type": "boolean"
                            },
                            "published_at": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "description": "ISO 8601 time in UTC."
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "voting_started_at": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "description": "ISO 8601 time in UTC."
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "closed_at": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "description": "ISO 8601 time in UTC."
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "prize_details": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "title": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "amount": {
                                      "description": "Value with currency, for example \"$500\".",
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "description": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "title",
                                    "amount",
                                    "description"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "host": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "url": {
                                  "type": "string"
                                },
                                "is_verified": {
                                  "type": "boolean",
                                  "description": "The site has checked that this member is a real person or business."
                                },
                                "organisation": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "website": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "about": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "url",
                                "is_verified",
                                "organisation",
                                "website",
                                "about"
                              ]
                            },
                            "counts": {
                              "type": "object",
                              "properties": {
                                "entries": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "comments": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991,
                                  "description": "Messages in the contest chat."
                                },
                                "participants": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "likes": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "finalists": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "entries",
                                "comments",
                                "participants",
                                "likes",
                                "finalists"
                              ]
                            },
                            "winner": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "url": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "author_name": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "url",
                                    "name",
                                    "author_name"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "your_rights": {
                              "type": "object",
                              "properties": {
                                "can_submit_entries": {
                                  "type": "boolean"
                                },
                                "can_like": {
                                  "type": "boolean"
                                },
                                "can_comment": {
                                  "type": "boolean"
                                },
                                "can_manage": {
                                  "type": "boolean",
                                  "description": "You host this contest and this connection may manage it."
                                }
                              },
                              "required": [
                                "can_submit_entries",
                                "can_like",
                                "can_comment",
                                "can_manage"
                              ],
                              "description": "What this connection may do in the contest right now."
                            },
                            "latest_updates": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  "text": {
                                    "type": "string"
                                  },
                                  "author": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "description": "Member id."
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "url": {
                                        "type": "string",
                                        "description": "Profile page."
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "name",
                                      "url"
                                    ]
                                  },
                                  "created_at": {
                                    "type": "string",
                                    "description": "ISO 8601 time in UTC."
                                  },
                                  "is_approved": {
                                    "type": "boolean",
                                    "description": "False while it waits for the contest holder."
                                  }
                                },
                                "required": [
                                  "id",
                                  "text",
                                  "author",
                                  "created_at",
                                  "is_approved"
                                ]
                              },
                              "description": "The host's latest announcements, newest first."
                            }
                          },
                          "required": [
                            "id",
                            "url",
                            "title",
                            "summary",
                            "topic",
                            "host_name",
                            "status",
                            "end_date",
                            "entry_count",
                            "prize",
                            "has_winner",
                            "description",
                            "terms",
                            "is_public",
                            "is_paused",
                            "entries_need_approval",
                            "comments_need_approval",
                            "published_at",
                            "voting_started_at",
                            "closed_at",
                            "prize_details",
                            "host",
                            "counts",
                            "winner",
                            "your_rights",
                            "latest_updates"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "What happened and what to do next."
                        }
                      },
                      "required": [
                        "contest",
                        "message"
                      ]
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "The call was refused or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "contests.write"
            ]
          }
        ],
        "x-required-scope": "contests.write",
        "x-openai-isConsequential": true
      }
    },
    "/contests/{contest}/entries": {
      "get": {
        "operationId": "list_entries",
        "summary": "List the names in a contest",
        "description": "Lists the names suggested in a contest with their authors, likes and comment counts, most liked first by default. Use it before suggesting a name (each name can be suggested once), to see finalists and the winner, or to find your own names with filter \"mine\".",
        "tags": [
          "contests.read"
        ],
        "parameters": [
          {
            "name": "contest",
            "in": "path",
            "required": true,
            "description": "Contest id, for example c1a2b3c4.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "popular: most liked first. new: newest first. az: by name.",
            "schema": {
              "default": "popular",
              "type": "string",
              "enum": [
                "popular",
                "new",
                "az"
              ]
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "mine: names you suggested. pending: names waiting for approval (the contest holder only).",
            "schema": {
              "default": "all",
              "type": "string",
              "enum": [
                "all",
                "finalists",
                "mine",
                "pending"
              ]
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "description": "Text the name must contain.",
            "schema": {
              "type": "string",
              "maxLength": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number, from 1.",
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "contest": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "url": {
                              "type": "string"
                            },
                            "title": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "unpublished",
                                "active",
                                "voting",
                                "expired",
                                "closed"
                              ],
                              "description": "unpublished: a draft only its host sees. active: takes names. voting: the final poll among finalists. expired: past its end date, waiting for the host to pick a winner. closed: finished."
                            }
                          },
                          "required": [
                            "id",
                            "url",
                            "title",
                            "status"
                          ]
                        },
                        "entries": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Entry id; pass it as `entry` to the other tools."
                              },
                              "url": {
                                "type": "string",
                                "description": "Entry page."
                              },
                              "name": {
                                "type": "string",
                                "description": "The suggested name."
                              },
                              "comment": {
                                "description": "The author's note about the name.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "author": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "description": "Member id."
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "url": {
                                    "type": "string",
                                    "description": "Profile page."
                                  }
                                },
                                "required": [
                                  "id",
                                  "name",
                                  "url"
                                ]
                              },
                              "likes": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991,
                                "description": "Likes; in the voting round these are the votes."
                              },
                              "comments": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "is_finalist": {
                                "type": "boolean"
                              },
                              "is_winner": {
                                "type": "boolean"
                              },
                              "is_approved": {
                                "type": "boolean",
                                "description": "False while it waits for the contest holder."
                              },
                              "created_at": {
                                "type": "string",
                                "description": "ISO 8601 time in UTC."
                              },
                              "liked_by_you": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "id",
                              "url",
                              "name",
                              "comment",
                              "author",
                              "likes",
                              "comments",
                              "is_finalist",
                              "is_winner",
                              "is_approved",
                              "created_at",
                              "liked_by_you"
                            ]
                          }
                        },
                        "total": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "page": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "page_size": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "has_more": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "contest",
                        "entries",
                        "total",
                        "page",
                        "page_size",
                        "has_more"
                      ]
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "The call was refused or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {},
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "contests.read"
            ]
          }
        ],
        "x-required-scope": "contests.read",
        "x-openai-isConsequential": false
      },
      "post": {
        "operationId": "submit_entry",
        "summary": "Suggest a name",
        "description": "Suggests a name in a contest as the connected member, with an optional short note on why it fits. The name appears publicly under the member's name (after the host approves it, when the contest asks for that). Only works while the contest takes names. Suggest names the member chose or agreed to; ...",
        "tags": [
          "entries.write"
        ],
        "parameters": [
          {
            "name": "contest",
            "in": "path",
            "required": true,
            "description": "Contest id, for example c1a2b3c4.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50,
                    "description": "The name to suggest, up to 50 characters. Each name can be suggested once per contest."
                  },
                  "comment": {
                    "description": "Why this name fits, up to 140 characters.",
                    "type": "string",
                    "maxLength": 140
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "entry": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Entry id; pass it as `entry` to the other tools."
                            },
                            "url": {
                              "type": "string",
                              "description": "Entry page."
                            },
                            "name": {
                              "type": "string",
                              "description": "The suggested name."
                            },
                            "comment": {
                              "description": "The author's note about the name.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "author": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Member id."
                                },
                                "name": {
                                  "type": "string"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "Profile page."
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "url"
                              ]
                            },
                            "likes": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991,
                              "description": "Likes; in the voting round these are the votes."
                            },
                            "comments": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "is_finalist": {
                              "type": "boolean"
                            },
                            "is_winner": {
                              "type": "boolean"
                            },
                            "is_approved": {
                              "type": "boolean",
                              "description": "False while it waits for the contest holder."
                            },
                            "created_at": {
                              "type": "string",
                              "description": "ISO 8601 time in UTC."
                            },
                            "liked_by_you": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "id",
                            "url",
                            "name",
                            "comment",
                            "author",
                            "likes",
                            "comments",
                            "is_finalist",
                            "is_winner",
                            "is_approved",
                            "created_at",
                            "liked_by_you"
                          ]
                        },
                        "approved": {
                          "type": "boolean",
                          "description": "False when the contest holder approves names first; the name appears after that."
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "entry",
                        "approved",
                        "message"
                      ]
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "The call was refused or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "entries.write"
            ]
          }
        ],
        "x-required-scope": "entries.write",
        "x-openai-isConsequential": true
      }
    },
    "/contests/{contest}/entries/{entry}": {
      "get": {
        "operationId": "get_entry",
        "summary": "Get a name and its comments",
        "description": "Returns one suggested name with its author, likes, and the comments people wrote about it.",
        "tags": [
          "contests.read"
        ],
        "parameters": [
          {
            "name": "contest",
            "in": "path",
            "required": true,
            "description": "Contest id, for example c1a2b3c4.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entry",
            "in": "path",
            "required": true,
            "description": "Entry id, for example k3j2h1g0f9.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "contest": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "url": {
                              "type": "string"
                            },
                            "title": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "unpublished",
                                "active",
                                "voting",
                                "expired",
                                "closed"
                              ],
                              "description": "unpublished: a draft only its host sees. active: takes names. voting: the final poll among finalists. expired: past its end date, waiting for the host to pick a winner. closed: finished."
                            }
                          },
                          "required": [
                            "id",
                            "url",
                            "title",
                            "status"
                          ]
                        },
                        "entry": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Entry id; pass it as `entry` to the other tools."
                            },
                            "url": {
                              "type": "string",
                              "description": "Entry page."
                            },
                            "name": {
                              "type": "string",
                              "description": "The suggested name."
                            },
                            "comment": {
                              "description": "The author's note about the name.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "author": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Member id."
                                },
                                "name": {
                                  "type": "string"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "Profile page."
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "url"
                              ]
                            },
                            "likes": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991,
                              "description": "Likes; in the voting round these are the votes."
                            },
                            "comments": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "is_finalist": {
                              "type": "boolean"
                            },
                            "is_winner": {
                              "type": "boolean"
                            },
                            "is_approved": {
                              "type": "boolean",
                              "description": "False while it waits for the contest holder."
                            },
                            "created_at": {
                              "type": "string",
                              "description": "ISO 8601 time in UTC."
                            },
                            "liked_by_you": {
                              "type": "boolean"
                            },
                            "views": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991,
                              "description": "Members who opened the entry page."
                            }
                          },
                          "required": [
                            "id",
                            "url",
                            "name",
                            "comment",
                            "author",
                            "likes",
                            "comments",
                            "is_finalist",
                            "is_winner",
                            "is_approved",
                            "created_at",
                            "liked_by_you",
                            "views"
                          ]
                        },
                        "comments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "text": {
                                "type": "string"
                              },
                              "author": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "description": "Member id."
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "url": {
                                    "type": "string",
                                    "description": "Profile page."
                                  }
                                },
                                "required": [
                                  "id",
                                  "name",
                                  "url"
                                ]
                              },
                              "created_at": {
                                "type": "string",
                                "description": "ISO 8601 time in UTC."
                              },
                              "is_approved": {
                                "type": "boolean",
                                "description": "False while it waits for the contest holder."
                              }
                            },
                            "required": [
                              "id",
                              "text",
                              "author",
                              "created_at",
                              "is_approved"
                            ]
                          },
                          "description": "Oldest first."
                        }
                      },
                      "required": [
                        "contest",
                        "entry",
                        "comments"
                      ]
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "The call was refused or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {},
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "contests.read"
            ]
          }
        ],
        "x-required-scope": "contests.read",
        "x-openai-isConsequential": false
      },
      "delete": {
        "operationId": "delete_entry",
        "summary": "Delete a name",
        "description": "Deletes a suggested name for good, with its likes and comments. Allowed for the member who suggested it and for the contest holder, unless the name is a finalist or the winner. Ask the member before deleting.",
        "tags": [
          "entries.write"
        ],
        "parameters": [
          {
            "name": "contest",
            "in": "path",
            "required": true,
            "description": "Contest id, for example c1a2b3c4.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entry",
            "in": "path",
            "required": true,
            "description": "Entry id, for example k3j2h1g0f9.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "deleted": {
                          "type": "boolean"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "deleted",
                        "name"
                      ]
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "The call was refused or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "entries.write"
            ]
          }
        ],
        "x-required-scope": "entries.write",
        "x-openai-isConsequential": true
      },
      "patch": {
        "operationId": "moderate_entry",
        "summary": "Approve a name or make it a finalist",
        "description": "For the contest holder: approves a name that waits for approval, or marks a name as a finalist for the voting round (or undoes either). A name must be approved before it can be a finalist.",
        "tags": [
          "contests.write"
        ],
        "parameters": [
          {
            "name": "contest",
            "in": "path",
            "required": true,
            "description": "Contest id, for example c1a2b3c4.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entry",
            "in": "path",
            "required": true,
            "description": "Entry id, for example k3j2h1g0f9.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "approved": {
                    "description": "Approve the name, or take the approval back.",
                    "type": "boolean"
                  },
                  "finalist": {
                    "description": "Make the name a finalist for the voting round, or remove it from the finalists.",
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "entry": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Entry id; pass it as `entry` to the other tools."
                            },
                            "url": {
                              "type": "string",
                              "description": "Entry page."
                            },
                            "name": {
                              "type": "string",
                              "description": "The suggested name."
                            },
                            "comment": {
                              "description": "The author's note about the name.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "author": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Member id."
                                },
                                "name": {
                                  "type": "string"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "Profile page."
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "url"
                              ]
                            },
                            "likes": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991,
                              "description": "Likes; in the voting round these are the votes."
                            },
                            "comments": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "is_finalist": {
                              "type": "boolean"
                            },
                            "is_winner": {
                              "type": "boolean"
                            },
                            "is_approved": {
                              "type": "boolean",
                              "description": "False while it waits for the contest holder."
                            },
                            "created_at": {
                              "type": "string",
                              "description": "ISO 8601 time in UTC."
                            },
                            "liked_by_you": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "id",
                            "url",
                            "name",
                            "comment",
                            "author",
                            "likes",
                            "comments",
                            "is_finalist",
                            "is_winner",
                            "is_approved",
                            "created_at",
                            "liked_by_you"
                          ]
                        }
                      },
                      "required": [
                        "entry"
                      ]
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "The call was refused or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "contests.write"
            ]
          }
        ],
        "x-required-scope": "contests.write",
        "x-openai-isConsequential": true
      }
    },
    "/contests/{contest}/comments": {
      "get": {
        "operationId": "list_comments",
        "summary": "List a contest's chat messages or host updates",
        "description": "Returns a contest's chat (what participants and the host are saying) or the host's updates (announcements such as changed requirements or a shortlist). The updates often refine the brief, so read them before suggesting names.",
        "tags": [
          "contests.read"
        ],
        "parameters": [
          {
            "name": "contest",
            "in": "path",
            "required": true,
            "description": "Contest id, for example c1a2b3c4.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "description": "chat: the contest's discussion, the latest messages in the order they were written. updates: the host's announcements, newest first.",
            "schema": {
              "default": "chat",
              "type": "string",
              "enum": [
                "chat",
                "updates"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "contest": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "url": {
                              "type": "string"
                            },
                            "title": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "unpublished",
                                "active",
                                "voting",
                                "expired",
                                "closed"
                              ],
                              "description": "unpublished: a draft only its host sees. active: takes names. voting: the final poll among finalists. expired: past its end date, waiting for the host to pick a winner. closed: finished."
                            }
                          },
                          "required": [
                            "id",
                            "url",
                            "title",
                            "status"
                          ]
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "chat",
                            "updates"
                          ]
                        },
                        "comments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "text": {
                                "type": "string"
                              },
                              "author": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "description": "Member id."
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "url": {
                                    "type": "string",
                                    "description": "Profile page."
                                  }
                                },
                                "required": [
                                  "id",
                                  "name",
                                  "url"
                                ]
                              },
                              "created_at": {
                                "type": "string",
                                "description": "ISO 8601 time in UTC."
                              },
                              "is_approved": {
                                "type": "boolean",
                                "description": "False while it waits for the contest holder."
                              }
                            },
                            "required": [
                              "id",
                              "text",
                              "author",
                              "created_at",
                              "is_approved"
                            ]
                          }
                        },
                        "has_more": {
                          "type": "boolean",
                          "description": "There are older ones than these."
                        }
                      },
                      "required": [
                        "contest",
                        "kind",
                        "comments",
                        "has_more"
                      ]
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "The call was refused or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {},
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "contests.read"
            ]
          }
        ],
        "x-required-scope": "contests.read",
        "x-openai-isConsequential": false
      },
      "post": {
        "operationId": "add_comment",
        "summary": "Comment on a name or in the contest chat",
        "description": "Posts a comment as the connected member: on one suggested name when `entry` is given, otherwise in the contest chat. The comment is public under the member's name. Works until the contest ends.",
        "tags": [
          "entries.write"
        ],
        "parameters": [
          {
            "name": "contest",
            "in": "path",
            "required": true,
            "description": "Contest id, for example c1a2b3c4.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 3000
                  },
                  "entry": {
                    "description": "Comment on this entry. Without it the text goes to the contest chat.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  }
                },
                "required": [
                  "text"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "comment": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "text": {
                              "type": "string"
                            },
                            "author": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Member id."
                                },
                                "name": {
                                  "type": "string"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "Profile page."
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "url"
                              ]
                            },
                            "created_at": {
                              "type": "string",
                              "description": "ISO 8601 time in UTC."
                            },
                            "is_approved": {
                              "type": "boolean",
                              "description": "False while it waits for the contest holder."
                            }
                          },
                          "required": [
                            "id",
                            "text",
                            "author",
                            "created_at",
                            "is_approved"
                          ]
                        },
                        "approved": {
                          "type": "boolean"
                        },
                        "on": {
                          "type": "string",
                          "enum": [
                            "entry",
                            "chat"
                          ]
                        }
                      },
                      "required": [
                        "comment",
                        "approved",
                        "on"
                      ]
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "The call was refused or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "entries.write"
            ]
          }
        ],
        "x-required-scope": "entries.write",
        "x-openai-isConsequential": true
      }
    },
    "/contests/{contest}/entries/{entry}/like": {
      "post": {
        "operationId": "like_entry",
        "summary": "Like or unlike a name",
        "description": "Likes a suggested name as the connected member, or takes the like back with like=false. In the voting round a like is a vote for that finalist. Works until the contest ends.",
        "tags": [
          "entries.write"
        ],
        "parameters": [
          {
            "name": "contest",
            "in": "path",
            "required": true,
            "description": "Contest id, for example c1a2b3c4.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entry",
            "in": "path",
            "required": true,
            "description": "Entry id, for example k3j2h1g0f9.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "like": {
                    "default": true,
                    "description": "False takes the like back.",
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "entry_id": {
                          "type": "string"
                        },
                        "liked": {
                          "type": "boolean"
                        },
                        "likes": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "entry_id",
                        "liked",
                        "likes"
                      ]
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "The call was refused or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "entries.write"
            ]
          }
        ],
        "x-required-scope": "entries.write",
        "x-openai-isConsequential": true
      }
    },
    "/contests/{contest}/stage": {
      "post": {
        "operationId": "set_contest_stage",
        "summary": "Publish, pause, resume, start voting, close or reopen a contest",
        "description": "Moves a contest the connected member hosts through its life: publish a draft, pause or resume it, start the final poll among the finalists, close it with a winning name, or reopen it within 24 hours of closing. Publishing makes the contest public and closing announces the winner, so confirm with ...",
        "tags": [
          "contests.write"
        ],
        "parameters": [
          {
            "name": "contest",
            "in": "path",
            "required": true,
            "description": "Contest id, for example c1a2b3c4.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "publish",
                      "pause",
                      "resume",
                      "start_voting",
                      "close",
                      "reopen"
                    ],
                    "description": "publish: make a draft live. pause and resume: stop and restart names, likes and comments. start_voting: open the final poll (needs at least 2 finalists). close: end the contest with `winner_entry` as the winner. reopen: undo a close within 24 hours."
                  },
                  "winner_entry": {
                    "description": "The winning entry; needed for `close`.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  }
                },
                "required": [
                  "action"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "contest": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Contest id; pass it as `contest` to the other tools."
                            },
                            "url": {
                              "type": "string",
                              "description": "Contest page. Show this link to people."
                            },
                            "title": {
                              "type": "string"
                            },
                            "summary": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "topic": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "host_name": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "unpublished",
                                "active",
                                "voting",
                                "expired",
                                "closed"
                              ],
                              "description": "unpublished: a draft only its host sees. active: takes names. voting: the final poll among finalists. expired: past its end date, waiting for the host to pick a winner. closed: finished."
                            },
                            "end_date": {
                              "type": "string",
                              "description": "ISO 8601 time in UTC."
                            },
                            "entry_count": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "prize": {
                              "description": "The prize as shown on the site: its value with currency, else its title.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "has_winner": {
                              "type": "boolean"
                            },
                            "description": {
                              "description": "The brief: what is being named and what the host wants. Markdown.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "terms": {
                              "description": "The contest's own rules, when the host wrote any.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "is_public": {
                              "type": "boolean",
                              "description": "Listed on the site and open to search engines."
                            },
                            "is_paused": {
                              "type": "boolean",
                              "description": "Paused by the host: no names, likes or comments for now."
                            },
                            "entries_need_approval": {
                              "type": "boolean"
                            },
                            "comments_need_approval": {
                              "type": "boolean"
                            },
                            "published_at": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "description": "ISO 8601 time in UTC."
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "voting_started_at": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "description": "ISO 8601 time in UTC."
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "closed_at": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "description": "ISO 8601 time in UTC."
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "prize_details": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "title": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "amount": {
                                      "description": "Value with currency, for example \"$500\".",
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "description": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "title",
                                    "amount",
                                    "description"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "host": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "url": {
                                  "type": "string"
                                },
                                "is_verified": {
                                  "type": "boolean",
                                  "description": "The site has checked that this member is a real person or business."
                                },
                                "organisation": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "website": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "about": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "url",
                                "is_verified",
                                "organisation",
                                "website",
                                "about"
                              ]
                            },
                            "counts": {
                              "type": "object",
                              "properties": {
                                "entries": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "comments": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991,
                                  "description": "Messages in the contest chat."
                                },
                                "participants": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "likes": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "finalists": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "entries",
                                "comments",
                                "participants",
                                "likes",
                                "finalists"
                              ]
                            },
                            "winner": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "url": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "author_name": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "url",
                                    "name",
                                    "author_name"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "your_rights": {
                              "type": "object",
                              "properties": {
                                "can_submit_entries": {
                                  "type": "boolean"
                                },
                                "can_like": {
                                  "type": "boolean"
                                },
                                "can_comment": {
                                  "type": "boolean"
                                },
                                "can_manage": {
                                  "type": "boolean",
                                  "description": "You host this contest and this connection may manage it."
                                }
                              },
                              "required": [
                                "can_submit_entries",
                                "can_like",
                                "can_comment",
                                "can_manage"
                              ],
                              "description": "What this connection may do in the contest right now."
                            },
                            "latest_updates": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  "text": {
                                    "type": "string"
                                  },
                                  "author": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "description": "Member id."
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "url": {
                                        "type": "string",
                                        "description": "Profile page."
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "name",
                                      "url"
                                    ]
                                  },
                                  "created_at": {
                                    "type": "string",
                                    "description": "ISO 8601 time in UTC."
                                  },
                                  "is_approved": {
                                    "type": "boolean",
                                    "description": "False while it waits for the contest holder."
                                  }
                                },
                                "required": [
                                  "id",
                                  "text",
                                  "author",
                                  "created_at",
                                  "is_approved"
                                ]
                              },
                              "description": "The host's latest announcements, newest first."
                            }
                          },
                          "required": [
                            "id",
                            "url",
                            "title",
                            "summary",
                            "topic",
                            "host_name",
                            "status",
                            "end_date",
                            "entry_count",
                            "prize",
                            "has_winner",
                            "description",
                            "terms",
                            "is_public",
                            "is_paused",
                            "entries_need_approval",
                            "comments_need_approval",
                            "published_at",
                            "voting_started_at",
                            "closed_at",
                            "prize_details",
                            "host",
                            "counts",
                            "winner",
                            "your_rights",
                            "latest_updates"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "What happened and what to do next."
                        }
                      },
                      "required": [
                        "contest",
                        "message"
                      ]
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "The call was refused or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "contests.write"
            ]
          }
        ],
        "x-required-scope": "contests.write",
        "x-openai-isConsequential": true
      }
    },
    "/contests/{contest}/updates": {
      "post": {
        "operationId": "post_update",
        "summary": "Post a host update",
        "description": "For the contest holder: posts an announcement on the contest page, for example a clarified requirement or a thank-you. Followers of the contest are notified, so post only what the member asked for.",
        "tags": [
          "contests.write"
        ],
        "parameters": [
          {
            "name": "contest",
            "in": "path",
            "required": true,
            "description": "Contest id, for example c1a2b3c4.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 3000,
                    "description": "The announcement. Everyone who follows the contest is told about it."
                  }
                },
                "required": [
                  "text"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "update": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "text": {
                              "type": "string"
                            },
                            "author": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Member id."
                                },
                                "name": {
                                  "type": "string"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "Profile page."
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "url"
                              ]
                            },
                            "created_at": {
                              "type": "string",
                              "description": "ISO 8601 time in UTC."
                            },
                            "is_approved": {
                              "type": "boolean",
                              "description": "False while it waits for the contest holder."
                            }
                          },
                          "required": [
                            "id",
                            "text",
                            "author",
                            "created_at",
                            "is_approved"
                          ]
                        }
                      },
                      "required": [
                        "update"
                      ]
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "The call was refused or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "contests.write"
            ]
          }
        ],
        "x-required-scope": "contests.write",
        "x-openai-isConsequential": true
      }
    },
    "/me/contests": {
      "get": {
        "operationId": "list_my_contests",
        "summary": "List the member's contests",
        "description": "Lists the connected member's contests: the ones they hold (drafts included, with how many names wait for approval) or other people's contests they took part in.",
        "tags": [
          "account.read"
        ],
        "parameters": [
          {
            "name": "role",
            "in": "query",
            "required": false,
            "description": "host: contests you hold, drafts included. participant: other people's contests you took part in.",
            "schema": {
              "default": "host",
              "type": "string",
              "enum": [
                "host",
                "participant"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "host",
                            "participant"
                          ]
                        },
                        "contests": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Contest id; pass it as `contest` to the other tools."
                              },
                              "url": {
                                "type": "string",
                                "description": "Contest page. Show this link to people."
                              },
                              "title": {
                                "type": "string"
                              },
                              "summary": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "topic": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "host_name": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "unpublished",
                                  "active",
                                  "voting",
                                  "expired",
                                  "closed"
                                ],
                                "description": "unpublished: a draft only its host sees. active: takes names. voting: the final poll among finalists. expired: past its end date, waiting for the host to pick a winner. closed: finished."
                              },
                              "end_date": {
                                "type": "string",
                                "description": "ISO 8601 time in UTC."
                              },
                              "entry_count": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "prize": {
                                "description": "The prize as shown on the site: its value with currency, else its title.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "has_winner": {
                                "type": "boolean"
                              },
                              "is_hidden": {
                                "description": "Hidden by the site from visitors (host role only).",
                                "type": "boolean"
                              },
                              "is_paused": {
                                "type": "boolean"
                              },
                              "pending": {
                                "description": "Names and comments waiting for your approval (host role only).",
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "id",
                              "url",
                              "title",
                              "summary",
                              "topic",
                              "host_name",
                              "status",
                              "end_date",
                              "entry_count",
                              "prize",
                              "has_winner"
                            ]
                          }
                        }
                      },
                      "required": [
                        "role",
                        "contests"
                      ]
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "The call was refused or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "account.read"
            ]
          }
        ],
        "x-required-scope": "account.read",
        "x-openai-isConsequential": false
      }
    },
    "/me": {
      "get": {
        "operationId": "get_account",
        "summary": "Get the connected member",
        "description": "Returns the member this connection acts as (name, profile address, whether the e-mail address is confirmed) and what the connection may do.",
        "tags": [
          "account.read"
        ],
        "responses": {
          "200": {
            "description": "The result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "account": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "url": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "email_verified": {
                              "type": "boolean"
                            },
                            "member_since": {
                              "type": "string",
                              "description": "ISO 8601 time in UTC."
                            }
                          },
                          "required": [
                            "id",
                            "url",
                            "name",
                            "email_verified",
                            "member_since"
                          ]
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "What this connection may do."
                        }
                      },
                      "required": [
                        "account",
                        "scopes"
                      ]
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "The call was refused or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "account.read"
            ]
          }
        ],
        "x-required-scope": "account.read",
        "x-openai-isConsequential": false
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "ok",
          "error"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": false
          },
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "A stable code such as not_found, invalid_input, already_taken or rate_limited."
              },
              "message": {
                "type": "string",
                "description": "What went wrong, in words a person can read."
              },
              "fields": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                },
                "description": "For invalid_input: the problem with each field."
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "A personal API key (nc_live_...) from https://www.namecontests.com/home/api, or an OAuth access token."
      },
      "oauth2": {
        "type": "oauth2",
        "description": "Authorization code with PKCE (S256). Apps register themselves at the registration endpoint.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://www.namecontests.com/oauth/authorize",
            "tokenUrl": "https://www.namecontests.com/oauth/token",
            "refreshUrl": "https://www.namecontests.com/oauth/token",
            "scopes": {
              "contests.read": "Read contests, names and comments that you can see",
              "entries.write": "Suggest names, like names and post comments as you",
              "contests.write": "Create contests and manage the ones you host",
              "account.read": "Read your profile and the list of your contests"
            }
          }
        }
      }
    }
  }
}