Overview
Datasync exposes REST endpoints for provisioning partners, triggering automations, and retrieving observability data. Every call is authenticated using OAuth 2.0 client credentials with JWT bearer tokens.
Base URL
https://api.datasync.com/v1
Authentication
- Create a client via the Datasync console (Settings → API Access).
- Exchange the client_id and client_secret for an access token.
- Send the token using the
Authorization: Bearer <token>header. Tokens expire after 60 minutes.
curl -X POST https://api.datasync.com/v1/auth/token \
-H "Content-Type: application/json" \
-d '{
"client_id": "YOUR_ID",
"client_secret": "YOUR_SECRET"
}'
Endpoints
Trading partners
POST /partners — create a new partner profile with AS2/SFTP credentials. Include transport details, certificates, and contact information.
GET /partners/{id} — retrieve the full configuration and status for a partner.
Automations
POST /automations/run — trigger a workflow (for example: resend invoice, reprocess shipment, regenerate MDN).
Observability
GET /transactions?status=failed — list failed transactions with filtering by partner, document type, or time range.
Webhooks
Subscribe to events (delivery failures, MDN status, SLA violations) via POST /webhooks/subscriptions. Each delivery is signed with an HMAC SHA-256 signature using your webhook secret.
{
"name": "as2-failures",
"url": "https://ops.example.com/hooks/datasync",
"events": ["transaction.failed", "mdn.timeout"]
}
Error handling
- 4xx codes indicate configuration issues (invalid payload, expired token, missing scope).
- 5xx codes indicate Datasync-side incidents; automatic retries occur for idempotent requests.
- Every error response includes a
request_idyou can reference when opening a ticket.
Next steps
- Review the webhook guide to connect alerts directly to Slack or PagerDuty.
- Use the
/sandboxenvironment for testing; traffic never touches production partners until promoted.
Code snippets
- curl -X POST https://api.datasync.com/v1/auth/token
- POST /v1/webhooks/subscriptions
Related integrations