Skip to content

feat(api_keys): document scopes, ip_whitelist and expiration - #133

Open
leofischer wants to merge 2 commits into
mainfrom
docs/api-keys-scopes-ip-whitelist-expiry
Open

leofischer wants to merge 2 commits into
mainfrom
docs/api-keys-scopes-ip-whitelist-expiry

Conversation

@leofischer

@leofischer leofischer commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

Brings the API key endpoints in line with what payments-api accepts and returns today.

Changes

  • Create (api_key_request): scopes (required for private keys), ip_whitelist and expires_in_seconds (7, 30, 90, 180 or 365 days).
  • Update gets its own api_key_update_request: active, description, ip_whitelist (full replacement, null clears it) and expires_in_seconds (a grace period of up to 7 days, only shortens the key's life, 0 stops it right away).
  • Responses: scopes, ip_whitelist and expires_at added to api_key_response and api_key_response_on_delete.
  • New shared schemas api_key_scopes, api_key_ip_whitelist and api_key_ip_whitelist_mode.
  • ip_whitelist_mode on update and in responses: enforce (default, rejects off-list IPs), monitor_strict (allows and alerts on every new off-list IP) and monitor_suspicious (allows and alerts only on suspicious IPs), plus the alert rules.
  • 403 (missing scope) added to every endpoint; 422 added to PUT and DELETE.
  • authentication_token description and example updated to the current 104-character format.
  • _build/api.yaml regenerated. I dropped the unrelated default: null lines the generator added.

Depends on

updated_at was already in the spec but the API didn't return it. conekta/payments-api#7269 adds it on 2.3.0, so merge this after that PR or together with it.

DELETE's deleted: true is also in the spec from before and the API doesn't return it yet. That is left for a later change.

ip_whitelist_mode with three values depends on the unmerged payments-api feat/ip-whitelist-security-alerts and auth feat/ip-whitelist-monitor-modes branches; main only knows enforce and monitor today. Merge after those.

Not documented on purpose

Provider entries in ip_whitelist are Conekta-assigned and left out. The legacy monitor value, still accepted and stored as monitor_suspicious, is left out too.

🤖 Generated with Claude Code

https://claude.ai/code/session_015867bQrxWyfgMwRc3dfV8A

@atlantis-conekta

Copy link
Copy Markdown
Error: This repo is not allowlisted for Atlantis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant