Skip to main content

Quickstart

Follow these four steps to go from zero to sending your first message through the eCourtDate API. The entire process takes about five minutes.

Prerequisites

Before starting, make sure you have:

  • An eCourtDate Console account with at least one agency assigned — sign in here
  • A terminal or command prompt to run commands — on macOS open Terminal (found in Applications > Utilities), on Windows open PowerShell or Command Prompt

The examples below use curl, a command-line tool for making HTTP requests that comes pre-installed on most operating systems. You type a curl command into your terminal and it sends a request to the API and shows you the response. If you prefer a graphical interface, Postman is a popular alternative that lets you build and send API requests visually.

Use the Staging Environment First

All examples in this guide use the staging API at staging.api.ecourtdate.com. Staging simulates outbound messages so nothing is actually delivered -- it is the safest place to experiment. Once you are confident your integration works, switch the base URL to your assigned production region.

Step 1 -- Get Your API Credentials

  1. Sign in to the eCourtDate Console.
  2. Navigate to APIs (console.ecourtdate.com/apis).
  3. Create a new API key (or use an existing one). You will receive a Client ID and a Client Secret.
  4. Store both values securely. The client secret is only displayed once.

Step 2 -- Get an Access Token

Exchange your client credentials for a bearer token using the OAuth 2.0 client_credentials grant:

curl -X POST https://staging.api.ecourtdate.com/oauth/token \
-H "Content-Type: application/json" \
-d '{
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
"grant_type": "client_credentials"
}'

A successful response returns an access token:

{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6...",
"token_type": "Bearer",
"expires_in": 3600
}

The expires_in: 3600 value means the token is valid for 3,600 seconds (1 hour). After that, you will need to request a new token by repeating this step.

Use this token in the Authorization header of all subsequent requests.

Step 3 -- Verify Access

Confirm that your token is valid by fetching your agency settings:

curl -X GET https://staging.api.ecourtdate.com/v1/settings \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

You should receive a 200 OK response containing your agency configuration. If you receive a 401 Unauthorized, double-check your client credentials and that the token has not expired.

Step 4 -- Send a Test Message

Send a one-off message to verify end-to-end connectivity:

curl -X POST https://staging.api.ecourtdate.com/v1/messages/oneoffs \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"to": "+15551234567",
"subject": "Test Message",
"content": "Hello from eCourtDate! This is a test message."
}'

A successful response returns the created message resource with a uuid you can use to track its status.

note

Because you are using the staging environment, the message will be created and tracked but will not actually be delivered to the recipient. This is expected behavior.

Troubleshooting

  • Getting a 401 Unauthorized response? Double-check that your Client ID and Client Secret are correct, that you copied them without extra spaces, and that your token has not expired (tokens last 1 hour).
  • Getting a 403 Forbidden response? Verify that your agency is active in the Console and that you are using an API client token (not a user login token).
  • Connection refused or timeout? Make sure your network allows outbound HTTPS connections to *.api.ecourtdate.com on port 443.

Next Steps