{
    "openapi": "3.1.0",
    "info": {
        "title": "Tawzifa Company API",
        "version": "1.0.0",
        "summary": "Connect your HR / ERP system to Tawzifa: jobs, applicants, interviews, offers, messages and webhooks.",
        "description": "Every request needs `Authorization: Bearer <key>` **and** a request signature:\n\n- `X-Tawzifa-Timestamp`: Unix seconds (±5 minutes)\n- `X-Tawzifa-Nonce`: 16–64 random characters, never reused\n- `X-Tawzifa-Signature`: `v1=` + hex HMAC-SHA256(secret, canonical)\n\ncanonical = METHOD + \"\\n\" + PATH + \"\\n\" + sorted query + \"\\n\" + timestamp + \"\\n\" + nonce + \"\\n\" + hex SHA-256(body).\nThe secret is the part of the key after the dot. `twz_test_` keys use the isolated sandbox; `twz_live_` keys your real data.\n\n**Live access:** an approved live request plus an active annual plan that includes the API and open payments on Tawzifa. Companies Tawzifa marks as partners (affiliated companies) need only the approved request: no documents, plan or open payments.\n\n**Idempotency:** send `Idempotency-Key` on POST/PATCH/DELETE. For 24 hours the first response for a key is replayed with `Idempotent-Replayed: true`, **including 4xx refusals**; only 5xx responses are not stored. After fixing the cause of a refusal, retry with a **new** key. Reusing a key with a different body answers 422 `idempotency_key_reuse`.\n\n**Times:** responses are ISO 8601 UTC (`Z`); `updated_since` accepts any ISO 8601 time (with or without an offset) and compares it as an instant. Errors are RFC 7807 `application/problem+json` with a stable `code`.",
        "contact": {
            "name": "Tawzifa",
            "url": "https://tawzifa.com/developers"
        }
    },
    "servers": [
        {
            "url": "https://tawzifa.com",
            "description": "Tawzifa"
        }
    ],
    "security": [
        {
            "ApiKey": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
        }
    ],
    "tags": [
        {
            "name": "Company"
        },
        {
            "name": "Jobs"
        },
        {
            "name": "Applications"
        },
        {
            "name": "Interviews"
        },
        {
            "name": "Offers"
        },
        {
            "name": "Messages"
        },
        {
            "name": "Reference"
        },
        {
            "name": "Usage"
        },
        {
            "name": "Webhooks"
        }
    ],
    "paths": {
        "/api/v1/company": {
            "get": {
                "operationId": "getCompany",
                "tags": [
                    "Company"
                ],
                "summary": "Your company profile",
                "description": "Scope: `company:read`",
                "x-tawzifa-scope": "company:read",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Company"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                }
            },
            "patch": {
                "operationId": "updateCompany",
                "tags": [
                    "Company"
                ],
                "summary": "Update descriptive profile fields",
                "description": "Scope: `company:write`",
                "x-tawzifa-scope": "company:write",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Company"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CompanyUpdate"
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/jobs": {
            "get": {
                "operationId": "listJobs",
                "tags": [
                    "Jobs"
                ],
                "summary": "List your jobs",
                "description": "Scope: `jobs:read`",
                "x-tawzifa-scope": "jobs:read",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/status"
                    },
                    {
                        "$ref": "#/components/parameters/updated_since"
                    },
                    {
                        "$ref": "#/components/parameters/cursor"
                    },
                    {
                        "$ref": "#/components/parameters/per_page"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Job"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/PageMeta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                }
            },
            "post": {
                "operationId": "createJob",
                "tags": [
                    "Jobs"
                ],
                "summary": "Create a job (draft, or publish: true)",
                "description": "Scope: `jobs:write`",
                "x-tawzifa-scope": "jobs:write",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "responses": {
                    "201": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Job"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/JobInput"
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/jobs/{job}": {
            "get": {
                "operationId": "getJob",
                "tags": [
                    "Jobs"
                ],
                "summary": "Get a job",
                "description": "Scope: `jobs:read`",
                "x-tawzifa-scope": "jobs:read",
                "parameters": [
                    {
                        "name": "job",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Job"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                }
            },
            "patch": {
                "operationId": "updateJob",
                "tags": [
                    "Jobs"
                ],
                "summary": "Update a job (only the fields you send)",
                "description": "Scope: `jobs:write`",
                "x-tawzifa-scope": "jobs:write",
                "parameters": [
                    {
                        "name": "job",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Job"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/JobInput"
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/jobs/{job}/publish": {
            "post": {
                "operationId": "publishJob",
                "tags": [
                    "Jobs"
                ],
                "summary": "Publish a job",
                "description": "Scope: `jobs:write`",
                "x-tawzifa-scope": "jobs:write",
                "parameters": [
                    {
                        "name": "job",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Job"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                }
            }
        },
        "/api/v1/jobs/{job}/pause": {
            "post": {
                "operationId": "pauseJob",
                "tags": [
                    "Jobs"
                ],
                "summary": "Pause a job",
                "description": "Scope: `jobs:write`",
                "x-tawzifa-scope": "jobs:write",
                "parameters": [
                    {
                        "name": "job",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Job"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                }
            }
        },
        "/api/v1/jobs/{job}/close": {
            "post": {
                "operationId": "closeJob",
                "tags": [
                    "Jobs"
                ],
                "summary": "Close a job",
                "description": "Scope: `jobs:write`",
                "x-tawzifa-scope": "jobs:write",
                "parameters": [
                    {
                        "name": "job",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Job"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                }
            }
        },
        "/api/v1/applications": {
            "get": {
                "operationId": "listApplications",
                "tags": [
                    "Applications"
                ],
                "summary": "List applicants (filters: job_id, status, updated_since)",
                "description": "Scope: `applications:read`",
                "x-tawzifa-scope": "applications:read",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/job_id"
                    },
                    {
                        "$ref": "#/components/parameters/app_status"
                    },
                    {
                        "$ref": "#/components/parameters/updated_since"
                    },
                    {
                        "$ref": "#/components/parameters/cursor"
                    },
                    {
                        "$ref": "#/components/parameters/per_page"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Application"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/PageMeta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                }
            }
        },
        "/api/v1/applications/{application}": {
            "get": {
                "operationId": "getApplication",
                "tags": [
                    "Applications"
                ],
                "summary": "Get an applicant",
                "description": "Scope: `applications:read`",
                "x-tawzifa-scope": "applications:read",
                "parameters": [
                    {
                        "name": "application",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Application"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                }
            }
        },
        "/api/v1/applications/{application}/cv": {
            "get": {
                "operationId": "getApplicationCv",
                "tags": [
                    "Applications"
                ],
                "summary": "A signed CV link valid for 10 minutes",
                "description": "Scope: `applications:read`",
                "x-tawzifa-scope": "applications:read",
                "parameters": [
                    {
                        "name": "application",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/CvLink"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                }
            }
        },
        "/api/v1/applications/{application}/status": {
            "post": {
                "operationId": "changeApplicationStatus",
                "tags": [
                    "Applications"
                ],
                "summary": "Change status (reviewing, shortlisted, hired, rejected)",
                "description": "Scope: `applications:write`",
                "x-tawzifa-scope": "applications:write",
                "parameters": [
                    {
                        "name": "application",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Application"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StatusInput"
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/applications/{application}/notes": {
            "put": {
                "operationId": "setApplicationNotes",
                "tags": [
                    "Applications"
                ],
                "summary": "Private company notes",
                "description": "Scope: `applications:write`",
                "x-tawzifa-scope": "applications:write",
                "parameters": [
                    {
                        "name": "application",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Application"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/NotesInput"
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/applications/{application}/interviews": {
            "get": {
                "operationId": "listInterviews",
                "tags": [
                    "Interviews"
                ],
                "summary": "Interviews of an applicant",
                "description": "Scope: `applications:read`",
                "x-tawzifa-scope": "applications:read",
                "parameters": [
                    {
                        "name": "application",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/cursor"
                    },
                    {
                        "$ref": "#/components/parameters/per_page"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Interview"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/PageMeta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                }
            },
            "post": {
                "operationId": "scheduleInterview",
                "tags": [
                    "Interviews"
                ],
                "summary": "Schedule an interview (Cairo time)",
                "description": "Scope: `interviews:write`",
                "x-tawzifa-scope": "interviews:write",
                "parameters": [
                    {
                        "name": "application",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "responses": {
                    "201": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Interview"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/InterviewInput"
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/interviews/{interview}": {
            "get": {
                "operationId": "getInterview",
                "tags": [
                    "Interviews"
                ],
                "summary": "Get an interview",
                "description": "Scope: `applications:read`",
                "x-tawzifa-scope": "applications:read",
                "parameters": [
                    {
                        "name": "interview",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Interview"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                }
            }
        },
        "/api/v1/interviews/{interview}/reschedule": {
            "post": {
                "operationId": "rescheduleInterview",
                "tags": [
                    "Interviews"
                ],
                "summary": "Move an interview",
                "description": "Scope: `interviews:write`",
                "x-tawzifa-scope": "interviews:write",
                "parameters": [
                    {
                        "name": "interview",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Interview"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/InterviewInput"
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/interviews/{interview}/confirm": {
            "post": {
                "operationId": "confirmInterviewSlot",
                "tags": [
                    "Interviews"
                ],
                "summary": "Confirm a time the applicant suggested",
                "description": "Scope: `interviews:write`",
                "x-tawzifa-scope": "interviews:write",
                "parameters": [
                    {
                        "name": "interview",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Interview"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SlotInput"
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/interviews/{interview}/cancel": {
            "post": {
                "operationId": "cancelInterview",
                "tags": [
                    "Interviews"
                ],
                "summary": "Cancel an interview",
                "description": "Scope: `interviews:write`",
                "x-tawzifa-scope": "interviews:write",
                "parameters": [
                    {
                        "name": "interview",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Interview"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ReasonInput"
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/interviews/{interview}/outcome": {
            "post": {
                "operationId": "recordInterviewOutcome",
                "tags": [
                    "Interviews"
                ],
                "summary": "Mark attended / no-show",
                "description": "Scope: `interviews:write`",
                "x-tawzifa-scope": "interviews:write",
                "parameters": [
                    {
                        "name": "interview",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Interview"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/OutcomeInput"
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/applications/{application}/offers": {
            "get": {
                "operationId": "listOffers",
                "tags": [
                    "Offers"
                ],
                "summary": "Offers of an applicant",
                "description": "Scope: `applications:read`",
                "x-tawzifa-scope": "applications:read",
                "parameters": [
                    {
                        "name": "application",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/cursor"
                    },
                    {
                        "$ref": "#/components/parameters/per_page"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Offer"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/PageMeta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                }
            },
            "post": {
                "operationId": "sendOffer",
                "tags": [
                    "Offers"
                ],
                "summary": "Send a job offer",
                "description": "Scope: `offers:write`",
                "x-tawzifa-scope": "offers:write",
                "parameters": [
                    {
                        "name": "application",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "responses": {
                    "201": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Offer"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/OfferInput"
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/offers/{offer}": {
            "get": {
                "operationId": "getOffer",
                "tags": [
                    "Offers"
                ],
                "summary": "Offer status",
                "description": "Scope: `applications:read`",
                "x-tawzifa-scope": "applications:read",
                "parameters": [
                    {
                        "name": "offer",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Offer"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                }
            }
        },
        "/api/v1/offers/{offer}/withdraw": {
            "post": {
                "operationId": "withdrawOffer",
                "tags": [
                    "Offers"
                ],
                "summary": "Withdraw an offer",
                "description": "Scope: `offers:write`",
                "x-tawzifa-scope": "offers:write",
                "parameters": [
                    {
                        "name": "offer",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Offer"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                }
            }
        },
        "/api/v1/conversations": {
            "get": {
                "operationId": "listConversations",
                "tags": [
                    "Messages"
                ],
                "summary": "Applicant conversations (filters: updated_since = a message since; unread=1 = unread applicant messages only)",
                "description": "Scope: `messages:read`",
                "x-tawzifa-scope": "messages:read",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/updated_since"
                    },
                    {
                        "$ref": "#/components/parameters/unread"
                    },
                    {
                        "$ref": "#/components/parameters/cursor"
                    },
                    {
                        "$ref": "#/components/parameters/per_page"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Conversation"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/PageMeta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                }
            }
        },
        "/api/v1/applications/{application}/conversation": {
            "post": {
                "operationId": "openConversation",
                "tags": [
                    "Messages"
                ],
                "summary": "Open (or get) the conversation with an applicant",
                "description": "Scope: `messages:write`",
                "x-tawzifa-scope": "messages:write",
                "parameters": [
                    {
                        "name": "application",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "responses": {
                    "201": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Conversation"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                }
            }
        },
        "/api/v1/conversations/{conversation}/messages": {
            "get": {
                "operationId": "listMessages",
                "tags": [
                    "Messages"
                ],
                "summary": "Messages (contact details masked until shared; mark_read=0 keeps the thread unread)",
                "description": "Scope: `messages:read`",
                "x-tawzifa-scope": "messages:read",
                "parameters": [
                    {
                        "name": "conversation",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/mark_read"
                    },
                    {
                        "$ref": "#/components/parameters/cursor"
                    },
                    {
                        "$ref": "#/components/parameters/per_page"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Message"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/PageMeta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                }
            },
            "post": {
                "operationId": "sendMessage",
                "tags": [
                    "Messages"
                ],
                "summary": "Send a message",
                "description": "Scope: `messages:write`",
                "x-tawzifa-scope": "messages:write",
                "parameters": [
                    {
                        "name": "conversation",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "responses": {
                    "201": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Message"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/MessageInput"
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/reference/fields": {
            "get": {
                "operationId": "listFields",
                "tags": [
                    "Reference"
                ],
                "summary": "Work fields",
                "description": "Scope: `reference:read`",
                "x-tawzifa-scope": "reference:read",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/cursor"
                    },
                    {
                        "$ref": "#/components/parameters/per_page"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Field"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/PageMeta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                }
            }
        },
        "/api/v1/reference/specialties": {
            "get": {
                "operationId": "listSpecialties",
                "tags": [
                    "Reference"
                ],
                "summary": "Specialties (trade_id for jobs)",
                "description": "Scope: `reference:read`",
                "x-tawzifa-scope": "reference:read",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/field_id"
                    },
                    {
                        "$ref": "#/components/parameters/cursor"
                    },
                    {
                        "$ref": "#/components/parameters/per_page"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Specialty"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/PageMeta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                }
            }
        },
        "/api/v1/reference/areas": {
            "get": {
                "operationId": "listAreas",
                "tags": [
                    "Reference"
                ],
                "summary": "Areas (area_id for jobs)",
                "description": "Scope: `reference:read`",
                "x-tawzifa-scope": "reference:read",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/governorate"
                    },
                    {
                        "$ref": "#/components/parameters/cursor"
                    },
                    {
                        "$ref": "#/components/parameters/per_page"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Area"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/PageMeta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                }
            }
        },
        "/api/v1/usage": {
            "get": {
                "operationId": "getUsage",
                "tags": [
                    "Usage"
                ],
                "summary": "Plan, limits and today’s usage",
                "description": "Scope: `usage:read`",
                "x-tawzifa-scope": "usage:read",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Usage"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                }
            }
        },
        "/api/v1/webhooks": {
            "get": {
                "operationId": "listWebhooks",
                "tags": [
                    "Webhooks"
                ],
                "summary": "Webhook endpoints of this key’s mode",
                "description": "Scope: `webhooks:manage`",
                "x-tawzifa-scope": "webhooks:manage",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/cursor"
                    },
                    {
                        "$ref": "#/components/parameters/per_page"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/WebhookEndpoint"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/PageMeta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                }
            },
            "post": {
                "operationId": "createWebhook",
                "tags": [
                    "Webhooks"
                ],
                "summary": "Add an endpoint (secret returned once)",
                "description": "Scope: `webhooks:manage`",
                "x-tawzifa-scope": "webhooks:manage",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "responses": {
                    "201": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/WebhookEndpointCreated"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookInput"
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/webhooks/{webhook}": {
            "delete": {
                "operationId": "deleteWebhook",
                "tags": [
                    "Webhooks"
                ],
                "summary": "Delete an endpoint",
                "description": "Scope: `webhooks:manage`",
                "x-tawzifa-scope": "webhooks:manage",
                "parameters": [
                    {
                        "name": "webhook",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Deleted"
                    },
                    "401": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "403": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "404": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "422": {
                        "$ref": "#/components/responses/Problem"
                    },
                    "429": {
                        "$ref": "#/components/responses/Problem"
                    }
                }
            }
        }
    },
    "webhooks": {
        "application.created": {
            "post": {
                "summary": "Event application.created",
                "description": "Verify X-Tawzifa-Signature = v1=hex(HMAC-SHA256(endpoint secret, X-Tawzifa-Timestamp + \".\" + raw body)) and ignore an X-Tawzifa-Event-Id you already processed. Answer 2xx within 8 seconds; a failed delivery is retried after 1, 5 and 30 minutes, then 2, 6, 12 and 24 hours (8 attempts), and an endpoint is turned off after 25 failures in a row.",
                "parameters": [
                    {
                        "name": "X-Tawzifa-Event",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "const": "application.created"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Event-Id",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Timestamp",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Signature",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookEvent"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Received"
                    }
                }
            }
        },
        "application.status_changed": {
            "post": {
                "summary": "Event application.status_changed",
                "description": "Verify X-Tawzifa-Signature = v1=hex(HMAC-SHA256(endpoint secret, X-Tawzifa-Timestamp + \".\" + raw body)) and ignore an X-Tawzifa-Event-Id you already processed. Answer 2xx within 8 seconds; a failed delivery is retried after 1, 5 and 30 minutes, then 2, 6, 12 and 24 hours (8 attempts), and an endpoint is turned off after 25 failures in a row.",
                "parameters": [
                    {
                        "name": "X-Tawzifa-Event",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "const": "application.status_changed"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Event-Id",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Timestamp",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Signature",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookEvent"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Received"
                    }
                }
            }
        },
        "interview.responded": {
            "post": {
                "summary": "Event interview.responded",
                "description": "Verify X-Tawzifa-Signature = v1=hex(HMAC-SHA256(endpoint secret, X-Tawzifa-Timestamp + \".\" + raw body)) and ignore an X-Tawzifa-Event-Id you already processed. Answer 2xx within 8 seconds; a failed delivery is retried after 1, 5 and 30 minutes, then 2, 6, 12 and 24 hours (8 attempts), and an endpoint is turned off after 25 failures in a row.",
                "parameters": [
                    {
                        "name": "X-Tawzifa-Event",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "const": "interview.responded"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Event-Id",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Timestamp",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Signature",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookEvent"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Received"
                    }
                }
            }
        },
        "interview.reminder": {
            "post": {
                "summary": "Event interview.reminder",
                "description": "Verify X-Tawzifa-Signature = v1=hex(HMAC-SHA256(endpoint secret, X-Tawzifa-Timestamp + \".\" + raw body)) and ignore an X-Tawzifa-Event-Id you already processed. Answer 2xx within 8 seconds; a failed delivery is retried after 1, 5 and 30 minutes, then 2, 6, 12 and 24 hours (8 attempts), and an endpoint is turned off after 25 failures in a row.",
                "parameters": [
                    {
                        "name": "X-Tawzifa-Event",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "const": "interview.reminder"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Event-Id",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Timestamp",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Signature",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookEvent"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Received"
                    }
                }
            }
        },
        "offer.accepted": {
            "post": {
                "summary": "Event offer.accepted",
                "description": "Verify X-Tawzifa-Signature = v1=hex(HMAC-SHA256(endpoint secret, X-Tawzifa-Timestamp + \".\" + raw body)) and ignore an X-Tawzifa-Event-Id you already processed. Answer 2xx within 8 seconds; a failed delivery is retried after 1, 5 and 30 minutes, then 2, 6, 12 and 24 hours (8 attempts), and an endpoint is turned off after 25 failures in a row.",
                "parameters": [
                    {
                        "name": "X-Tawzifa-Event",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "const": "offer.accepted"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Event-Id",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Timestamp",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Signature",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookEvent"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Received"
                    }
                }
            }
        },
        "offer.declined": {
            "post": {
                "summary": "Event offer.declined",
                "description": "Verify X-Tawzifa-Signature = v1=hex(HMAC-SHA256(endpoint secret, X-Tawzifa-Timestamp + \".\" + raw body)) and ignore an X-Tawzifa-Event-Id you already processed. Answer 2xx within 8 seconds; a failed delivery is retried after 1, 5 and 30 minutes, then 2, 6, 12 and 24 hours (8 attempts), and an endpoint is turned off after 25 failures in a row.",
                "parameters": [
                    {
                        "name": "X-Tawzifa-Event",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "const": "offer.declined"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Event-Id",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Timestamp",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Signature",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookEvent"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Received"
                    }
                }
            }
        },
        "offer.expired": {
            "post": {
                "summary": "Event offer.expired",
                "description": "Verify X-Tawzifa-Signature = v1=hex(HMAC-SHA256(endpoint secret, X-Tawzifa-Timestamp + \".\" + raw body)) and ignore an X-Tawzifa-Event-Id you already processed. Answer 2xx within 8 seconds; a failed delivery is retried after 1, 5 and 30 minutes, then 2, 6, 12 and 24 hours (8 attempts), and an endpoint is turned off after 25 failures in a row.",
                "parameters": [
                    {
                        "name": "X-Tawzifa-Event",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "const": "offer.expired"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Event-Id",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Timestamp",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Signature",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookEvent"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Received"
                    }
                }
            }
        },
        "message.received": {
            "post": {
                "summary": "Event message.received",
                "description": "Verify X-Tawzifa-Signature = v1=hex(HMAC-SHA256(endpoint secret, X-Tawzifa-Timestamp + \".\" + raw body)) and ignore an X-Tawzifa-Event-Id you already processed. Answer 2xx within 8 seconds; a failed delivery is retried after 1, 5 and 30 minutes, then 2, 6, 12 and 24 hours (8 attempts), and an endpoint is turned off after 25 failures in a row.",
                "parameters": [
                    {
                        "name": "X-Tawzifa-Event",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "const": "message.received"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Event-Id",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Timestamp",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Signature",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookEvent"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Received"
                    }
                }
            }
        },
        "job.expired": {
            "post": {
                "summary": "Event job.expired",
                "description": "Verify X-Tawzifa-Signature = v1=hex(HMAC-SHA256(endpoint secret, X-Tawzifa-Timestamp + \".\" + raw body)) and ignore an X-Tawzifa-Event-Id you already processed. Answer 2xx within 8 seconds; a failed delivery is retried after 1, 5 and 30 minutes, then 2, 6, 12 and 24 hours (8 attempts), and an endpoint is turned off after 25 failures in a row.",
                "parameters": [
                    {
                        "name": "X-Tawzifa-Event",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "const": "job.expired"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Event-Id",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Timestamp",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Signature",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookEvent"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Received"
                    }
                }
            }
        },
        "job.closed": {
            "post": {
                "summary": "Event job.closed",
                "description": "Verify X-Tawzifa-Signature = v1=hex(HMAC-SHA256(endpoint secret, X-Tawzifa-Timestamp + \".\" + raw body)) and ignore an X-Tawzifa-Event-Id you already processed. Answer 2xx within 8 seconds; a failed delivery is retried after 1, 5 and 30 minutes, then 2, 6, 12 and 24 hours (8 attempts), and an endpoint is turned off after 25 failures in a row.",
                "parameters": [
                    {
                        "name": "X-Tawzifa-Event",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "const": "job.closed"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Event-Id",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Timestamp",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Tawzifa-Signature",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookEvent"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Received"
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "ApiKey": {
                "type": "http",
                "scheme": "bearer",
                "description": "twz_test_… or twz_live_… key, shown once when created."
            },
            "Timestamp": {
                "type": "apiKey",
                "in": "header",
                "name": "X-Tawzifa-Timestamp"
            },
            "Nonce": {
                "type": "apiKey",
                "in": "header",
                "name": "X-Tawzifa-Nonce"
            },
            "Signature": {
                "type": "apiKey",
                "in": "header",
                "name": "X-Tawzifa-Signature"
            }
        },
        "parameters": {
            "cursor": {
                "name": "cursor",
                "in": "query",
                "schema": {
                    "type": "string"
                },
                "description": "meta.next_cursor of the previous page"
            },
            "per_page": {
                "name": "per_page",
                "in": "query",
                "schema": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "default": 25
                }
            },
            "status": {
                "name": "status",
                "in": "query",
                "schema": {
                    "type": "string",
                    "enum": [
                        "draft",
                        "published",
                        "paused",
                        "closed"
                    ]
                }
            },
            "app_status": {
                "name": "status",
                "in": "query",
                "schema": {
                    "type": "string",
                    "enum": [
                        "submitted",
                        "reviewing",
                        "shortlisted",
                        "interview",
                        "hired",
                        "rejected",
                        "withdrawn"
                    ]
                }
            },
            "job_id": {
                "name": "job_id",
                "in": "query",
                "schema": {
                    "type": "integer"
                }
            },
            "updated_since": {
                "name": "updated_since",
                "in": "query",
                "description": "ISO 8601 time, e.g. 2026-11-24T10:00:00Z or 2026-11-24T12:00:00+02:00. Returns records changed at or after that instant.",
                "schema": {
                    "type": "string",
                    "format": "date-time"
                }
            },
            "unread": {
                "name": "unread",
                "in": "query",
                "description": "Pass 1 to list only conversations with applicant messages your company has not read.",
                "schema": {
                    "type": "boolean"
                }
            },
            "mark_read": {
                "name": "mark_read",
                "in": "query",
                "description": "Default true. Pass 0 to read without marking the thread as read.",
                "schema": {
                    "type": "boolean",
                    "default": true
                }
            },
            "field_id": {
                "name": "field_id",
                "in": "query",
                "schema": {
                    "type": "integer"
                }
            },
            "governorate": {
                "name": "governorate",
                "in": "query",
                "schema": {
                    "type": "string"
                }
            },
            "IdempotencyKey": {
                "name": "Idempotency-Key",
                "in": "header",
                "schema": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 100
                },
                "description": "Retry safely: the first response for a key (2xx and 4xx; not 5xx) is replayed for 24 hours. Use a new key once you have fixed the cause of a refusal."
            }
        },
        "responses": {
            "Problem": {
                "description": "Error",
                "content": {
                    "application/problem+json": {
                        "schema": {
                            "$ref": "#/components/schemas/Problem"
                        }
                    }
                }
            }
        },
        "schemas": {
            "Problem": {
                "type": "object",
                "properties": {
                    "type": {
                        "type": "string"
                    },
                    "title": {
                        "type": "string"
                    },
                    "status": {
                        "type": "integer"
                    },
                    "code": {
                        "type": "string",
                        "enum": [
                            "https_required",
                            "missing_key",
                            "invalid_key",
                            "key_revoked",
                            "key_expired",
                            "stale_timestamp",
                            "invalid_nonce",
                            "bad_signature",
                            "replayed_request",
                            "company_suspended",
                            "no_owner",
                            "ip_not_allowed",
                            "live_access_inactive",
                            "insufficient_scope",
                            "forbidden",
                            "not_found",
                            "method_not_allowed",
                            "idempotency_in_progress",
                            "payload_too_large",
                            "unsupported_media_type",
                            "validation_failed",
                            "rule_violation",
                            "invalid_idempotency_key",
                            "idempotency_key_reuse",
                            "unsafe_webhook_url",
                            "webhook_domain_not_declared",
                            "too_many_endpoints",
                            "rate_limited",
                            "daily_quota_exceeded",
                            "internal_error",
                            "api_unavailable",
                            "sandbox_unavailable"
                        ]
                    },
                    "detail": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "request_id": {
                        "type": "string"
                    },
                    "errors": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    "retry_after": {
                        "type": "integer"
                    }
                },
                "required": [
                    "type",
                    "title",
                    "status",
                    "code"
                ]
            },
            "PageMeta": {
                "type": "object",
                "properties": {
                    "per_page": {
                        "type": "integer"
                    },
                    "next_cursor": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "has_more": {
                        "type": "boolean"
                    }
                }
            },
            "Area": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name_ar": {
                        "type": "string"
                    },
                    "name_en": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "governorate_ar": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "governorate_en": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                }
            },
            "Specialty": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name_ar": {
                        "type": "string"
                    },
                    "name_en": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "field_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    }
                }
            },
            "Field": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "name_ar": {
                        "type": "string"
                    },
                    "name_en": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "parent_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    }
                }
            },
            "Location": {
                "type": [
                    "object",
                    "null"
                ],
                "properties": {
                    "lat": {
                        "type": "number"
                    },
                    "lng": {
                        "type": "number"
                    }
                }
            },
            "Company": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "name_en": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "legal_entity": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "about": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "website": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "email": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "phone": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "size": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "area": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/Area"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "address": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "location": {
                        "$ref": "#/components/schemas/Location"
                    },
                    "representative": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "title": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    "available_headcount": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "lead_time_days": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "terms": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "supervision_policy": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "replacement_policy": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "verified": {
                        "type": "boolean"
                    },
                    "public_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                }
            },
            "CompanyUpdate": {
                "type": "object",
                "properties": {
                    "about": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "website": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri"
                    },
                    "representative_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "representative_title": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "available_headcount": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "lead_time_days": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "terms": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "supervision_policy": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "replacement_policy": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                }
            },
            "Job": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "title": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "draft",
                            "published",
                            "paused",
                            "closed"
                        ]
                    },
                    "specialty": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/Specialty"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "category": {
                        "type": "object",
                        "properties": {
                            "group_id": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "description": "Main category (a field with parent_id null in GET /reference/fields)"
                            },
                            "field_id": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "description": "Sub-category (null when the specialty sits directly under the main category)"
                            }
                        }
                    },
                    "specialization": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "area": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/Area"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "address": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "location": {
                        "$ref": "#/components/schemas/Location"
                    },
                    "employment_type": {
                        "type": "string",
                        "enum": [
                            "daily",
                            "temporary",
                            "full_time",
                            "part_time"
                        ]
                    },
                    "openings": {
                        "type": "integer"
                    },
                    "salary": {
                        "type": "object",
                        "properties": {
                            "on_agreement": {
                                "type": "boolean"
                            },
                            "min": {
                                "type": [
                                    "number",
                                    "null"
                                ]
                            },
                            "max": {
                                "type": [
                                    "number",
                                    "null"
                                ]
                            },
                            "period": {
                                "type": "string"
                            },
                            "currency": {
                                "type": "string",
                                "const": "EGP"
                            }
                        }
                    },
                    "start_date": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date"
                    },
                    "duration_days": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "working_hours": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "description": {
                        "type": "string"
                    },
                    "requirements": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "benefits": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "closes_on": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date"
                    },
                    "closing_note": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "published_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "public_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                }
            },
            "JobInput": {
                "type": "object",
                "properties": {
                    "title": {
                        "type": "string",
                        "maxLength": 160
                    },
                    "trade_id": {
                        "type": "integer"
                    },
                    "work_field_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Optional sub-category (GET /reference/fields, a field with a parent_id); trade_id must belong to it"
                    },
                    "specialization": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "area_id": {
                        "type": "integer"
                    },
                    "address": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "job_location": {
                        "type": "string",
                        "enum": [
                            "company",
                            "custom"
                        ]
                    },
                    "latitude": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "longitude": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "employment_type": {
                        "type": "string",
                        "enum": [
                            "daily",
                            "temporary",
                            "full_time",
                            "part_time"
                        ]
                    },
                    "openings": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 500
                    },
                    "salary_on_agreement": {
                        "type": "boolean"
                    },
                    "salary_min": {
                        "type": "number",
                        "description": "EGP"
                    },
                    "salary_max": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "description": "EGP"
                    },
                    "salary_period": {
                        "type": "string",
                        "enum": [
                            "hour",
                            "day",
                            "week",
                            "month",
                            "project"
                        ]
                    },
                    "start_date": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date"
                    },
                    "duration_days": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "working_hours": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "description": {
                        "type": "string",
                        "minLength": 20,
                        "maxLength": 5000
                    },
                    "requirements": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "benefits": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "closes_on": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date"
                    },
                    "closing_note": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "publish": {
                        "type": "boolean",
                        "description": "POST /jobs only: publish right away"
                    }
                },
                "required": [
                    "title",
                    "trade_id",
                    "area_id",
                    "employment_type",
                    "openings",
                    "salary_period",
                    "description"
                ]
            },
            "Application": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "job_id": {
                        "type": "integer"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "submitted",
                            "reviewing",
                            "shortlisted",
                            "interview",
                            "hired",
                            "rejected",
                            "withdrawn"
                        ]
                    },
                    "status_changed_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "applied_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "applicant": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "name": {
                                "type": "string"
                            },
                            "headline": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "specialty": {
                                "oneOf": [
                                    {
                                        "$ref": "#/components/schemas/Specialty"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "area": {
                                "oneOf": [
                                    {
                                        "$ref": "#/components/schemas/Area"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "experience_years": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "rating": {
                                "type": "object",
                                "properties": {
                                    "average": {
                                        "type": [
                                            "number",
                                            "null"
                                        ]
                                    },
                                    "count": {
                                        "type": "integer"
                                    }
                                }
                            },
                            "identity_verified": {
                                "type": "boolean"
                            },
                            "languages": {
                                "type": [
                                    "array",
                                    "null"
                                ],
                                "description": "GET /applications/{id} only"
                            },
                            "skills": {
                                "type": [
                                    "array",
                                    "null"
                                ],
                                "description": "GET /applications/{id} only"
                            }
                        }
                    },
                    "contact": {
                        "type": "object",
                        "properties": {
                            "shared": {
                                "type": "boolean"
                            },
                            "phone": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "email": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    "conversation_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "cover_letter": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "rejection_reason": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "interview_ids": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        }
                    },
                    "offer_ids": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        }
                    }
                }
            },
            "CvLink": {
                "type": "object",
                "properties": {
                    "url": {
                        "type": "string",
                        "format": "uri"
                    },
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                }
            },
            "StatusInput": {
                "type": "object",
                "properties": {
                    "status": {
                        "type": "string",
                        "enum": [
                            "reviewing",
                            "shortlisted",
                            "hired",
                            "rejected"
                        ]
                    },
                    "note": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "status"
                ]
            },
            "NotesInput": {
                "type": "object",
                "properties": {
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 3000
                    }
                },
                "required": [
                    "notes"
                ]
            },
            "Interview": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "application_id": {
                        "type": "integer"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "pending",
                            "accepted",
                            "rescheduling",
                            "declined",
                            "cancelled",
                            "attended",
                            "no_show",
                            "expired"
                        ]
                    },
                    "starts_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "duration_minutes": {
                        "type": "integer"
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "in_person",
                            "phone",
                            "video"
                        ]
                    },
                    "location": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "meeting_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "proposed_slots": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "proposal_note": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "decline_reason": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "cancel_reason": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "responded_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "outcome_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                }
            },
            "InterviewInput": {
                "type": "object",
                "properties": {
                    "starts_at": {
                        "type": "string",
                        "description": "Cairo time, format Y-m-d\\TH:i, e.g. 2026-12-01T10:30",
                        "examples": [
                            "2026-12-01T10:30"
                        ]
                    },
                    "duration_minutes": {
                        "type": "integer",
                        "enum": [
                            15,
                            30,
                            45,
                            60,
                            90,
                            120
                        ]
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "in_person",
                            "phone",
                            "video"
                        ]
                    },
                    "location": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "meeting_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "starts_at",
                    "duration_minutes",
                    "type"
                ]
            },
            "SlotInput": {
                "type": "object",
                "properties": {
                    "slot": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 2
                    }
                },
                "required": [
                    "slot"
                ]
            },
            "ReasonInput": {
                "type": "object",
                "properties": {
                    "reason": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 500
                    }
                },
                "required": [
                    "reason"
                ]
            },
            "OutcomeInput": {
                "type": "object",
                "properties": {
                    "attended": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "attended"
                ]
            },
            "Offer": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "application_id": {
                        "type": "integer"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "sent",
                            "accepted",
                            "declined",
                            "withdrawn",
                            "expired"
                        ]
                    },
                    "title": {
                        "type": "string"
                    },
                    "salary": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "salary_period": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "currency": {
                        "type": "string",
                        "const": "EGP"
                    },
                    "start_date": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date"
                    },
                    "employment_type": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "location": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "working_hours": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "benefits": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "terms": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "responded_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "decline_reason": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "withdrawn_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                }
            },
            "OfferInput": {
                "type": "object",
                "properties": {
                    "title": {
                        "type": "string"
                    },
                    "salary": {
                        "type": "number",
                        "description": "EGP"
                    },
                    "salary_period": {
                        "type": "string",
                        "enum": [
                            "hour",
                            "day",
                            "week",
                            "month",
                            "project"
                        ]
                    },
                    "start_date": {
                        "type": "string",
                        "format": "date"
                    },
                    "employment_type": {
                        "type": "string",
                        "enum": [
                            "daily",
                            "temporary",
                            "full_time",
                            "part_time"
                        ]
                    },
                    "location": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "working_hours": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "benefits": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "terms": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "expires_at": {
                        "type": "string",
                        "description": "Cairo time, Y-m-d\\TH:i, at least 1 hour ahead"
                    }
                },
                "required": [
                    "title",
                    "salary",
                    "salary_period",
                    "start_date",
                    "employment_type",
                    "expires_at"
                ]
            },
            "Conversation": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "application_id": {
                        "type": "integer"
                    },
                    "contact_shared": {
                        "type": "boolean"
                    },
                    "blocked": {
                        "type": "boolean"
                    },
                    "last_message_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "company_read_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "applicant_read_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "unread_count": {
                        "type": "integer",
                        "description": "Applicant messages your company has not read"
                    }
                }
            },
            "Message": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "conversation_id": {
                        "type": "integer"
                    },
                    "from": {
                        "type": "string",
                        "enum": [
                            "company",
                            "worker"
                        ]
                    },
                    "body": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "masked": {
                        "type": "boolean"
                    },
                    "has_image": {
                        "type": "boolean"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                }
            },
            "MessageInput": {
                "type": "object",
                "properties": {
                    "body": {
                        "type": "string",
                        "maxLength": 2000
                    }
                },
                "required": [
                    "body"
                ]
            },
            "Usage": {
                "type": "object",
                "properties": {
                    "mode": {
                        "type": "string",
                        "enum": [
                            "test",
                            "live"
                        ]
                    },
                    "plan": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "name": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "ends_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "job_post_limit": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            }
                        }
                    },
                    "free_launch": {
                        "type": "boolean"
                    },
                    "jobs": {
                        "type": "object",
                        "properties": {
                            "published": {
                                "type": "integer"
                            },
                            "free_active_limit": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "description": "Free-launch cap on published jobs; null when not in free launch or unlimited"
                            },
                            "unlimited": {
                                "type": "boolean",
                                "description": "true for Tawzifa partners"
                            }
                        }
                    },
                    "rate_limit_per_minute": {
                        "type": "integer"
                    },
                    "daily_quota": {
                        "type": "integer"
                    },
                    "used_today": {
                        "type": "integer"
                    }
                }
            },
            "WebhookEndpoint": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "mode": {
                        "type": "string",
                        "enum": [
                            "test",
                            "live"
                        ]
                    },
                    "url": {
                        "type": "string"
                    },
                    "events": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "application.created",
                                "application.status_changed",
                                "interview.responded",
                                "interview.reminder",
                                "offer.accepted",
                                "offer.declined",
                                "offer.expired",
                                "message.received",
                                "job.expired",
                                "job.closed"
                            ]
                        }
                    },
                    "active": {
                        "type": "boolean"
                    },
                    "consecutive_failures": {
                        "type": "integer"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                }
            },
            "WebhookEndpointCreated": {
                "allOf": [
                    {
                        "$ref": "#/components/schemas/WebhookEndpoint"
                    },
                    {
                        "type": "object",
                        "properties": {
                            "secret": {
                                "type": "string",
                                "description": "Shown once. Use it to verify X-Tawzifa-Signature."
                            }
                        }
                    }
                ]
            },
            "WebhookInput": {
                "type": "object",
                "properties": {
                    "url": {
                        "type": "string",
                        "format": "uri",
                        "description": "https only; public address; live endpoints on a declared domain"
                    },
                    "events": {
                        "type": "array",
                        "minItems": 1,
                        "items": {
                            "type": "string",
                            "enum": [
                                "application.created",
                                "application.status_changed",
                                "interview.responded",
                                "interview.reminder",
                                "offer.accepted",
                                "offer.declined",
                                "offer.expired",
                                "message.received",
                                "job.expired",
                                "job.closed"
                            ]
                        }
                    }
                },
                "required": [
                    "url",
                    "events"
                ]
            },
            "WebhookEvent": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "application.created",
                            "application.status_changed",
                            "interview.responded",
                            "interview.reminder",
                            "offer.accepted",
                            "offer.declined",
                            "offer.expired",
                            "message.received",
                            "job.expired",
                            "job.closed",
                            "ping"
                        ]
                    },
                    "mode": {
                        "type": "string",
                        "enum": [
                            "test",
                            "live"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "data": {
                        "type": "object"
                    }
                },
                "required": [
                    "id",
                    "type",
                    "mode",
                    "created_at",
                    "data"
                ]
            }
        }
    }
}