API Key

All API requests must be authenticated with a bearer token. This token can be created in your API Settings under the “Personal Access Tokens (API Key)” section.

Bearer Token

Once you have created a token, you can use it to authenticate your API requests by including it in the Authorization header as follows:

Authorization: Bearer YOUR_ACCESS_TOKEN

Example Request

Here is an example of how to make an authenticated request using curl:

curl -X POST "https://api.thanks.io/api/v2/send/postcard" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "recipients": [{ 
      "name": "John Doe", 
      "address": "123 Main Street, Any Town, NY 12345"
    }],
    "message": "Hi %FIRST_NAME% - Thank you for your business!",
    "front_image_url": "https://d2md0c8rpvzmz5.cloudfront.net/inspiration_templates/default10.png"
  }'