Crego APIs
APIs DocHome Page
Web Apps
  • Jupiter
  • Venus
APIs DocHome Page
Web Apps
  • Jupiter
  • Venus
  1. APIs Doc
  • Reports
  • Auth
    • Get Token
      POST
    • Refresh Token
      POST
    • Ping
      GET
  • LMS
  • Omni
  • LOS
  • CRM
  • Flow
  • Sample Flow
  • Create Task
    POST
  1. APIs Doc

Create Task

preprod
https://preprod.api.crego.io
preprod
https://preprod.api.crego.io
POST
/v1/cron/tasks/
Last modified:2025-06-03 11:14:45

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json
name
string 
required
success_response_codes
array[integer]
required
type
string 
required
request_data
object 
required
headers
object 
required
method
string 
required
payload
object 
required
url
string 
required
timeout
integer 
required
schedule
object 
required
count
string 
required
cron
string 
required
priority
string 
required
Example
{
    "name": "Cron",
    "success_response_codes": [
        200,
        201
    ],
    "type": "request",
    "request_data": {
        "headers": {
            "content-type": "application/json"
        },
        "method": "GET",
        "payload": {},
        "url": "https://open.spotify.com/",
        "timeout": 300
    },
    "schedule": {
        "count": "10",
        "cron": "*/1 * * * *",
        "priority": "4"
    }
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://preprod.api.crego.io/v1/cron/tasks/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "Cron",
    "success_response_codes": [
        200,
        201
    ],
    "type": "request",
    "request_data": {
        "headers": {
            "content-type": "application/json"
        },
        "method": "GET",
        "payload": {},
        "url": "https://open.spotify.com/",
        "timeout": 300
    },
    "schedule": {
        "count": "10",
        "cron": "*/1 * * * *",
        "priority": "4"
    }
}'

Responses

🟢200Create Task
application/json
Body
_id
string 
required
created_at
string 
required
name
string 
required
remaining_count
string 
required
request_data
object 
required
headers
object 
required
method
string 
required
payload
object 
required
timeout
integer 
required
url
string 
required
schedule
object 
required
count
string 
required
cron
string 
required
priority
string 
required
status
string 
required
success_response_codes
array[integer]
required
type
string 
required
updated_at
string 
required
user_id
string 
required
Example
{
    "_id": "ed1155d0-be99-4107-8a5b-50ec55e753ac",
    "created_at": "1720598579",
    "name": "Cron",
    "remaining_count": "10",
    "request_data": {
        "headers": {
            "content-type": "application/json"
        },
        "method": "GET",
        "payload": {},
        "timeout": 300,
        "url": "https://open.spotify.com/"
    },
    "schedule": {
        "count": "10",
        "cron": "*/1 * * * *",
        "priority": "4"
    },
    "status": "initiated",
    "success_response_codes": [
        200,
        201
    ],
    "type": "request",
    "updated_at": "1720598579",
    "user_id": "9cca8c02-ac64-4d1d-94a6-9b738867b493"
}
Previous
Sample Flow
Built with