# Creates a merchant API key

POST {{baseURL}}/v2/api-keys
Creates a new API key for a merchant.
If the API token used for this endpoint was created from a partner API key, an API key can be created only for merchants associated with that partner.
If the API token used for this endpoint was created from a merchant API key, an API key can be created only for that merchant.
See Also:
To list available keys, see GET /v2/api-keys.
To revoke an API key, see DELETE /v2/api-keys/{{clientId}}.

Endpoint: POST /v2/api-keys
Version: V2 Beta
Security: Bearer

## Security:

  - `Bearer` (unknown)
    http bearer JWT

## Request fields (application/json):

  - `merchantId` (string, required)
    Identifies the merchant identifier.

Example: 5611f824-48ef-4255-978d-91ce13953bbd
    Example: 5611f824-48ef-4255-978d-91ce13953bbd

  - `apiKeyName` (string, required)
    Specifies a display name for the API key.

Example: Production integration key
    Example: Production integration key

## Response 200:

  - `200` (unknown)
    OK

## Response 200 fields (application/json):

  - `clientId` (string)
    Indicates the client identifier.

Example: 919c19ac-09cf-40c1-b093-413b9cabde43
    Example: 919c19ac-09cf-40c1-b093-413b9cabde43

  - `clientSecret` (string)
    Indicates the client secret.
The client secret is returned once and only during its creation here.
Store it securely.
Protect the `clientSecret` as if it were a password.
Example: bcaa0840-2872-44ea-9122-552a804a054a
    Example: bcaa0840-2872-44ea-9122-552a804a054a

## Response 400:

  - `400` (unknown)
    Bad Request

## Response 400 fields (application/json):

  - `details` (string)
    Indicates details about the error.

Example: Unauthorized
    Example: Unauthorized

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Response | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)
    Indicates the source of the error.
Example: <Service>
    Example: <Service>

  - `exceptionType` (string)
    Indicates the error's exception type.

Example: FluentValidation.ValidationException
    Example: FluentValidation.ValidationException

  - `correlationId` (string)
    Indicates the correlation identifier.

This is a unique identifier, a trace identifier, Flute attaches to a request/response pair so a single transaction can be traced end-to-end across systems and logs. 

Its intent is to support troubleshooting.
We recommend including this value when contacting support.

Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef
    Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef

  - `entityId` (string)
    Indicates the entity identifier.
This is a field on Flute's standard error response object, alongside values such as `correlationId`, `errorCode`, or `statusCode`.
It's the identifier of the specific resource the failed request was about.
Error messages may specify "Entity with ID b31fbe9f-eebb-45ce-9cae-92265389f47f does not exist or has been deleted."
When a 404 (or similar entity-specific error, like a conflict) comes back,
check `entityId` to get the exact identifier of the record that couldn't be found or matched.
This is useful for confirming which resource reference was wrong, especially if the request touched multiple identifiers at once.
Example: null

  - `errorCode` (string)
    Indicates the error code.
Example:
null

  - `title` (string)
    Indicates a short, human-readable summary of the error category.

Example: Resource not found
    Example: Resource not found

  - `cause` (string)
    Indicates the reason the error occurred.

Example: The requested resource does not exist or has been deleted.
    Example: The requested resource does not exist or has been deleted.

  - `resolution` (string)
    Indicates the recommended action for resolving the error.

Example: Verify the resource ID is correct or retrieve a list of available resources.
    Example: Verify the resource ID is correct or retrieve a list of available resources.

  - `documentationUrl` (string)
    https://developer.flute.com/

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `details` (string)
    Indicates details about the error.

Example: Unauthorized
    Example: Unauthorized

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Response | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)
    Indicates the source of the error.
Example: <Service>
    Example: <Service>

  - `exceptionType` (string)
    Indicates the error's exception type.

Example: FluentValidation.ValidationException
    Example: FluentValidation.ValidationException

  - `correlationId` (string)
    Indicates the correlation identifier.

This is a unique identifier, a trace identifier, Flute attaches to a request/response pair so a single transaction can be traced end-to-end across systems and logs. 

Its intent is to support troubleshooting.
We recommend including this value when contacting support.

Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef
    Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef

  - `entityId` (string)
    Indicates the entity identifier.
This is a field on Flute's standard error response object, alongside values such as `correlationId`, `errorCode`, or `statusCode`.
It's the identifier of the specific resource the failed request was about.
Error messages may specify "Entity with ID b31fbe9f-eebb-45ce-9cae-92265389f47f does not exist or has been deleted."
When a 404 (or similar entity-specific error, like a conflict) comes back,
check `entityId` to get the exact identifier of the record that couldn't be found or matched.
This is useful for confirming which resource reference was wrong, especially if the request touched multiple identifiers at once.
Example: null

  - `errorCode` (string)
    Indicates the error code.
