{
  "openapi": "3.1.0",
  "info": {
    "title": "Vox Pop API",
    "version": "0.4.0",
    "description": "Programmatic access to your Vox Pop account, and the public reads and upload\nthe embed widget makes.\n\nCreate a personal API key in Settings, exchange it at `POST /api/v1/auth/token`\nfor a short-lived access token, and send that token as `Authorization: Bearer <token>`.\nOperations marked with no security requirement take no credential at all.\n\nEvery response uses the envelope `{ success, data }` on success and\n`{ success, error, requestId }` on failure.\n\n**Preview.** This surface is pre-1.0 and may change between minor versions."
  },
  "servers": [
    {
      "url": "https://api.voxpop.audio",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/v1/users/{handle}": {
      "get": {
        "tags": [
          "Users"
        ],
        "operationId": "getPublicProfile",
        "summary": "Get an actor's public profile",
        "description": "One person's public profile, looked up by handle. Takes no credential. The embed widget calls it to show who is asking, and to check that the prompt it was given belongs to the handle it was given.\n\nOnly the public profile is returned: the id, handle, display name, avatar, bio and links the person chose to show. Email, phone number and account settings never are. An unknown handle is a `404`. Limited to 60 requests a minute per IP address.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "The handle to look up, without a leading `@`",
              "example": "voxpop"
            },
            "required": true,
            "description": "The handle to look up, without a leading `@`",
            "name": "handle",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The public profile projection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/ProfileView"
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": "u_8f3k2m9q",
                    "handle": "myshow",
                    "displayName": "My Show",
                    "avatarUrl": null,
                    "bio": "A weekly show about the questions our listeners send in."
                  }
                }
              }
            }
          },
          "404": {
            "description": "No user with that handle",
            "content": {
              "application/json": {
                "example": {
                  "success": false,
                  "error": {
                    "message": "User not found",
                    "code": "not_found"
                  },
                  "requestId": "req_01JABCDEF0123456789"
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "not_found"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (60 per 1 min)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "rate_limited"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "internal_error"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/token": {
      "post": {
        "tags": [
          "Auth"
        ],
        "operationId": "exchangeApiKey",
        "summary": "Exchange an API key for an access token",
        "description": "Exchange a personal API key for a Bearer access token. The token is valid for 15 minutes on every operation that accepts API access; when it expires, exchange the key again. Keys do not expire on their own, so a revoked key stops working within 15 minutes.\n\nCreate and revoke keys from your Vox Pop account. Treat a key like a password: it is shown once, and anyone holding it can export your replies.",
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "apiKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256,
                    "description": "A key from `POST /api/v1/users/me/api-keys`"
                  }
                },
                "required": [
                  "apiKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "An api-audience access token",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "data": {
                    "accessToken": "eyJhbGciOiJFUzI1NiIsImtpZCI6IjEifQ.eyJzdWIiOiJ1c2VyXzEyMyJ9.c2lnbmF0dXJl",
                    "tokenType": "Bearer",
                    "expiresAt": "2026-10-16T12:15:00.000Z"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "accessToken": {
                          "type": "string"
                        },
                        "tokenType": {
                          "type": "string",
                          "enum": [
                            "Bearer"
                          ]
                        },
                        "expiresAt": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "accessToken",
                        "tokenType",
                        "expiresAt"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "example": {
                  "success": false,
                  "error": {
                    "message": "Invalid request body",
                    "code": "validation_failed"
                  },
                  "requestId": "req_01JABCDEF0123456789"
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unknown or revoked API key",
            "content": {
              "application/json": {
                "example": {
                  "success": false,
                  "error": {
                    "message": "Unknown or revoked API key",
                    "code": "invalid_api_key"
                  },
                  "requestId": "req_01JABCDEF0123456789"
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "invalid_api_key"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Account disabled",
            "content": {
              "application/json": {
                "example": {
                  "success": false,
                  "error": {
                    "message": "This account has been disabled",
                    "code": "account_disabled"
                  },
                  "requestId": "req_01JABCDEF0123456789"
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "account_disabled"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (5 per 1 min)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "rate_limited"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "internal_error"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/audio/upload-pending": {
      "post": {
        "tags": [
          "Audio"
        ],
        "operationId": "uploadPendingAudio",
        "security": [],
        "summary": "Upload audio (anonymous, embed)",
        "description": "Hold a recorded reply to a prompt until the person who recorded it confirms their phone number. Takes no credential. This is what the embed widget does when a visitor finishes recording.\n\nSend `multipart/form-data` with the recording in `file` and the prompt's id in `promptId`. The response is a `pendingId`. Nothing is published yet: the reply is sent only once the visitor opens the prompt's page with `?pending=<pendingId>` and confirms their phone number there. The embed widget moves the browser tab to that page itself. A held recording expires ten minutes after upload and can no longer be sent.\n\nLimited to 5 uploads an hour per IP address. `promptId` must be a prompt that `getPrompt` returns to a caller with no credential; anything else, including the id of a reply or of a prompt that no longer takes replies, is a `404`. A `502` means the prompt could not be checked right now; nothing was held, and the same upload can be retried.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file",
                  "promptId"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The recording, 512 bytes to 25 MB: audio/webm, audio/ogg, audio/mp4, audio/m4a, audio/mpeg or audio/wav. A part with no type is treated as audio/mp4."
                  },
                  "promptId": {
                    "type": "string",
                    "description": "The id of the prompt being replied to: the last segment of its `uri`.",
                    "example": "3mi5a5dynk2n3"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Pending upload id",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "data": {
                    "pendingId": "pend_0f8e6c1a-4b2d-4e9a-9c3f-5d7b2a1e8f60"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "pendingId": {
                          "type": "string",
                          "description": "Opaque id to pass as `?pending=` when binding the reply"
                        }
                      },
                      "required": [
                        "pendingId"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Missing/oversized/undersized file, missing promptId, or unsupported type",
            "content": {
              "application/json": {
                "example": {
                  "success": false,
                  "error": {
                    "message": "File too small",
                    "code": "validation_failed"
                  },
                  "requestId": "req_01JABCDEF0123456789"
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No prompt with this id is taking replies",
            "content": {
              "application/json": {
                "example": {
                  "success": false,
                  "error": {
                    "message": "Prompt not found",
                    "code": "not_found"
                  },
                  "requestId": "req_01JABCDEF0123456789"
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "not_found"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (5 per 60 min)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "rate_limited"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Staging failure",
            "content": {
              "application/json": {
                "example": {
                  "success": false,
                  "error": {
                    "message": "Upload failed",
                    "code": "internal_error"
                  },
                  "requestId": "req_01JABCDEF0123456789"
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "internal_error"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "The prompt could not be checked",
            "content": {
              "application/json": {
                "example": {
                  "success": false,
                  "error": {
                    "message": "Upstream service unavailable",
                    "code": "service_unavailable"
                  },
                  "requestId": "req_01JABCDEF0123456789"
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "service_unavailable"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/prompts/{postId}": {
      "get": {
        "tags": [
          "Prompts"
        ],
        "operationId": "getPrompt",
        "summary": "Get a prompt by id (public)",
        "description": "One prompt, by id. Takes no credential. This is the read the embed widget renders: the question (`record.title`, with `record.text` as its body), and, when the prompt was recorded, a playable audio URL in `embed.url` with waveform peaks (0 to 100) in `embed.waveform`.\n\n`embed.url` is a signed link that expires; fetch the prompt again for a fresh one rather than storing it. `author` is the public profile of whoever asked, and `authorId` is its `id`. Audience counts are not part of this response: they are visible only to the person who asked.\n\nA prompt that has been closed, or an id that belongs to a reply rather than a prompt, is a `404`, the same as an id that does not exist. Limited to 60 requests a minute per IP address.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "The post id",
              "example": "3mi5a5dynk2n3"
            },
            "required": true,
            "description": "The post id",
            "name": "postId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Composed prompt view",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/PromptView"
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                },
                "example": {
                  "success": true,
                  "data": {
                    "uri": "at://u_8f3k2m9q/dev.antiphony.audio.post/3mi5a5dynk2n3",
                    "cid": "bafyreigh2akiscaildcqabsyg3dfr6chu3fgpregiymsck7e7aqa4s52zy",
                    "kind": "prompt",
                    "authorId": "u_8f3k2m9q",
                    "record": {
                      "title": "What should we cover next season?",
                      "text": "Tell us the one topic you want a whole episode on, and why.",
                      "createdAt": "2026-10-12T15:04:05.000Z"
                    },
                    "embed": {
                      "$type": "dev.antiphony.embed.audio#view",
                      "url": "https://media.example.com/signed/3mi5a5dynk2n3.webm?expires=1760630700&sig=c2lnbmF0dXJl",
                      "durationMs": 18400,
                      "waveform": [
                        4,
                        18,
                        52,
                        71,
                        40,
                        12
                      ]
                    },
                    "author": {
                      "id": "u_8f3k2m9q",
                      "handle": "myshow",
                      "displayName": "My Show"
                    },
                    "replyCount": 12,
                    "lastReplyAt": "2026-10-15T18:42:07.000Z",
                    "status": "live"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The read was refused upstream",
            "content": {
              "application/json": {
                "example": {
                  "success": false,
                  "error": {
                    "message": "Authentication required",
                    "code": "unauthenticated"
                  },
                  "requestId": "req_01JABCDEF0123456789"
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthenticated"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Prompt not found",
            "content": {
              "application/json": {
                "example": {
                  "success": false,
                  "error": {
                    "message": "Prompt not found",
                    "code": "not_found"
                  },
                  "requestId": "req_01JABCDEF0123456789"
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "not_found"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (60 per 1 min)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "rate_limited"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "internal_error"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A service this read depends on failed",
            "content": {
              "application/json": {
                "example": {
                  "success": false,
                  "error": {
                    "message": "Upstream service unavailable",
                    "code": "service_unavailable"
                  },
                  "requestId": "req_01JABCDEF0123456789"
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "service_unavailable"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "A service this read depends on is not available",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "service_unavailable"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/media/{token}": {
      "get": {
        "tags": [
          "Replies"
        ],
        "operationId": "streamReplyDownload",
        "summary": "Stream a reply's audio as a named attachment",
        "description": "Download one reply's audio. This is the URL in an export item's `download.url`; fetch it as is, with no Authorization header. The response is the audio as an attachment, with the filename in `Content-Disposition`. For a `format: 'mp3'` item it is an mp3; for `format: 'original'` it is the original upload, usually webm/opus, and `Content-Type` says which.\n\nThe link is the credential. It names a single reply, expires five minutes after it was issued, and stops working early if you lose access to that reply. Every failure, including an expired link, is the same `404`; request the export page again for a fresh link. `Range` requests are not supported.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The capability token in a download URL (an export item's `download.url`, or the single-reply download). Scoped to one reply, valid for five minutes. Not a session token and not interchangeable with one."
            },
            "required": true,
            "description": "The capability token in a download URL (an export item's `download.url`, or the single-reply download). Scoped to one reply, valid for five minutes. Not a session token and not interchangeable with one.",
            "name": "token",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The audio bytes, as a named attachment: the mp3 rendition, or the original upload when that is what the download resolved to.",
            "content": {
              "audio/mpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "audio/webm": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "No such download — invalid, expired, or no longer authorized",
            "content": {
              "application/json": {
                "example": {
                  "success": false,
                  "error": {
                    "message": "This download link is no longer valid",
                    "code": "not_found"
                  },
                  "requestId": "req_01JABCDEF0123456789"
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "not_found"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (60 per 1 min)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "rate_limited"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "internal_error"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/exports/replies": {
      "get": {
        "tags": [
          "Exports"
        ],
        "operationId": "exportReplies",
        "summary": "Export the audio of every reply to the viewer's prompts",
        "description": "A paginated manifest of every reply to your prompts, newest first, each with a download link. Your script fetches the files; nothing is zipped or queued on our side.\n\n**Fetch a page before asking for the next.** Every link expires five minutes after the page is served (`download.expiresAt`). If one lapses, request the same `cursor` again for fresh links. When no mp3 is available the item has `format: 'original'` and its link is to the original upload instead.\n\nFilenames are unique within an export (`show-prompt-replier-<id>.mp3`), so files can be saved side by side without overwriting each other. An `original` takes its real extension instead, usually `.webm`. Filter with `promptId`, `status` (default `all`, which includes archived replies), `dateFrom` and `dateTo`.\n\nAuthenticate with the `accessToken` from `POST /api/v1/auth/token` as a Bearer token.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Scope to one prompt — matches the reply's thread ROOT, not its direct parent"
            },
            "required": false,
            "description": "Scope to one prompt — matches the reply's thread ROOT, not its direct parent",
            "name": "promptId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "dateFrom",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "dateTo",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "live",
                "archived",
                "all"
              ],
              "default": "all",
              "description": "Inbox status (default all — an export includes archived replies unless told otherwise)"
            },
            "required": false,
            "description": "Inbox status (default all — an export includes archived replies unless told otherwise)",
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "description": "1–50 (default 25)"
            },
            "required": false,
            "description": "1–50 (default 25)",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Pagination cursor — `nextCursor` from the prior page"
            },
            "required": false,
            "description": "Pagination cursor — `nextCursor` from the prior page",
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of the export manifest",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "data": {
                    "items": [
                      {
                        "postId": "3l6zq2mxk4s2a",
                        "promptId": "3l6yhw7b2fk2c",
                        "promptTitle": "What should we cover next season?",
                        "createdAt": "2026-10-15T18:42:07.000Z",
                        "durationMs": 41250,
                        "replier": "@listener.bsky.social",
                        "download": {
                          "url": "https://api.voxpop.audio/api/v1/media/eyJ0eXAiOiJtZWRpYSJ9.c2lnbmF0dXJl",
                          "filename": "my-show-what-should-we-cover-next-season-listener-mxk4s2a.mp3",
                          "format": "mp3",
                          "expiresAt": "2026-10-16T12:05:00.000Z"
                        }
                      }
                    ],
                    "nextCursor": "3l6zq2mxk4s2a"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ExportReplyItem"
                          }
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "items",
                        "nextCursor"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid query parameters",
            "content": {
              "application/json": {
                "example": {
                  "success": false,
                  "error": {
                    "message": "Invalid query parameters",
                    "code": "validation_failed"
                  },
                  "requestId": "req_01JABCDEF0123456789"
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated",
            "content": {
              "application/json": {
                "example": {
                  "success": false,
                  "error": {
                    "message": "Invalid or expired session",
                    "code": "unauthenticated"
                  },
                  "requestId": "req_01JABCDEF0123456789"
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthenticated"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Session audience not permitted (requires creator or api)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "audience_not_permitted"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (10 per 1 min)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "rate_limited"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "internal_error"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "A service this export depends on failed",
            "content": {
              "application/json": {
                "example": {
                  "success": false,
                  "error": {
                    "message": "Could not read replies. Try again shortly.",
                    "code": "service_unavailable"
                  },
                  "requestId": "req_01JABCDEF0123456789"
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "service_unavailable"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "A service this export depends on is not available",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "service_unavailable"
                          ]
                        },
                        "issues": {},
                        "details": {}
                      },
                      "required": [
                        "message"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "error",
                    "requestId"
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Auth",
      "description": "Phone OTP sign-in and AT Protocol identity linking."
    },
    {
      "name": "Users",
      "description": "The signed-in viewer, public profiles, and handle resolution."
    },
    {
      "name": "Prompts",
      "description": "Creating, listing, and closing prompts — the question a creator asks."
    },
    {
      "name": "Replies",
      "description": "The audio answers to a prompt: the creator's inbox, triage, search, and download."
    },
    {
      "name": "Audio",
      "description": "Direct and pre-auth (anonymous embed) audio uploads."
    },
    {
      "name": "Exports",
      "description": "Bulk export of reply audio as a paginated manifest of download links."
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "The `accessToken` returned by `POST /api/v1/auth/token`. Valid for 15 minutes; exchange the key again when it expires."
      }
    },
    "schemas": {
      "ProfileView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The person's id. A prompt's `authorId` is this value."
          },
          "handle": {
            "type": [
              "string",
              "null"
            ],
            "description": "Their handle, without the `@`. Absent or `null` for someone who has not chosen one."
          },
          "displayName": {
            "type": [
              "string",
              "null"
            ]
          },
          "avatarUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "bio": {
            "type": [
              "string",
              "null"
            ]
          },
          "website": {
            "type": [
              "string",
              "null"
            ]
          },
          "links": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                }
              },
              "required": [
                "label",
                "url"
              ]
            }
          },
          "bluesky": {
            "type": "object",
            "properties": {
              "handle": {
                "type": "string"
              },
              "did": {
                "type": "string"
              }
            },
            "required": [
              "handle",
              "did"
            ],
            "description": "Their Bluesky account. Present only when they chose to show it."
          }
        },
        "required": [
          "id"
        ],
        "description": "A public profile. Email, phone number and account settings are never included."
      },
      "PromptView": {
        "type": "object",
        "properties": {
          "uri": {
            "type": "string"
          },
          "cid": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "prompt"
            ]
          },
          "authorId": {
            "type": "string",
            "description": "The asker's id: `author.id`."
          },
          "authorDid": {
            "type": "string",
            "description": "The asker's AT Protocol DID. Present only when they chose to show their Bluesky account on their profile."
          },
          "record": {
            "$ref": "#/components/schemas/PostRecordPublic"
          },
          "embed": {
            "$ref": "#/components/schemas/AudioEmbedView"
          },
          "author": {
            "$ref": "#/components/schemas/ProfileView"
          },
          "replyCount": {
            "type": "integer",
            "minimum": 0
          },
          "lastReplyAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the latest reply arrived."
          },
          "status": {
            "type": "string",
            "enum": [
              "live"
            ],
            "description": "Always `live`: a closed prompt is a `404` to anyone but its author."
          }
        },
        "required": [
          "uri",
          "cid",
          "kind",
          "authorId",
          "record",
          "author",
          "replyCount",
          "status"
        ]
      },
      "PostRecordPublic": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "maxLength": 3000
          },
          "title": {
            "type": "string",
            "maxLength": 3000
          },
          "reply": {
            "type": "object",
            "properties": {
              "root": {
                "type": "object",
                "properties": {
                  "uri": {
                    "type": "string",
                    "maxLength": 512,
                    "pattern": "^at:(\\/\\/|space\\/).+"
                  },
                  "cid": {
                    "type": "string",
                    "maxLength": 128
                  }
                },
                "required": [
                  "uri",
                  "cid"
                ]
              },
              "parent": {
                "type": "object",
                "properties": {
                  "uri": {
                    "type": "string",
                    "maxLength": 512,
                    "pattern": "^at:(\\/\\/|space\\/).+"
                  },
                  "cid": {
                    "type": "string",
                    "maxLength": 128
                  }
                },
                "required": [
                  "uri",
                  "cid"
                ]
              }
            },
            "required": [
              "root",
              "parent"
            ]
          },
          "langs": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 3
          },
          "selfLabels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "format": "date-time"
              }
            ]
          }
        },
        "required": [
          "text",
          "createdAt"
        ]
      },
      "AudioEmbedView": {
        "type": "object",
        "properties": {
          "$type": {
            "type": "string",
            "enum": [
              "dev.antiphony.embed.audio#view"
            ]
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "durationMs": {
            "type": "integer",
            "minimum": 0
          },
          "alt": {
            "type": "string",
            "maxLength": 10000
          },
          "waveform": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100
            },
            "maxItems": 1000
          },
          "transcript": {
            "type": "object",
            "properties": {
              "segments": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "startMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "endMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "text": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "startMs",
                    "endMs",
                    "text"
                  ]
                }
              },
              "text": {
                "type": "string"
              }
            },
            "required": [
              "segments"
            ]
          },
          "assessment": {
            "type": "object",
            "properties": {
              "sets": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "name",
                    "version"
                  ]
                }
              },
              "answers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "top": {
                      "type": "string"
                    },
                    "distribution": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "type": "string"
                          },
                          "probability": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 1000
                          }
                        },
                        "required": [
                          "value",
                          "probability"
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "top",
                    "distribution"
                  ]
                }
              },
              "model": {
                "type": "string"
              },
              "createdAt": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "string",
                    "format": "date-time"
                  }
                ]
              }
            },
            "required": [
              "sets",
              "answers",
              "model",
              "createdAt"
            ]
          },
          "processing": {
            "type": "object",
            "properties": {
              "transcribe": {
                "type": "string",
                "enum": [
                  "pending",
                  "ready",
                  "failed",
                  "skipped"
                ]
              },
              "denoise": {
                "type": "string",
                "enum": [
                  "pending",
                  "ready",
                  "failed",
                  "skipped"
                ]
              },
              "trim": {
                "type": "string",
                "enum": [
                  "pending",
                  "ready",
                  "failed",
                  "skipped"
                ]
              },
              "waveform": {
                "type": "string",
                "enum": [
                  "pending",
                  "ready",
                  "failed",
                  "skipped"
                ]
              },
              "assess": {
                "type": "string",
                "enum": [
                  "pending",
                  "ready",
                  "failed",
                  "skipped"
                ]
              }
            }
          }
        },
        "required": [
          "$type",
          "url"
        ]
      },
      "ExportReplyItem": {
        "type": "object",
        "properties": {
          "postId": {
            "type": "string"
          },
          "promptId": {
            "type": "string"
          },
          "promptTitle": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "durationMs": {
            "type": [
              "number",
              "null"
            ]
          },
          "replier": {
            "type": [
              "string",
              "null"
            ]
          },
          "download": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "url": {
                "type": "string",
                "format": "uri"
              },
              "filename": {
                "type": "string"
              },
              "format": {
                "type": "string",
                "enum": [
                  "mp3",
                  "original"
                ]
              },
              "expiresAt": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "url",
              "filename",
              "format",
              "expiresAt"
            ]
          }
        },
        "required": [
          "postId",
          "promptId",
          "promptTitle",
          "createdAt",
          "durationMs",
          "replier",
          "download"
        ]
      }
    }
  }
}