Getting Started
The Fivetran REST API allows you to programmatically manage your Fivetran account, groups, destinations, and connections, trigger syncs, and monitor status. This guide explains how to get access, send your first request, and identify which connectors support API access and their authorization methods.
REST API quickstart guide
This section covers the concepts and prerequisites for creating connections and other group-scoped resources using the API.
1. Set up authentication and access
To make a call to the API, you must authenticate with an API key. Use a scoped API key. It's tied to your Fivetran user account and inherits your RBAC permissions, so you can only access resources within your permission scope. Alternatively, use a service account API key, which uses a dedicated account for programmatic API access.
Once you have your key and secret, Base64-encode them to use in requests. For details on the request format and response structure Fivetran uses, see API request basics.
The GET /v1/metadata/connectors endpoint is publicly accessible and doesn't require authentication. You can start exploring it right away using curl or Postman.
2. Set up a group and destination
A group is the top-level container in Fivetran. The following resources all require a group to exist before you can create them:
- Destinations
- Connections
- dbt transformation projects
- External logging configurations
- Hybrid deployment agents
Once a destination exists for a group, group_id, destination_id, and destination_group_id all refer to the same entity across API requests. See How Do Destinations and Groups Relate? for details.
If you don't have a group and destination yet:
- Call
POST /v1/groupsto create a group. Note theidin the response — this is yourgroup_id. - Call
POST /v1/destinationsusing thatgroup_idto add a destination to the group.
If you already have a destination, call GET /v1/destinations to find its group_id.
3. Find the connector service identifier
The service field in a connection request uses an internal connector identifier — for example, github or google_sheets — that may not match the connector's display name in the Fivetran dashboard. Use GET /v1/metadata/connectors to list all available connectors and their id values. The id is the value to use in the service field.
API reference examples and required fields
The API Reference shows all applicable fields and options for each resource type — for connections, destinations, and others. These are not minimal working requests — copy-pasting an example without replacing all placeholders and removing inapplicable fields will result in errors or unexpected behavior.
To create a connection, you must provide the following fields:
group_id— the destination group where the connection will live. See step 2 above.service— the connector type identifier (for example,google_sheets). See step 3 above.config— the connector-specific credentials and connection parameters. For the full list ofconfigfields per connector type, see the Create a Connection reference.
A request missing any of these fields returns a 400 Bad Request error.
Common terms
| Term | Description |
|---|---|
| source | The application, database, storage, or event service from which Fivetran replicates data to your destination. |
| destination | The system where Fivetran loads your replicated source data. Fivetran supports cloud data warehouses, databases, data lakes, and online data platforms. Each destination is linked to exactly one group. |
| connection | A data pipeline that replicates data from your source to your destination. |
| connector type | The pre-built component that determines which source type Fivetran connects to. For example, Salesforce is a connector type |
| group | A group maps users to the destination. Each group is mapped on a 1:1 basis to its destination. We do this mapping using the group's id value that we automatically generate when you create a group, and the destination's group_id value that you specify when you create a destination. This means that you must create a group in your Fivetran account before you can create a destination in it. Users and connections can be provisioned within these groups. |
Also, explore the Fivetran REST API Postman collection to try requests quickly, and review webhooks for event-driven updates.
API request basics
Base URL
All API requests use this root URL:
https://api.fivetran.com/v1/
Request content type
The Fivetran REST API requires the Content-Type: application/json header on all POST and PATCH requests and the Accept: application/json header on all requests.
Omitting Content-Type: application/json returns the HTTP 415 Unsupported Media Type error. Sending an unsupported Accept value, for example, application/xml, returns the HTTP 406 Not Acceptable error.
Example request
curl -X POST "https://api.fivetran.com/v1/groups" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-u "api_key:api_secret" \
-d '{"name":"Group_Name"}'
Response structure
Every response has the following format:
{
"code": "Success",
"message": "message",
"data": {}
}
Example response
{
"code": "Success",
"message": "Group has been created",
"data": {
"id": "group_id",
"name": "Group_Name",
"created_at": "2025-01-01T00:00:00Z"
}
}
Fields
| Name | Description |
|---|---|
code | Status or error identifier for programmatic handling. For example, Success, InvalidInput. |
message | Human-readable description of the outcome or error. |
data | Wrapper object containing the returned resource. |
The data field is only present on successful responses. Error responses (4xx, 5xx) return only code and message.
Response codes
We respond with standard HTTP status codes during request processing. For the full list of supported HTTP status codes and Fivetran-specific code values, see our API response codes documentation.
Authorization methods for connectors
Authorization gives a connector permission to read from the source system (for example, Instagram, Salesforce, DB). Until you authorize the connector, it can’t fetch data even though you have successfully authenticated to the API.
You can authorize some connectors entirely by API, while others require a Connect Card flow. Support varies by connector.
Connect Card - Redirect end users to an embeddable setup flow so they can authorize without sharing credentials with you. Use Connect Cards if you’re implementing a Powered by Fivetran workflow, or whenever obtaining end user credentials is difficult.
API-based authorization - Provide credentials in the connection payload using one of these methods:
- Define an
authsection in the request body. - Provide the
loginandpasswordfields. - Provide a
tokenand any related fields. - Provide a
keyand any related fields.
Use API-based authorization when you control the source credentials and want a fully automated setup (for example, in automated pipelines, Infrastructure as Code (IaC), or bulk provisioning of connections).
Token-based auth example
curl -X POST "https://api.fivetran.com/v1/connectors" \ -u "$FIVETRAN_API_KEY:$FIVETRAN_API_SECRET" \ -H "Content-Type: application/json" \ -d '{ "group_id": "YOUR_GROUP_ID", "service": "github", "config": { "token": "REPLACE_WITH_GITHUB_TOKEN", "schema": "schema_name" }, "paused": false, "run_setup_tests": true }'- Define an
Refer to each connector’s API reference for the exact fields.
Do you want added API support for a connector? Submit your request in our Support Portal.