Skip to main content

API Authentication

The Uptimia API uses a type of HTTP authentication known as "Bearer authentication" or "Token authentication." You must include your API key whenever you make a request. To get your API key, go to your Uptimia account's "Settings" -> "API Keys" section. You can find instructions on how to use this authentication method here.

Do not forget to include the following HTTP header in each request:

HTTP header
Authorization: Bearer <token>

How to create an API key

  1. Log in to your Uptimia account and go to "Settings" -> "API keys." How to create an API key: step 1

  2. Give your API key a name (just for your own reference). How to create an API key: step 2

  3. Click the eye icon to reveal your new API key. It is hidden by default for security. How to create an API key: step 2

  4. Use this API key to access Uptimia API.

danger

Remember to keep your API key safe and do not share it with anyone. If you suspect it is compromised, create a new one.

How to use an API key

You can use your API key by including an HTTP header like this: "Authoriaztion: Bearer <token>". You can do this with cURL or any software you prefer.

cURL request sample
curl "https://www.uptimia.com/api/v1/uptime" \
-H "Authorization: Bearer <token>"

What happens when the API key is invalid

You will receive the following error message if the API key is invalid:

HTTP 401 Unauthorized
{
error_code: 'invalid_api_key'
message: 'API key invalid'
}

Where to find the API documentation

You can find the documentation here.