API REFERENCE
Get Coding Agent PR Merged Status (Admin)
On this page
/api/admins/coding/prReturns the status (open, closed, or merged) for each provided GitHub pull request URL. Accepts one or more pull_requests query parameters containing GitHub PR URLs. Uses the GitHub REST API to check each pull request's state. Requires the authenticated account to be a Recoup admin. Authentication via x-api-key or Authorization Bearer token.
Authentication
x-api-key in header
bearerAuth bearer
Request
curl --request GET \
--url 'https://api.recoupable.dev/api/admins/coding/pr?pull_requests=YOUR_PULL_REQUESTS' \
--header 'x-api-key: YOUR_API_KEY'Replace the YOUR_ placeholders with your values. Required query parameters are included; optional parameters are listed below.
Try it
Fill in the fields, send the request from your browser, and read the live response. The curl below updates as you type.
Kept in this browser tab only and cleared when it closes.
curl --request GET \
--url 'https://recoup-api.vercel.app/api/admins/coding/pr'Parameters
Query parameters
pull_requestsarray<string>requiredOne or more GitHub pull request URLs to check. Repeat this parameter for each URL. Example: ?pull_requests=https://github.com/org/repo/pull/1&pull_requests=https://github.com/org/repo/pull/2
Responses
200PR merged status retrieved successfully+
application/json
statusstring · enumrequiredStatus of the request
Values: "success"
pull_requestsarray<object>requiredStatus for each provided pull request URL
Item properties for pull_requests
urlstringrequiredThe GitHub pull request URL
format: uri
statusstring · enumrequiredThe current status of the pull request
Values: "open", "closed", "merged"
400Bad request - missing or invalid pull_requests parameter+
application/json
statusstring · enumrequiredStatus of the request
Values: "error"
messagestringrequiredError message describing what went wrong
401Unauthorized - missing or invalid credentials+
application/json
statusstring · enumrequiredStatus of the request
Values: "error"
messagestringrequiredError message describing what went wrong
403Forbidden - authenticated account is not a Recoup admin+
application/json
statusstring · enumrequiredStatus of the request
Values: "error"
messagestringrequiredError message describing what went wrong
500Internal server error+
application/json
statusstring · enumrequiredStatus of the request
Values: "error"
messagestringrequiredError message describing what went wrong
Full specification
Download the OpenAPI file for complete schemas, constraints, and examples.
Download accounts.jsonView operation source
{
"description": "Returns the status (open, closed, or merged) for each provided GitHub pull request URL. Accepts one or more `pull_requests` query parameters containing GitHub PR URLs. Uses the GitHub REST API to check each pull request's state. Requires the authenticated account to be a Recoup admin. Authentication via x-api-key or Authorization Bearer token.",
"parameters": [
{
"name": "pull_requests",
"in": "query",
"description": "One or more GitHub pull request URLs to check. Repeat this parameter for each URL. Example: ?pull_requests=https://github.com/org/repo/pull/1&pull_requests=https://github.com/org/repo/pull/2",
"required": true,
"schema": {
"type": "array",
"items": {
"type": "string",
"format": "uri"
},
"minItems": 1,
"maxItems": 50
},
"style": "form",
"explode": true
}
],
"security": [
{
"apiKeyAuth": []
},
{
"bearerAuth": []
}
],
"responses": {
"200": {
"description": "PR merged status retrieved successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"status",
"pull_requests"
],
"properties": {
"status": {
"type": "string",
"enum": [
"success"
],
"description": "Status of the request"
},
"pull_requests": {
"type": "array",
"description": "Status for each provided pull request URL",
"items": {
"type": "object",
"required": [
"url",
"status"
],
"properties": {
"url": {
"type": "string",
"format": "uri",
"description": "The GitHub pull request URL",
"example": "https://github.com/recoupable/api/pull/42"
},
"status": {
"type": "string",
"enum": [
"open",
"closed",
"merged"
],
"description": "The current status of the pull request",
"example": "merged"
}
}
}
}
}
}
}
}
},
"400": {
"description": "Bad request - missing or invalid pull_requests parameter",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized - missing or invalid credentials",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountErrorResponse"
}
}
}
},
"403": {
"description": "Forbidden - authenticated account is not a Recoup admin",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountErrorResponse"
}
}
}
}
}
}