Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: ONCE REST Agent Auth API
version: 1.0.0
description: Human-friendly HTTP API for ONCE music distribution. Same capabilities, authentication, billing, and validation as the ONCE MCP server.
servers:
- url: https://once.app/v1
security:
- bearerAuth: []
tags:
- name: Agent Auth
paths:
/agent-auth/verified-email/challenge:
post:
summary: Request a verified-email agent credential code
description: Auth.md verified_email flow, step 1. Mails a one-time code to the ONCE account holder. The response is identical whether or not the address has an account. Rate limited per IP and per email.
security: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- email
properties:
email:
type: string
description: Email of the ONCE account to act for.
client_name:
type: string
description: Agent name shown in the email and used as the issued token name.
scopes:
type: array
items:
type: string
description: Requested scopes. Defaults to once:mcp.
responses:
'200':
description: Generic acknowledgement with claim_uri and expires_in
'429':
description: Rate limited
tags:
- Agent Auth
operationId: postAgentAuthVerifiedEmailChallenge
x-operation-id-source: derived
/agent-auth/verified-email/claim:
post:
summary: Exchange a verified-email code for a credential
description: Auth.md verified_email flow, step 2. Returns a scoped bearer token the account owner can revoke at /settings/developer. Codes are single-use, expire in 15 minutes, and allow 5 attempts.
security: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- email
- code
properties:
email:
type: string
code:
type: string
description: The 8-digit code from the email.
responses:
'201':
description: access_token, token_type, scope, expires_at
'400':
description: Invalid or expired code, or too many attempts
tags:
- Agent Auth
operationId: postAgentAuthVerifiedEmailClaim
x-operation-id-source: derived
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT or once_pat_*