Obtain API token
Your API token authenticates both API versions. How you send it differs:
v1 accepts X-API-Key or Authorization: Basic <token>,
while v2 accepts only X-API-Key.
To obtain a token, send a POST request to:
https://webapi.inboxroad.com/api/token/There is also an interactive version where you can try out requests.
Request
The payload is a JSON object:
{ "username": "you@example.com", "password": "your-password"}| Field name | Required | Description |
|---|---|---|
| username | Yes | The email address of your account. |
| password | Yes | Your account password. |
Response
The response is a JSON array with one entry per profile you own. Each entry
contains the profile’s token (key) and its human-readable name. A token is
auto-issued on first request if a profile doesn’t have one yet.
[ { "key": "8f2c1a9b4d7e6f3a0b5c2d1e9f8a7b6c", "profile_name": "Marketing" }, { "key": "1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d", "profile_name": "Transactional" }]Use the key value as your API token in subsequent requests.
Examples
curl -X POST 'https://webapi.inboxroad.com/api/token/' \ -H 'Content-Type: application/json' \ -d '{ "username": "you@example.com", "password": "your-password" }'import requests
url = "https://webapi.inboxroad.com/api/token/"payload = {"username": "you@example.com", "password": "your-password"}response = requests.post(url, json=payload)print(response.json())<?php$ch = curl_init('https://webapi.inboxroad.com/api/token/');curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => ['Content-Type: application/json'], CURLOPT_POSTFIELDS => json_encode([ 'username' => 'you@example.com', 'password' => 'your-password', ]),]);echo curl_exec($ch);require "uri"require "net/http"require "json"
url = URI("https://webapi.inboxroad.com/api/token/")https = Net::HTTP.new(url.host, url.port)https.use_ssl = true
request = Net::HTTP::Post.new(url)request["Content-Type"] = "application/json"request.body = { username: "you@example.com", password: "your-password" }.to_json
response = https.request(request)puts response.read_body