- 🐶 Walk through Apidog
- Sample APIs
- Auth
- User
Upload File
PUT
https://api.cardtonic.com/v1/users/upload
Request
Header Params
X-Tonic-Env
string
required
Example:
development
Body Params application/json
files
array [object {2}]
required
name
string
optional
type
string
optional
Example
{
"files": [
{
"name": "example.png",
"type": "image/png"
}
]
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://api.cardtonic.com/v1/users/upload' \
--header 'X-Tonic-Env: development' \
--header 'Content-Type: application/json' \
--data-raw '{
"files": [
{
"name": "example.png",
"type": "image/png"
}
]
}'
Responses
🟢200Upload File
application/json
Body
message
string
required
success
boolean
required
data
array [object {4}]
required
name
string
optional
type
string
optional
url
string
optional
imageUrl
string
optional
meta
object
required
settings
null
required
Example
{
"message": "data fetched",
"success": true,
"data": [
{
"name": "example.png",
"type": "image/png",
"url": "https://fra1.digitaloceanspaces.com/cardtonic.staging/67196ce82eee9ec7461ec103/V4YEookeO5-6Fwy_.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=WOEEC5QQRLNU6ZREWUOY%2F20241029%2Ffra1%2Fs3%2Faws4_request&X-Amz-Date=20241029T125715Z&X-Amz-Expires=300&X-Amz-Signature=4f8c1caaf3e46cdf227d32aa217e71accd87b10f9af1a8dfebbc70316faf06aa&X-Amz-SignedHeaders=host&x-amz-acl=public-read&x-id=PutObject",
"imageUrl": "https://staging.assets.cardtonic.com/67196ce82eee9ec7461ec103/V4YEookeO5-6Fwy_.png"
}
],
"meta": {
"settings": null
}
}
Modified at 2024-11-17 09:59:00