# Create a new API key Creates a new credential pair (client_id + client_secret) for the partner. The client_secret is displayed only once in the response — store it securely. Use multiple credentials to separate environments (production, staging, development) or distinct internal systems. Endpoint: POST /auth/credentials Version: 2026-03-01 Security: bearerAuth ## Header parameters: - `Idempotency-Key` (string) Unique string for idempotent POST requests. Cached for 24 hours. ## Request fields (application/json): - `name` (string, required) Human-readable label for this key Example: "Production Key" - `expires_at` (string,null) Optional expiration date. Null = never expires. Example: "2027-03-04T00:00:00Z" ## Response 201 fields (application/json): - `id` (string, required) - `client_id` (string, required) - `name` (string, required) Example: "Production Key" - `status` (string, required) Enum: "active", "revoked" - `expires_at` (string,null, required) - `created_at` (string, required) - `updated_at` (string, required) - `last_used_at` (string,null, required) - `client_secret` (string, required) Store securely -- shown only once. Example: "dinie_cs_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ## Response 400 fields (application/problem+json): - `type` (string, required) URI identifying the error type - `title` (string, required) Short, human-readable summary of the problem type - `status` (integer, required) HTTP status code - `detail` (string, required) Human-readable explanation specific to this occurrence - `instance` (string) URI identifying this specific occurrence - `code` (string) Machine-readable subtype code - `param` (string) The request parameter that caused the error - `errors` (array) Field-level validation errors - `errors.param` (string, required) - `errors.detail` (string, required) - `errors.code` (string) ## Response 401 fields (application/problem+json): - `type` (string, required) URI identifying the error type - `title` (string, required) Short, human-readable summary of the problem type - `status` (integer, required) HTTP status code - `detail` (string, required) Human-readable explanation specific to this occurrence - `instance` (string) URI identifying this specific occurrence - `code` (string) Machine-readable subtype code - `param` (string) The request parameter that caused the error - `errors` (array) Field-level validation errors - `errors.param` (string, required) - `errors.detail` (string, required) - `errors.code` (string) ## Response 422 fields (application/problem+json): - `type` (string, required) URI identifying the error type - `title` (string, required) Short, human-readable summary of the problem type - `status` (integer, required) HTTP status code - `detail` (string, required) Human-readable explanation specific to this occurrence - `instance` (string) URI identifying this specific occurrence - `code` (string) Machine-readable subtype code - `param` (string) The request parameter that caused the error - `errors` (array) Field-level validation errors - `errors.param` (string, required) - `errors.detail` (string, required) - `errors.code` (string) ## Response 429 fields (application/problem+json): - `type` (string, required) URI identifying the error type - `title` (string, required) Short, human-readable summary of the problem type - `status` (integer, required) HTTP status code - `detail` (string, required) Human-readable explanation specific to this occurrence - `instance` (string) URI identifying this specific occurrence - `code` (string) Machine-readable subtype code - `param` (string) The request parameter that caused the error - `errors` (array) Field-level validation errors - `errors.param` (string, required) - `errors.detail` (string, required) - `errors.code` (string) ## Response 500 fields (application/problem+json): - `type` (string, required) URI identifying the error type - `title` (string, required) Short, human-readable summary of the problem type - `status` (integer, required) HTTP status code - `detail` (string, required) Human-readable explanation specific to this occurrence - `instance` (string) URI identifying this specific occurrence - `code` (string) Machine-readable subtype code - `param` (string) The request parameter that caused the error - `errors` (array) Field-level validation errors - `errors.param` (string, required) - `errors.detail` (string, required) - `errors.code` (string)