C
CIFP

Credentials API

Generate and revoke proxy access credentials.

Credentials (username + password) authenticate HTTP clients to the proxy itself via the Proxy-Authorization header. The plaintext password is returnedonly on creation.

List Credentials

GET/api/proxies/:id/credentials
bash
curl https://cifp.vril.dev/api/proxies/proxy-id/credentials \
  -H "Authorization: Bearer cifp_your_api_key"
Response
{
  "credentials": [
    {
      "id":          "cred_uuid",
      "username":    "proxy-abc123def456-u1a2b3c",
      "description": "my-agent-prod",
      "lastUsedAt":  "2026-06-05T14:22:00Z",
      "expiresAt":   null,
      "createdAt":   "2026-06-01T10:00:00Z"
    }
  ],
  "count": 1
}

The passwordHash is never included in list responses.

Generate Credential

POST/api/proxies/:id/credentials
bash
curl -X POST https://cifp.vril.dev/api/proxies/proxy-id/credentials \
  -H "Authorization: Bearer cifp_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "my-agent-prod",
    "expiresAt":   "2026-12-31T00:00:00Z"
  }'
Response (201)
{
  "id":          "cred_uuid",
  "username":    "proxy-abc123def456-u1a2b3c",
  "password":    "CIFPrand0mGeneratedPassword",
  "description": "my-agent-prod",
  "expiresAt":   "2026-12-31T00:00:00Z",
  "createdAt":   "2026-06-06T09:00:00Z"
}

Save the password immediately

The password field is only present in this response. It is stored as a bcrypt hash and cannot be recovered. Generate a new credential if lost.

FieldRequiredDescription
descriptionNoHuman-readable label (e.g. "staging-agent")
expiresAtNoISO-8601 expiry. After this, the credential is rejected.

Revoke Credential

DELETE/api/proxies/:id/credentials/:credId

Deletes the credential and immediately syncs the change to the proxy. The next connection attempt using this credential is rejected with 407.

bash
curl -X DELETE \
  https://cifp.vril.dev/api/proxies/proxy-id/credentials/cred-uuid \
  -H "Authorization: Bearer cifp_your_api_key"

# Returns 204 No Content

Using Credentials with a Proxy

bash
# curl
curl -x https://proxy-abc123def456.proxy.cifp.vril.dev:3128 \
     -U "proxy-abc123def456-u1a2b3c:CIFPrand0mGeneratedPassword" \
     https://api.example.com/

# Python requests
import requests
proxies = {"https": "https://proxy-abc123def456-u1a2b3c:password@proxy-abc123def456.proxy.cifp.vril.dev:3128"}
requests.get("https://api.example.com/", proxies=proxies)