Getting Started with TextGrid

Learn how to authenticate, make your first API request, and integrate TextGrid messaging, voice, and webhooks.

Use the TextGrid API to send SMS and MMS messages, manage phone numbers, make voice calls, and register 10DLC brands and campaigns.

Get your credentials

Open the Overview page in your TextGrid dashboard to find your Account SID, Auth Token, and Webhook Secret.

  • Account SID: Identifies your account.
  • Auth Token: Authenticates your API requests. The logged-in user must have two-factor authentication (2FA) set up before viewing or rotating the token. Click the eye icon to reveal it and complete the verification prompt.
  • Webhook Secret: Verifies that incoming webhooks were signed by TextGrid. See Verifying Webhook Signatures.

Keep your Auth Token and Webhook Secret private. Store them securely on your server. Do not include them in browser or mobile application code, public repositories, screenshots, or support messages.

Main accounts and subaccounts

Each subaccount has its own credentials. When integrating with a subaccount, use that subaccount’s Account SID and Auth Token together.

For account-specific routes, use the intended account’s SID in the URL. Do not combine one account’s SID with another account’s Auth Token.

Rotate your Auth Token

The logged-in user must have two-factor authentication (2FA) set up to rotate the Auth Token.

Click Generate new auth token in the dashboard and complete the verification prompts.

Update every application, integration, and server that uses the token, then verify that requests succeed with the new credentials. Plan the change carefully to avoid interrupting your integrations.

If you suspect your token has been exposed, replace it promptly, remove exposed copies, and contact support to review any unexpected account activity.

Authenticate your requests

TextGrid supports HTTP Basic Auth and the Bearer header format shown below. Use HTTPS for all API requests.

HTTP Basic Auth

Configure your HTTP client with:

  • Username: Your Account SID
  • Password: Your Auth Token

Your client handles Base64 encoding and creates the authorization header:

Authorization: Basic YOUR_BASE64_ENCODED_CREDENTIALS

For clients such as n8n, select Basic Auth and enter the SID and token in the username and password fields. Do not Base64-encode those fields yourself.

Bearer header

Join your Account SID and Auth Token with a colon:

YOUR_ACCOUNT_SID:YOUR_AUTH_TOKEN

Base64-encode that string and send the result in the Authorization header:

Authorization: Bearer YOUR_BASE64_ENCODED_CREDENTIALS

This value is the Base64-encoded SID and Auth Token pair, not an OAuth access token. Base64 encoding does not encrypt your credentials.

Make your first request

Retrieve your account details using either authentication format:

curl "https://api.textgrid.com/2010-04-01/Accounts/YOUR_ACCOUNT_SID.json" \
  --user "YOUR_ACCOUNT_SID:YOUR_AUTH_TOKEN"
curl "https://api.textgrid.com/2010-04-01/Accounts/YOUR_ACCOUNT_SID.json" \
  -H "Authorization: Bearer YOUR_BASE64_ENCODED_CREDENTIALS"

Replace the placeholders with your account’s values. For Basic Auth, curl encodes the credentials automatically. For Bearer Token, Base64-encode YOUR_ACCOUNT_SID:YOUR_AUTH_TOKEN yourself.

If you receive 401 Unauthorized, check that the SID and token belong to the intended account and that your integration uses the current token.

Explore the API

Open API Reference in the navigation to browse endpoints, request fields, response schemas, and examples.

Most operations use this base URL:

https://api.textgrid.com/2010-04-01

Phone number lookups use:

https://lookups.textgrid.com/v1

Use the content type shown for each endpoint. Some operations accept JSON, while others use form fields or query parameters.

Receive webhooks

Configure callback URLs to receive incoming messages, delivery updates, and voice events.

Your callback endpoints must be reachable by TextGrid. Verify the X-TextGrid-Signature header using your account’s Webhook Secret.

Register messaging traffic

For messaging that requires 10DLC registration:

  1. Create a brand.
  2. Complete verification and any required vetting or Identity Appeals.
  3. Register a campaign.
  4. Attach your sending numbers to the campaign.

See A2P 10DLC Registration.


Did this page help you?