Create an FTP user
curl --request POST \
--url https://clarus-api.com/api/ftp_users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "ftp_users",
"attributes": {
"direction": "upload",
"name": "Acme Inbound Feed",
"username": "acme_inbound",
"password": "S3cure-Pass!",
"password_confirmation": "S3cure-Pass!"
}
}
}
'import requests
url = "https://clarus-api.com/api/ftp_users"
payload = { "data": {
"type": "ftp_users",
"attributes": {
"direction": "upload",
"name": "Acme Inbound Feed",
"username": "acme_inbound",
"password": "S3cure-Pass!",
"password_confirmation": "S3cure-Pass!"
}
} }
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data: {
type: 'ftp_users',
attributes: {
direction: 'upload',
name: 'Acme Inbound Feed',
username: 'acme_inbound',
password: 'S3cure-Pass!',
password_confirmation: 'S3cure-Pass!'
}
}
})
};
fetch('https://clarus-api.com/api/ftp_users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "31",
"type": "ftp_users",
"attributes": {
"direction": "upload",
"name": "Acme Inbound Feed",
"username": "acme_inbound",
"active": true
}
}
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}SFTP Users
Create an FTP user
Create an FTP user that can connect to the tenant SFTP server to upload (inbound) or download (outbound) files.
POST
/
api
/
ftp_users
Create an FTP user
curl --request POST \
--url https://clarus-api.com/api/ftp_users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "ftp_users",
"attributes": {
"direction": "upload",
"name": "Acme Inbound Feed",
"username": "acme_inbound",
"password": "S3cure-Pass!",
"password_confirmation": "S3cure-Pass!"
}
}
}
'import requests
url = "https://clarus-api.com/api/ftp_users"
payload = { "data": {
"type": "ftp_users",
"attributes": {
"direction": "upload",
"name": "Acme Inbound Feed",
"username": "acme_inbound",
"password": "S3cure-Pass!",
"password_confirmation": "S3cure-Pass!"
}
} }
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data: {
type: 'ftp_users',
attributes: {
direction: 'upload',
name: 'Acme Inbound Feed',
username: 'acme_inbound',
password: 'S3cure-Pass!',
password_confirmation: 'S3cure-Pass!'
}
}
})
};
fetch('https://clarus-api.com/api/ftp_users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "31",
"type": "ftp_users",
"attributes": {
"direction": "upload",
"name": "Acme Inbound Feed",
"username": "acme_inbound",
"active": true
}
}
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Request Structure
{
"data": {
"type": "ftp_users",
"attributes": {
"direction": "upload",
"name": "Acme Inbound Feed",
"username": "acme_inbound",
"password": "S3cure-Pass!",
"password_confirmation": "S3cure-Pass!"
}
}
}
Key Fields
| Field | Required | Description |
|---|---|---|
direction | Yes | download or upload |
name | Yes | Display name |
username | Yes | Login username (min 6 chars, unique) |
password | Yes | Password (write-only) |
password_confirmation | Yes | Must match password |
Notes
- On update, omitting
password(or sending it blank) leaves the existing password unchanged. - Creating an
uploadFTP user auto-provisions a default set of import templates.
Authorizations
OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.
FlowAuthorization Code
- Authorization URL
- https://clarus-api.com/oauth/authorize
- Token URL
- https://clarus-api.com/oauth/token
FlowClient Credentials
- Token URL
- https://clarus-api.com/oauth/token
The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.
Body
application/json
Show child attributes
Show child attributes
Response
N ftp user created successfully
Show child attributes
Show child attributes

