Create a connector and its single-use enrollment token (dashboard session only)
POST
/connectors
const url = 'https://api.krakenkey.io/connectors';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"web-01","clientLabel":"Acme Corp","scopes":["certs:read"],"allowedCertIds":[1],"allowedDomainIds":["example"]}'};
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://api.krakenkey.io/connectors \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "web-01", "clientLabel": "Acme Corp", "scopes": [ "certs:read" ], "allowedCertIds": [ 1 ], "allowedDomainIds": [ "example" ] }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
string
Example
web-01clientLabel
Customer or site the connector runs for
string
Example
Acme Corpscopes
required
Scopes of the keys the connector gets. Must include certs:read.
Array<string>
allowedCertIds
Certificates the connector may use. At least one of allowedCertIds and allowedDomainIds is required.
Array<number>
allowedDomainIds
Domains the connector may use certificates for. At least one of allowedCertIds and allowedDomainIds is required.
Array<string>
Responses
Section titled “Responses”Connector created; the enrollment token is shown once
Connector limit reached