curl --request POST \
--url http://localhost/mogl/mogl-backend/api/ai-edit-job \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": 2726,
"isEdit": 1,
"addTitleAndDescription": {
"job_name": "Content Creation Job",
"jobDescription": "<p>My gym is looking for athletes to help with video content and online presence.</p>",
"specifics_exclusive_deal": "None",
"deliverableList": [
{
"source_milestone_id": 6588,
"name": "Instagram Reel",
"description": "<p>Create and publish a Instagram Reel. See the deal description for full campaign requirements.</p>",
"payment_mode": "Cash",
"price": 33,
"product_detail": "None",
"milestone_category_id": 14,
"due_date_number": 2,
"due_date_type": "Week"
},
{
"source_milestone_id": 6588,
"name": "TikTok Video",
"description": "<p>Create and publish a TikTok Video. See the deal description for full campaign requirements.</p>",
"payment_mode": "Cash",
"price": 33,
"product_detail": "None",
"milestone_category_id": 15,
"due_date_number": 2,
"due_date_type": "Week"
},
{
"source_milestone_id": 6588,
"name": "X (Twitter) Post",
"description": "<p>Create and publish a X (Twitter) Post. See the deal description for full campaign requirements.</p>",
"payment_mode": "Cash",
"price": 35,
"product_detail": "None",
"milestone_category_id": 16,
"due_date_number": 2,
"due_date_type": "Week"
}
]
},
"addLocation": {
"university": [
1
],
"sports": [
1
],
"instagram_min": 1000,
"instagram_max": 5000,
"tiktok_min": 1000,
"tiktok_max": 5000,
"x_min": 1000,
"x_max": 5000
}
}
'import requests
url = "http://localhost/mogl/mogl-backend/api/ai-edit-job"
payload = {
"id": 2726,
"isEdit": 1,
"addTitleAndDescription": {
"job_name": "Content Creation Job",
"jobDescription": "<p>My gym is looking for athletes to help with video content and online presence.</p>",
"specifics_exclusive_deal": "None",
"deliverableList": [
{
"source_milestone_id": 6588,
"name": "Instagram Reel",
"description": "<p>Create and publish a Instagram Reel. See the deal description for full campaign requirements.</p>",
"payment_mode": "Cash",
"price": 33,
"product_detail": "None",
"milestone_category_id": 14,
"due_date_number": 2,
"due_date_type": "Week"
},
{
"source_milestone_id": 6588,
"name": "TikTok Video",
"description": "<p>Create and publish a TikTok Video. See the deal description for full campaign requirements.</p>",
"payment_mode": "Cash",
"price": 33,
"product_detail": "None",
"milestone_category_id": 15,
"due_date_number": 2,
"due_date_type": "Week"
},
{
"source_milestone_id": 6588,
"name": "X (Twitter) Post",
"description": "<p>Create and publish a X (Twitter) Post. See the deal description for full campaign requirements.</p>",
"payment_mode": "Cash",
"price": 35,
"product_detail": "None",
"milestone_category_id": 16,
"due_date_number": 2,
"due_date_type": "Week"
}
]
},
"addLocation": {
"university": [1],
"sports": [1],
"instagram_min": 1000,
"instagram_max": 5000,
"tiktok_min": 1000,
"tiktok_max": 5000,
"x_min": 1000,
"x_max": 5000
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 2726,
isEdit: 1,
addTitleAndDescription: {
job_name: 'Content Creation Job',
jobDescription: '<p>My gym is looking for athletes to help with video content and online presence.</p>',
specifics_exclusive_deal: 'None',
deliverableList: [
{
source_milestone_id: 6588,
name: 'Instagram Reel',
description: '<p>Create and publish a Instagram Reel. See the deal description for full campaign requirements.</p>',
payment_mode: 'Cash',
price: 33,
product_detail: 'None',
milestone_category_id: 14,
due_date_number: 2,
due_date_type: 'Week'
},
{
source_milestone_id: 6588,
name: 'TikTok Video',
description: '<p>Create and publish a TikTok Video. See the deal description for full campaign requirements.</p>',
payment_mode: 'Cash',
price: 33,
product_detail: 'None',
milestone_category_id: 15,
due_date_number: 2,
due_date_type: 'Week'
},
{
source_milestone_id: 6588,
name: 'X (Twitter) Post',
description: '<p>Create and publish a X (Twitter) Post. See the deal description for full campaign requirements.</p>',
payment_mode: 'Cash',
price: 35,
product_detail: 'None',
milestone_category_id: 16,
due_date_number: 2,
due_date_type: 'Week'
}
]
},
addLocation: {
university: [1],
sports: [1],
instagram_min: 1000,
instagram_max: 5000,
tiktok_min: 1000,
tiktok_max: 5000,
x_min: 1000,
x_max: 5000
}
})
};
fetch('http://localhost/mogl/mogl-backend/api/ai-edit-job', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://localhost/mogl/mogl-backend/api/ai-edit-job",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => 2726,
'isEdit' => 1,
'addTitleAndDescription' => [
'job_name' => 'Content Creation Job',
'jobDescription' => '<p>My gym is looking for athletes to help with video content and online presence.</p>',
'specifics_exclusive_deal' => 'None',
'deliverableList' => [
[
'source_milestone_id' => 6588,
'name' => 'Instagram Reel',
'description' => '<p>Create and publish a Instagram Reel. See the deal description for full campaign requirements.</p>',
'payment_mode' => 'Cash',
'price' => 33,
'product_detail' => 'None',
'milestone_category_id' => 14,
'due_date_number' => 2,
'due_date_type' => 'Week'
],
[
'source_milestone_id' => 6588,
'name' => 'TikTok Video',
'description' => '<p>Create and publish a TikTok Video. See the deal description for full campaign requirements.</p>',
'payment_mode' => 'Cash',
'price' => 33,
'product_detail' => 'None',
'milestone_category_id' => 15,
'due_date_number' => 2,
'due_date_type' => 'Week'
],
[
'source_milestone_id' => 6588,
'name' => 'X (Twitter) Post',
'description' => '<p>Create and publish a X (Twitter) Post. See the deal description for full campaign requirements.</p>',
'payment_mode' => 'Cash',
'price' => 35,
'product_detail' => 'None',
'milestone_category_id' => 16,
'due_date_number' => 2,
'due_date_type' => 'Week'
]
]
],
'addLocation' => [
'university' => [
1
],
'sports' => [
1
],
'instagram_min' => 1000,
'instagram_max' => 5000,
'tiktok_min' => 1000,
'tiktok_max' => 5000,
'x_min' => 1000,
'x_max' => 5000
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost/mogl/mogl-backend/api/ai-edit-job"
payload := strings.NewReader("{\n \"id\": 2726,\n \"isEdit\": 1,\n \"addTitleAndDescription\": {\n \"job_name\": \"Content Creation Job\",\n \"jobDescription\": \"<p>My gym is looking for athletes to help with video content and online presence.</p>\",\n \"specifics_exclusive_deal\": \"None\",\n \"deliverableList\": [\n {\n \"source_milestone_id\": 6588,\n \"name\": \"Instagram Reel\",\n \"description\": \"<p>Create and publish a Instagram Reel. See the deal description for full campaign requirements.</p>\",\n \"payment_mode\": \"Cash\",\n \"price\": 33,\n \"product_detail\": \"None\",\n \"milestone_category_id\": 14,\n \"due_date_number\": 2,\n \"due_date_type\": \"Week\"\n },\n {\n \"source_milestone_id\": 6588,\n \"name\": \"TikTok Video\",\n \"description\": \"<p>Create and publish a TikTok Video. See the deal description for full campaign requirements.</p>\",\n \"payment_mode\": \"Cash\",\n \"price\": 33,\n \"product_detail\": \"None\",\n \"milestone_category_id\": 15,\n \"due_date_number\": 2,\n \"due_date_type\": \"Week\"\n },\n {\n \"source_milestone_id\": 6588,\n \"name\": \"X (Twitter) Post\",\n \"description\": \"<p>Create and publish a X (Twitter) Post. See the deal description for full campaign requirements.</p>\",\n \"payment_mode\": \"Cash\",\n \"price\": 35,\n \"product_detail\": \"None\",\n \"milestone_category_id\": 16,\n \"due_date_number\": 2,\n \"due_date_type\": \"Week\"\n }\n ]\n },\n \"addLocation\": {\n \"university\": [\n 1\n ],\n \"sports\": [\n 1\n ],\n \"instagram_min\": 1000,\n \"instagram_max\": 5000,\n \"tiktok_min\": 1000,\n \"tiktok_max\": 5000,\n \"x_min\": 1000,\n \"x_max\": 5000\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost/mogl/mogl-backend/api/ai-edit-job")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": 2726,\n \"isEdit\": 1,\n \"addTitleAndDescription\": {\n \"job_name\": \"Content Creation Job\",\n \"jobDescription\": \"<p>My gym is looking for athletes to help with video content and online presence.</p>\",\n \"specifics_exclusive_deal\": \"None\",\n \"deliverableList\": [\n {\n \"source_milestone_id\": 6588,\n \"name\": \"Instagram Reel\",\n \"description\": \"<p>Create and publish a Instagram Reel. See the deal description for full campaign requirements.</p>\",\n \"payment_mode\": \"Cash\",\n \"price\": 33,\n \"product_detail\": \"None\",\n \"milestone_category_id\": 14,\n \"due_date_number\": 2,\n \"due_date_type\": \"Week\"\n },\n {\n \"source_milestone_id\": 6588,\n \"name\": \"TikTok Video\",\n \"description\": \"<p>Create and publish a TikTok Video. See the deal description for full campaign requirements.</p>\",\n \"payment_mode\": \"Cash\",\n \"price\": 33,\n \"product_detail\": \"None\",\n \"milestone_category_id\": 15,\n \"due_date_number\": 2,\n \"due_date_type\": \"Week\"\n },\n {\n \"source_milestone_id\": 6588,\n \"name\": \"X (Twitter) Post\",\n \"description\": \"<p>Create and publish a X (Twitter) Post. See the deal description for full campaign requirements.</p>\",\n \"payment_mode\": \"Cash\",\n \"price\": 35,\n \"product_detail\": \"None\",\n \"milestone_category_id\": 16,\n \"due_date_number\": 2,\n \"due_date_type\": \"Week\"\n }\n ]\n },\n \"addLocation\": {\n \"university\": [\n 1\n ],\n \"sports\": [\n 1\n ],\n \"instagram_min\": 1000,\n \"instagram_max\": 5000,\n \"tiktok_min\": 1000,\n \"tiktok_max\": 5000,\n \"x_min\": 1000,\n \"x_max\": 5000\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/mogl/mogl-backend/api/ai-edit-job")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": 2726,\n \"isEdit\": 1,\n \"addTitleAndDescription\": {\n \"job_name\": \"Content Creation Job\",\n \"jobDescription\": \"<p>My gym is looking for athletes to help with video content and online presence.</p>\",\n \"specifics_exclusive_deal\": \"None\",\n \"deliverableList\": [\n {\n \"source_milestone_id\": 6588,\n \"name\": \"Instagram Reel\",\n \"description\": \"<p>Create and publish a Instagram Reel. See the deal description for full campaign requirements.</p>\",\n \"payment_mode\": \"Cash\",\n \"price\": 33,\n \"product_detail\": \"None\",\n \"milestone_category_id\": 14,\n \"due_date_number\": 2,\n \"due_date_type\": \"Week\"\n },\n {\n \"source_milestone_id\": 6588,\n \"name\": \"TikTok Video\",\n \"description\": \"<p>Create and publish a TikTok Video. See the deal description for full campaign requirements.</p>\",\n \"payment_mode\": \"Cash\",\n \"price\": 33,\n \"product_detail\": \"None\",\n \"milestone_category_id\": 15,\n \"due_date_number\": 2,\n \"due_date_type\": \"Week\"\n },\n {\n \"source_milestone_id\": 6588,\n \"name\": \"X (Twitter) Post\",\n \"description\": \"<p>Create and publish a X (Twitter) Post. See the deal description for full campaign requirements.</p>\",\n \"payment_mode\": \"Cash\",\n \"price\": 35,\n \"product_detail\": \"None\",\n \"milestone_category_id\": 16,\n \"due_date_number\": 2,\n \"due_date_type\": \"Week\"\n }\n ]\n },\n \"addLocation\": {\n \"university\": [\n 1\n ],\n \"sports\": [\n 1\n ],\n \"instagram_min\": 1000,\n \"instagram_max\": 5000,\n \"tiktok_min\": 1000,\n \"tiktok_max\": 5000,\n \"x_min\": 1000,\n \"x_max\": 5000\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Job Updated Successfully"
}Edit job after AI review
Accepts AI-suggested edits for an existing job (first-deal auto-approval flow). Only updates fields that are provided. Use deliverableList with source_milestone_id to split one milestone into multiple deliverables; use id (without source_milestone_id) to update an existing milestone in place. Marks the pending AI suggestion as accepted, activates the job, and may trigger AI ranking for public jobs.
curl --request POST \
--url http://localhost/mogl/mogl-backend/api/ai-edit-job \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": 2726,
"isEdit": 1,
"addTitleAndDescription": {
"job_name": "Content Creation Job",
"jobDescription": "<p>My gym is looking for athletes to help with video content and online presence.</p>",
"specifics_exclusive_deal": "None",
"deliverableList": [
{
"source_milestone_id": 6588,
"name": "Instagram Reel",
"description": "<p>Create and publish a Instagram Reel. See the deal description for full campaign requirements.</p>",
"payment_mode": "Cash",
"price": 33,
"product_detail": "None",
"milestone_category_id": 14,
"due_date_number": 2,
"due_date_type": "Week"
},
{
"source_milestone_id": 6588,
"name": "TikTok Video",
"description": "<p>Create and publish a TikTok Video. See the deal description for full campaign requirements.</p>",
"payment_mode": "Cash",
"price": 33,
"product_detail": "None",
"milestone_category_id": 15,
"due_date_number": 2,
"due_date_type": "Week"
},
{
"source_milestone_id": 6588,
"name": "X (Twitter) Post",
"description": "<p>Create and publish a X (Twitter) Post. See the deal description for full campaign requirements.</p>",
"payment_mode": "Cash",
"price": 35,
"product_detail": "None",
"milestone_category_id": 16,
"due_date_number": 2,
"due_date_type": "Week"
}
]
},
"addLocation": {
"university": [
1
],
"sports": [
1
],
"instagram_min": 1000,
"instagram_max": 5000,
"tiktok_min": 1000,
"tiktok_max": 5000,
"x_min": 1000,
"x_max": 5000
}
}
'import requests
url = "http://localhost/mogl/mogl-backend/api/ai-edit-job"
payload = {
"id": 2726,
"isEdit": 1,
"addTitleAndDescription": {
"job_name": "Content Creation Job",
"jobDescription": "<p>My gym is looking for athletes to help with video content and online presence.</p>",
"specifics_exclusive_deal": "None",
"deliverableList": [
{
"source_milestone_id": 6588,
"name": "Instagram Reel",
"description": "<p>Create and publish a Instagram Reel. See the deal description for full campaign requirements.</p>",
"payment_mode": "Cash",
"price": 33,
"product_detail": "None",
"milestone_category_id": 14,
"due_date_number": 2,
"due_date_type": "Week"
},
{
"source_milestone_id": 6588,
"name": "TikTok Video",
"description": "<p>Create and publish a TikTok Video. See the deal description for full campaign requirements.</p>",
"payment_mode": "Cash",
"price": 33,
"product_detail": "None",
"milestone_category_id": 15,
"due_date_number": 2,
"due_date_type": "Week"
},
{
"source_milestone_id": 6588,
"name": "X (Twitter) Post",
"description": "<p>Create and publish a X (Twitter) Post. See the deal description for full campaign requirements.</p>",
"payment_mode": "Cash",
"price": 35,
"product_detail": "None",
"milestone_category_id": 16,
"due_date_number": 2,
"due_date_type": "Week"
}
]
},
"addLocation": {
"university": [1],
"sports": [1],
"instagram_min": 1000,
"instagram_max": 5000,
"tiktok_min": 1000,
"tiktok_max": 5000,
"x_min": 1000,
"x_max": 5000
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 2726,
isEdit: 1,
addTitleAndDescription: {
job_name: 'Content Creation Job',
jobDescription: '<p>My gym is looking for athletes to help with video content and online presence.</p>',
specifics_exclusive_deal: 'None',
deliverableList: [
{
source_milestone_id: 6588,
name: 'Instagram Reel',
description: '<p>Create and publish a Instagram Reel. See the deal description for full campaign requirements.</p>',
payment_mode: 'Cash',
price: 33,
product_detail: 'None',
milestone_category_id: 14,
due_date_number: 2,
due_date_type: 'Week'
},
{
source_milestone_id: 6588,
name: 'TikTok Video',
description: '<p>Create and publish a TikTok Video. See the deal description for full campaign requirements.</p>',
payment_mode: 'Cash',
price: 33,
product_detail: 'None',
milestone_category_id: 15,
due_date_number: 2,
due_date_type: 'Week'
},
{
source_milestone_id: 6588,
name: 'X (Twitter) Post',
description: '<p>Create and publish a X (Twitter) Post. See the deal description for full campaign requirements.</p>',
payment_mode: 'Cash',
price: 35,
product_detail: 'None',
milestone_category_id: 16,
due_date_number: 2,
due_date_type: 'Week'
}
]
},
addLocation: {
university: [1],
sports: [1],
instagram_min: 1000,
instagram_max: 5000,
tiktok_min: 1000,
tiktok_max: 5000,
x_min: 1000,
x_max: 5000
}
})
};
fetch('http://localhost/mogl/mogl-backend/api/ai-edit-job', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://localhost/mogl/mogl-backend/api/ai-edit-job",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => 2726,
'isEdit' => 1,
'addTitleAndDescription' => [
'job_name' => 'Content Creation Job',
'jobDescription' => '<p>My gym is looking for athletes to help with video content and online presence.</p>',
'specifics_exclusive_deal' => 'None',
'deliverableList' => [
[
'source_milestone_id' => 6588,
'name' => 'Instagram Reel',
'description' => '<p>Create and publish a Instagram Reel. See the deal description for full campaign requirements.</p>',
'payment_mode' => 'Cash',
'price' => 33,
'product_detail' => 'None',
'milestone_category_id' => 14,
'due_date_number' => 2,
'due_date_type' => 'Week'
],
[
'source_milestone_id' => 6588,
'name' => 'TikTok Video',
'description' => '<p>Create and publish a TikTok Video. See the deal description for full campaign requirements.</p>',
'payment_mode' => 'Cash',
'price' => 33,
'product_detail' => 'None',
'milestone_category_id' => 15,
'due_date_number' => 2,
'due_date_type' => 'Week'
],
[
'source_milestone_id' => 6588,
'name' => 'X (Twitter) Post',
'description' => '<p>Create and publish a X (Twitter) Post. See the deal description for full campaign requirements.</p>',
'payment_mode' => 'Cash',
'price' => 35,
'product_detail' => 'None',
'milestone_category_id' => 16,
'due_date_number' => 2,
'due_date_type' => 'Week'
]
]
],
'addLocation' => [
'university' => [
1
],
'sports' => [
1
],
'instagram_min' => 1000,
'instagram_max' => 5000,
'tiktok_min' => 1000,
'tiktok_max' => 5000,
'x_min' => 1000,
'x_max' => 5000
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost/mogl/mogl-backend/api/ai-edit-job"
payload := strings.NewReader("{\n \"id\": 2726,\n \"isEdit\": 1,\n \"addTitleAndDescription\": {\n \"job_name\": \"Content Creation Job\",\n \"jobDescription\": \"<p>My gym is looking for athletes to help with video content and online presence.</p>\",\n \"specifics_exclusive_deal\": \"None\",\n \"deliverableList\": [\n {\n \"source_milestone_id\": 6588,\n \"name\": \"Instagram Reel\",\n \"description\": \"<p>Create and publish a Instagram Reel. See the deal description for full campaign requirements.</p>\",\n \"payment_mode\": \"Cash\",\n \"price\": 33,\n \"product_detail\": \"None\",\n \"milestone_category_id\": 14,\n \"due_date_number\": 2,\n \"due_date_type\": \"Week\"\n },\n {\n \"source_milestone_id\": 6588,\n \"name\": \"TikTok Video\",\n \"description\": \"<p>Create and publish a TikTok Video. See the deal description for full campaign requirements.</p>\",\n \"payment_mode\": \"Cash\",\n \"price\": 33,\n \"product_detail\": \"None\",\n \"milestone_category_id\": 15,\n \"due_date_number\": 2,\n \"due_date_type\": \"Week\"\n },\n {\n \"source_milestone_id\": 6588,\n \"name\": \"X (Twitter) Post\",\n \"description\": \"<p>Create and publish a X (Twitter) Post. See the deal description for full campaign requirements.</p>\",\n \"payment_mode\": \"Cash\",\n \"price\": 35,\n \"product_detail\": \"None\",\n \"milestone_category_id\": 16,\n \"due_date_number\": 2,\n \"due_date_type\": \"Week\"\n }\n ]\n },\n \"addLocation\": {\n \"university\": [\n 1\n ],\n \"sports\": [\n 1\n ],\n \"instagram_min\": 1000,\n \"instagram_max\": 5000,\n \"tiktok_min\": 1000,\n \"tiktok_max\": 5000,\n \"x_min\": 1000,\n \"x_max\": 5000\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost/mogl/mogl-backend/api/ai-edit-job")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": 2726,\n \"isEdit\": 1,\n \"addTitleAndDescription\": {\n \"job_name\": \"Content Creation Job\",\n \"jobDescription\": \"<p>My gym is looking for athletes to help with video content and online presence.</p>\",\n \"specifics_exclusive_deal\": \"None\",\n \"deliverableList\": [\n {\n \"source_milestone_id\": 6588,\n \"name\": \"Instagram Reel\",\n \"description\": \"<p>Create and publish a Instagram Reel. See the deal description for full campaign requirements.</p>\",\n \"payment_mode\": \"Cash\",\n \"price\": 33,\n \"product_detail\": \"None\",\n \"milestone_category_id\": 14,\n \"due_date_number\": 2,\n \"due_date_type\": \"Week\"\n },\n {\n \"source_milestone_id\": 6588,\n \"name\": \"TikTok Video\",\n \"description\": \"<p>Create and publish a TikTok Video. See the deal description for full campaign requirements.</p>\",\n \"payment_mode\": \"Cash\",\n \"price\": 33,\n \"product_detail\": \"None\",\n \"milestone_category_id\": 15,\n \"due_date_number\": 2,\n \"due_date_type\": \"Week\"\n },\n {\n \"source_milestone_id\": 6588,\n \"name\": \"X (Twitter) Post\",\n \"description\": \"<p>Create and publish a X (Twitter) Post. See the deal description for full campaign requirements.</p>\",\n \"payment_mode\": \"Cash\",\n \"price\": 35,\n \"product_detail\": \"None\",\n \"milestone_category_id\": 16,\n \"due_date_number\": 2,\n \"due_date_type\": \"Week\"\n }\n ]\n },\n \"addLocation\": {\n \"university\": [\n 1\n ],\n \"sports\": [\n 1\n ],\n \"instagram_min\": 1000,\n \"instagram_max\": 5000,\n \"tiktok_min\": 1000,\n \"tiktok_max\": 5000,\n \"x_min\": 1000,\n \"x_max\": 5000\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/mogl/mogl-backend/api/ai-edit-job")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": 2726,\n \"isEdit\": 1,\n \"addTitleAndDescription\": {\n \"job_name\": \"Content Creation Job\",\n \"jobDescription\": \"<p>My gym is looking for athletes to help with video content and online presence.</p>\",\n \"specifics_exclusive_deal\": \"None\",\n \"deliverableList\": [\n {\n \"source_milestone_id\": 6588,\n \"name\": \"Instagram Reel\",\n \"description\": \"<p>Create and publish a Instagram Reel. See the deal description for full campaign requirements.</p>\",\n \"payment_mode\": \"Cash\",\n \"price\": 33,\n \"product_detail\": \"None\",\n \"milestone_category_id\": 14,\n \"due_date_number\": 2,\n \"due_date_type\": \"Week\"\n },\n {\n \"source_milestone_id\": 6588,\n \"name\": \"TikTok Video\",\n \"description\": \"<p>Create and publish a TikTok Video. See the deal description for full campaign requirements.</p>\",\n \"payment_mode\": \"Cash\",\n \"price\": 33,\n \"product_detail\": \"None\",\n \"milestone_category_id\": 15,\n \"due_date_number\": 2,\n \"due_date_type\": \"Week\"\n },\n {\n \"source_milestone_id\": 6588,\n \"name\": \"X (Twitter) Post\",\n \"description\": \"<p>Create and publish a X (Twitter) Post. See the deal description for full campaign requirements.</p>\",\n \"payment_mode\": \"Cash\",\n \"price\": 35,\n \"product_detail\": \"None\",\n \"milestone_category_id\": 16,\n \"due_date_number\": 2,\n \"due_date_type\": \"Week\"\n }\n ]\n },\n \"addLocation\": {\n \"university\": [\n 1\n ],\n \"sports\": [\n 1\n ],\n \"instagram_min\": 1000,\n \"instagram_max\": 5000,\n \"tiktok_min\": 1000,\n \"tiktok_max\": 5000,\n \"x_min\": 1000,\n \"x_max\": 5000\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Job Updated Successfully"
}Authorizations
JWT Bearer token authentication. Use the /api/login endpoint to obtain a token.
Body
Job ID to edit (must be created by the authenticated partner)
2726
Optional flag sent by the client (same as add-job); not required for AI edit
1
Show child attributes
Show child attributes
Job targeting criteria. Only fields explicitly posted are applied (no AI backfill merge on accept).
Show child attributes
Show child attributes