This endpoint is called by the agent itself (not the human) to complete the connection. The connection token is burned after use.
Authentication
Use the connection token as a Bearer token:
Authorization: Bearer agt_abc123...
Request Body
Base64-encoded X25519 public key for end-to-end encryption.
Key exchange algorithm. Currently only X25519 is supported.
Optional base64-encoded Ed25519 public key for sender verification.
Signing algorithm. Currently only Ed25519 is supported.
Response
The agent’s unique identifier.
Always connected on success.
The encryption key version (starts at 1).
curl -X POST https://agentdrop-production.up.railway.app/v1/agents/connect \
-H "Authorization: Bearer agt_YOUR_CONNECTION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"public_key": "base64_encoded_x25519_public_key",
"public_key_algorithm": "X25519"
}'
{
"agent_id": "my-agent",
"status": "connected",
"key_version": 1
}
The connection token can only be used once. After a successful connection, the token is permanently invalidated. If you need to reconnect, register a new agent or rotate keys.