openapi: 3.0.4 info: contact: email: team@neynar.com name: Neynar url: https://neynar.com/ description: The Neynar API allows you to interact with the Farcaster protocol among other things. See the [Neynar docs](https://docs.neynar.com/reference) for more details. title: Neynar Action studio API version: 3.176.0 servers: - url: https://api.neynar.com security: - ApiKeyAuth: [] tags: - name: studio paths: /v2/studio/credit-drops/: get: description: Returns the most recent credit drop for the authenticated user. Returns the drop regardless of claimed/expired status. externalDocs: url: https://docs.neynar.com/reference/get-credit-drop operationId: get-credit-drop parameters: - description: Farcaster ID of the user in: query name: fid required: true schema: example: 3 format: int32 minimum: 0 type: integer responses: '200': content: application/json: schema: properties: allowance_expires_at: description: 'Timestamp at which the drop stops contributing to the effective CU limit. Stamped by the credit-drop job at insert time (default: created_at + 24h).' format: date-time type: string claimed: description: Whether the credit drop has been claimed type: boolean created_at: description: When the credit drop was generated format: date-time type: string credits_remaining: description: reward_amount - credits_used, clamped at 0. Spendable only until allowance_expires_at. nullable: true type: number credits_used: description: Portion of this drop already consumed against STUDIO CU usage (incremented by the CU sync). Forfeited at allowance_expires_at if unused. type: number expired: description: Whether the credit drop's allowance window has closed (NOW() >= allowance_expires_at). Once true, the drop no longer contributes to the effective CU limit; any unused portion is forfeited. type: boolean percentile_score: description: Percentile rank within 7-day global distribution maximum: 1 minimum: 0 nullable: true type: number raw_score: description: Raw quality score from 0 to 1 maximum: 1 minimum: 0 nullable: true type: number reward_amount: description: Credit reward amount nullable: true type: number required: - created_at - raw_score - percentile_score - reward_amount - claimed - credits_used - credits_remaining - allowance_expires_at - expired type: object description: Success '402': content: application/json: schema: properties: code: type: string message: type: string required: - message - code type: object description: Payment Required '404': content: application/json: schema: properties: message: type: string required: - message type: object description: Resource not found security: - ApiKeyAuth: [] summary: Get most recent credit drop tags: - studio /v2/studio/credit-drops/claim: post: description: Claims the most recent credit drop for the authenticated user. The drop's allowance is surfaced dynamically until expires_at and does not mutate extra_credits. Only drops created within the past 24 hours can be claimed. externalDocs: url: https://docs.neynar.com/reference/claim-credit-drop operationId: claim-credit-drop requestBody: content: application/json: schema: properties: fid: description: Farcaster ID of the user example: 3 format: int32 minimum: 0 type: integer required: - fid type: object required: true responses: '200': content: application/json: schema: properties: claimed: enum: - true type: boolean new_extra_credits: description: New total extra credits balance type: number reward_amount: description: Amount of credits added type: number required: - claimed - reward_amount - new_extra_credits type: object description: Success '402': content: application/json: schema: properties: code: type: string message: type: string required: - message - code type: object description: Payment Required '404': content: application/json: schema: properties: message: type: string required: - message type: object description: Resource not found '409': content: application/json: schema: properties: message: type: string required: - message type: object description: Conflict '410': content: application/json: schema: properties: message: type: string required: - message type: object description: Gone security: - ApiKeyAuth: [] summary: Claim credit drop tags: - studio /v2/studio/deployment/: delete: description: 'Deletes a specific miniapp generator deployment or all deployments for a FID. If deployment_id or name is provided, deletes single deployment. If only FID is provided, deletes all deployments for that FID. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call.' externalDocs: url: https://docs.neynar.com/reference/delete-deployment operationId: delete-deployment requestBody: content: application/json: schema: properties: deployment_id: description: Deployment ID (UUID). If provided, deletes this specific deployment. format: uuid type: string fid: description: Farcaster ID of the user example: 3 format: int32 minimum: 0 type: integer name: description: Kubernetes deployment name. If not provided and deployment_id not provided, all deployments for the FID will be deleted type: string namespace: description: Optional Kubernetes namespace. If not provided, will query for the active namespace for the given FID. type: string required: - fid type: object required: true responses: '200': content: application/json: schema: properties: deletedCount: type: number success: type: boolean required: - success type: object description: Success '400': content: application/json: schema: properties: error: type: string required: - error type: object description: Bad Request '404': content: application/json: schema: properties: error: type: string required: - error type: object description: Resource not found '500': content: application/json: schema: properties: error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Delete deployment(s) tags: - studio get: description: 'Lists all miniapp generator deployments for a user. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call.' externalDocs: url: https://docs.neynar.com/reference/list-deployments operationId: list-deployments parameters: - description: Farcaster ID of the user. Required for non-admin users. Studio admins can omit to query all deployments. in: query name: fid schema: example: 3 format: int32 minimum: 0 type: integer - description: Maximum number of deployments to return. Defaults to 50, max 1000. in: query name: limit schema: default: 50 maximum: 1000 minimum: 1 type: integer x-is-limit-param: true - description: Number of deployments to skip for pagination. Defaults to 0. in: query name: offset schema: default: 0 minimum: 0 type: integer - description: Search string to filter deployments by name, display name, or FID. in: query name: query schema: type: string - description: Field to sort deployments by. Defaults to updated_at (most recently updated first). in: query name: sort_by schema: default: updated_at enum: - created_at - updated_at type: string - description: Include deleted deployments in the response. Defaults to false. in: query name: include_deleted schema: default: false type: boolean responses: '200': content: application/json: schema: items: properties: created_at: description: Creation timestamp format: date-time type: string deleted_at: description: Deletion timestamp format: date-time nullable: true type: string dev_server_state: description: 'Dev server process state: stopped, starting, running, crashed, or hung' enum: - stopped - starting - running - crashed - hung type: string display_name: description: Display name for the project type: string generated_app_exists: description: Whether a generated app exists in the deployment type: boolean generated_app_serving: description: Whether the generated app is currently serving type: boolean github_url: description: GitHub repository SSH URL type: string has_database: description: Whether the deployment has a Neon database configured type: boolean id: description: Deployment ID type: string is_ready: description: Deployment is ready to serve app and accept prompts type: boolean name: description: Kubernetes deployment name type: string namespace: description: Kubernetes namespace type: string production_app_status: description: Production app deployment status from Vercel properties: created_at: description: Deployment creation timestamp (Unix ms) type: number deployment_state: description: Deployment state (e.g., READY, BUILDING, ERROR) type: string deployment_url: description: Vercel deployment URL type: string project_id: description: Vercel project ID type: string target: description: Deployment target (e.g., production, preview) type: string required: - project_id - deployment_url - deployment_state - created_at type: object updated_at: description: Last update timestamp format: date-time nullable: true type: string url: description: Public URL for the deployment format: uri type: string required: - id - deleted_at - updated_at - created_at - namespace - name - is_ready - generated_app_exists - generated_app_serving type: object type: array description: Success '400': content: application/json: schema: properties: error: type: string required: - error type: object description: Bad Request '403': content: application/json: schema: properties: error: type: string required: - error type: object description: Forbidden '500': content: application/json: schema: properties: error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: List deployments tags: - studio post: description: 'Creates and deploys an instance of the miniapp generator for a user. Requires authentication via API key in the request header. Note: Studio CU is tracked based on LLM token usage, not per API call.' externalDocs: url: https://docs.neynar.com/reference/create-deployment operationId: create-deployment requestBody: content: application/json: schema: properties: display_name: description: Display name for the deployment type: string env: additionalProperties: type: string description: Environment variables for the deployment type: object fid: description: Farcaster ID of the user example: 3 format: int32 minimum: 0 type: integer required: - fid type: object required: true responses: '200': content: application/json: schema: properties: created_at: description: Creation timestamp format: date-time type: string deleted_at: description: Deletion timestamp format: date-time nullable: true type: string dev_server_state: description: 'Dev server process state: stopped, starting, running, crashed, or hung' enum: - stopped - starting - running - crashed - hung type: string display_name: description: Display name for the project type: string generated_app_exists: description: Whether a generated app exists in the deployment type: boolean generated_app_serving: description: Whether the generated app is currently serving type: boolean github_url: description: GitHub repository SSH URL type: string has_database: description: Whether the deployment has a Neon database configured type: boolean id: description: Deployment ID type: string is_ready: description: Deployment is ready to serve app and accept prompts type: boolean name: description: Kubernetes deployment name type: string namespace: description: Kubernetes namespace type: string production_app_status: description: Production app deployment status from Vercel properties: created_at: description: Deployment creation timestamp (Unix ms) type: number deployment_state: description: Deployment state (e.g., READY, BUILDING, ERROR) type: string deployment_url: description: Vercel deployment URL type: string project_id: description: Vercel project ID type: string target: description: Deployment target (e.g., production, preview) type: string required: - project_id - deployment_url - deployment_state - created_at type: object updated_at: description: Last update timestamp format: date-time nullable: true type: string url: description: Public URL for the deployment format: uri type: string required: - id - deleted_at - updated_at - created_at - namespace - name - is_ready - generated_app_exists - generated_app_serving type: object description: Success '400': content: application/json: schema: properties: error: type: string required: - error type: object description: Bad Request '500': content: application/json: schema: properties: error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Create a miniapp generator deployment tags: - studio /v2/studio/deployment/account-association: get: description: Retrieves the account-association.json file from a miniapp deployment, which contains the JFS-signed domain association. Requires API key authentication. externalDocs: url: https://docs.neynar.com/reference/get-account-association operationId: get-account-association parameters: - description: Deployment ID in: query name: deployment_id schema: format: uuid type: string - description: Kubernetes namespace name in: query name: namespace schema: type: string - description: Kubernetes deployment name in: query name: name schema: type: string responses: '200': content: application/json: schema: properties: header: description: Base64URL encoded JFS header type: string payload: description: Base64URL encoded JFS payload type: string signature: description: Base64URL encoded JFS signature type: string required: - header - payload - signature type: object description: Success '400': content: application/json: schema: properties: error: type: string required: - error type: object description: Bad Request '404': content: application/json: schema: properties: error: type: string required: - error type: object description: Resource not found '500': content: application/json: schema: properties: error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Get account association of a miniapp tags: - studio post: description: 'Associates a generated miniapp with a Farcaster account using a JFS-signed domain association. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call.' externalDocs: url: https://docs.neynar.com/reference/associate-deployment operationId: associate-deployment requestBody: content: application/json: schema: properties: account_association: description: Signed domain association linking this deployment to a Farcaster account properties: header: description: Base64URL encoded JFS header type: string payload: description: Base64URL encoded JFS payload type: string signature: description: Base64URL encoded JFS signature type: string required: - header - payload - signature type: object deployment_id: description: Deployment ID (UUID). Required if name not provided. format: uuid type: string fid: description: Farcaster ID of the user; if not provided, namespace must be provided example: 3 format: int32 minimum: 0 type: integer name: description: Kubernetes deployment name. Required if deployment_id not provided. type: string namespace: description: Optional Kubernetes namespace. If not provided, will query for the active namespace for the given FID. type: string required: - account_association type: object required: true responses: '200': content: application/json: schema: properties: message: description: Status message from the miniapp generator type: string success: type: boolean required: - success - message type: object description: Success '400': content: application/json: schema: properties: error: type: string required: - error type: object description: Bad Request '404': content: application/json: schema: properties: error: type: string required: - error type: object description: Resource not found '500': content: application/json: schema: properties: error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Set account association tags: - studio /v2/studio/deployment/build: post: description: 'Runs Next.js build process for the generated app. If build fails, automatically calls a build-fixer agent to resolve errors. Streams build output and agent responses via Server-Sent Events. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call.' externalDocs: url: https://docs.neynar.com/reference/build operationId: build requestBody: content: application/json: schema: properties: build_type: default: vercel description: Build tool to use. "vercel" runs vercel build for production deployment. "npm" runs npm run build for dev server recovery. enum: - npm - vercel type: string deployment_id: description: Deployment ID format: uuid type: string name: description: Kubernetes deployment name type: string namespace: description: Kubernetes namespace type: string type: object required: true responses: '200': description: Success '400': content: application/json: schema: properties: error: type: string required: - error type: object description: Bad Request '404': content: application/json: schema: properties: error: type: string required: - error type: object description: Resource not found '409': content: application/json: schema: properties: error: type: string required: - error type: object description: Conflict '500': content: application/json: schema: properties: error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Build generated app with automatic error fixing tags: - studio /v2/studio/deployment/by-name-and-fid: get: description: 'Fetches info about a miniapp generator deployment by its deployment_id or name and creator''s Farcaster ID. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call.' externalDocs: url: https://docs.neynar.com/reference/get-deployment operationId: get-deployment parameters: - description: Deployment ID (UUID). Required if name not provided. in: query name: deployment_id schema: format: uuid type: string - description: Farcaster ID of the user; if not provided, namespace must be provided in: query name: fid schema: example: 3 format: int32 minimum: 0 type: integer - description: Kubernetes deployment name. Required if deployment_id not provided. in: query name: name schema: type: string - description: Optional Kubernetes namespace. If not provided, will query for the active namespace for the given FID. in: query name: namespace schema: type: string responses: '200': content: application/json: schema: properties: created_at: description: Creation timestamp format: date-time type: string deleted_at: description: Deletion timestamp format: date-time nullable: true type: string dev_server_state: description: 'Dev server process state: stopped, starting, running, crashed, or hung' enum: - stopped - starting - running - crashed - hung type: string display_name: description: Display name for the project type: string generated_app_exists: description: Whether a generated app exists in the deployment type: boolean generated_app_serving: description: Whether the generated app is currently serving type: boolean github_url: description: GitHub repository SSH URL type: string has_database: description: Whether the deployment has a Neon database configured type: boolean id: description: Deployment ID type: string is_ready: description: Deployment is ready to serve app and accept prompts type: boolean name: description: Kubernetes deployment name type: string namespace: description: Kubernetes namespace type: string production_app_status: description: Production app deployment status from Vercel properties: created_at: description: Deployment creation timestamp (Unix ms) type: number deployment_state: description: Deployment state (e.g., READY, BUILDING, ERROR) type: string deployment_url: description: Vercel deployment URL type: string project_id: description: Vercel project ID type: string target: description: Deployment target (e.g., production, preview) type: string required: - project_id - deployment_url - deployment_state - created_at type: object updated_at: description: Last update timestamp format: date-time nullable: true type: string url: description: Public URL for the deployment format: uri type: string required: - id - deleted_at - updated_at - created_at - namespace - name - is_ready - generated_app_exists - generated_app_serving type: object description: Success '400': content: application/json: schema: properties: error: type: string required: - error type: object description: Bad Request '404': content: application/json: schema: properties: error: type: string required: - error type: object description: Resource not found '500': content: application/json: schema: properties: error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Get deployment info tags: - studio /v2/studio/deployment/conversations: get: description: 'Lists all conversations for a specific deployment. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call.' externalDocs: url: https://docs.neynar.com/reference/list-conversations operationId: list-conversations parameters: - description: Deployment ID (UUID). If provided, filters conversations to this deployment only. in: query name: deployment_id schema: format: uuid type: string - description: Farcaster ID of the user. Required for non-admin users. Studio admins can omit to query all conversations. in: query name: fid schema: example: 3 format: int32 minimum: 0 type: integer - description: Kubernetes deployment name. If provided, filters conversations to this deployment only. in: query name: name schema: type: string - description: Include deleted conversations in the response. Defaults to false. in: query name: include_deleted schema: default: false type: boolean responses: '200': content: application/json: schema: properties: conversations: description: List of conversations items: properties: admin: description: Whether the conversation is an admin conversation type: boolean created_at: description: Creation timestamp format: date-time type: string deployment_id: description: Deployment ID format: uuid type: string id: description: Conversation ID format: uuid type: string last_message_preview: description: Preview of the last user message (truncated to ~80 chars) nullable: true type: string title: description: AI-generated title summarizing the conversation topic nullable: true type: string updated_at: description: Last update timestamp format: date-time type: string required: - id - created_at - updated_at - deployment_id - admin - title - last_message_preview type: object type: array required: - conversations type: object description: Success '400': content: application/json: schema: properties: error: type: string required: - error type: object description: Bad Request '403': content: application/json: schema: properties: error: type: string required: - error type: object description: Forbidden '404': content: application/json: schema: properties: error: type: string required: - error type: object description: Resource not found '500': content: application/json: schema: properties: error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: List conversations for a deployment tags: - studio /v2/studio/deployment/conversations/messages: get: description: 'Retrieves messages in a specific conversation with cursor-based pagination (newest first). Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call.' externalDocs: url: https://docs.neynar.com/reference/get-conversation-messages operationId: get-conversation-messages parameters: - description: Deployment ID (UUID). Required if name not provided. in: query name: deployment_id schema: format: uuid type: string - description: Farcaster ID of the user; if not provided, namespace must be provided in: query name: fid schema: example: 3 format: int32 minimum: 0 type: integer - description: Kubernetes deployment name. Required if deployment_id not provided. in: query name: name schema: type: string - description: Optional Kubernetes namespace. If not provided, will query for the active namespace for the given FID. in: query name: namespace schema: type: string - description: Conversation ID in: query name: conversation_id required: true schema: format: uuid type: string - description: Include deleted messages in the response. Defaults to false. in: query name: include_deleted schema: default: false type: boolean - description: Maximum number of messages to return per page. Defaults to 50, max 100. in: query name: limit schema: default: 50 maximum: 100 minimum: 1 type: integer x-is-limit-param: true - description: Pagination cursor for fetching older messages. Omit to start from most recent. in: query name: cursor schema: type: string responses: '200': content: application/json: schema: properties: messages: description: List of messages items: properties: conversation_id: description: Conversation ID format: uuid type: string created_at: description: Creation timestamp format: date-time type: string id: description: Message ID format: uuid type: string message: description: Message content type: string origin: description: Message origin enum: - user - system - admin type: string subtype: description: Message subtype type: string type: description: Message type type: string required: - id - created_at - conversation_id - message - origin type: object type: array next: $ref: '#/components/schemas/NextCursor' required: - messages - next type: object description: Success '400': content: application/json: schema: properties: error: type: string required: - error type: object description: Bad Request '403': content: application/json: schema: properties: error: type: string required: - error type: object description: Forbidden '404': content: application/json: schema: properties: error: type: string required: - error type: object description: Resource not found '500': content: application/json: schema: properties: error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Get messages in a conversation tags: - studio /v2/studio/deployment/database/provision: post: description: Provisions a Neon PostgreSQL database for the deployment, or validates and attaches a user-provided (BYO) connection string. Idempotent — returns success if already provisioned. externalDocs: url: https://docs.neynar.com/reference/provision operationId: provision requestBody: content: application/json: schema: properties: connection_string: description: Optional BYO PostgreSQL connection string. If omitted, a Neon database is auto-provisioned. type: string deployment_id: description: Deployment ID (UUID) format: uuid type: string fid: description: Farcaster ID of the user example: 3 format: int32 minimum: 0 type: integer required: - deployment_id - fid type: object required: true responses: '200': content: application/json: schema: properties: alreadyProvisioned: description: True if the database was already provisioned type: boolean success: enum: - true type: boolean required: - success - alreadyProvisioned type: object description: Success '400': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Bad Request '403': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Forbidden '404': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Resource not found '500': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Provision a database for a deployment tags: - studio /v2/studio/deployment/database/query: post: description: Query data from a table with pagination and sorting. externalDocs: url: https://docs.neynar.com/reference/query-table operationId: query-table requestBody: content: application/json: schema: properties: columns: description: Columns to select (defaults to all) items: type: string type: array deployment_id: description: Deployment ID (UUID) format: uuid type: string fid: description: Farcaster ID of the user. Required for non-admin users. example: 3 format: int32 minimum: 0 type: integer limit: description: 'Maximum rows to return (default: 100, max: 1000)' maximum: 1000 minimum: 1 type: number offset: description: Number of rows to skip minimum: 0 type: number orderBy: description: Column to sort by type: string orderDirection: description: Sort direction enum: - asc - desc type: string table: description: Table name to query minLength: 1 type: string required: - deployment_id - table type: object required: true responses: '200': content: application/json: schema: properties: columns: description: Column metadata items: properties: name: description: Column name type: string type: description: Column data type type: string required: - name - type type: object type: array hasMore: description: Whether more rows are available type: boolean limit: description: Applied limit type: number offset: description: Applied offset type: number rows: description: Query result rows items: additionalProperties: {} type: object type: array totalCount: description: Total number of rows in table type: number required: - columns - rows - totalCount - limit - offset - hasMore type: object description: Success '400': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Bad Request '403': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Forbidden '404': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Resource not found '500': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Query table data tags: - studio /v2/studio/deployment/database/sql: post: description: Executes a raw SQL query against the deployment database. Only SELECT, WITH, and EXPLAIN queries are allowed. Admin access required. externalDocs: url: https://docs.neynar.com/reference/execute-sql operationId: execute-sql requestBody: content: application/json: schema: properties: deployment_id: description: Deployment ID (UUID) format: uuid type: string fid: description: Farcaster ID (optional for admins) example: 3 format: int32 minimum: 0 type: integer sql: description: SQL query to execute maxLength: 10000 minLength: 1 type: string required: - deployment_id - sql type: object required: true responses: '200': content: application/json: schema: properties: columns: description: Column metadata items: properties: name: description: Column name type: string type: description: Column data type type: string required: - name - type type: object type: array executionTimeMs: description: Query execution time in milliseconds type: number rowCount: description: Number of rows returned type: number rows: description: Query result rows items: additionalProperties: {} type: object type: array required: - columns - rows - rowCount - executionTimeMs type: object description: Success '400': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Bad Request '403': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Forbidden '404': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Resource not found '500': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Execute raw SQL query (admin only) tags: - studio /v2/studio/deployment/database/tables: get: description: Lists all tables and views in the deployment database, excluding system tables. externalDocs: url: https://docs.neynar.com/reference/list-tables operationId: list-tables parameters: - description: Deployment ID (UUID) in: query name: deployment_id required: true schema: format: uuid type: string - description: Farcaster ID of the user. Required for non-admin users. in: query name: fid schema: example: 3 format: int32 minimum: 0 type: integer responses: '200': content: application/json: schema: properties: tables: description: List of tables items: properties: name: description: Table name type: string rowCountEstimate: description: Estimated row count from statistics nullable: true type: number schema: description: Schema name type: string type: description: Table type enum: - BASE TABLE - VIEW type: string required: - name - schema - type - rowCountEstimate type: object type: array required: - tables type: object description: Success '400': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Bad Request '403': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Forbidden '404': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Resource not found '500': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: List all tables in deployment database tags: - studio /v2/studio/deployment/database/tables/{table_name}/rows: delete: description: Deletes rows matching the WHERE conditions. WHERE clause is required to prevent accidental bulk deletes. externalDocs: url: https://docs.neynar.com/reference/delete-rows operationId: delete-rows parameters: - in: path name: table_name required: true schema: type: string requestBody: content: application/json: schema: properties: deployment_id: description: Deployment ID (UUID) format: uuid type: string fid: description: Farcaster ID of the user. Required for non-admin users. example: 3 format: int32 minimum: 0 type: integer limit: description: 'Maximum rows to delete (default: 1000)' maximum: 1000 minimum: 1 type: number where: additionalProperties: {} description: WHERE conditions (equality only, required) type: object required: - deployment_id - where type: object required: true responses: '200': content: application/json: schema: properties: deletedCount: description: Number of rows deleted type: number required: - deletedCount type: object description: Success '400': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Bad Request '403': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Forbidden '404': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Resource not found '500': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Delete rows from table tags: - studio patch: description: Updates rows matching the WHERE conditions. WHERE clause is required to prevent accidental bulk updates. externalDocs: url: https://docs.neynar.com/reference/update-rows operationId: update-rows parameters: - in: path name: table_name required: true schema: type: string requestBody: content: application/json: schema: properties: deployment_id: description: Deployment ID (UUID) format: uuid type: string fid: description: Farcaster ID of the user. Required for non-admin users. example: 3 format: int32 minimum: 0 type: integer limit: description: 'Maximum rows to update (default: 1000)' maximum: 1000 minimum: 1 type: number set: additionalProperties: {} description: Column values to update type: object where: additionalProperties: {} description: WHERE conditions (equality only, required) type: object required: - deployment_id - set - where type: object required: true responses: '200': content: application/json: schema: properties: updatedCount: description: Number of rows updated type: number required: - updatedCount type: object description: Success '400': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Bad Request '403': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Forbidden '404': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Resource not found '500': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Update rows in table tags: - studio post: description: Inserts one or more rows into the specified table. Returns the inserted rows with generated values. externalDocs: url: https://docs.neynar.com/reference/insert-rows operationId: insert-rows parameters: - in: path name: table_name required: true schema: type: string requestBody: content: application/json: schema: properties: deployment_id: description: Deployment ID (UUID) format: uuid type: string fid: description: Farcaster ID of the user. Required for non-admin users. example: 3 format: int32 minimum: 0 type: integer rows: description: Rows to insert (max 100) items: additionalProperties: {} type: object maxItems: 100 minItems: 1 type: array required: - deployment_id - rows type: object required: true responses: '200': content: application/json: schema: properties: insertedCount: description: Number of rows inserted type: number rows: description: Inserted rows with generated values items: additionalProperties: {} type: object type: array required: - insertedCount - rows type: object description: Success '400': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Bad Request '403': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Forbidden '404': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Resource not found '500': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Insert rows into table tags: - studio /v2/studio/deployment/database/tables/{table_name}/schema: get: description: Retrieves the complete schema for a table including columns, indexes, and foreign keys. externalDocs: url: https://docs.neynar.com/reference/get-table-schema operationId: get-table-schema parameters: - in: path name: table_name required: true schema: type: string - description: Deployment ID (UUID) in: query name: deployment_id required: true schema: format: uuid type: string - description: Farcaster ID of the user. Required for non-admin users. in: query name: fid schema: example: 3 format: int32 minimum: 0 type: integer responses: '200': content: application/json: schema: properties: columns: description: Table columns items: properties: defaultValue: description: Default value expression nullable: true type: string isPrimaryKey: description: Whether the column is part of primary key type: boolean name: description: Column name type: string nullable: description: Whether the column allows NULL values type: boolean position: description: Ordinal position in table type: number type: description: Column data type type: string required: - name - type - nullable - defaultValue - isPrimaryKey - position type: object type: array foreignKeys: description: Foreign key relationships items: properties: columnName: description: Local column name type: string constraintName: description: Constraint name type: string referencedColumn: description: Referenced column name type: string referencedTable: description: Referenced table name type: string required: - constraintName - columnName - referencedTable - referencedColumn type: object type: array indexes: description: Table indexes items: properties: columns: description: Columns in the index items: type: string type: array isPrimary: description: Whether this is the primary key index type: boolean isUnique: description: Whether the index enforces uniqueness type: boolean name: description: Index name type: string required: - name - columns - isUnique - isPrimary type: object type: array primaryKeyColumns: description: Primary key column names items: type: string type: array tableName: description: Table name type: string required: - tableName - columns - indexes - foreignKeys - primaryKeyColumns type: object description: Success '400': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Bad Request '403': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Forbidden '404': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Resource not found '500': content: application/json: schema: properties: code: type: string error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Get table schema tags: - studio /v2/studio/deployment/dev-status: get: description: 'Retrieves the dev-status.json file from a miniapp deployment, which tracks the progress of app development phases. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call.' externalDocs: url: https://docs.neynar.com/reference/get-dev-status operationId: get-dev-status parameters: - description: Deployment ID in: query name: deployment_id schema: format: uuid type: string - description: Kubernetes namespace name in: query name: namespace schema: type: string - description: Kubernetes deployment name in: query name: name schema: type: string responses: '200': content: application/json: schema: oneOf: - properties: ready_to_publish: type: boolean schema_version: enum: - 0 type: number required: - schema_version - ready_to_publish type: object - additionalProperties: {} properties: completed_at: nullable: true type: string current_phase: type: number last_updated_at: nullable: true type: string metadata: additionalProperties: {} type: object phases: additionalProperties: additionalProperties: {} properties: {} type: object type: object ready_to_publish: type: boolean schema_version: enum: - 1 type: number started_at: nullable: true type: string required: - schema_version - ready_to_publish - current_phase - started_at - last_updated_at - completed_at - phases - metadata type: object type: object description: Success '400': content: application/json: schema: properties: error: type: string required: - error type: object description: Bad Request '404': content: application/json: schema: properties: error: type: string required: - error type: object description: Resource not found '500': content: application/json: schema: properties: error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Get dev status of a miniapp tags: - studio /v2/studio/deployment/export-zip: get: description: 'Downloads the generated miniapp source code as a binary ZIP archive (Content-Type: application/zip). Requires a paid Studio subscription (GROWTH, STUDIO_PLUS, STUDIO_MAX, or INTERNAL). The deployment must be running. The 200 response body is a raw binary stream, not JSON.' externalDocs: url: https://docs.neynar.com/reference/export-zip operationId: export-zip parameters: - description: Deployment ID (UUID). Required if name not provided. in: query name: deployment_id schema: format: uuid type: string - description: Farcaster ID of the user; if not provided, namespace must be provided in: query name: fid schema: example: 3 format: int32 minimum: 0 type: integer - description: Kubernetes deployment name. Required if deployment_id not provided. in: query name: name schema: type: string - description: Optional Kubernetes namespace. If not provided, will query for the active namespace for the given FID. in: query name: namespace schema: type: string responses: '200': description: Success '400': content: application/json: schema: properties: error: type: string required: - error type: object description: Bad Request '402': content: application/json: schema: properties: code: type: string message: type: string required: - message - code type: object description: Payment Required '403': content: application/json: schema: properties: error: type: string required: - error type: object description: Forbidden '404': content: application/json: schema: properties: error: type: string required: - error type: object description: Resource not found '500': content: application/json: schema: properties: error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Export deployment source code as ZIP tags: - studio /v2/studio/deployment/file: get: description: 'Retrieves the contents of a specific file from the generated app. Requires Studio admin authentication or FID ownership validation. Note: Studio CU is tracked based on LLM token usage, not per API call.' externalDocs: url: https://docs.neynar.com/reference/get-deployment-file operationId: get-deployment-file parameters: - description: Deployment ID (UUID). Required if name not provided. in: query name: deployment_id schema: format: uuid type: string - description: Farcaster ID of the user; if not provided, namespace must be provided in: query name: fid schema: example: 3 format: int32 minimum: 0 type: integer - description: Kubernetes deployment name. Required if deployment_id not provided. in: query name: name schema: type: string - description: Optional Kubernetes namespace. If not provided, will query for the active namespace for the given FID. in: query name: namespace schema: type: string - description: File path relative to gen/ in: query name: file_path required: true schema: type: string responses: '200': content: application/json: schema: properties: content: description: File contents type: string path: description: File path relative to gen/ type: string required: - content - path type: object description: Success '400': content: application/json: schema: properties: error: type: string required: - error type: object description: Bad Request '403': content: application/json: schema: properties: error: type: string required: - error type: object description: Forbidden '404': content: application/json: schema: properties: error: type: string required: - error type: object description: Resource not found '500': content: application/json: schema: properties: error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Get deployment file contents tags: - studio /v2/studio/deployment/files: get: description: 'Lists files in a directory of the generated app. Requires Studio admin authentication or FID ownership validation. Note: Studio CU is tracked based on LLM token usage, not per API call.' externalDocs: url: https://docs.neynar.com/reference/list-deployment-files operationId: list-deployment-files parameters: - description: Deployment ID (UUID). Required if name not provided. in: query name: deployment_id schema: format: uuid type: string - description: Farcaster ID of the user; if not provided, namespace must be provided in: query name: fid schema: example: 3 format: int32 minimum: 0 type: integer - description: Kubernetes deployment name. Required if deployment_id not provided. in: query name: name schema: type: string - description: Optional Kubernetes namespace. If not provided, will query for the active namespace for the given FID. in: query name: namespace schema: type: string - description: Directory path relative to gen/ (defaults to root) in: query name: directory schema: type: string responses: '200': content: application/json: schema: properties: files: description: List of files and directories items: properties: is_directory: description: Whether this is a directory type: boolean name: description: File or directory name type: string path: description: Full path relative to gen/ type: string required: - name - path - is_directory type: object type: array required: - files type: object description: Success '400': content: application/json: schema: properties: error: type: string required: - error type: object description: Bad Request '403': content: application/json: schema: properties: error: type: string required: - error type: object description: Forbidden '404': content: application/json: schema: properties: error: type: string required: - error type: object description: Resource not found '500': content: application/json: schema: properties: error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: List deployment files tags: - studio /v2/studio/deployment/prompt/stream: post: description: 'Sends a prompt to a specific miniapp generator deployment and returns a streaming response using Server-Sent Events. The response is a continuous stream of Server-Sent Events, not a single JSON payload. Each event contains a JSON object with type, message, and other fields specific to the message type. Requires authentication via API key in the request header. Note: Studio CU is tracked based on LLM token usage, not per API call.' externalDocs: url: https://docs.neynar.com/reference/prompt-deployment-stream operationId: prompt-deployment-stream requestBody: content: application/json: schema: properties: conversation_id: description: Optional conversation ID to continue an existing chat. If not provided, a new conversation will be created. format: uuid type: string deployment_id: description: Deployment ID (UUID). Required if name not provided. format: uuid type: string fid: description: Farcaster ID of the user; if not provided, namespace must be provided example: 3 format: int32 minimum: 0 type: integer images: description: Optional images for multimodal messages. Each image is base64-encoded. items: properties: data: description: Base64-encoded image data or data URL (data:image/png;base64,...) type: string mediaType: description: MIME type of the image, e.g. image/png enum: - image/jpeg - image/png - image/gif - image/webp type: string required: - mediaType - data type: object type: array name: description: Kubernetes deployment name. Required if deployment_id not provided. type: string namespace: description: Optional Kubernetes namespace. If not provided, will query for the active namespace for the given FID. type: string prompt: description: Prompt string to send to the deployment type: string session_id: description: Optional Claude SDK session ID to resume an existing Claude Code session. Enables session-based conversation continuity. type: string system_prompt_variant: description: System prompt variant to use. Defaults to stable if not provided. enum: - canary - beta - stable type: string required: - prompt type: object required: true responses: '200': description: Success '202': content: application/json: schema: properties: conversation_id: description: The conversation ID format: uuid type: string queued: description: Indicates the message was queued to the active session enum: - true type: boolean session_id: description: The session ID the message was queued to type: string required: - queued - session_id - conversation_id type: object description: '202' '400': content: application/json: schema: properties: error: type: string required: - error type: object description: Bad Request '404': content: application/json: schema: properties: error: type: string required: - error type: object description: Resource not found '413': content: application/json: schema: properties: error: type: string required: - error type: object description: Content Too Large '500': content: application/json: schema: properties: error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Prompt a deployment with streaming response tags: - studio /v2/studio/deployment/recover: post: description: 'Attempts to recover a broken dev server. Phase 1: reads dev server error logs and sends them to an AI agent for fixing, then waits for HMR to auto-rebuild. Phase 2: if HMR fails, falls back to a full npm build with AI retry loop. Streams progress events via Server-Sent Events. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call.' externalDocs: url: https://docs.neynar.com/reference/recover operationId: recover requestBody: content: application/json: schema: properties: deployment_id: description: Deployment ID format: uuid type: string name: description: Kubernetes deployment name type: string namespace: description: Kubernetes namespace type: string type: object required: true responses: '200': description: Success '400': content: application/json: schema: properties: error: type: string required: - error type: object description: Bad Request '404': content: application/json: schema: properties: error: type: string required: - error type: object description: Resource not found '409': content: application/json: schema: properties: error: type: string required: - error type: object description: Conflict '500': content: application/json: schema: properties: error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Recover dev server with two-phase strategy tags: - studio /v2/studio/deployment/secrets/: delete: description: Deletes environment variables (secrets) from a deployment. externalDocs: url: https://docs.neynar.com/reference/delete-secrets operationId: delete-secrets requestBody: content: application/json: schema: properties: deployment_id: description: Deployment ID to delete secrets from format: uuid type: string ids: description: Secret IDs to delete items: type: string minItems: 1 type: array required: - deployment_id - ids type: object required: true responses: '200': content: application/json: schema: properties: success: enum: - true type: boolean required: - success type: object description: Success '400': content: application/json: schema: $ref: '#/components/schemas/ErrorRes' description: Bad Request '404': content: application/json: schema: $ref: '#/components/schemas/ErrorRes' description: Resource not found '500': content: application/json: schema: $ref: '#/components/schemas/ErrorRes' description: Server Error security: - ApiKeyAuth: [] summary: Delete deployment secrets tags: - studio get: description: Retrieves all secrets for a deployment. externalDocs: url: https://docs.neynar.com/reference/list-secrets operationId: list-secrets parameters: - description: Deployment ID to list secrets for in: query name: deployment_id required: true schema: format: uuid type: string - description: Optional filter by environment variable name in: query name: key schema: type: string responses: '200': content: application/json: schema: properties: secrets: items: properties: id: description: Environment variable ID type: string key: description: Environment variable name type: string preview: description: Masked preview of the secret value (e.g. "sk_l…t1b3") type: string type: description: Whether this is a system-managed or user-defined variable enum: - system - user type: string required: - key - id - type type: object type: array success: enum: - true type: boolean required: - success - secrets type: object description: Success '404': content: application/json: schema: $ref: '#/components/schemas/ErrorRes' description: Resource not found '500': content: application/json: schema: $ref: '#/components/schemas/ErrorRes' description: Server Error security: - ApiKeyAuth: [] summary: List deployment secrets tags: - studio post: description: Upsert secrets for a deployment. externalDocs: url: https://docs.neynar.com/reference/upsert-secrets operationId: upsert-secrets requestBody: content: application/json: schema: properties: deployment_id: description: Deployment ID to add secrets to format: uuid type: string secrets: description: Secrets to create items: properties: key: description: Environment variable name type: string value: description: Environment variable value type: string required: - key - value type: object minItems: 1 type: array required: - deployment_id - secrets type: object required: true responses: '200': content: application/json: schema: properties: success: enum: - true type: boolean required: - success type: object description: Success '400': content: application/json: schema: $ref: '#/components/schemas/ErrorRes' description: Bad Request '404': content: application/json: schema: $ref: '#/components/schemas/ErrorRes' description: Resource not found '500': content: application/json: schema: $ref: '#/components/schemas/ErrorRes' description: Server Error security: - ApiKeyAuth: [] summary: Upsert deployment secrets tags: - studio /v2/studio/deployment/session/cancel: post: description: 'Cancels an in-progress Claude Code session for a deployment. Safe to call even if no session is active — returns cancelled: false in that case.' externalDocs: url: https://docs.neynar.com/reference/cancel-session operationId: cancel-session requestBody: content: application/json: schema: properties: conversation_id: description: The conversation ID of the session to cancel format: uuid type: string deployment_id: description: Deployment ID (UUID). Required if name not provided. format: uuid type: string fid: description: Farcaster ID of the user; if not provided, namespace must be provided example: 3 format: int32 minimum: 0 type: integer name: description: Kubernetes deployment name. Required if deployment_id not provided. type: string namespace: description: Optional Kubernetes namespace. If not provided, will query for the active namespace for the given FID. type: string required: - conversation_id type: object required: true responses: '200': content: application/json: schema: properties: cancelled: description: Whether an active session was found and cancelled type: boolean required: - cancelled type: object description: Success '400': content: application/json: schema: properties: error: type: string required: - error type: object description: Bad Request '404': content: application/json: schema: properties: error: type: string required: - error type: object description: Resource not found '500': content: application/json: schema: properties: error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Cancel an active Claude session for a deployment tags: - studio /v2/studio/deployment/start: post: description: 'Starts the Next.js development server for the generated miniapp. Requires Studio admin authentication. Note: Studio CU is tracked based on LLM token usage, not per API call.' externalDocs: url: https://docs.neynar.com/reference/start-app operationId: start-app requestBody: content: application/json: schema: properties: deployment_id: description: Deployment ID (UUID). Required if name not provided. format: uuid type: string fid: description: Farcaster ID of the user; if not provided, namespace must be provided example: 3 format: int32 minimum: 0 type: integer name: description: Kubernetes deployment name. Required if deployment_id not provided. type: string namespace: description: Optional Kubernetes namespace. If not provided, will query for the active namespace for the given FID. type: string type: object required: true responses: '200': content: application/json: schema: properties: message: description: Status message type: string success: type: boolean required: - success - message type: object description: Success '400': content: application/json: schema: properties: error: type: string required: - error type: object description: Bad Request '403': content: application/json: schema: properties: error: type: string required: - error type: object description: Forbidden '404': content: application/json: schema: properties: error: type: string required: - error type: object description: Resource not found '408': content: application/json: schema: properties: error: type: string required: - error type: object description: Request Timeout '500': content: application/json: schema: properties: error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Start generated miniapp tags: - studio /v2/studio/deployment/stop: post: description: 'Stops the Next.js development server for the generated miniapp. Requires Studio admin authentication. Note: Studio CU is tracked based on LLM token usage, not per API call.' externalDocs: url: https://docs.neynar.com/reference/stop-app operationId: stop-app requestBody: content: application/json: schema: properties: deployment_id: description: Deployment ID (UUID). Required if name not provided. format: uuid type: string fid: description: Farcaster ID of the user; if not provided, namespace must be provided example: 3 format: int32 minimum: 0 type: integer name: description: Kubernetes deployment name. Required if deployment_id not provided. type: string namespace: description: Optional Kubernetes namespace. If not provided, will query for the active namespace for the given FID. type: string type: object required: true responses: '200': content: application/json: schema: properties: message: description: Status message type: string success: type: boolean required: - success - message type: object description: Success '400': content: application/json: schema: properties: error: type: string required: - error type: object description: Bad Request '403': content: application/json: schema: properties: error: type: string required: - error type: object description: Forbidden '404': content: application/json: schema: properties: error: type: string required: - error type: object description: Resource not found '500': content: application/json: schema: properties: error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Stop generated miniapp tags: - studio /v2/studio/deployment/upload-image: post: description: 'Uploads an image file to the generated miniapp public folder. The image will be accessible as a static asset on the deployed miniapp. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call.' externalDocs: url: https://docs.neynar.com/reference/upload-image operationId: upload-image responses: '200': content: application/json: schema: properties: filename: description: Uploaded filename type: string message: description: Status message type: string success: description: Whether the upload was successful type: boolean url: description: URL path to access the image type: string required: - success - message type: object description: Success '400': content: application/json: schema: properties: error: type: string required: - error type: object description: Bad Request '404': content: application/json: schema: properties: error: type: string required: - error type: object description: Resource not found '500': content: application/json: schema: properties: error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Upload image to deployment tags: - studio /v2/studio/deployment/upload-image-url: post: description: 'Downloads an image from the provided URL and saves it to the generated miniapp public folder. The image will be accessible as a static asset on the deployed miniapp. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call.' externalDocs: url: https://docs.neynar.com/reference/upload-image-url operationId: upload-image-url requestBody: content: application/json: schema: properties: deployment_id: description: Deployment ID (UUID). Required if name not provided. format: uuid type: string fid: description: Farcaster ID of the user; if not provided, namespace must be provided example: 3 format: int32 minimum: 0 type: integer name: description: Kubernetes deployment name. Required if deployment_id not provided. type: string namespace: description: Optional Kubernetes namespace. If not provided, will query for the active namespace for the given FID. type: string url: description: URL of the image to download format: uri type: string required: - url type: object required: true responses: '200': content: application/json: schema: properties: filename: description: Uploaded filename type: string message: description: Status message type: string success: description: Whether the upload was successful type: boolean url: description: URL path to access the image type: string required: - success - message type: object description: Success '400': content: application/json: schema: properties: error: type: string required: - error type: object description: Bad Request '404': content: application/json: schema: properties: error: type: string required: - error type: object description: Resource not found '500': content: application/json: schema: properties: error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Upload image from URL to deployment tags: - studio /v2/studio/usage/report: post: description: Called by miniapp-generator instances to report Claude SDK usage. Idempotent — duplicate submissions (same idempotency_key) are accepted but not double-counted. externalDocs: url: https://docs.neynar.com/reference/report-studio-usage operationId: report-studio-usage requestBody: content: application/json: schema: properties: compute_units: description: Compute units to add (must be positive) exclusiveMinimum: true minimum: 0 type: integer deployment_id: type: string developer_uuid: format: uuid type: string idempotency_key: description: UUID from the Claude SDK result message format: uuid type: string session_id: description: Claude session ID for audit trail type: string required: - idempotency_key - developer_uuid - deployment_id - compute_units type: object required: true responses: '200': content: application/json: schema: properties: accepted: enum: - true type: boolean duplicate: type: boolean required: - accepted - duplicate type: object description: Success '400': content: application/json: schema: properties: error: type: string required: - error type: object description: Bad Request '401': content: application/json: schema: properties: error: type: string required: - error type: object description: Unauthorized '404': content: application/json: schema: properties: error: type: string required: - error type: object description: Resource not found '500': content: application/json: schema: properties: error: type: string required: - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Report studio compute unit usage tags: - studio /v2/studio/vercel/: post: description: 'Publishes the generated miniapp to Vercel via GitHub. Creates a GitHub repository, pushes code, creates a Vercel project linked to GitHub, and triggers deployment. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call.' externalDocs: url: https://docs.neynar.com/reference/deploy-to-vercel operationId: deploy-to-vercel requestBody: content: application/json: schema: properties: deployment_id: description: Deployment ID (UUID). Required if name not provided. format: uuid type: string env: additionalProperties: type: string description: Environment variables for the Vercel deployment type: object fid: description: Farcaster ID of the user; if not provided, namespace must be provided example: 3 format: int32 minimum: 0 type: integer name: description: Deployment name (used for both GitHub repo and Vercel project). Required if deployment_id not provided. type: string namespace: description: Kubernetes namespace name type: string type: object required: true responses: '200': content: application/json: schema: properties: deployment_url: description: URL of the deployed Vercel app type: string production_url: description: Production URL under neynar.app domain type: string project_id: description: Vercel project ID type: string success: description: Whether the deployment succeeded type: boolean required: - success type: object description: Success '400': content: application/json: schema: properties: error: type: string success: enum: - false type: boolean required: - success - error type: object description: Bad Request '404': content: application/json: schema: properties: error: type: string success: enum: - false type: boolean required: - success - error type: object description: Resource not found '409': content: application/json: schema: properties: error: type: string success: enum: - false type: boolean required: - success - error type: object description: Conflict '500': content: application/json: schema: properties: error: type: string success: enum: - false type: boolean required: - success - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Deploy miniapp to Vercel tags: - studio /v2/studio/vercel/domain: put: description: 'Assigns a custom *.neynar.app subdomain to the user''s deployed miniapp. The new domain is added to the Vercel project alongside the existing auto-assigned domain. The productionDomain in the database is updated to the custom domain. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call.' externalDocs: url: https://docs.neynar.com/reference/assign-custom-domain operationId: assign-custom-domain parameters: - description: Farcaster ID of the requesting user in: query name: fid required: true schema: example: 3 format: int32 minimum: 0 type: integer requestBody: content: application/json: schema: properties: deployment_id: description: Deployment ID (UUID) of the miniapp format: uuid type: string subdomain: description: The desired subdomain (without .neynar.app suffix). Must be 3-63 characters, lowercase alphanumeric and hyphens only. maxLength: 63 minLength: 3 pattern: ^[a-z0-9]([a-z0-9-]*[a-z0-9])?$ type: string required: - deployment_id - subdomain type: object required: true responses: '200': content: application/json: schema: properties: domain: description: The full assigned domain (e.g., myapp.neynar.app) type: string previous_domain: description: The previous production domain, if any type: string success: enum: - true type: boolean required: - success - domain type: object description: Success '400': content: application/json: schema: properties: error: type: string success: enum: - false type: boolean required: - success - error type: object description: Bad Request '403': content: application/json: schema: properties: error: type: string success: enum: - false type: boolean required: - success - error type: object description: Forbidden '404': content: application/json: schema: properties: error: type: string success: enum: - false type: boolean required: - success - error type: object description: Resource not found '409': content: application/json: schema: properties: error: type: string success: enum: - false type: boolean required: - success - error type: object description: Conflict '500': content: application/json: schema: properties: error: type: string success: enum: - false type: boolean required: - success - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Assign a custom subdomain to a deployed miniapp tags: - studio /v2/studio/vercel/domain/check: get: description: 'Checks whether a custom *.neynar.app subdomain is available for assignment. Validates format, checks reserved names, and verifies no other active deployment is using it. Note: Studio CU is tracked based on LLM token usage, not per API call.' externalDocs: url: https://docs.neynar.com/reference/check-domain-availability operationId: check-domain-availability parameters: - description: Farcaster ID of the requesting user in: query name: fid required: true schema: example: 3 format: int32 minimum: 0 type: integer - description: The desired subdomain (without .neynar.app suffix). Must be 3-63 characters, lowercase alphanumeric and hyphens only. in: query name: subdomain required: true schema: maxLength: 63 minLength: 3 pattern: ^[a-z0-9]([a-z0-9-]*[a-z0-9])?$ type: string responses: '200': content: application/json: schema: properties: available: description: Whether the subdomain is available type: boolean domain: description: The full domain (e.g., myapp.neynar.app) type: string reason: description: Reason why the subdomain is unavailable (e.g., "reserved", "taken") type: string required: - available - domain type: object description: Success '400': content: application/json: schema: properties: error: type: string success: enum: - false type: boolean required: - success - error type: object description: Bad Request '500': content: application/json: schema: properties: error: type: string success: enum: - false type: boolean required: - success - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Check if a custom subdomain is available tags: - studio /v2/studio/vercel/logs: get: description: 'Retrieves the build logs for a Vercel deployment. Useful for debugging failed deployments. Requires Studio admin authentication. Note: Studio CU is tracked based on LLM token usage, not per API call.' externalDocs: url: https://docs.neynar.com/reference/vercel-deployment-logs operationId: vercel-deployment-logs parameters: - description: Deployment ID (UUID). Required if name not provided. in: query name: deployment_id schema: format: uuid type: string - description: Farcaster ID of the user in: query name: fid schema: minimum: 0 type: integer - description: K8s Namespace name in: query name: namespace schema: type: string - description: Deployment name used to identify the Vercel project. Required if deployment_id not provided. in: query name: name schema: type: string - description: Maximum number of log events to return. Defaults to 100. in: query name: limit schema: default: 100 minimum: 1 type: integer responses: '200': content: application/json: schema: properties: logs: description: Array of log events items: properties: created: description: Timestamp of the log event type: number date: description: Date of the log event type: number text: description: Log text content type: string type: description: Event type (stdout, stderr, etc.) type: string required: - type - created - date type: object type: array success: description: Whether the request succeeded type: boolean required: - success - logs type: object description: Success '400': content: application/json: schema: properties: error: type: string success: enum: - false type: boolean required: - success - error type: object description: Bad Request '403': content: application/json: schema: properties: error: type: string success: enum: - false type: boolean required: - success - error type: object description: Forbidden '404': content: application/json: schema: properties: error: type: string success: enum: - false type: boolean required: - success - error type: object description: Resource not found '500': content: application/json: schema: properties: error: type: string success: enum: - false type: boolean required: - success - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Get Vercel deployment build logs tags: - studio /v2/studio/vercel/status: get: description: 'Retrieves the status of a Vercel deployment for a miniapp. Looks up the Vercel project ID from the deployment and queries Vercel API for deployment status. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call.' externalDocs: url: https://docs.neynar.com/reference/vercel-deployment-status operationId: vercel-deployment-status parameters: - description: Deployment ID (UUID). Required if name not provided. in: query name: deployment_id schema: format: uuid type: string - description: Farcaster ID of the user; if not provided, namespace must be provided in: query name: fid schema: minimum: 0 type: integer - description: K8s Namespace name in: query name: namespace schema: type: string - description: Deployment name used to identify the Vercel project. Required if deployment_id not provided. in: query name: name schema: type: string responses: '200': content: application/json: schema: properties: created_at: description: Timestamp when deployment was created type: number deployment_state: description: Current state of the deployment type: string deployment_url: description: URL of the deployed Vercel app type: string project_id: description: Vercel project ID type: string success: description: Whether the request succeeded type: boolean target: description: Deployment target environment type: string required: - success type: object description: Success '400': content: application/json: schema: properties: error: type: string success: enum: - false type: boolean required: - success - error type: object description: Bad Request '404': content: application/json: schema: properties: error: type: string success: enum: - false type: boolean required: - success - error type: object description: Resource not found '500': content: application/json: schema: properties: error: type: string success: enum: - false type: boolean required: - success - error type: object description: Server Error security: - ApiKeyAuth: [] summary: Get Vercel deployment status tags: - studio components: schemas: NextCursor: description: Returns next cursor properties: cursor: nullable: true type: string required: - cursor title: NextCursor type: object ErrorRes: description: Details for the error response properties: code: type: string message: type: string property: type: string status: format: int32 type: integer required: - message title: ErrorRes type: object securitySchemes: ApiKeyAuth: description: API key to authorize requests in: header name: x-api-key type: apiKey x-default: NEYNAR_API_DOCS