Batch create transfers

Prev Next
Post
/v1/teams/{team_id}/transfers/batch

Create multiple transfers in a single request. Each transfer configuration is created independently — if one fails, the others still succeed. Mixed data source types are allowed within a single batch.

The batch must contain between 1 and 100 items. Empty batches, batches exceeding 100 items, and exact-duplicate configurations within the same batch are rejected. To create copies of an existing transfer, use the clone endpoint instead.

Security
HTTP
Type bearer

API key authentication. Create API keys in the Supermetrics Hub and send them in the Authorization header: Authorization: Bearer <your-api-key>

Path parameters
team_id
integer (int64) Required

ID of the team

Minimum1
Maximum9223372036854776000
Example936506
Body parameters

Batch of transfer configurations to create

Expand All
object
transfers
Array of object (TransferConfigurationRequest) Required

Array of transfer configurations, each using the same schema as the single-create endpoint

Min items1
Max items100
object
data_source_id
string Required

Data source identifier

Max length50
ExampleAW
schema_id
integer (int32) Required

Numeric schema identifier (the data warehouse dwh_schema_id) of the table group this transfer writes into. Obtain it from the schema_id field of the List table groups endpoint (GET /table/groups). The table group's prefixed group_id (for example tg_99999) is NOT accepted here.

Example2
destination_id
integer (int32) Required

Destination identifier

Example8
display_name
string Required

Human-readable name for the transfer

Max length255
ExampleAW enhanced 2022-11-17
schedule
Array of object (TransferSchedule) Required

Transfer execution schedule configuration

object
Example{ "run_interval": "daily", "run_hour": 22, "refresh_window": 1 }
run_interval
string

Frequency of transfer execution

Valid values[ "hourly", "daily", "weekly", "monthly" ]
run_hour
integer (int32)

Hour of day to run (UTC)

Minimum0
Maximum23
refresh_window
integer (int32)

Number of days to refresh

Minimum1
run_weekday
integer (int32)

Day of week to run (1=Monday, 7=Sunday). Required for weekly interval.

Minimum1
Maximum7
run_day
integer (int32)

Day of month to run. Required for monthly interval.

Minimum1
Maximum31
accounts
Array of object (TransferAccount) Required

Data source accounts to include in transfer

object
Example{ "data_source_username": "user.name@supermetrics.com", "login_id": 2682599, "account_id": "8733197711" }
data_source_username
string

Username for data source authentication

Max length255
login_id
integer (int32)

Login identifier

account_id
string

Account identifier in the data source

Max length100
segments
Array of object (TransferSegment)

Data segments to include in transfer

object
Example{ "data_source_username": "user.name@supermetrics.com", "login_id": 2830506, "segment_id": "-1", "segment_name": "All users" }
data_source_username
string

Username for data source authentication

Max length255
login_id
integer (int32)

Login identifier

segment_id
string

Segment identifier

Max length100
segment_name
string

Human-readable segment name

Max length255
data_source_settings
Array of object (TransferDataSourceSetting)

Source-specific configuration settings

object
Example{ "field_id": "BRAND_KEYWORDS", "value": "", "group": "Default" }
field_id
string

Setting field identifier

Max length100
value

Setting value (type varies by field)

OneOf
string | null
string
boolean | null
boolean
integer | null
integer
group
string

Setting group identifier

Max length100
notification_recipients
Array of string

Email addresses to notify on transfer events

Example[ "user1@supermetrics.com", "user2@supermetrics.com" ]
string (email)
Max length255
transfer_type
integer (int32)

Transfer type identifier

Example1
Responses
200

Batch processed

Headers
Access-Control-Allow-Origin
string
CORS header
Valid values[ "*" ]
Max length255
Example*
{
  "meta": {
    "request_id": "019461A0-0000-7000-8000-000000000000"
  },
  "data": {
    "has_errors": true,
    "results": [
      {
        "index": 0,
        "transfer_id": 36091,
        "transfer_name": "GA4 -> Snowflake",
        "status": "success"
      },
      {
        "index": 1,
        "status": "error",
        "error_code": "DWH_INVALID_TRANSFER_SETUP_DATA",
        "message": "Transfer configuration is invalid. Check validation_errors for details.",
        "validation_errors": [
          {
            "field_id": "destination_id",
            "error_code": "Value is required",
            "message": "This field is required and was not provided."
          }
        ]
      }
    ]
  }
}
Expand All
object
meta
object (Meta)

Metadata included in every API response.

request_id
string

Unique identifier for the request, for tracking and debugging.

Min length8
Max length64
Pattern^[A-Za-z0-9_-]+$
ExampleBXaEFVtjc7TXaJxgZhmFgSUD9edqq_CN
data
object
has_errors
boolean

True if any item in the batch failed

results
Array of object
object
index
integer

Zero-based position in the input array

transfer_id
integer (int32)

ID of the created transfer (present on success)

transfer_name
string

Display name of the created transfer (present on success)

status
string
Valid values[ "success", "error" ]
error_code
string

Machine-readable error identifier (present on error). Possible values: INVALID_ITEM_DATA, DWH_INVALID_TRANSFER_SETUP_DATA, DWH_TRANSFER_CREATE_FAILED, DWH_BATCH_CREATE_DUPLICATE_CONFIGURATION

message
string

Human-readable error description (present on error)

validation_errors
Array of object

Field-level validation details (present when error_code is DWH_INVALID_TRANSFER_SETUP_DATA)

object
field_id
string

The field that failed validation

error_code
string

