Create organization API credentials

Creates new API credentials for an organization with the following validations: 1. **Organization Validation**: - Organization must exist - User must have access to the organization 2. **Role Assignment** (required): - At least one role must be provided - Roles will be assigned to the API credentials for the organization - Roles must be valid organization roles (not merchant roles) - Invalid or missing roles will result in a 400 error 3. **Permission Requirements**: - User must have MERCHANT_DEV_SETTINGS_CREATE_API_KEY permission

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

organizationIdstringRequired
Organization ID

Request

This endpoint expects an object.
namestringRequired
Descriptive name to identify the purpose of the API credentials
roleslist of stringsRequired
Array of role IDs or names to assign to the API credentials for the merchant. Must contain at least 1 role.

Response

Organization API credentials created successfully
apiKeystring
Generated API Key for the merchant
secretstring
Generated Secret for the merchant

Errors

400
Create Organization API Credentials Request Bad Request Error
401
Create Organization API Credentials Request Unauthorized Error
403
Create Organization API Credentials Request Forbidden Error
404
Create Organization API Credentials Request Not Found Error
409
Create Organization API Credentials Request Conflict Error
422
Create Organization API Credentials Request Unprocessable Entity Error
500
Create Organization API Credentials Request Internal Server Error