Call it
curl https://api.peume.com/v1/call/redirect-chains \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"id": "03051327-4536-0216-1000-3b458a2cfcca",
"url": "https://test_rdr.example.com/a/"
}
}'const res = await fetch("https://api.peume.com/v1/call/redirect-chains", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"id": "03051327-4536-0216-1000-3b458a2cfcca",
"url": "https://test_rdr.example.com/a/"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/redirect-chains",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"id": "03051327-4536-0216-1000-3b458a2cfcca",
"url": "https://test_rdr.example.com/a/"
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: redirect-chains.
Parameters
idstringID of the task required field you can get this ID in the response of the Task POST endpoint example: “07131248-1535-0216-1000-17384017ad04”
Example: 03051327-4536-0216-1000-3b458a2cfcca
urlstringpage URL optional field absolute URL of the target page if you use this field, the API response will return only redirect chains which contain the specified URL
Example: https://test_rdr.example.com/a/
limitintegerthe maximum number of returned redirect chains optional field default value: 100 maximum value: 1000
offsetintegeroffset in the results array of returned redirect chains optional field default value: 0 maximum value: 2000000 if you specify the 10 value, the first ten redirect chains in the results array will be omitted and the data will be provided for the successive redirect chains
filtersarrayarray of results filtering parameters optional field you can use only one filtering parameter with this endpoint the following filtering parameter is supported: is_redirect_loop the following operators are supported: regex, not_regex, =, <> examples: ["is_redirect_loop","=","true"] ["is_redirect_loo
tagstringuser-defined task identifier optional field the character limit is 255 you can use this parameter to identify the task and match it with the result you will find the specified tag value in the data object of the response
