Answer the exact pending execution question
curl --request POST \
--url https://api.peel.sh/v1/executions/{id}/input \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"question_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"answer": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({question_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', answer: '<string>'})
};
fetch('https://api.peel.sh/v1/executions/{id}/input', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.peel.sh/v1/executions/{id}/input"
payload = {
"question_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"answer": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "running",
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"question": {
"key": "<string>",
"prompt": "<string>",
"secret": true,
"question_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"step": "<string>",
"details": {},
"dialog": {
"type": "<string>",
"message": "<string>",
"defaultValue": "<string>"
},
"allow_empty": true,
"answer_url": "<string>"
},
"result": {
"status": "success",
"execution_time": 1,
"data": "<unknown>",
"status_code": 349,
"error_code": "<string>",
"action_outcome": "committed",
"retry_safe": true,
"retry": "never",
"cache_status": "hit",
"credits_charged": 123,
"credits_remaining": 123,
"runtime_source": "live",
"transport": "html_browser"
},
"error": {
"code": "<string>",
"message": "<string>",
"action_outcome": "committed",
"retry_safe": true,
"retry": "never"
},
"progress": [
{
"at": "2023-11-07T05:31:56Z",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"retry": "same_key",
"docs_url": "<string>",
"details": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"retry": "same_key",
"docs_url": "<string>",
"details": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"retry": "same_key",
"docs_url": "<string>",
"details": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"retry": "same_key",
"docs_url": "<string>",
"details": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"retry": "same_key",
"docs_url": "<string>",
"details": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"retry": "same_key",
"docs_url": "<string>",
"details": {}
}Interactive executions and files
Answer the exact pending execution question
POST
/
v1
/
executions
/
{id}
/
input
Answer the exact pending execution question
curl --request POST \
--url https://api.peel.sh/v1/executions/{id}/input \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"question_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"answer": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({question_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', answer: '<string>'})
};
fetch('https://api.peel.sh/v1/executions/{id}/input', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.peel.sh/v1/executions/{id}/input"
payload = {
"question_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"answer": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "running",
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"question": {
"key": "<string>",
"prompt": "<string>",
"secret": true,
"question_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"step": "<string>",
"details": {},
"dialog": {
"type": "<string>",
"message": "<string>",
"defaultValue": "<string>"
},
"allow_empty": true,
"answer_url": "<string>"
},
"result": {
"status": "success",
"execution_time": 1,
"data": "<unknown>",
"status_code": 349,
"error_code": "<string>",
"action_outcome": "committed",
"retry_safe": true,
"retry": "never",
"cache_status": "hit",
"credits_charged": 123,
"credits_remaining": 123,
"runtime_source": "live",
"transport": "html_browser"
},
"error": {
"code": "<string>",
"message": "<string>",
"action_outcome": "committed",
"retry_safe": true,
"retry": "never"
},
"progress": [
{
"at": "2023-11-07T05:31:56Z",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"retry": "same_key",
"docs_url": "<string>",
"details": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"retry": "same_key",
"docs_url": "<string>",
"details": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"retry": "same_key",
"docs_url": "<string>",
"details": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"retry": "same_key",
"docs_url": "<string>",
"details": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"retry": "same_key",
"docs_url": "<string>",
"details": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"retry": "same_key",
"docs_url": "<string>",
"details": {}
}Body
application/json
Response
The matching answer is encrypted, consumed once and removed. Stale question IDs are rejected.
Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$⌘I