> For the complete documentation index, see [llms.txt](https://www.center.daxium-air.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.center.daxium-air.com/api-reference/doc-api/taches/creation-de-taches.md).

# Création de tâches

## Créer une tâche (simple ou récurrente)

> Crée une tâche liée à un modèle de fiche (\`submission\_model\_id\`) ou à une liste de\
> fiches (\`submissions\`). Pour une tâche \*\*récurrente\*\*, ajoutez l'objet \`recurrency\` ;\
> dans ce cas \`due\_date\` n'est pas obligatoire.<br>

```json
{"openapi":"3.0.3","info":{"title":"Daxium Air API","version":"v1.3"},"tags":[{"name":"tasks-write"}],"servers":[{"url":"https://api.daxium-air.com","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"AppShort":{"name":"app_short","in":"path","required":true,"description":"Nom court de l'instance (ex. `daxium-test`)","schema":{"type":"string"}}},"schemas":{"TaskInput":{"type":"object","required":["start_date"],"description":"Corps de création d'une tâche. Fournissez soit `submission_model_id`, soit `submissions`.\nAjoutez `recurrency` pour une tâche récurrente (dans ce cas `due_date` est optionnel).\n","properties":{"start_date":{"type":"integer","format":"int64","description":"Date de début de la tâche (timestamp UNIX)"},"due_date":{"type":"integer","format":"int64","description":"Date d'échéance (timestamp UNIX). Optionnel pour une tâche récurrente."},"submission_model_id":{"type":"string","format":"uuid","description":"Identifiant d'un modèle de fiche"},"submissions":{"type":"array","description":"Liste d'identifiants de fiches","items":{"type":"string","format":"uuid"}},"user_id":{"type":"integer","nullable":true,"description":"Identifiant de l'utilisateur assigné"},"duration":{"type":"integer","description":"Durée de la tâche en secondes"},"delay_before":{"type":"integer","description":"Délai d'affichage indicatif en secondes avant le début de la tâche"},"delay_after":{"type":"integer","description":"Délai d'affichage indicatif en secondes après l'échéance de la tâche"},"recurrency":{"$ref":"#/components/schemas/Recurrency"}}},"Recurrency":{"type":"object","description":"Définition de la récurrence d'une tâche","properties":{"type":{"type":"string","enum":["daily","weekly"],"description":"Type de récurrence"},"interval":{"type":"integer","description":"Intervalle entre chaque occurrence (minimum 1)"},"days":{"type":"object","description":"Jours de la semaine (3 premières lettres en anglais : mon, tue, wed, thu, fri, sat, sun).\nPour la récurrence hebdomadaire, tous les jours ne sont pas requis.\n","additionalProperties":{"type":"object","properties":{"start":{"type":"string","description":"Heure de début (format HH:MM)"},"end":{"type":"integer","description":"Durée de la tâche en secondes"}}}},"end":{"type":"object","description":"Condition de fin de la récurrence","properties":{"type":{"type":"string","enum":["occurrence","date"],"description":"`occurrence` = nombre d'occurrences, `date` = date de fin"},"value":{"type":"integer","description":"Nombre d'occurrences ou date de fin (timestamp) selon `type`"}}}}},"Task":{"type":"object","description":"Tâche liée à une fiche","properties":{"id":{"type":"string","format":"uuid","description":"Identifiant de la tâche"},"created_at":{"type":"integer","format":"int64","description":"Date de création (timestamp UNIX)"},"updated_at":{"type":"integer","format":"int64","description":"Date de mise à jour (timestamp UNIX)"},"start_date":{"type":"integer","format":"int64","description":"Date de début prévue (timestamp UNIX)"},"due_date":{"type":"integer","format":"int64","description":"Date d'échéance (timestamp UNIX)"},"duration":{"type":"integer","description":"Durée prévue en secondes"},"delay_before":{"type":"integer","description":"Délai d'affichage indicatif en secondes avant le début de la tâche"},"delay_after":{"type":"integer","description":"Délai d'affichage indicatif en secondes après la fin de la tâche"},"user_id":{"type":"integer","description":"Identifiant de l'utilisateur assigné"},"submission":{"$ref":"#/components/schemas/Submission","description":"Fiche associée à la tâche"}}},"Submission":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Identifiant de la fiche"},"structure_id":{"type":"integer","description":"Identifiant du formulaire"},"structure_version":{"type":"integer","description":"Version du formulaire"},"created_at":{"type":"integer","format":"int64","description":"Date de création (timestamp UNIX)"},"updated_at":{"type":"integer","format":"int64","description":"Date de mise à jour (timestamp UNIX)"},"data_created_at":{"type":"integer","format":"int64","description":"Date de création des données sur le serveur"},"data_updated_at":{"type":"integer","format":"int64","description":"Date de dernière mise à jour des données sur le serveur"},"user_id":{"type":"integer","description":"Propriétaire de la fiche"},"channels":{"type":"array","items":{"type":"string"},"description":"Conditions remplies par la fiche"},"items":{"type":"object","additionalProperties":true,"description":"Dictionnaire clé/valeur dont la clé est le nom système du champ.\n\n**Types simples :** texte/email → chaîne | nombre → flottant | booléen → bool |\ndate → timestamp UNIX | durée → ms | téléphone → RFC 3966\n\n**location :** `{lat, lng, address}`\n\n**image/signature/fichier :** `[{id, name, mimeType, extension, size, comment}]`\n\n**liste :** `[id, …]`\n\n**relation :** `{submissions: [{id, count?}, …]}`\n\n**utilisateur :** `[{id}, …]`\n"},"submission_number":{"type":"integer","description":"Numéro séquentiel global"},"number_in_structure":{"type":"integer","description":"Numéro séquentiel au sein du formulaire"},"latitude":{"type":"number","format":"double","description":"Latitude de la fiche"},"longitude":{"type":"number","format":"double","description":"Longitude de la fiche"},"last_updated_user_id":{"type":"integer","description":"Identifiant du dernier utilisateur ayant modifié la fiche"},"current_state":{"type":"string","format":"uuid","nullable":true,"description":"UUID de l'état de workflow courant (null si pas de workflow)"},"assigned_user":{"$ref":"#/components/schemas/UserRef"},"subscribers":{"type":"array","items":{},"description":"Utilisateurs abonnés à la fiche"},"settings":{"type":"array","items":{}}}},"UserRef":{"type":"object","description":"Référence à un utilisateur","properties":{"id":{"type":"integer"},"email":{"type":"string","format":"email"},"first_name":{"type":"string","description":"Prénom"},"last_name":{"type":"string","description":"Nom"},"groups":{"type":"array","items":{},"description":"Groupes de l'utilisateur"},"system_groups":{"type":"array","items":{},"description":"Groupes système de l'utilisateur"}}}}},"paths":{"/{app_short}/tasks":{"post":{"summary":"Créer une tâche (simple ou récurrente)","description":"Crée une tâche liée à un modèle de fiche (`submission_model_id`) ou à une liste de\nfiches (`submissions`). Pour une tâche **récurrente**, ajoutez l'objet `recurrency` ;\ndans ce cas `due_date` n'est pas obligatoire.\n","tags":["tasks-write"],"operationId":"createTask","parameters":[{"$ref":"#/components/parameters/AppShort"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskInput"}}}},"responses":{"200":{"description":"Tâche créée","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://www.center.daxium-air.com/api-reference/doc-api/taches/creation-de-taches.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
