{
	"openapi": "3.1.0",
	"info": {
		"title": "Vega: sending passes",
		"version": "2026-11-08",
		"description": "Send the signal quality your ground stations measure on each pass. https://docs.vega.space/api-reference/sending-passes"
	},
	"servers": [
		{
			"url": "https://admin.vega.space/api/v1/frontend"
		}
	],
	"security": [
		{
			"apiKey": []
		}
	],
	"paths": {
		"/organizations/{organization_id}/forwarded_passes": {
			"post": {
				"summary": "Send one pass",
				"operationId": "sendPass",
				"parameters": [
					{
						"name": "organization_id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "integer"
						}
					},
					{
						"name": "dry_run",
						"in": "query",
						"schema": {
							"type": "boolean"
						},
						"description": "Check the pass and store nothing."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": ["pass"],
								"properties": {
									"pass": {
										"$ref": "https://docs.vega.space/schemas/forwarded-pass.schema.json"
									}
								}
							}
						}
					}
				},
				"responses": {
					"202": {
						"description": "Accepted; check status_url for the outcome.",
						"headers": {
							"Location": {
								"schema": {
									"type": "string",
									"format": "uri"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"$ref": "#/components/schemas/Receipt"
										},
										"meta": {
											"type": "object"
										}
									}
								}
							}
						}
					},
					"200": {
						"description": "A dry run, or a pass id already sent.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object"
								}
							}
						}
					},
					"401": {
						"description": "Missing, revoked or expired key."
					},
					"403": {
						"description": "The key cannot send to this organization (API_KEY_REQUIRED, API_KEY_ORGANIZATION_MISMATCH)."
					},
					"422": {
						"description": "The pass is invalid.",
						"content": {
							"application/problem+json": {
								"schema": {
									"$ref": "#/components/schemas/Problem"
								}
							}
						}
					}
				}
			},
			"get": {
				"summary": "List the organization's passes",
				"operationId": "listPasses",
				"parameters": [
					{
						"name": "organization_id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "integer"
						}
					},
					{
						"name": "limit",
						"in": "query",
						"schema": {
							"type": "integer",
							"default": 50,
							"maximum": 200
						}
					},
					{
						"name": "offset",
						"in": "query",
						"schema": {
							"type": "integer",
							"default": 0
						}
					}
				],
				"responses": {
					"200": {
						"description": "Passes, newest received first."
					}
				}
			}
		},
		"/organizations/{organization_id}/forwarded_passes/{id}": {
			"get": {
				"summary": "One pass: the status_url of a 202",
				"operationId": "getPass",
				"parameters": [
					{
						"name": "organization_id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "integer"
						}
					},
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "integer"
						}
					}
				],
				"responses": {
					"200": {
						"description": "The pass, its status (received, stored, failed) and its readings."
					},
					"404": {
						"description": "No such pass."
					}
				}
			},
			"delete": {
				"summary": "Hide a pass from the list",
				"operationId": "hidePass",
				"parameters": [
					{
						"name": "organization_id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "integer"
						}
					},
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "integer"
						}
					}
				],
				"responses": {
					"200": {
						"description": "Hidden."
					}
				}
			}
		}
	},
	"components": {
		"securitySchemes": {
			"apiKey": {
				"type": "http",
				"scheme": "bearer",
				"description": "An organization key (Access: Send passes), vgk_\u2026"
			}
		},
		"schemas": {
			"Receipt": {
				"type": "object",
				"properties": {
					"received": {
						"type": "boolean"
					},
					"pass_id": {
						"type": "integer"
					},
					"customer_pass_id": {
						"type": ["string", "null"]
					},
					"samples": {
						"type": "integer"
					},
					"status": {
						"type": "string",
						"enum": ["received", "stored", "failed"]
					},
					"start": {
						"type": "string",
						"format": "date-time"
					},
					"end": {
						"type": "string",
						"format": "date-time"
					},
					"status_url": {
						"type": "string",
						"format": "uri"
					},
					"warnings": {
						"type": "array",
						"items": {
							"$ref": "#/components/schemas/FieldMessage"
						}
					}
				}
			},
			"Problem": {
				"type": "object",
				"required": ["type", "title", "status", "errors"],
				"properties": {
					"type": {
						"type": "string",
						"format": "uri"
					},
					"title": {
						"type": "string"
					},
					"status": {
						"type": "integer"
					},
					"detail": {
						"type": "string"
					},
					"errors": {
						"type": "array",
						"items": {
							"$ref": "#/components/schemas/FieldMessage"
						}
					},
					"error": {
						"type": "object",
						"properties": {
							"code": {
								"type": "string"
							},
							"message": {
								"type": "string"
							}
						}
					}
				}
			},
			"FieldMessage": {
				"type": "object",
				"required": ["field", "message"],
				"properties": {
					"field": {
						"type": "string",
						"examples": ["measurements[3].t"]
					},
					"message": {
						"type": "string"
					}
				}
			}
		}
	}
}
