Twilee API – Getting Started

Last updated Feb 27, 2026

Connect Twilee directly with your own tools and workflows.

With an API key or an OAuth2 token, your team can bring Twilee’s power directly into your tech stack: automate QR code generation, capture live scan data, and integrate intelligent tracking into your products, all with just a few lines of code.


Overview

  • Each team can create one API Key.
  • All endpoints return data in JSON and JSON-LD format.
  • Pagination is supported for collection endpoints.
  • Supports CRUD operations on QR codes (GET, POST, PUT, DELETE) plus specialized schema.org and download actions.
  • All API calls require authentication via an API key or an OAuth2 bearer token.

Base URL

https://api.twilee.com

Authentication & Headers

All endpoints require the Authorization header with a valid token, and support the Accept header to specify the response format. Two authentication methods are supported.

API Key

Each team can generate one API key from Team > API Key. Pass it as a Bearer token:

-H "Authorization: Bearer sk_TEAM_ID_SECRET" \
-H "Accept: application/json"

OAuth2 Bearer Token

You can also authenticate using an OAuth2 access token obtained through the standard OAuth2 authorization flow (the same flow used by MCP integrations). Pass the JWT as a Bearer token:

-H "Authorization: Bearer YOUR_OAUTH2_TOKEN" \
-H "Accept: application/json"

To obtain an OAuth2 token, follow the authorization flow described in the MCP documentation.

Response Format

Supported formats for the Accept header:

  • application/json
  • application/ld+json

Available Endpoints

Resource Description Methods
/qr_codes List all QR codes GET
/qr_codes/{id} Retrieve a specific QR code GET
/qr_codes/{id}/schemaorg Retrieve schema.org payload for a QR code GET
/qr_codes Create a new QR code POST
/qr_codes/{id} Update a specific QR code PUT
/qr_codes/{id} Delete a specific QR code DELETE
/qr_codes/{id}/download Download a rendered QR code image POST
/qr_codes/{id}/scans List scans for a QR code GET
/qr_codes/{id}/page-views List page views for a QR code GET

Example Request

curl -X GET "https://api.twilee.com/qr_codes" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

HTTP Status Codes

Code Meaning Description
200 OK Request succeeded.
201 Created The resource was successfully created.
204 No Content The resource was deleted successfully.
400 Bad Request Invalid or missing parameters.
401 Unauthorized Missing or invalid API key or OAuth2 token.
403 Forbidden Authenticated but not authorized to perform the requested action.
404 Not Found The requested resource does not exist.
409 Conflict The resource already exists.
429 Too Many Requests Rate limit exceeded.
500 Server Error An unexpected error occurred.

Next Steps

  1. Generate an API key for your team.
  2. Create your first QR code with the POST /qr_codes endpoint.
  3. Retrieve the code, download the rendered image, and monitor scans.

You’re all set! Start integrating Twilee’s QR code capabilities into your applications today.