POST
Mission.Add
Create a mission/task matching dashboard create_mission AJAX. Same fields as Mission.Create including Priority (priority / appoinment_color1 / color: transparent, yellow, red, green, blue). Runs mission.created automation and realtime mission.created.
Permissions
- User must be logged in with a valid bearer token.
- Returned or changed records are limited by the user permissions, team access, folder access, and account settings.
Action
- Creates a Mission record or sends the requested data after validation.
Push Service
Pushes event mission.created to users who should see this change.
Automation
Runs automation event mission.created with the record id and submitted parameters after the action succeeds.
Special Instructions
- Send the bearer token on protected calls with Authorization: Bearer YOUR TOKEN.
- Send parameters as POST body fields exactly as documented.
- Send date/time values in UTC Y-m-d H:i:s format when a date or datetime field is used.
Required Parameters
| Name | Type | Sample | Explanation |
|---|---|---|---|
missionpost | string | Call customer | Mission title/text. Aliases: title, message (dashboard form field). |
Optional Parameters
| Name | Type | Sample | What it gives |
|---|---|---|---|
notepost | string | Follow up about quote | Optional notes. |
date_to_dopost | string | tomorrow | Due date. Supports today, tomorrow, next_week, choose_date, or Y-m-d H:i:s / datetime. Alias: due_date. Default now. |
days_after_adspost | int | 3 | If set, due date = now + N days (dashboard days_after_ads). |
customer_idpost | int | 123 | Customer id. Aliases: cust_id, client_id, clientid, client_id1, lead_id. |
organizations_userpost | array|string | 47,48 | Assignee member id(s), comma-separated or array. Alias: member_id. Default current user. |
project_idpost | int | 10 | Project id. If customer_id empty, customer may be taken from the project. |
missions_steps_idpost | string | 5 | Mission step id from Create Mission Step dropdown (missions_steps). List options via Mission.StepsList / MissionSteps.List or User.Basic data.mission_steps. Or send add_new_mission_step with step_name_en / step_name_he / step_color. Alias: mission_step_id. |
ticket_idpost | int | 900 | Linked ticket id. |
project_columnpost | string | to_do | Board column. Default to_do. If done and ticket_id set, ticket is marked done. |
time_missionpost | string | 30min | Duration. Alias: time. Also time_mission_days (Nd), time_mission_hours (Nh), or start_time+end_time. |
prioritypost | string | yellow | Create Mission Priority dropdown. Stored in missions.color. Values: transparent (Default), yellow, red, green, blue. Aliases: appoinment_color1 (dashboard select name), color. If omitted: yellow. |
appoinment_color1post | string | yellow | Dashboard form name for Priority. Same values as priority. |
colorpost | string | yellow | Alias for Priority. Same values: transparent, yellow, red, green, blue. |
tag_idpost | array|string | 1,2 | Tag ids. Aliases: tag, select_tag_misn, sel_tag. |
repeat_dayspost | string | daily | Repeat rule when used by the account (daily/weekly/monthly/etc.). |
sub_missionspost | array|json | ["Check docs","Send email"] | Sub-mission titles array, or JSON objects. Pair with sub_missions_done / sub_missions_done1 and sub_missions_user, or send sub_missions_formated. |
mission_reminderpost | json | [] | Reminder JSON array, or parallel arrays reminder_name, reminder_description, reminder_type, reminder_send_on, reminder_datetime. |
notify_clientpost | int | 0 | 1 to notify customer. |
email_me_employeepost | int | 0 | 1 to email assignees. |
whatsApp_reminderpost | int | 0 | 1 for WhatsApp reminder. Alias: whatsapp_reminder. |
use_as_templatepost | int | 0 | 1 = save as template (show_mission becomes 0 unless show_mission is sent). |
private_missionpost | int | 0 | 1 = private (clears assignees and customer, same as dashboard). |
imagefile | file | photo.png | Multipart image upload. Field names: image, image[], mission_image, mission_image[], file. Multiple files are joined with ---@---. Allowed image/document types same as Files.Upload. You can also send an already-uploaded path string in image / mission_image. |
room_idpost | int | 0 | Optional room id. |
flow_idpost | int | 0 | Optional workflow flow id. |
step_idpost | int | 0 | Optional workflow step id. |
Authentication
Send the bearer token returned by Login in the request header.
Authorization: Bearer YOUR TOKEN
Sample Request
{
"url": "\/app\/Mission.Add",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"mission": "Call customer",
"customer_id": "123",
"organizations_user": "47,48",
"date_to_do": "tomorrow",
"time_mission": "30min",
"priority": "yellow",
"project_id": "10",
"missions_steps_id": "5",
"note": "Follow up about quote",
"notify_client": "0"
},
"url_user": "https:\/\/{user}.bull36.com\/app\/Mission.Add",
"url_domain": "https:\/\/{domain}\/app\/Mission.Add"
}Endpoint
POST /app/Mission.Add
POST https://{user}.bull36.com/app/Mission.Add
POST https://{domain}/app/Mission.AddSample Output
{
"success": 1,
"message": "Success",
"mission_id": "500",
"id": "500",
"image": "biz1upload\/app\/{domain}\/{user}\/mission.add\/1784282338000-a1b2c3.png",
"image_url": "https:\/\/files.biz1.co.il\/biz1upload\/app\/{domain}\/{user}\/mission.add\/1784282338000-a1b2c3.png",
"images": [],
"automation_event": "mission.created",
"socket_event": "mission.created"
}JavaScript Example
const token = 'YOUR TOKEN';
const body = new URLSearchParams({
mission: 'Call customer',
customer_id: '123',
organizations_user: '47,48',
date_to_do: 'tomorrow',
time_mission: '30min',
priority: 'yellow',
note: 'Follow up about quote'
});
const res = await fetch('/app/Mission.Add', {
method: 'POST',
headers: { Authorization: 'Bearer ' + token },
body
});
const data = await res.json();
console.log(data);Error Example
{
"success": 0,
"message": "Missing required parameter: mission"
}