> ## Documentation Index > Fetch the complete documentation index at: https://docs.supermetrics.com/llms.txt > Use this file to discover all available pages before exploring further. # Batch create transfers > 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. **Important Notes:** - You must have `dwh.transfer.edit` permission ## OpenAPI ````json POST /v1/teams/{team_id}/transfers/batch { "openapi": "3.0.3", "info": { "title": "Management API Reference", "version": "2.0.0", "description": "API Documentation for the Supermetrics Management API. For more information, visit https://supermetrics.com.", "termsOfService": "https://supermetrics.com/terms-of-service", "contact": { "name": "Supermetrics Suppot", "email": "support@supermetrics.com", "url": "https://supermetrics.com/support" }, "license": { "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, "x-api-id": "sm-management-api", "x-audience": "public" }, "servers": [ { "url": "https://api.supermetrics.com/v2", "description": "Global production public Supermetrics Management API base path.", "x-internal": false }, { "url": "https://api.supermetrics.com", "description": "Global production public Supermetrics API base path (for Connector Builder and Team endpoints).", "x-internal": false } ], "tags": [ { "name": "API Keys", "description": "Manage API keys to access Supermetrics API" }, { "name": "Saved Queries", "description": "Manage queries saved in Query Manager" }, { "name": "Datasources", "description": "Retrieve datasource configuration details" }, { "name": "Data Source Logins", "description": "Access your data source authentications and login links" }, { "name": "Custom Fields", "description": "Create and manage Custom Fields" }, { "name": "Account Tags", "description": "Group data source accounts into reusable tags" }, { "name": "Data Blending", "description": "Create and manage Data Blending" }, { "name": "Connector Builder", "description": "Create and manage custom connectors, including their secrets, logos, logs, and schemas" }, { "name": "Teams", "description": "View and update team details" }, { "name": "Team Users", "description": "Manage members and invitations for your team" }, { "name": "Team Licenses", "description": "Assign and manage your team's licenses" }, { "name": "Team Settings", "description": "Configure general settings for your team" }, { "name": "Workspaces", "description": "Create and manage workspaces, their members, and license pools" }, { "name": "Data Transfers", "description": "Create, configure, and manage Data Warehouse transfers, their runs, backfills, and data source connections" }, { "name": "Data Destinations", "description": "Create, configure, and manage Data Warehouse destinations" }, { "name": "Table Groups", "description": "Manage your team's table groups" } ], "externalDocs": { "description": "Find out more about Supermetrics Management API", "url": "https://docs.supermetrics.com/apidocs/management-api" }, "paths": { "/v1/teams/{team_id}/transfers/batch": { "servers": [ { "url": "https://dts-api.supermetrics.com", "description": "Global production public Supermetrics Data Warehouse Transfers API base path.", "x-internal": false } ], "parameters": [ { "$ref": "#/components/parameters/TeamId" } ], "post": { "summary": "Batch create transfers", "description": "Create multiple transfers in a single request. Each transfer configuration\nis created independently — if one fails, the others still succeed.\nMixed data source types are allowed within a single batch.\n\nThe batch must contain between 1 and 100 items. Empty batches, batches\nexceeding 100 items, and exact-duplicate configurations within the same\nbatch are rejected. To create copies of an existing transfer, use the\nclone endpoint instead.\n\n**Important Notes:**\n- You must have `dwh.transfer.edit` permission\n", "operationId": "batchCreateTransfers", "tags": [ "Data Transfers" ], "requestBody": { "description": "Batch of transfer configurations to create", "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "transfers" ], "properties": { "transfers": { "type": "array", "minItems": 1, "maxItems": 100, "description": "Array of transfer configurations, each using the same schema as the single-create endpoint", "items": { "allOf": [ { "$ref": "#/components/schemas/TransferConfigurationRequest" }, { "type": "object", "properties": { "accounts": { "maxItems": 5000 }, "segments": { "maxItems": 50 }, "schedule": { "maxItems": 1 }, "data_source_settings": { "maxItems": 100 }, "subscriptions": { "maxItems": 50 }, "notification_recipients": { "maxItems": 50 } } } ] } } } } } } }, "responses": { "200": { "description": "Batch processed", "headers": { "Access-Control-Allow-Origin": { "$ref": "#/components/headers/Access-Control-Allow-Origin" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "meta": { "$ref": "#/components/schemas/Meta" }, "data": { "type": "object", "required": [ "has_errors", "results" ], "properties": { "has_errors": { "type": "boolean", "description": "True if any item in the batch failed" }, "results": { "type": "array", "items": { "type": "object", "required": [ "index", "status" ], "properties": { "index": { "type": "integer", "description": "Zero-based position in the input array" }, "transfer_id": { "type": "integer", "format": "int32", "description": "ID of the created transfer (present on success)" }, "transfer_name": { "type": "string", "description": "Display name of the created transfer (present on success)" }, "status": { "type": "string", "enum": [ "success", "error" ] }, "error_code": { "type": "string", "description": "Machine-readable error identifier (present on error).\nPossible values: INVALID_ITEM_DATA, DWH_INVALID_TRANSFER_SETUP_DATA,\nDWH_TRANSFER_CREATE_FAILED, DWH_BATCH_CREATE_DUPLICATE_CONFIGURATION\n" }, "message": { "type": "string", "description": "Human-readable error description (present on error)" }, "validation_errors": { "type": "array", "description": "Field-level validation details (present when error_code is DWH_INVALID_TRANSFER_SETUP_DATA)", "items": { "type": "object", "required": [ "field_id", "error_code", "message" ], "properties": { "field_id": { "type": "string", "description": "The field that failed validation" }, "error_code": { "type": "string", "description": "Validation error code (values originate from the validation framework, not an enum-stable set)" }, "message": { "type": "string", "description": "Human-readable validation error message" } } } } } } } } } } }, "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." } ] } ] } } } } }, "400": { "description": "Batch-level validation failed — no transfers are created. Error codes:\nDWH_BATCH_EMPTY, DWH_BATCH_TOO_LARGE, DWH_BATCH_NOT_ARRAY.\n" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "500": { "$ref": "#/components/responses/InternalServerError" } }, "security": [ { "ApiKeyAuth": [] } ] } } }, "components": { "parameters": { "TeamId": { "name": "team_id", "in": "path", "description": "ID of the team", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 9.223372036854776E+18 }, "example": 936506 } }, "schemas": { "TransferConfigurationRequest": { "type": "object", "required": [ "data_source_id", "schema_id", "destination_id", "display_name", "schedule", "accounts" ], "properties": { "data_source_id": { "type": "string", "maxLength": 50, "description": "Data source identifier", "example": "AW" }, "schema_id": { "type": "integer", "format": "int32", "description": "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.", "example": 2 }, "destination_id": { "type": "integer", "format": "int32", "description": "Destination identifier", "example": 8 }, "display_name": { "type": "string", "maxLength": 255, "description": "Human-readable name for the transfer", "example": "AW enhanced 2022-11-17" }, "schedule": { "type": "array", "description": "Transfer execution schedule configuration", "items": { "$ref": "#/components/schemas/TransferSchedule" } }, "accounts": { "type": "array", "description": "Data source accounts to include in transfer", "items": { "$ref": "#/components/schemas/TransferAccount" } }, "segments": { "type": "array", "description": "Data segments to include in transfer", "items": { "$ref": "#/components/schemas/TransferSegment" } }, "data_source_settings": { "type": "array", "description": "Source-specific configuration settings", "items": { "$ref": "#/components/schemas/TransferDataSourceSetting" } }, "notification_recipients": { "type": "array", "description": "Email addresses to notify on transfer events", "items": { "type": "string", "format": "email", "maxLength": 255 }, "example": [ "user1@supermetrics.com", "user2@supermetrics.com" ] }, "transfer_type": { "type": "integer", "format": "int32", "description": "Transfer type identifier", "example": 1 } }, "additionalProperties": false }, "Meta": { "type": "object", "description": "Metadata included in every API response.", "properties": { "request_id": { "$ref": "#/components/schemas/RequestId" } }, "required": [ "request_id" ], "additionalProperties": false }, "TransferSchedule": { "type": "object", "properties": { "run_interval": { "type": "string", "enum": [ "hourly", "daily", "weekly", "monthly" ], "description": "Frequency of transfer execution" }, "run_hour": { "type": "integer", "format": "int32", "minimum": 0, "maximum": 23, "description": "Hour of day to run (UTC)" }, "refresh_window": { "type": "integer", "format": "int32", "minimum": 1, "description": "Number of days to refresh" }, "run_weekday": { "type": "integer", "format": "int32", "minimum": 1, "maximum": 7, "description": "Day of week to run (1=Monday, 7=Sunday). Required for weekly interval." }, "run_day": { "type": "integer", "format": "int32", "minimum": 1, "maximum": 31, "description": "Day of month to run. Required for monthly interval." } }, "example": { "run_interval": "daily", "run_hour": 22, "refresh_window": 1 } }, "TransferAccount": { "type": "object", "properties": { "data_source_username": { "type": "string", "maxLength": 255, "description": "Username for data source authentication" }, "login_id": { "type": "integer", "format": "int32", "description": "Login identifier" }, "account_id": { "type": "string", "maxLength": 100, "description": "Account identifier in the data source" } }, "example": { "data_source_username": "user.name@supermetrics.com", "login_id": 2682599, "account_id": "8733197711" } }, "TransferSegment": { "type": "object", "properties": { "data_source_username": { "type": "string", "maxLength": 255, "description": "Username for data source authentication" }, "login_id": { "type": "integer", "format": "int32", "description": "Login identifier" }, "segment_id": { "type": "string", "maxLength": 100, "description": "Segment identifier" }, "segment_name": { "type": "string", "maxLength": 255, "description": "Human-readable segment name" } }, "example": { "data_source_username": "user.name@supermetrics.com", "login_id": 2830506, "segment_id": "-1", "segment_name": "All users" } }, "TransferDataSourceSetting": { "type": "object", "properties": { "field_id": { "type": "string", "maxLength": 100, "description": "Setting field identifier" }, "value": { "oneOf": [ { "type": "string", "nullable": true }, { "type": "boolean", "nullable": true }, { "type": "integer", "nullable": true } ], "description": "Setting value (type varies by field)" }, "group": { "type": "string", "maxLength": 100, "description": "Setting group identifier" } }, "example": { "field_id": "BRAND_KEYWORDS", "value": "", "group": "Default" } }, "RequestId": { "type": "string", "description": "Unique identifier for the request, for tracking and debugging.", "pattern": "^[A-Za-z0-9_-]+$", "minLength": 8, "maxLength": 64, "example": "BXaEFVtjc7TXaJxgZhmFgSUD9edqq_CN", "x-faker": { "random.alphaNumeric": 30 } }, "ErrorResponse": { "type": "object", "description": "Standard envelope returned by all error (4xx/5xx) responses.", "properties": { "meta": { "$ref": "#/components/schemas/Meta" }, "error": { "$ref": "#/components/schemas/Error" } }, "required": [ "meta", "error" ], "additionalProperties": false }, "Error": { "type": "object", "description": "Machine- and human-readable detail for a failed request.", "properties": { "code": { "type": "string", "pattern": "^[A-Z][A-Z0-9_]*$", "maxLength": 100, "description": "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.", "example": "BAD_REQUEST" }, "message": { "type": "string", "maxLength": 255, "pattern": "^.+$", "description": "Short, human-readable summary of the error.", "example": "The request was invalid." }, "description": { "type": "string", "maxLength": 2048, "description": "Optional longer explanation specific to this occurrence.", "example": "The field 'display_name' must not be empty." } }, "required": [ "code", "message" ], "additionalProperties": false } }, "headers": { "Access-Control-Allow-Origin": { "description": "CORS header", "schema": { "type": "string", "maxLength": 255, "enum": [ "*" ], "example": "*" } }, "WWW-Authenticate": { "description": "Bearer token required", "schema": { "type": "string", "maxLength": 255, "pattern": "^Bearer.*" } }, "X-RateLimit-Limit": { "description": "Request limit per hour", "schema": { "type": "integer", "format": "int32", "minimum": 1, "maximum": 10000, "example": 5000 } }, "X-RateLimit-Remaining": { "description": "Remaining requests in current window", "schema": { "type": "integer", "format": "int32", "minimum": 0, "maximum": 10000, "example": 4999 } } }, "responses": { "Unauthorized": { "description": "Unauthorized", "headers": { "WWW-Authenticate": { "$ref": "#/components/headers/WWW-Authenticate" }, "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "Access-Control-Allow-Origin": { "$ref": "#/components/headers/Access-Control-Allow-Origin" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "meta": { "request_id": "BXaEFVtjc7TXaJxgZhmFgSUD9edqq_CN" }, "error": { "code": "UNAUTHORIZED", "message": "Authentication is required." } } } } }, "Forbidden": { "description": "Access forbidden", "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "Access-Control-Allow-Origin": { "$ref": "#/components/headers/Access-Control-Allow-Origin" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "meta": { "request_id": "BXaEFVtjc7TXaJxgZhmFgSUD9edqq_CN" }, "error": { "code": "FORBIDDEN", "message": "You do not have access to this resource." } } } } }, "InternalServerError": { "description": "Internal server error", "headers": { "Access-Control-Allow-Origin": { "$ref": "#/components/headers/Access-Control-Allow-Origin" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "example": { "meta": { "request_id": "BXaEFVtjc7TXaJxgZhmFgSUD9edqq_CN" }, "error": { "code": "INTERNAL_SERVER_ERROR", "message": "An unexpected error occurred." } } } } } }, "securitySchemes": { "ApiKeyAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "API_KEY", "description": "API key authentication. Create API keys in the Supermetrics Hub and send\nthem in the Authorization header:\n`Authorization: Bearer `\n" } } } } ````