[Source feeds] Create a source configuration.

POST
https://api.staging.wetransform.com/sender/source

Request Payload

SourceCreateRequest
Property / Description Constraints
name *
string

The name of the source.

Length
max
70
data_extractor *
string

The selected data extractor.

Possible values: upload, url, ftp, sftp, custom, email

Sample value: "url"
Enum Value
enum type
data extractor
deniedValues
[
    "upload"
]
url *
object

Always null if not granted Can import files from URL X_IMPORT_URL

Describes the URL data extractor.

Valid
url.url
string

The URL to which the request is sent.

Sample value: "https:\/\/example.com"
Not Blank
Length
max
1024
Url
requireTld
false
url.method
string

The HTTP method to use for the request.

Possible values: GET, POST, PUT, DELETE, PATCH

Sample value: "GET"
Not Blank
Enum Value
enum type
http method
deniedValues
[]
url.headers
array

Headers to send along with the request.

Should be an array of hashes, where the key is the header name and the value is the header value.

{
   "headers": {
     "Authorization": "Bearer 1234567890"
   }
}

Can be useful if an Authorization header is required.

Valid Headers
Count
max
5
url.cookies
array

Cookies to send along with the request.

Should be an array of hashes, where the key is the cookie name and the value is the cookie value.

 {
    "cookies": {
      "session_id": "0987654321"
    }
 }

Please note that cookies are stateless, we won't change their value based on the response.

Valid Cookies
Count
max
1
url.content_type *
string

The content type of the body.

Possible values: application/json, application/xml, text/plain, application/x-www-form-urlencoded, multipart/form-data

Sample value: "application\/json"
Enum Value
enum type
http content type
deniedValues
[]
url.body *
string

The body of the request, encoded in the right format.

Sample value: "{\"foo\":\"bar\"}"
Length
max
4096
ftp *
object

Always null if not granted Can import files from FTP X_IMPORT_FTP

Describes the FTP data extractor.

Valid
ftp.host
string

The FTP host.

Sample value: "ftp.example.com"
Not Blank
Length
max
70
ftp.port *
integer

The FTP port.

Sample value: 21
Range
min
1
max
65535
ftp.username
string

The FTP username.

Sample value: "username"
Not Blank
Length
max
70
ftp.password
string

The FTP password.

Sample value: "password"
Not Blank
Length
max
70
ftp.path
string

The FTP path.

It can contain wildcards, we will take the first matching file.

Sample value: "*.csv"
Not Blank
Length
max
4096
ftp.is_ssl *
boolean

Whether to use SSL or not.

Sample value: false
sftp *
object

Always null if not granted Can import files from SFTP X_IMPORT_SFTP

Describes the SFTP data extractor.

Valid
sftp.host
string

The SFTP host to connect to.

Sample value: "example.com"
Not Blank
Length
max
70
sftp.port
integer

The SFTP port to connect to.

Sample value: 22
Not Blank
Range
min
1
max
65535
sftp.username
string

The username to use for the SFTP connection.

Sample value: "username"
Not Blank
Length
max
70
sftp.password *
string

The password to use for the SFTP connection.

Sample value: "password"
Length
max
70
sftp.path
string

The path to the file or directory to send.