Example:
null

  - `title` (string)
    Indicates a short, human-readable summary of the error category.

Example: Resource not found
    Example: Resource not found

  - `cause` (string)
    Indicates the reason the error occurred.

Example: The requested resource does not exist or has been deleted.
    Example: The requested resource does not exist or has been deleted.

  - `resolution` (string)
    Indicates the recommended action for resolving the error.

Example: Verify the resource ID is correct or retrieve a list of available resources.
    Example: Verify the resource ID is correct or retrieve a list of available resources.

  - `documentationUrl` (string)
    https://developer.flute.com/

## Response 403:

  - `403` (unknown)
    Forbidden

## Response 403 fields (application/json):

  - `details` (string)
    Indicates details about the error.

Example: Validation failed: -- Email: 'Email' is not a valid email address. Severity: Error
    Example: Validation failed: -- Email: 'Email' is not a valid email address. Severity: Error

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Status | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)
    Indicates the source of the error.
Example: <Service>
    Example: <Service>

  - `exceptionType` (string)
    Indicates the error's exception type.

Example: FluentValidation.ValidationException
    Example: FluentValidation.ValidationException

  - `correlationId` (string)
    Indicates the correlation identifier.

Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef
    Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef

  - `entityId` (string)
    Indicates the entity identifier.
Example:
null

  - `errorCode` (string)
    Indicates the error code.
Example:
null

  - `title` (string)

  - `cause` (string)

  - `resolution` (string)

  - `documentationUrl` (string)
    https://developer.flute.com/

  - `errors` (object)

## Response 404:

  - `404` (unknown)
    Not Found

## Response 404 fields (application/json):

  - `details` (string)
    Indicates details about the error.

Example: Unauthorized
    Example: Unauthorized

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Response | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)
    Indicates the source of the error.
Example: <Service>
    Example: <Service>

  - `exceptionType` (string)
    Indicates the error's exception type.

Example: FluentValidation.ValidationException
    Example: FluentValidation.ValidationException

  - `correlationId` (string)
    Indicates the correlation identifier.

This is a unique identifier, a trace identifier, Flute attaches to a request/response pair so a single transaction can be traced end-to-end across systems and logs. 

Its intent is to support troubleshooting.
We recommend including this value when contacting support.

Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef
    Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef

  - `entityId` (string)
    Indicates the entity identifier.
This is a field on Flute's standard error response object, alongside values such as `correlationId`, `errorCode`, or `statusCode`.
It's the identifier of the specific resource the failed request was about.
Error messages may specify "Entity with ID b31fbe9f-eebb-45ce-9cae-92265389f47f does not exist or has been deleted."
When a 404 (or similar entity-specific error, like a conflict) comes back,
check `entityId` to get the exact identifier of the record that couldn't be found or matched.
This is useful for confirming which resource reference was wrong, especially if the request touched multiple identifiers at once.
Example: null

  - `errorCode` (string)
    Indicates the error code.
Example:
null

  - `title` (string)
    Indicates a short, human-readable summary of the error category.

Example: Resource not found
    Example: Resource not found

  - `cause` (string)
    Indicates the reason the error occurred.

Example: The requested resource does not exist or has been deleted.
    Example: The requested resource does not exist or has been deleted.

  - `resolution` (string)
    Indicates the recommended action for resolving the error.

Example: Verify the resource ID is correct or retrieve a list of available resources.
    Example: Verify the resource ID is correct or retrieve a list of available resources.

  - `documentationUrl` (string)
    https://developer.flute.com/

## Response 409:

  - `409` (unknown)
    Conflict

## Response 409 fields (application/json):

  - `details` (string)
    Indicates details about the error.

Example: Unauthorized
    Example: Unauthorized

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Response | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)
    Indicates the source of the error.
Example: <Service>
    Example: <Service>

  - `exceptionType` (string)
    Indicates the error's exception type.

Example: FluentValidation.ValidationException
    Example: FluentValidation.ValidationException

  - `correlationId` (string)
    Indicates the correlation identifier.

This is a unique identifier, a trace identifier, Flute attaches to a request/response pair so a single transaction can be traced end-to-end across systems and logs. 

Its intent is to support troubleshooting.
We recommend including this value when contacting support.

Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef
    Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef

  - `entityId` (string)
    Indicates the entity identifier.
This is a field on Flute's standard error response object, alongside values such as `correlationId`, `errorCode`, or `statusCode`.
It's the identifier of the specific resource the failed request was about.
Error messages may specify "Entity with ID b31fbe9f-eebb-45ce-9cae-92265389f47f does not exist or has been deleted."
When a 404 (or similar entity-specific error, like a conflict) comes back,
check `entityId` to get the exact identifier of the record that couldn't be found or matched.
This is useful for confirming which resource reference was wrong, especially if the request touched multiple identifiers at once.
Example: null

  - `errorCode` (string)
    Indicates the error code.
