> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wethehivers.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Publication d'une offre d'emploi

> Comment créer, publier et gérer une offre d'emploi

# Publication d'une offre

Une offre d'emploi suit un cycle **brouillon → publiée → fermée**. Seul un recruteur `ACTIVE` rattaché à une entreprise vérifiée peut publier.

## Cycle de vie

```mermaid theme={null}
stateDiagram-v2
    [*] --> DRAFT: create
    DRAFT --> PUBLISHED: publish
    PUBLISHED --> CLOSED: close
    PUBLISHED --> DRAFT: unpublish
    CLOSED --> [*]
```

## 1. Création (brouillon)

```bash theme={null}
curl -X POST https://api.wethehivers.com/v1/api/offres \
  -H "Authorization: Bearer <token-recruteur>" \
  -H "Content-Type: application/json" \
  -d '{
    "titre": "Développeur Full Stack Java/React",
    "description": "Nous recherchons un développeur full stack...",
    "typeContrat": "CDI",
    "niveauExperience": "SENIOR",
    "secteur": "SOFTWARE",
    "ville": "Douala",
    "salaireMin": 800000,
    "salaireMax": 1500000,
    "deviseSalaire": "XAF",
    "competencesRequises": ["Java", "Spring Boot", "React", "PostgreSQL"],
    "dateExpiration": "2026-06-30"
  }'
```

L'offre est créée en statut `DRAFT`, invisible des candidats.

## 2. Publication

```bash theme={null}
curl -X POST https://api.wethehivers.com/v1/api/offres/42/publish \
  -H "Authorization: Bearer <token-recruteur>"
```

<Info>
  Une offre publiée est immédiatement indexée pour la recherche plein-texte (PostgreSQL `tsvector`) et visible publiquement sur `wethehivers.com`.
</Info>

## 3. Gestion des candidatures

Le recruteur suit les candidatures reçues via son tableau de bord :

```bash theme={null}
curl https://api.wethehivers.com/v1/api/offres/42/candidatures \
  -H "Authorization: Bearer <token-recruteur>"
```

Pour le workflow détaillé, voir [Workflow de candidature](/guides/workflow-candidature).

## 4. Clôture

Une offre est fermée automatiquement à `dateExpiration` ou manuellement :

```bash theme={null}
curl -X POST https://api.wethehivers.com/v1/api/offres/42/close \
  -H "Authorization: Bearer <token-recruteur>"
```

Une offre fermée reste visible sur le profil de l'entreprise mais n'accepte plus de candidature.

## Limites

| Plan       | Offres actives simultanées |
| ---------- | -------------------------- |
| Gratuit    | 2                          |
| Essentiel  | 10                         |
| Pro        | 50                         |
| Entreprise | Illimité                   |

<Warning>
  Une offre dont la description contient des informations de contact (téléphone, email, WhatsApp) est automatiquement rejetée à la publication. Les candidatures doivent passer par la plateforme.
</Warning>
