{
    "openapi": "3.1.0",
    "info": {
        "title": "From Monday",
        "version": "1.0.0",
        "description": "Who fits a role, and the Monday each person can start. Keyless, read-only."
    },
    "servers": [
        {
            "url": "https://frommonday.app"
        }
    ],
    "paths": {
        "/api/v1/match": {
            "get": {
                "operationId": "findAvailablePeople",
                "summary": "Find people who fit a role and can start",
                "parameters": [
                    {
                        "name": "brief",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "The role in plain words, or a job-ad URL."
                    },
                    {
                        "name": "region",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "europe",
                                "north_america",
                                "latin_america",
                                "middle_east",
                                "africa",
                                "asia_pacific"
                            ]
                        }
                    },
                    {
                        "name": "city",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "work_mode",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "remote",
                                "hybrid",
                                "onsite"
                            ]
                        }
                    },
                    {
                        "name": "engagement",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "freelance",
                                "contract",
                                "permanent",
                                "part_time",
                                "interim"
                            ]
                        }
                    },
                    {
                        "name": "seniority",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "junior",
                                "mid",
                                "senior",
                                "lead"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The scoped role and the people who fit.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "brief": {
                                            "type": "string"
                                        },
                                        "scope": {
                                            "type": "object"
                                        },
                                        "match_count": {
                                            "type": "integer"
                                        },
                                        "people": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "title": {
                                                        "type": "string",
                                                        "description": "The single title that matches the brief."
                                                    },
                                                    "skills": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "years_experience": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "location": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "available_from": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "format": "date"
                                                    },
                                                    "availability": {
                                                        "type": "string"
                                                    }
                                                }
                                            }
                                        },
                                        "more": {
                                            "type": "integer"
                                        },
                                        "private_count": {
                                            "type": "integer"
                                        },
                                        "url": {
                                            "type": "string",
                                            "format": "uri"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}