What is a api key?

An API key is a secret string that a program sends with its requests to an API, to prove which account it is acting for.

The service creates the key and shows it to you. Your program then includes it in each request, most often in the Authorization header. The service looks the key up, finds the account and its permissions, and allows or refuses the request. Many services let you create keys with limited rights, such as read only.

A key works like a password, so it must stay out of anything public. Code in a web page can be read by every visitor, which means a key placed there is no longer secret. Keep keys in environment variables on a server, never commit them to a repository, and replace a key that may have leaked.

Sending a form to a form backend needs no key, because the endpoint can only receive submissions. Reading them does. FormTango keys start with ft_, are created in the dashboard under Account, come with read or write access, and are for servers and scripts only.

bash
curl https://formtango.com/api/v1/account \
  -H "Authorization: Bearer ft_..."

Related