Upload an automation action parameter attachment
curl --request POST \
--url https://clarus-api.com/api/automation_action_parameters/{automation_action_parameter_id}/attachment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/octet-stream' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '<string>'import requests
url = "https://clarus-api.com/api/automation_action_parameters/{automation_action_parameter_id}/attachment"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/octet-stream"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/octet-stream'
},
body: '<string>'
};
fetch('https://clarus-api.com/api/automation_action_parameters/{automation_action_parameter_id}/attachment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Automations
Upload an automation action parameter attachment
Upload a file as the attachment for an automation action parameter (e.g. a template body or import file). Replaces any existing attachment.
POST
/
api
/
automation_action_parameters
/
{automation_action_parameter_id}
/
attachment
Upload an automation action parameter attachment
curl --request POST \
--url https://clarus-api.com/api/automation_action_parameters/{automation_action_parameter_id}/attachment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/octet-stream' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '<string>'import requests
url = "https://clarus-api.com/api/automation_action_parameters/{automation_action_parameter_id}/attachment"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/octet-stream"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/octet-stream'
},
body: '<string>'
};
fetch('https://clarus-api.com/api/automation_action_parameters/{automation_action_parameter_id}/attachment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Binary Upload
This endpoint uses binary upload (not JSON:API). Send the file contents as the raw request body.Required Headers
| Header | Description | Example |
|---|---|---|
Content-Disposition | Filename of the upload | attachment; filename="body.html" |
Content-Type | MIME type of the file | text/html |
cURL Example
curl -X POST https://clarus-api.com/api/automation_action_parameters/42/attachment \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "X-Clarus-Subdomain: acme-warehouse" \
-H "Content-Disposition: attachment; filename=\"body.html\"" \
-H "Content-Type: text/html" \
--data-binary @body.html
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.
Path Parameters
The unique identifier of the automation action parameter
Body
application/octet-stream
The file contents
Response
Attachment uploaded successfully

