Skip to main content
POST
/
v1
/
credentials
Create a credential
curl --request POST \
  --url https://sta.sandbox.lerian.net/v1/credentials \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "institutionCode": "<string>",
  "operatorId": "<string>",
  "password": "<string>",
  "description": "<string>"
}
'
import requests

url = "https://sta.sandbox.lerian.net/v1/credentials"

payload = {
"institutionCode": "<string>",
"operatorId": "<string>",
"password": "<string>",
"description": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
institutionCode: '<string>',
operatorId: '<string>',
password: '<string>',
description: '<string>'
})
};

fetch('https://sta.sandbox.lerian.net/v1/credentials', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://sta.sandbox.lerian.net/v1/credentials",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'institutionCode' => '<string>',
'operatorId' => '<string>',
'password' => '<string>',
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://sta.sandbox.lerian.net/v1/credentials"

payload := strings.NewReader("{\n \"institutionCode\": \"<string>\",\n \"operatorId\": \"<string>\",\n \"password\": \"<string>\",\n \"description\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://sta.sandbox.lerian.net/v1/credentials")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"institutionCode\": \"<string>\",\n \"operatorId\": \"<string>\",\n \"password\": \"<string>\",\n \"description\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://sta.sandbox.lerian.net/v1/credentials")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"institutionCode\": \"<string>\",\n \"operatorId\": \"<string>\",\n \"password\": \"<string>\",\n \"description\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "asOf": "<string>",
  "createdAt": "<string>",
  "daysRemaining": 123,
  "description": "<string>",
  "expiryStatus": "<string>",
  "id": "<string>",
  "institutionCode": "<string>",
  "lastExpiryCheckedAt": "<string>",
  "lastRotatedAt": "<string>",
  "lastTestResult": "<string>",
  "lastTestedAt": "<string>",
  "operatorId": "<string>",
  "passwordExpiresAt": "<string>",
  "status": "<string>",
  "updatedAt": "<string>"
}
{}
{}
{}
{}
{}

Authorizations

Authorization
string
header
required

Bearer token authentication (format: "Bearer {token}")

Body

application/json

credential payload

institutionCode
string
required
Maximum string length: 8
operatorId
string
required
Maximum string length: 20
password
string
required
Minimum string length: 8
description
string
Maximum string length: 255

Response

Created

asOf
string
createdAt
string
daysRemaining
integer
description
string
expiryStatus
string
id
string
institutionCode
string
lastExpiryCheckedAt
string
lastRotatedAt
string
lastTestResult
string
lastTestedAt
string
operatorId
string
passwordExpiresAt
string
status
string
updatedAt
string