For the complete documentation index, see llms.txt. This page is also available as Markdown.

Auth

Self-service API key management (create / retrieve / delete), authenticated by an EIP-712 wallet signature instead of an API key. See the Authentication section for the typed-data structure, examples, error codes and activation timing.

Get API key

get

Retrieve the wallet's current API key. Authenticated by an EIP-712 wallet signature with action: get (see the Authentication section).

Returns HTTP 200 with the outcome in errno: 0 success, 11010 no API key found, 11011 / 11012 invalid / expired signature. get signatures can be retried within the 5-minute window.

Header parameters
OPINION_ADDRESSstringRequired

Signing wallet address

OPINION_SIGNATUREstringRequired

EIP-712 signature over the OpinionApiKeyAuth typed data (see the Authentication section)

OPINION_TIMESTAMPstringRequired

Unix timestamp in seconds; must equal the signed timestamp field. Valid for 5 minutes.

Responses
200

Successful response (check errno in the body)

application/json

Envelope used by the Auth endpoints. Unlike the data endpoints, the outcome is reported in errno / errmsg.

errnointegerOptional

Business result code (0 for success; see the Authentication section for the full list)

Example: 0
errmsgstringOptional

Error message (empty on success)

get/auth/api-key
200

Successful response (check errno in the body)

Create API key

post

Create the wallet's API key. Authenticated by an EIP-712 wallet signature with action: create (see the Authentication section).

Returns HTTP 200 with the outcome in errno: 0 success, 11004 issuance disabled, 11005 wallet is not a registered Opinion account, 11009 key already exists, 11011 / 11012 / 11013 invalid / expired / already-used signature. A newly created key becomes active at the gateway within about 15 seconds — retry on 401.

Header parameters
OPINION_ADDRESSstringRequired

Signing wallet address

OPINION_SIGNATUREstringRequired

EIP-712 signature over the OpinionApiKeyAuth typed data (see the Authentication section)

OPINION_TIMESTAMPstringRequired

Unix timestamp in seconds; must equal the signed timestamp field. Valid for 5 minutes.

Responses
200

Successful response (check errno in the body)

application/json

Envelope used by the Auth endpoints. Unlike the data endpoints, the outcome is reported in errno / errmsg.

errnointegerOptional

Business result code (0 for success; see the Authentication section for the full list)

Example: 0
errmsgstringOptional

Error message (empty on success)

post/auth/api-key
200

Successful response (check errno in the body)

Delete API key

delete

Delete (revoke) the wallet's current API key. Authenticated by an EIP-712 wallet signature with action: delete (see the Authentication section). Deleting when no key exists is treated as success, so it is safe to retry.

The revoked key stops working at the gateway within about 10 seconds.

Header parameters
OPINION_ADDRESSstringRequired

Signing wallet address

OPINION_SIGNATUREstringRequired

EIP-712 signature over the OpinionApiKeyAuth typed data (see the Authentication section)

OPINION_TIMESTAMPstringRequired

Unix timestamp in seconds; must equal the signed timestamp field. Valid for 5 minutes.

Responses
200

Successful response (check errno in the body)

application/json

Envelope used by the Auth endpoints. Unlike the data endpoints, the outcome is reported in errno / errmsg.

errnointegerOptional

Business result code (0 for success; see the Authentication section for the full list)

Example: 0
errmsgstringOptional

Error message (empty on success)

delete/auth/api-key
200

Successful response (check errno in the body)

Last updated