Skip to content
GridRouterhome

Search

Search providers, capabilities and pages

Docs
API referenceCalls and routing

Save a preset

POST
/v1/presets

Create or replace a routing preset shared within the org (order/only/ignore/sort/max price/data policy, credential, fields, max cost, stop rule).

Authorization

bearer
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/presets" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "slug": "string"  }'
{  "name": "string",  "description": "",  "capability": null,  "provider": {},  "credential": "auto",  "fields": [    "string"  ],  "max_cost_micro": 0,  "stop_when": "hit",  "options": {    "timing": {      "timeout_ms": 100,      "deadline_ms": 100,      "hedge_after_ms": 50,      "wait_s": 0,      "run_at": "2019-08-24T14:15:22Z",      "delay_s": 1,      "schedule": "string",      "job_ttl_s": 60,      "retry": {        "max": 0,        "backoff": "fixed",        "base_ms": 10,        "max_ms": 10,        "jitter": true,        "retry_on": [          "429"        ]      }    },    "concurrency": {      "max_concurrency": 1,      "per_provider_concurrency": 1,      "priority": "low",      "ordering": "fifo"    },    "rate": {      "per_second": 0.01,      "per_minute": 1,      "burst": 1,      "adaptive": true    },    "cost": {      "max_cost_micro": 0,      "daily_cap_micro": 0,      "budget": "string",      "dry_run": true,      "quote_only": true    },    "routing": {      "provider": {        "order": [          "string"        ],        "only": [          "string"        ],        "ignore": [          "string"        ],        "allow_fallbacks": true,        "sort": "price",        "max_cost_micro": 0,        "max_price_micro": 0,        "preferred_max_latency_ms": 1,        "data_policy": {          "storage": "any",          "zdr": false        },        "require_verified": true      },      "preset": "string",      "waterfall": "string"    },    "data": {      "fields": [        "string"      ],      "cache": {        "mode": "prefer",        "max_age_s": 0,        "ttl_s": 60,        "stale_while_revalidate_s": 0,        "write": true,        "class_ttl_s": {          "work_email": 60,          "personal_email": 60,          "phone": 60,          "title": 60,          "firmographics": 60,          "technographics": 60,          "signals": 60,          "verification": 60,          "social": 60,          "other": 60        }      },      "store": {        "records": true,        "bodies": true      }    },    "delivery": {      "mode": "sync",      "webhook": {        "url": "http://example.com",        "events": [          "completed"        ],        "secret_ref": "string"      },      "destination": "string",      "stream": "sse"    },    "identity": {      "idempotency_key": "string",      "dedupe_window_s": 0,      "meta": {        "property1": "string",        "property2": "string"      },      "app": "string",      "run": "string",      "end_user": "string"    },    "observability": {      "log_level": "full",      "redact_fields": [        "string"      ],      "tail": true,      "tail_sample": 0    }  },  "object": "preset",  "slug": "string",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "updated_by": "string"}