Skip to content

Patch an RTB formula

PATCH
/api/v1/rtbs/{rtb_id}
curl --request PATCH \
--url https://external-api.moja-ai.com/api/v1/rtbs/example \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "rtb_name": "example", "buyer_id": "example", "rtb_type": "example", "static_phone_number": "example", "use_static_phone_number": true, "steps": [ { "url": "example", "method": "example", "headers": [ { "key": "Authorization", "value": "Bearer token-123" } ], "query_params": [ { "key": "caller_id", "value": "{{caller_id}}" } ], "body_params": [ { "key": "zip_code", "value": "{{zip_code}}" } ], "body_type": "none", "raw_body": "", "api_response": { "bid": 12.5, "duration": 90, "phoneNumber": "+15551234567" }, "run_on_rtb_group_win": false, "selected_keys": [ { "key": "bid", "path": "data.bid" } ], "response_field_mappings": [ { "fieldPath": "data.bid", "stepIndex": 0, "tagName": "bid" } ], "continue_on_failure": false, "processed_response": "", "process_response_code": "", "target_selection_criteria": {} } ], "mapped_response": { "bid": "data.bid", "duration": "data.duration", "phone_number": "data.phoneNumber" }, "zip_code_type": "example", "static_zip_code": "example", "caller_id_param": "example", "zip_code_param": "example", "caller_id_test": "example", "misc_settings": { "retryCount": 2, "timeoutMs": 5000 }, "parsing_formula": { "parseInstructions": { "duration": "data.duration", "payout": "data.bid", "phoneNumber": "data.phoneNumber" } }, "hours_of_operation": { "always_open": true, "days": [] }, "timezone": "example", "is_active": true, "max_concurrency": 1, "consider_duplicate": true, "consider_duplicate_on": "example", "consider_duplicate_length": 1, "consider_duplicate_interval": 1, "conversion_scope": 1, "duplicate_conversion_action": "decline", "filters": { "enabled": true, "groups": [ { "conditions": [ { "field": "state", "operator": "in", "values": [ "CA", "TX" ] } ] } ] }, "rtb_timeout": 1, "outbound_ping_rate_limit": 1, "outbound_ping_rate_period": "min", "outbound_ping_max_inflight": 1, "outbound_ping_backoff_enabled": true, "outbound_ping_backoff_threshold": 1, "outbound_ping_backoff_seconds": 1, "external_id": "example", "disable_recordings": true, "access_to_call_recordings": true, "advanced_caps": [ {} ] }'
rtb_id
required
Rtb Id
string
X-API-Key
Any of:
string
Media typeapplication/json
RTBPatch
object
rtb_name
Any of:
string
>= 1 characters <= 255 characters
buyer_id
Any of:
string
>= 1 characters
rtb_type
Any of:
string
static_phone_number
Any of:
string
use_static_phone_number
Any of:
boolean
steps
Any of:
Array<object>
>= 1 items
RTBStep
object
url
required
Url
string
method
required
Method
string
headers
Headers
Array<object>
object
key
additional properties
any
query_params
Query Params
Array<object>
object
key
additional properties
any
body_params
Body Params
Array<object>
object
key
additional properties
any
body_type
Body Type
string
default: none
raw_body
Raw Body
string
""
api_response
required
Api Response
run_on_rtb_group_win
Run On Rtb Group Win
boolean
selected_keys
Selected Keys
Array<object>
object
key
additional properties
any
response_field_mappings
Response Field Mappings
Array<object>
object
key
additional properties
any
continue_on_failure
Continue On Failure
boolean
processed_response
Processed Response
""
process_response_code
Process Response Code
string
""
target_selection_criteria
Any of:
object
key
additional properties
any
mapped_response
Any of:
object
key
additional properties
any
zip_code_type
Any of:
string
static_zip_code
Any of:
string
caller_id_param
Any of:
string
zip_code_param
Any of:
string
caller_id_test
Any of:
string
misc_settings
Any of:
object
key
additional properties
any
parsing_formula
Any of:
object
key
additional properties
any
hours_of_operation
Any of:
object
key
additional properties
any
timezone
Any of:
string
is_active
Any of:
boolean
max_concurrency
Any of:
integer
consider_duplicate
Any of:
boolean
consider_duplicate_on
Any of:
string
consider_duplicate_length
Any of:
integer
consider_duplicate_interval
Any of:
integer
>= 1
conversion_scope
Any of:
integer
duplicate_conversion_action
Any of:
string
Allowed values: decline route_no_pay route_no_revenue route_no_revenue_no_pay
filters
Any of:
object
key
additional properties
any
rtb_timeout
Any of:
integer
>= 1 <= 30000
outbound_ping_rate_limit
Any of:
integer
outbound_ping_rate_period
Any of:
string
Allowed values: min hour day
outbound_ping_max_inflight
Any of:
integer
outbound_ping_backoff_enabled
Any of:
boolean
outbound_ping_backoff_threshold
Any of:
integer
>= 1
outbound_ping_backoff_seconds
Any of:
integer
>= 1
external_id
Any of:
string
>= 1 characters <= 64 characters
disable_recordings
Any of:
boolean
access_to_call_recordings
Any of:
boolean
advanced_caps
Any of:
Array<object>
object
key
additional properties
any

Successful Response