Validation error code (values originate from the validation framework, not an enum-stable set)

message
string

Human-readable validation error message

400

Batch-level validation failed — no transfers are created. Error codes: DWH_BATCH_EMPTY, DWH_BATCH_TOO_LARGE, DWH_BATCH_NOT_ARRAY.

401

Unauthorized

Headers
WWW-Authenticate
string
Bearer token required
Max length255
Pattern^Bearer.*
X-RateLimit-Limit
integer
Request limit per hour
Minimum1
Maximum10000
Example5000
X-RateLimit-Remaining
integer
Remaining requests in current window
Minimum0
Maximum10000
Example4999
Access-Control-Allow-Origin
string
CORS header
Valid values[ "*" ]
Max length255
Example*
{
  "meta": {
    "request_id": "BXaEFVtjc7TXaJxgZhmFgSUD9edqq_CN"
  },
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Authentication is required."
  }
}
Expand All
object

Standard envelope returned by all error (4xx/5xx) responses.

meta
object (Meta)

Metadata included in every API response.

request_id
string

Unique identifier for the request, for tracking and debugging.

Min length8
Max length64
Pattern^[A-Za-z0-9_-]+$
ExampleBXaEFVtjc7TXaJxgZhmFgSUD9edqq_CN
error
object (Error)

Machine- and human-readable detail for a failed request.

code
string

Stable, screaming-snake-case identifier for the error condition. Clients should branch on this, not on message. Common values include BAD_REQUEST, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT_ERROR, PERMISSION_ERROR, UNPROCESSABLE_ENTITY, UNPROCESSABLE_CONTENT, TOO_MANY_REQUESTS, INTERNAL_SERVER_ERROR, DUPLICATION_FAILED, SERVICE_UNAVAILABLE; domains may define additional codes.

Max length100
Pattern^[A-Z][A-Z0-9_]*$
ExampleBAD_REQUEST
message
string

Short, human-readable summary of the error.

Max length255
Pattern^.+$
ExampleThe request was invalid.
description
string

Optional longer explanation specific to this occurrence.

Max length2048
ExampleThe field 'display_name' must not be empty.
403

Access forbidden

Headers
X-RateLimit-Limit
integer
Request limit per hour
Minimum1
Maximum10000
Example5000
X-RateLimit-Remaining
integer
Remaining requests in current window
Minimum0
Maximum10000
Example4999
Access-Control-Allow-Origin
string
CORS header
Valid values[ "*" ]
Max length255
Example*
{
  "meta": {
    "request_id": "BXaEFVtjc7TXaJxgZhmFgSUD9edqq_CN"
  },
  "error": {
    "code": "FORBIDDEN",
    "message": "You do not have access to this resource."
  }
}
Expand All
object

Standard envelope returned by all error (4xx/5xx) responses.

meta
object (Meta)

Metadata included in every API response.

request_id
string

Unique identifier for the request, for tracking and debugging.

Min length8
Max length64
Pattern^[A-Za-z0-9_-]+$
ExampleBXaEFVtjc7TXaJxgZhmFgSUD9edqq_CN
error
object (Error)

Machine- and human-readable detail for a failed request.

code
string

Stable, screaming-snake-case identifier for the error condition. Clients should branch on this, not on message. Common values include BAD_REQUEST, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT_ERROR, PERMISSION_ERROR, UNPROCESSABLE_ENTITY, UNPROCESSABLE_CONTENT, TOO_MANY_REQUESTS, INTERNAL_SERVER_ERROR, DUPLICATION_FAILED, SERVICE_UNAVAILABLE; domains may define additional codes.

Max length100
Pattern^[A-Z][A-Z0-9_]*$
ExampleBAD_REQUEST
message
string

Short, human-readable summary of the error.

Max length255
Pattern^.+$
ExampleThe request was invalid.
description
string

Optional longer explanation specific to this occurrence.

Max length2048
ExampleThe field 'display_name' must not be empty.
500

Internal server error

Headers
Access-Control-Allow-Origin
string
CORS header
Valid values[ "*" ]
Max length255
Example*
{
  "meta": {
    "request_id": "BXaEFVtjc7TXaJxgZhmFgSUD9edqq_CN"
  },
  "error": {
    "code": "INTERNAL_SERVER_ERROR",
    "message": "An unexpected error occurred."
  }
}
Expand All
object

Standard envelope returned by all error (4xx/5xx) responses.

meta
object (Meta)

Metadata included in every API response.

request_id
string

Unique identifier for the request, for tracking and debugging.

Min length8
Max length64
Pattern^[A-Za-z0-9_-]+$
ExampleBXaEFVtjc7TXaJxgZhmFgSUD9edqq_CN
error
object (Error)

Machine- and human-readable detail for a failed request.

code
string

Stable, screaming-snake-case identifier for the error condition. Clients should branch on this, not on message. Common values include BAD_REQUEST, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT_ERROR, PERMISSION_ERROR, UNPROCESSABLE_ENTITY, UNPROCESSABLE_CONTENT, TOO_MANY_REQUESTS, INTERNAL_SERVER_ERROR, DUPLICATION_FAILED, SERVICE_UNAVAILABLE; domains may define additional codes.

Max length100
Pattern^[A-Z][A-Z0-9_]*$
ExampleBAD_REQUEST
message
string

Short, human-readable summary of the error.

Max length255
Pattern^.+$
ExampleThe request was invalid.
description
string

Optional longer explanation specific to this occurrence.

Max length2048
ExampleThe field 'display_name' must not be empty.