Agent Registration
Register new agent identities programmatically. This endpoint provisions a new cryptographic certificate and returns the credentials required for the agent to authenticate via mTLS.
Registration API
Use the SDK to register an agent. You must pass a unique string identifier and the policy ID you wish to attach.
TypeScript
const newAgent = await nayker.register({
name: 'sales-outreach-bot',
policyId: 'pol_12345xyz',
environment: 'production'
});Python
new_agent = nayker.register(
name="sales-outreach-bot",
policy_id="pol_12345xyz",
environment="production"
)Response Object
{
"id": "agt_8f92j10",
"name": "sales-outreach-bot",
"credentials": {
"client_id": "nayker_client_abc123",
"client_secret": "sk_live_...",
"certificate": "-----BEGIN CERTIFICATE-----\nMIIDdTCCAl2gAwIBAgIU...\n-----END CERTIFICATE-----"
},
"status": "active"
}Common Errors
policy_not_found: The provided policy ID does not exist in your environment.name_conflict: An active agent with this name already exists. Agent names must be unique per environment.