The path can contain wildcards, e.g. /path/to/files/*.csv, we will take the first file that matches the pattern.

Sample value: "\/path\/to\/files\/file.csv"
Length
max
4096
sftp.private_key *
string

The key to use for the SFTP connection.

Not Blank
allowNull
true

Describes the custom data extractor.

Valid
custom.custom_data_extractor_id *
string

The custom data extractor's ID.

This or handle must be set.

Sample value: "c3e2a4d2-0176-4560-bf6e-d7bc77c57036"
Sequentially
constraints
[
    {
        "payload": null,
        "groups": [
            "Default"
        ],
        "message": "This is not a valid UUID.",
        "strict": true,
        "versions": [
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8
        ],
        "normalizer": null
    },
    {
        "payload": null,
        "groups": [
            "Default"
        ],
        "errorPath": "",
        "messageInvalidResource": "violations.common.invalid_entity",
        "messageAccessDenied": "violations.common.access_denied",
        "attribute": "CUSTOM_DATA_EXTRACTOR_ACCESS",
        "entityClass": "Dot\\ReceiverBundle\\Entity\\CustomDataExtractor",
        "identifier": "uuid"
    }
]
custom.handle *
string

The custom data extractor's handle.

This or customDataExtractorId must be set.

Sample value: "my-export"
Is Granted
attribute
CUSTOM_DATA_EXTRACTOR_ACCESS
entity class
custom data extractor
identifier
handle

Properties suffixed with * are nullable.

Example Copy
{
    "name": null,
    "data_extractor": "url",
    "url": {
        "url": "https:\/\/example.com",
        "method": "GET",
        "headers": {
            "Authorization": "Bearer 1234567890"
        },
        "cookies": {
            "secret": "0987654321"
        },
        "content_type": "application\/json",
        "body": "{\"foo\":\"bar\"}"
    },
    "ftp": {
        "host": "ftp.example.com",
        "port": 21,
        "username": "username",
        "password": "password",
        "path": "*.csv",
        "is_ssl": false
    },
    "sftp": {
        "host": "example.com",
        "port": 22,
        "username": "username",
        "password": "password",
        "path": "\/path\/to\/files\/file.csv",
        "private_key": null
    },
    "custom": null
}

Responses

200 OK
ResponseSuccess SourceResponse
Property / Description
success
boolean

Always true on successful responses.

Sample value: true
payload
object

Payload of the requested resource.

payload.source_id *
string

The source ID.

payload.name *
string

The name of the source.

payload.data_extractor *
string

The selected data extractor.

Possible values: upload, url, ftp, sftp, custom, email

Sample value: "url"
payload.url *
object

Always null if not granted Can import files from URL X_IMPORT_URL

Describes the URL data extractor.

payload.url.url
string

The URL to which the request is sent.

Sample value: "https:\/\/example.com"
payload.url.method
string

The HTTP method to use for the request.

Possible values: GET, POST, PUT, DELETE, PATCH

Sample value: "GET"
payload.url.headers
array

Headers to send along with the request.

Should be an array of hashes, where the key is the header name and the value is the header value.

{
   "headers": {
     "Authorization": "Bearer 1234567890"
   }
}

Can be useful if an Authorization header is required.

payload.url.cookies
array

Cookies to send along with the request.

Should be an array of hashes, where the key is the cookie name and the value is the cookie value.

 {
    "cookies": {
      "session_id": "0987654321"
    }
 }

Please note that cookies are stateless, we won't change their value based on the response.

payload.url.content_type *
string

The content type of the body.

Possible values: application/json, application/xml, text/plain, application/x-www-form-urlencoded, multipart/form-data

Sample value: "application\/json"
payload.url.body *
string

The body of the request, encoded in the right format.

Sample value: "{\"foo\":\"bar\"}"
payload.ftp *
object

Always null if not granted Can import files from FTP X_IMPORT_FTP

Describes the FTP data extractor.

payload.ftp.host
string

The FTP host.

Sample value: "ftp.example.com"
payload.ftp.port *
integer

The FTP port.

Sample value: 21
payload.ftp.username
string

The FTP username.

Sample value: "username"
payload.ftp.password
string

The FTP password.

Sample value: "password"
payload.ftp.path
string

The FTP path.

It can contain wildcards, we will take the first matching file.

Sample value: "*.csv"
payload.ftp.is_ssl *
boolean

Whether to use SSL or not.

Sample value: false
payload.sftp *
object

Always null if not granted Can import files from SFTP X_IMPORT_SFTP

Describes the SFTP data extractor.

payload.sftp.host
string

The SFTP host to connect to.

Sample value: "example.com"
payload.sftp.port
integer

The SFTP port to connect to.

Sample value: 22
payload.sftp.username
string

The username to use for the SFTP connection.

Sample value: "username"
payload.sftp.password *
string

The password to use for the SFTP connection.

Sample value: "password"
payload.sftp.path
string

The path to the file or directory to send.

The path can contain wildcards, e.g. /path/to/files/*.csv, we will take the first file that matches the pattern.

Sample value: "\/path\/to\/files\/file.csv"
payload.sftp.private_key *
string

The key to use for the SFTP connection.

payload.custom *
object

Always null if not granted Can import files from a custom data extractor X_IMPORT_CUSTOM

Describes the custom data extractor.

payload.custom.custom_data_extractor_id *
string

The custom data extractor's ID.

This or handle must be set.

Sample value: "a13b2630-8ea5-46b8-879a-63824f078b9a"
payload.custom.handle *
string

The custom data extractor's handle.

This or customDataExtractorId must be set.

Sample value: "my-export"
product *
object

A product needed.

Not null if user requires to buy a specific product (permission or limitation) in order to access a feature.

product.requirement *
string

Whether the user requested a features s/he doesn't have access to, or the user needs greater limits. Possible values: permission, limitation

Sample value: "permission"
product.permission *
object

The required permission.

You will need to know which permission is needed in order to fill up search filters in the shop.

product.permission.description *
string

A human-understandable name for the permission.

product.permission.name
string

A technical permission name (ex: ORGANISATION_UPDATE_SETTINGS).

Possible values depend on the context, check the domain's metadata endpoint.

Sample value: "X_SOURCE_FORMAT_XML"
product.limitation_type *
string

The limitation that needs to be increased (ex: number of columns).

product.limitation_needed_value *
integer

The needed resource quantity (if receiver uses 9 columns in a template, this value is 9).

product.limitation_current_value *
integer

The current value of the limitation (if receiver is allowed to use 10 columns, this value is 10).

product.limitation_object *
object

The limitation type in a readable format, for example, "lines per file".

product.is_cta *
boolean

Whether a Call To Action should be displayed.

It may not be displayed if:

  • the limitation is on the membership role
  • the limitation is on the customer role
  • the user is a sender
debug
array

Debug information.

Contains logs about business logic explaining state of the response payload.

Provided in development & admin modes only.

Properties suffixed with * are nullable.

Example Copy
{
    "success": true,
    "payload": {
        "source_id": null,
        "name": null,
        "data_extractor": "url",
        "url": {
            "url": "https:\/\/example.com",
            "method": "GET",
            "headers": {
                "Authorization": "Bearer 1234567890"
            },
            "cookies": {
                "secret": "0987654321"
            },
            "content_type": "application\/json",
            "body": "{\"foo\":\"bar\"}"
        },
        "ftp": {
            "host": "ftp.example.com",
            "port": 21,
            "username": "username",
            "password": "password",
            "path": "*.csv",
            "is_ssl": false
        },
        "sftp": {
            "host": "example.com",
            "port": 22,
            "username": "username",
            "password": "password",
            "path": "\/path\/to\/files\/file.csv",
            "private_key": null
        },
        "custom": null
    },
    "product": {
        "requirement": "permission",
        "permission": {
            "name": "X_SOURCE_FORMAT_XML",
            "description": "Can import XML files"
        },
        "limitation_type": null,
        "limitation_needed_value": null,
        "limitation_current_value": null,
        "limitation_object": null,
        "is_cta": false
    },
    "debug": []
}
Bad request.

The client sent an unexpected request.

It happens if the client sent an invalid JSON payload, or if the JSON payload cannot be mapped to the expected request object.

Property / Description
success
boolean

Always false on error responses.

Sample value: false
payload
object

Context about the error, if any.

product *
object

A product needed.

Not null if user requires to buy a specific product (permission or limitation) in order to access a feature.

product.requirement *
string

Whether the user requested a features s/he doesn't have access to, or the user needs greater limits. Possible values: permission, limitation

Sample value: "permission"
product.permission *
object

The required permission.

You will need to know which permission is needed in order to fill up search filters in the shop.

product.permission.description *
string

A human-understandable name for the permission.

product.permission.name
string

A technical permission name (ex: ORGANISATION_UPDATE_SETTINGS).

Possible values depend on the context, check the domain's metadata endpoint.

Sample value: "X_SOURCE_FORMAT_XML"
product.limitation_type *
string

The limitation that needs to be increased (ex: number of columns).

product.limitation_needed_value *
integer

The needed resource quantity (if receiver uses 9 columns in a template, this value is 9).

product.limitation_current_value *
integer

The current value of the limitation (if receiver is allowed to use 10 columns, this value is 10).

product.limitation_object *
object

The limitation type in a readable format, for example, "lines per file".

product.is_cta *
boolean

Whether a Call To Action should be displayed.

It may not be displayed if:

  • the limitation is on the membership role
  • the limitation is on the customer role
  • the user is a sender
debug
array

Debug information.

Contains logs about business logic explaining state of the response payload.

Provided in development & admin modes only.

Properties suffixed with * are nullable.

Example Copy
{
    "success": false,
    "payload": [],
    "product": {
        "requirement": "permission",
        "permission": {
            "name": "X_SOURCE_FORMAT_XML",
            "description": "Can import XML files"
        },
        "limitation_type": null,
        "limitation_needed_value": null,
        "limitation_current_value": null,
        "limitation_object": null,
        "is_cta": false
    },
    "debug": []
}
Authentication required.

User must be authenticated to access the resource.

This response is received when the authorization header does not contain a valid authentication token.

It mostly happens because the current access_token has expired, and it needs to be renewed using a refresh_token.

Property / Description
success
boolean

Always false on error responses.

Sample value: false
payload
object

Context about the error, if any.

product *
object

A product needed.

Not null if user requires to buy a specific product (permission or limitation) in order to access a feature.

product.requirement *
string

Whether the user requested a features s/he doesn't have access to, or the user needs greater limits. Possible values: permission, limitation

Sample value: "permission"
product.permission *
object

The required permission.

You will need to know which permission is needed in order to fill up search filters in the shop.

product.permission.description *
string

A human-understandable name for the permission.

product.permission.name
string

A technical permission name (ex: ORGANISATION_UPDATE_SETTINGS).

Possible values depend on the context, check the domain's metadata endpoint.

Sample value: "X_SOURCE_FORMAT_XML"
product.limitation_type *
string

The limitation that needs to be increased (ex: number of columns).

product.limitation_needed_value *
integer

The needed resource quantity (if receiver uses 9 columns in a template, this value is 9).

product.limitation_current_value *
integer

The current value of the limitation (if receiver is allowed to use 10 columns, this value is 10).

product.limitation_object *
object

The limitation type in a readable format, for example, "lines per file".

product.is_cta *
boolean

Whether a Call To Action should be displayed.

It may not be displayed if:

  • the limitation is on the membership role
  • the limitation is on the customer role
  • the user is a sender
debug
array

Debug information.

Contains logs about business logic explaining state of the response payload.

Provided in development & admin modes only.

Properties suffixed with * are nullable.

Example Copy
{
    "success": false,
    "payload": [],
    "product": {
        "requirement": "permission",
        "permission": {
            "name": "X_SOURCE_FORMAT_XML",
            "description": "Can import XML files"
        },
        "limitation_type": null,
        "limitation_needed_value": null,
        "limitation_current_value": null,
        "limitation_object": null,
        "is_cta": false
    },
    "debug": []
}
Access denied.

User is well authenticated, but not authorized to access the resource.

It can happen if user is trying to use a feature that s/he didn't pay for, access someone else's resource, etc.

These issues are normally fixed by the frontend, which should render features and resources user has access to.

Property / Description
success
boolean

Always false on error responses.

Sample value: false
payload
object

Context about the error, if any.

product *
object

A product needed.

Not null if user requires to buy a specific product (permission or limitation) in order to access a feature.

product.requirement *
string

Whether the user requested a features s/he doesn't have access to, or the user needs greater limits. Possible values: permission, limitation

Sample value: "permission"
product.permission *
object

The required permission.

You will need to know which permission is needed in order to fill up search filters in the shop.

product.permission.description *
string

A human-understandable name for the permission.

product.permission.name
string

A technical permission name (ex: ORGANISATION_UPDATE_SETTINGS).

Possible values depend on the context, check the domain's metadata endpoint.

Sample value: "X_SOURCE_FORMAT_XML"
product.limitation_type *
string

The limitation that needs to be increased (ex: number of columns).

product.limitation_needed_value *
integer

The needed resource quantity (if receiver uses 9 columns in a template, this value is 9).

product.limitation_current_value *
integer

The current value of the limitation (if receiver is allowed to use 10 columns, this value is 10).

product.limitation_object *
object

The limitation type in a readable format, for example, "lines per file".

product.is_cta *
boolean

Whether a Call To Action should be displayed.

It may not be displayed if:

  • the limitation is on the membership role
  • the limitation is on the customer role
  • the user is a sender
debug
array

Debug information.

Contains logs about business logic explaining state of the response payload.

Provided in development & admin modes only.

Properties suffixed with * are nullable.

Example Copy
{
    "success": false,
    "payload": [],
    "product": {
        "requirement": "permission",
        "permission": {
            "name": "X_SOURCE_FORMAT_XML",
            "description": "Can import XML files"
        },
        "limitation_type": null,
        "limitation_needed_value": null,
        "limitation_current_value": null,
        "limitation_object": null,
        "is_cta": false
    },
    "debug": []
}
Payload contains invalid values.

A violation happens when a property value does not respect the expected constraints.

If a user is making a mistake in a form and frontend is not able to detect it (because of the constraint being tied to some business logic for example), the API will return the invalid properties with the right error messages.

Note: examples are hardcoded in english (no access to the translator in a DTO).

Property / Description
success
boolean

Always false on error responses.

Sample value: false
payload
object

Context about the error, if any.

payload.error
object
payload.error.code
string

A translation key for the given message.

Sample value: "exception.violation"
payload.error.message
string

The translated version of the message.

Click on "Example" to get its translated value.

payload.violations
array
payload.violations[].property_path
string

Property having an invalid value.

Sample value: "title"
payload.violations[].invalid_value *

The invalid value.

Sample value: ""
payload.violations[].message
string

An error message describing the violation.

Sample value: "This value should not be blank"
product *
object

A product needed.

Not null if user requires to buy a specific product (permission or limitation) in order to access a feature.

product.requirement *
string

Whether the user requested a features s/he doesn't have access to, or the user needs greater limits. Possible values: permission, limitation

Sample value: "permission"
product.permission *
object

The required permission.

You will need to know which permission is needed in order to fill up search filters in the shop.

product.permission.description *
string

A human-understandable name for the permission.

product.permission.name
string

A technical permission name (ex: ORGANISATION_UPDATE_SETTINGS).

Possible values depend on the context, check the domain's metadata endpoint.

Sample value: "X_SOURCE_FORMAT_XML"
product.limitation_type *
string

The limitation that needs to be increased (ex: number of columns).

product.limitation_needed_value *
integer

The needed resource quantity (if receiver uses 9 columns in a template, this value is 9).

product.limitation_current_value *
integer

The current value of the limitation (if receiver is allowed to use 10 columns, this value is 10).

product.limitation_object *
object

The limitation type in a readable format, for example, "lines per file".

product.is_cta *
boolean

Whether a Call To Action should be displayed.

It may not be displayed if:

  • the limitation is on the membership role
  • the limitation is on the customer role
  • the user is a sender
debug
array

Debug information.

Contains logs about business logic explaining state of the response payload.

Provided in development & admin modes only.

Properties suffixed with * are nullable.

Example Copy
{
    "success": false,
    "payload": {
        "error": {
            "code": "exception.violation",
            "message": "The provided payload contains property violations."
        },
        "violations": [
            {
                "property_path": "title",
                "invalid_value": "",
                "message": "This value should not be blank"
            },
            {
                "property_path": "price",
                "invalid_value": -5,
                "message": "The amount should be greater than 1"
            }
        ]
    },
    "product": {
        "requirement": "permission",
        "permission": {
            "name": "X_SOURCE_FORMAT_XML",
            "description": "Can import XML files"
        },
        "limitation_type": null,
        "limitation_needed_value": null,
        "limitation_current_value": null,
        "limitation_object": null,
        "is_cta": false
    },
    "debug": []
}

Interactive Console

Please login in order to access the console.

© 2026