curl --request POST \
--url https://api.peel.sh/v1/apis/{api_id}/endpoints/{endpoint_name}:call \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"limit": 10
}'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({limit: 10})
};
fetch('https://api.peel.sh/v1/apis/{api_id}/endpoints/{endpoint_name}:call', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.peel.sh/v1/apis/{api_id}/endpoints/{endpoint_name}:call"
payload = { "limit": 10 }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": "<string>",
"status_code": 123,
"data": "<unknown>",
"error": "<string>",
"error_code": "<string>",
"execution_time": 123,
"action_outcome": "committed",
"retry_safe": true,
"retry": "never",
"credits_charged": 123,
"credits_remaining": 123,
"transport": "html_browser",
"initiates_session": true,
"session_id": "<string>",
"encryption_key": "<string>",
"session_renewed": true,
"shape": {
"status": "applied",
"reason": "<string>",
"left_out": [
"<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": {}
}{
"status": "<string>",
"status_code": 123,
"data": "<unknown>",
"error": "<string>",
"error_code": "<string>",
"execution_time": 123,
"action_outcome": "committed",
"retry_safe": true,
"retry": "never",
"credits_charged": 123,
"credits_remaining": 123,
"transport": "html_browser",
"initiates_session": true,
"session_id": "<string>",
"encryption_key": "<string>",
"session_renewed": true,
"shape": {
"status": "applied",
"reason": "<string>",
"left_out": [
"<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": {}
}{
"status": "<string>",
"status_code": 123,
"data": "<unknown>",
"error": "<string>",
"error_code": "<string>",
"execution_time": 123,
"action_outcome": "committed",
"retry_safe": true,
"retry": "never",
"credits_charged": 123,
"credits_remaining": 123,
"transport": "html_browser",
"initiates_session": true,
"session_id": "<string>",
"encryption_key": "<string>",
"session_renewed": true,
"shape": {
"status": "applied",
"reason": "<string>",
"left_out": [
"<string>"
]
}
}{
"status": "<string>",
"status_code": 123,
"data": "<unknown>",
"error": "<string>",
"error_code": "<string>",
"execution_time": 123,
"action_outcome": "committed",
"retry_safe": true,
"retry": "never",
"credits_charged": 123,
"credits_remaining": 123,
"transport": "html_browser",
"initiates_session": true,
"session_id": "<string>",
"encryption_key": "<string>",
"session_renewed": true,
"shape": {
"status": "applied",
"reason": "<string>",
"left_out": [
"<string>"
]
}
}{
"status": "<string>",
"status_code": 123,
"data": "<unknown>",
"error": "<string>",
"error_code": "<string>",
"execution_time": 123,
"action_outcome": "committed",
"retry_safe": true,
"retry": "never",
"credits_charged": 123,
"credits_remaining": 123,
"transport": "html_browser",
"initiates_session": true,
"session_id": "<string>",
"encryption_key": "<string>",
"session_renewed": true,
"shape": {
"status": "applied",
"reason": "<string>",
"left_out": [
"<string>"
]
}
}{
"status": "<string>",
"status_code": 123,
"data": "<unknown>",
"error": "<string>",
"error_code": "<string>",
"execution_time": 123,
"action_outcome": "committed",
"retry_safe": true,
"retry": "never",
"credits_charged": 123,
"credits_remaining": 123,
"transport": "html_browser",
"initiates_session": true,
"session_id": "<string>",
"encryption_key": "<string>",
"session_renewed": true,
"shape": {
"status": "applied",
"reason": "<string>",
"left_out": [
"<string>"
]
}
}{
"status": "<string>",
"status_code": 123,
"data": "<unknown>",
"error": "<string>",
"error_code": "<string>",
"execution_time": 123,
"action_outcome": "committed",
"retry_safe": true,
"retry": "never",
"credits_charged": 123,
"credits_remaining": 123,
"transport": "html_browser",
"initiates_session": true,
"session_id": "<string>",
"encryption_key": "<string>",
"session_renewed": true,
"shape": {
"status": "applied",
"reason": "<string>",
"left_out": [
"<string>"
]
}
}Call a generated endpoint
curl --request POST \
--url https://api.peel.sh/v1/apis/{api_id}/endpoints/{endpoint_name}:call \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"limit": 10
}'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({limit: 10})
};
fetch('https://api.peel.sh/v1/apis/{api_id}/endpoints/{endpoint_name}:call', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.peel.sh/v1/apis/{api_id}/endpoints/{endpoint_name}:call"
payload = { "limit": 10 }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": "<string>",
"status_code": 123,
"data": "<unknown>",
"error": "<string>",
"error_code": "<string>",
"execution_time": 123,
"action_outcome": "committed",
"retry_safe": true,
"retry": "never",
"credits_charged": 123,
"credits_remaining": 123,
"transport": "html_browser",
"initiates_session": true,
"session_id": "<string>",
"encryption_key": "<string>",
"session_renewed": true,
"shape": {
"status": "applied",
"reason": "<string>",
"left_out": [
"<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": {}
}{
"status": "<string>",
"status_code": 123,
"data": "<unknown>",
"error": "<string>",
"error_code": "<string>",
"execution_time": 123,
"action_outcome": "committed",
"retry_safe": true,
"retry": "never",
"credits_charged": 123,
"credits_remaining": 123,
"transport": "html_browser",
"initiates_session": true,
"session_id": "<string>",
"encryption_key": "<string>",
"session_renewed": true,
"shape": {
"status": "applied",
"reason": "<string>",
"left_out": [
"<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": {}
}{
"status": "<string>",
"status_code": 123,
"data": "<unknown>",
"error": "<string>",
"error_code": "<string>",
"execution_time": 123,
"action_outcome": "committed",
"retry_safe": true,
"retry": "never",
"credits_charged": 123,
"credits_remaining": 123,
"transport": "html_browser",
"initiates_session": true,
"session_id": "<string>",
"encryption_key": "<string>",
"session_renewed": true,
"shape": {
"status": "applied",
"reason": "<string>",
"left_out": [
"<string>"
]
}
}{
"status": "<string>",
"status_code": 123,
"data": "<unknown>",
"error": "<string>",
"error_code": "<string>",
"execution_time": 123,
"action_outcome": "committed",
"retry_safe": true,
"retry": "never",
"credits_charged": 123,
"credits_remaining": 123,
"transport": "html_browser",
"initiates_session": true,
"session_id": "<string>",
"encryption_key": "<string>",
"session_renewed": true,
"shape": {
"status": "applied",
"reason": "<string>",
"left_out": [
"<string>"
]
}
}{
"status": "<string>",
"status_code": 123,
"data": "<unknown>",
"error": "<string>",
"error_code": "<string>",
"execution_time": 123,
"action_outcome": "committed",
"retry_safe": true,
"retry": "never",
"credits_charged": 123,
"credits_remaining": 123,
"transport": "html_browser",
"initiates_session": true,
"session_id": "<string>",
"encryption_key": "<string>",
"session_renewed": true,
"shape": {
"status": "applied",
"reason": "<string>",
"left_out": [
"<string>"
]
}
}{
"status": "<string>",
"status_code": 123,
"data": "<unknown>",
"error": "<string>",
"error_code": "<string>",
"execution_time": 123,
"action_outcome": "committed",
"retry_safe": true,
"retry": "never",
"credits_charged": 123,
"credits_remaining": 123,
"transport": "html_browser",
"initiates_session": true,
"session_id": "<string>",
"encryption_key": "<string>",
"session_renewed": true,
"shape": {
"status": "applied",
"reason": "<string>",
"left_out": [
"<string>"
]
}
}{
"status": "<string>",
"status_code": 123,
"data": "<unknown>",
"error": "<string>",
"error_code": "<string>",
"execution_time": 123,
"action_outcome": "committed",
"retry_safe": true,
"retry": "never",
"credits_charged": 123,
"credits_remaining": 123,
"transport": "html_browser",
"initiates_session": true,
"session_id": "<string>",
"encryption_key": "<string>",
"session_renewed": true,
"shape": {
"status": "applied",
"reason": "<string>",
"left_out": [
"<string>"
]
}
}Headers
Optional. Scoped to the owner, API and endpoint. A retry with the same key and params is not charged again: a successful response up to 375 KB is stored and replayed with Idempotent-Replayed: true; a login response, a larger one or a failed call answers 409 with the recorded outcome (already_finalized), and a call still running answers request_in_progress. The same key with different params returns 409 idempotency_key_reused.
1 - 255Optional. Run this version of the API instead of the current one, such as a draft; version ids are builds[].version_id in the revisions. A malformed id answers 400 version_invalid and a version of another API answers 404 version_not_found. Marketplace calls always run the current version.
Body
Endpoint parameters. The body is the endpoint's input.
Response
Endpoint execution envelope. Runtime failures that do not map to a more specific transport status may also return 200 with status:error.
Present on every failed call. never: do not repeat it, inspect the target first. fix_request: nothing ran, change the request first. same_key: repeat the same request with the same Idempotency-Key. new_key: nothing was committed, repeat it as a new request.
never, fix_request, same_key, new_key