Create credentials
POST/integration/credentials
integration.credentials.create
Request​
- application/json
Bodyrequired
Partition ID.
Name.
Connection type.
Possible values: [ftp
, ssh
, sftp
, imap
, imap_microsoft
, web
, smtp
]
Username.
Required if type is ftp
, ssh
, imap
or web
.
Possible values: <= 255 characters
null
Password.
Required if type is ftp
, imap
or web
.
Additionally required for type smtp
if login
is provided.
null
Server hostname or IP address.
Required if type is ftp
, ssh
, imap
or smtp
.
Possible values: <= 255 characters
null
Server port.
Required if type is ftp
, ssh
, imap
or smtp
.
Possible values: >= 1
and <= 65535
null
SMTP security mode.
Required if type is smtp
.
Possible values: [plain
, tls
, ssl
]
null
imap_microsoft_settings object
Responses​
- 200
- 400
- 401
- 404
- 422
- 500
Credentials object as has been stored.
- application/json
- Schema
- Example (auto)
Schema
{}
The request contains invalid arguments or is malformed
- application/json
- Schema
- Example (auto)
Schema
error object
{
"error": {
"message": "Invalid request",
"data": {
"name": "Empty value is not allowed",
"payment_terms_id": "Object \"payment_terms(123)\" was not found!"
}
}
}
Access is not authorized
- application/json
- Schema
- Example (auto)
Schema
error object
{
"error": {
"message": "utoken-auth-failed: Authentication Failed: IP 10.0.0.1 is not allowed",
"data": {
"code": "utoken-auth-failed",
"message": "Authentication Failed: IP 10.0.0.1 is not allowed"
}
}
}
Requested object was not found
- application/json
- Schema
- Example (auto)
Schema
error object
{
"error": {
"message": "not_found: Object \"clients(123)\" was not found!",
"data": {
"code": "not_found",
"message": "Object \"clients(123)\" was not found!",
"object_name": "clients",
"object_id": "123"
}
}
}
A logical error occurred, making the request unprocessable
- application/json
- Schema
- Example (auto)
Schema
error object
{
"error": {
"message": "invoices-zero-amount: Impossible to create an invoice with zero amount",
"data": {
"code": "invoices-zero-amount",
"message": "Impossible to create an invoice with zero amount"
}
}
}
An unexpected error occurred
- application/json
- Schema
- Example (auto)
Schema
error object
{
"error": {
"message": "An unexpected error occurred"
}
}
Authorization: X-Api-Key
name: X-Api-Keytype: apiKeyin: headerdescription: Token for API access
- curl
- python
- nodejs
- php
- CURL
curl -L 'https://docs.jerasoft.net/integration/credentials' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-Api-Key: <X-Api-Key>' \
-d '{
"companies_id": 0,
"name": "string",
"type": "ftp",
"smtp_security": "plain",
"imap_microsoft_settings": {
"client_id": "string",
"tenant": "string",
"refresh_token": "string"
}
}'