---
updatedAt: 2025-10-12T07:44:28.000Z
agentTools:
  projectIndex: https://api-spreadsheet-docs.readme.io/llms.txt
---

# Get job status (and outputs when completed)

Returns the job status. When the job is completed, returns presigned download URLs for output files that are active for 1 hour

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "API Spreadsheets — Agents",
    "version": "1.2.0",
    "description": "Execute spreadsheet agents and retrieve job status and outputs."
  },
  "servers": [
    {
      "url": "https://api.apispreadsheets.com"
    }
  ],
  "paths": {
    "/agents/jobs/{job_id}": {
      "parameters": [
        {
          "name": "job_id",
          "in": "path",
          "required": true,
          "description": "Identifier of the job (e.g., returned from runAgent).",
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "accessKey",
          "in": "query",
          "required": true,
          "description": "Agent access key.",
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "secretKey",
          "in": "query",
          "required": true,
          "description": "Agent secret key.",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "operationId": "getJobStatus",
        "summary": "Get job status (and outputs when completed)",
        "description": "Returns the job status. When the job is completed, returns presigned download URLs for output files that are active for 1 hour",
        "responses": {
          "200": {
            "description": "Job status (and outputs if completed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobStatusResponse200"
                },
                "examples": {
                  "running": {
                    "value": {
                      "status": "running"
                    }
                  },
                  "completed": {
                    "value": {
                      "status": "completed",
                      "output": {
                        "download_url": {
                          "Report_Q3.xlsx": "https://signed.example/presigned-url",
                          "Summary.pdf": "https://signed.example/another-url"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing query parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "missing": {
                    "value": {
                      "error": "accessKey and secretKey query parameters are required"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid agent credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "badAuth": {
                    "value": {
                      "error": "Invalid agent credentials"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Job or Agent not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "noJob": {
                    "value": {
                      "error": "Job not found"
                    }
                  },
                  "noAgent": {
                    "value": {
                      "error": "Agent not found"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "generic": {
                    "value": {
                      "error": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "JobStatusResponse200": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Current job status."
          },
          "output": {
            "type": "object",
            "description": "Present when status is 'completed'.",
            "properties": {
              "download_url": {
                "type": "object",
                "additionalProperties": {
                  "type": "string",
                  "format": "uri",
                  "nullable": true
                },
                "description": "Map of filename → presigned download URL (valid for 1 hour) (or null if generation failed)."
              }
            },
            "required": [
              "download_url"
            ]
          }
        },
        "required": [
          "status"
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ]
      }
    }
  }
}
```