API Reference api

REST & Webhook API

Endpoints, authentication, and event delivery patterns for integrating Datasync programmatically.

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

  1. Create a client via the Datasync console (Settings → API Access).
  2. Exchange the client_id and client_secret for an access token.
  3. 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_id you can reference when opening a ticket.

Next steps

  • Review the webhook guide to connect alerts directly to Slack or PagerDuty.
  • Use the /sandbox environment 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

API SAP

Need a deeper dive?

Book a documentation walkthrough with Datasync architects

We’ll pair you with the engineers who built these flows so you can map docs to your exact use cases.