Skip to main content

Generate API Key

To obtain your API key, simply utilize our dedicated endpoint designed explicitly for this purpose. When sending a request to this endpoint, you have the flexibility to define the lifespan of your API key according to your needs. Specify the desired duration for validity by setting a value for "expires_at". Alternatively, if you require an API key with an indefinite lifespan, simply send an empty request body. With this seamless process, you can swiftly acquire the access you need to leverage our powerful AML Watcher APIs.

info

Maximum API Keys a user can generate is 5.

Endpoint: https://api.amlwatcher.com/api/api-key

Method: POST

Sample Request
POST /api/api-key HTTP/1.1
Host: api.amlwatcher.com
Authorization: Bearer Token
Content-Type: application/json
Content-Length: 24

{
"expires_at": 12
}

Request

ParametersRequiredTypeDescription
expires_atYesIntegerMin: 1
Max: 365
The expires_at represents the number of days.

Response

ParametersDescription
errorWhenever there is an error in your request, this param will have details of that error; otherwise it’ll remain empty.
statusThe status field is set to either “SUCCESS” or “FAIL”, indicating that the API request resulted in a successful or failure/error condition respectively.
dataAn array containing the actual response elements.
Sample Response
{
"data": {
"api_key": {
"created_at": "Wed, 08 May 2024 06:13:24 GMT",
"expires_at": "Mon, 20 May 2024 06:13:24 GMT",
"key": "Generated API Key"
}
},
"error": false,
"status": "SUCCESS"
}