cURL
curl --request POST \ --url http://localhost:8080/v1/api-keys \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "name": "Production Key", "environment": "test" } '
{ "key": { "id": "<string>", "merchant_id": "<string>", "name": "<string>", "prefix": "ak_live_", "environment": "test", "expires_at": "2023-11-07T05:31:56Z", "last_used_at": "2023-11-07T05:31:56Z", "revoked_at": "2023-11-07T05:31:56Z", "created_at": "2023-11-07T05:31:56Z" }, "raw_key": "ak_live_cq1234567890abcdef_sEcReTkEyVaLuE" }
Merchant API key: ak_live_... or ak_test_...
ak_live_...
ak_test_...
"Production Key"
test
live
API key created (raw key is only returned once)
Show child attributes
Full API key value, only returned at creation time
"ak_live_cq1234567890abcdef_sEcReTkEyVaLuE"