Example:
null

  - `title` (string)
    Indicates a short, human-readable summary of the error category.

Example: Resource not found
    Example: Resource not found

  - `cause` (string)
    Indicates the reason the error occurred.

Example: The requested resource does not exist or has been deleted.
    Example: The requested resource does not exist or has been deleted.

  - `resolution` (string)
    Indicates the recommended action for resolving the error.

Example: Verify the resource ID is correct or retrieve a list of available resources.
    Example: Verify the resource ID is correct or retrieve a list of available resources.

  - `documentationUrl` (string)
    https://developer.flute.com/

## Response 429:

  - `429` (unknown)
    Too Many Requests

## Response 429 fields (application/json):

  - `details` (string)
    Indicates details about the error.

Example: Unauthorized
    Example: Unauthorized

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Response | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)
    Indicates the source of the error.
Example: <Service>
    Example: <Service>

  - `exceptionType` (string)
    Indicates the error's exception type.

Example: FluentValidation.ValidationException
    Example: FluentValidation.ValidationException

  - `correlationId` (string)
    Indicates the correlation identifier.

This is a unique identifier, a trace identifier, Flute attaches to a request/response pair so a single transaction can be traced end-to-end across systems and logs. 

Its intent is to support troubleshooting.
We recommend including this value when contacting support.

Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef
    Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef

  - `entityId` (string)
    Indicates the entity identifier.
This is a field on Flute's standard error response object, alongside values such as `correlationId`, `errorCode`, or `statusCode`.
It's the identifier of the specific resource the failed request was about.
Error messages may specify "Entity with ID b31fbe9f-eebb-45ce-9cae-92265389f47f does not exist or has been deleted."
When a 404 (or similar entity-specific error, like a conflict) comes back,
check `entityId` to get the exact identifier of the record that couldn't be found or matched.
This is useful for confirming which resource reference was wrong, especially if the request touched multiple identifiers at once.
Example: null

  - `errorCode` (string)
    Indicates the error code.
Example:
null

  - `title` (string)
    Indicates a short, human-readable summary of the error category.

Example: Resource not found
    Example: Resource not found

  - `cause` (string)
    Indicates the reason the error occurred.

Example: The requested resource does not exist or has been deleted.
    Example: The requested resource does not exist or has been deleted.

  - `resolution` (string)
    Indicates the recommended action for resolving the error.

Example: Verify the resource ID is correct or retrieve a list of available resources.
    Example: Verify the resource ID is correct or retrieve a list of available resources.

  - `documentationUrl` (string)
    https://developer.flute.com/

## Response 500:

  - `500` (unknown)
    Internal Server Error

## Response 500 fields (application/json):

  - `details` (string)
    Indicates details about the error.

Example: Unauthorized
    Example: Unauthorized

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Response | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)
    Indicates the source of the error.
Example: <Service>
    Example: <Service>

  - `exceptionType` (string)
    Indicates the error's exception type.

Example: FluentValidation.ValidationException
    Example: FluentValidation.ValidationException

  - `correlationId` (string)
    Indicates the correlation identifier.

This is a unique identifier, a trace identifier, Flute attaches to a request/response pair so a single transaction can be traced end-to-end across systems and logs. 

Its intent is to support troubleshooting.
We recommend including this value when contacting support.

Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef
    Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef

  - `entityId` (string)
    Indicates the entity identifier.
This is a field on Flute's standard error response object, alongside values such as `correlationId`, `errorCode`, or `statusCode`.
It's the identifier of the specific resource the failed request was about.
Error messages may specify "Entity with ID b31fbe9f-eebb-45ce-9cae-92265389f47f does not exist or has been deleted."
When a 404 (or similar entity-specific error, like a conflict) comes back,
check `entityId` to get the exact identifier of the record that couldn't be found or matched.
This is useful for confirming which resource reference was wrong, especially if the request touched multiple identifiers at once.
Example: null

  - `errorCode` (string)
    Indicates the error code.
Example:
null

  - `title` (string)
    Indicates a short, human-readable summary of the error category.

Example: Resource not found
    Example: Resource not found

  - `cause` (string)
    Indicates the reason the error occurred.

Example: The requested resource does not exist or has been deleted.
    Example: The requested resource does not exist or has been deleted.

  - `resolution` (string)
    Indicates the recommended action for resolving the error.

Example: Verify the resource ID is correct or retrieve a list of available resources.
    Example: Verify the resource ID is correct or retrieve a list of available resources.

  - `documentationUrl` (string)
    https://developer.flute.com/

