createApiKey
POST
/v1/developers/api-keys
const url = 'https://testnet-rpc.necter.network/v1/developers/api-keys';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","scopes":["tasks:submit"],"project_ids":["example"],"expires_at":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://testnet-rpc.necter.network/v1/developers/api-keys \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "scopes": [ "tasks:submit" ], "project_ids": [ "example" ], "expires_at": 1 }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Created; secret is shown once
Media typeapplication/json
object
Example
{ "prefix": "nk_test_ab12cd34", "scopes": [ "tasks:submit" ], "secret": "nk_test_ab12cd34_…"}Authenticated but not allowed (forbidden, not_owner, not_enrolled, not_verified, scope_missing)
Media typeapplication/json
object
error
required
Stable machine code
string
message
required
string
details
object
key
additional properties
any
request_id
required
string
Example generated
{ "error": "example", "message": "example", "details": {}, "request_id": "example"}