cURL
curl --request POST \ --url https://app.promptingco.com/api/v1/apps/{appId}/routes/batch \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data ' { "routes": [ { "path": "<string>", "targetId": "<string>", "targetType": "product_document" } ] } '
{ "ok": true, "data": { "createdCount": 1, "routes": [ { "id": "<string>", "appId": "<string>", "path": "<string>", "targetType": "product_document", "targetId": "<string>", "createdAt": "2023-11-07T05:31:56Z", "updatedAt": "2023-11-07T05:31:56Z", "target": { "id": "<string>", "title": "<string>", "filePath": "<string>", "sourceUrl": "<string>", "status": "<string>", "type": "<string>", "redirectToUrl": "<string>", "productId": "<string>" }, "product": { "id": "<string>", "name": "<string>", "slug": "<string>" } } ] } }
Organization-scoped API key. Available scopes:
1
1 - 100
Show child attributes
Successful response
true