Media typeapplication/json
RTBResponse
object
id
required
Id
string
created_at
Any of:
string format: date-time
updated_at
Any of:
string format: date-time
org_id
required
Org Id
string
buyer_id
Any of:
string
buyer_name
Any of:
string
rtb_name
required
Rtb Name
string
rtb_type
required
Rtb Type
string
static_phone_number
Static Phone Number
string
""
use_static_phone_number
Use Static Phone Number
boolean
steps
Steps
Array<object>
RTBStep
object
url
required
Url
string
method
required
Method
string
headers
Headers
Array<object>
object
key
additional properties
any
query_params
Query Params
Array<object>
object
key
additional properties
any
body_params
Body Params
Array<object>
object
key
additional properties
any
body_type
Body Type
string
default: none
raw_body
Raw Body
string
""
api_response
required
Api Response
run_on_rtb_group_win
Run On Rtb Group Win
boolean
selected_keys
Selected Keys
Array<object>
object
key
additional properties
any
response_field_mappings
Response Field Mappings
Array<object>
object
key
additional properties
any
continue_on_failure
Continue On Failure
boolean
processed_response
Processed Response
""
process_response_code
Process Response Code
string
""
target_selection_criteria
Any of:
object
key
additional properties
any
mapped_response
Mapped Response
object
key
additional properties
any
zip_code_type
Zip Code Type
string
default: dynamic
static_zip_code
Static Zip Code
string
""
caller_id_param
Caller Id Param
string
""
zip_code_param
Zip Code Param
string
""
caller_id_test
Caller Id Test
string
""
misc_settings
Misc Settings
object
key
additional properties
any
parsing_formula
Parsing Formula
object
key
additional properties
any
hours_of_operation
Hours Of Operation
object
key
additional properties
any
timezone
Any of:
string
is_active
required
Is Active
boolean
max_concurrency
Max Concurrency
integer
0
consider_duplicate
Consider Duplicate
boolean
consider_duplicate_on
Any of:
string
consider_duplicate_length
Any of:
integer
consider_duplicate_interval
Consider Duplicate Interval
integer
default: 30
conversion_scope
required
Conversion Scope
integer
duplicate_conversion_action
Duplicate Conversion Action
string
default: decline
Allowed values: decline route_no_pay route_no_revenue route_no_revenue_no_pay
filters
Any of:
object
key
additional properties
any
rtb_timeout
Rtb Timeout
integer
default: 5000
outbound_ping_rate_limit
Any of:
integer
outbound_ping_rate_period
Any of:
string
Allowed values: min hour day
outbound_ping_max_inflight
Any of:
integer
outbound_ping_backoff_enabled
Outbound Ping Backoff Enabled
boolean
outbound_ping_backoff_threshold
Outbound Ping Backoff Threshold
integer
default: 3
outbound_ping_backoff_seconds
Outbound Ping Backoff Seconds
integer
default: 60
external_id
Any of:
string
disable_recordings
Disable Recordings
boolean
access_to_call_recordings
required
Access To Call Recordings
boolean
advanced_caps
Advanced Caps
Array<object>
object
key
additional properties
any
paused_until
Any of:
string format: date-time
paused_at
Any of:
string format: date-time
paused_by
Any of:
string
is_paused
Is Paused
boolean
Example
{
"static_phone_number": "",
"use_static_phone_number": false,
"steps": [
{
"headers": [
{
"key": "Authorization",
"value": "Bearer token-123"
}
],
"query_params": [
{
"key": "caller_id",
"value": "{{caller_id}}"
}
],
"body_params": [
{
"key": "zip_code",
"value": "{{zip_code}}"
}
],
"body_type": "none",
"raw_body": "",
"api_response": {
"bid": 12.5,
"duration": 90,
"phoneNumber": "+15551234567"
},
"run_on_rtb_group_win": false,
"selected_keys": [
{
"key": "bid",
"path": "data.bid"
}
],
"response_field_mappings": [
{
"fieldPath": "data.bid",
"stepIndex": 0,
"tagName": "bid"
}
],
"continue_on_failure": false,
"processed_response": "",
"process_response_code": ""
}
],
"mapped_response": {
"bid": "data.bid",
"duration": "data.duration",
"phone_number": "data.phoneNumber"
},
"zip_code_type": "dynamic",
"static_zip_code": "",
"caller_id_param": "",
"zip_code_param": "",
"caller_id_test": "",
"misc_settings": {
"retryCount": 2,
"timeoutMs": 5000
},
"parsing_formula": {
"parseInstructions": {
"duration": "data.duration",
"payout": "data.bid",
"phoneNumber": "data.phoneNumber"
}
},
"hours_of_operation": {
"always_open": true,
"days": []
},
"max_concurrency": 0,
"consider_duplicate": false,
"consider_duplicate_interval": 30,
"duplicate_conversion_action": "decline",
"filters": {
"enabled": true,
"groups": [
{
"conditions": [
{
"field": "state",
"operator": "in",
"values": [
"CA",
"TX"
]
}
]
}
]
},
"rtb_timeout": 5000,
"outbound_ping_rate_period": "min",
"outbound_ping_backoff_enabled": false,
"outbound_ping_backoff_threshold": 3,
"outbound_ping_backoff_seconds": 60,
"disable_recordings": false,
"is_paused": false
}

Bad Request

Media typeapplication/json
ErrorResponse
object
detail
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
Examplegenerated
{
"detail": {
"code": "example",
"message": "example"
}
}

Unauthorized

Media typeapplication/json
ErrorResponse
object
detail
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
Examplegenerated
{
"detail": {
"code": "example",
"message": "example"
}
}

Not Found

Media typeapplication/json
ErrorResponse
object
detail
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
Examplegenerated
{
"detail": {
"code": "example",
"message": "example"
}
}

Conflict

Media typeapplication/json
ErrorResponse
object
detail
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
Examplegenerated
{
"detail": {
"code": "example",
"message": "example"
}
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}

Too Many Requests

Media typeapplication/json
ErrorResponse
object
detail
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
Examplegenerated
{
"detail": {
"code": "example",
"message": "example"
}
}