Register a company user with a certificate
curl --request POST \
--url https://web-api.dev.soxai.site/api/companies/users \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data ex_uid=external_123 \
--data 'signed_cer=<signed-certificate>'import requests
url = "https://web-api.dev.soxai.site/api/companies/users"
payload = {
"ex_uid": "external_123",
"signed_cer": "<signed-certificate>"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({ex_uid: 'external_123', signed_cer: '<signed-certificate>'})
};
fetch('https://web-api.dev.soxai.site/api/companies/users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"uid": "user123",
"token": "<custom token>"
}{
"error": "bad-request",
"error_msg": "Invalid certificate"
}{
"error": "unprocessable-entity",
"error_msg": "body.<field>: <validation message>"
}{
"error": "rate-limited",
"error_msg": "Rate limit exceeded. Retry after <n> seconds."
}{
"error": "internal-server-error",
"error_msg": "Failed to fetch data: <error_message>"
}Partner Companies
Register a company user with a certificate
Not part of the Sandbox
A Sandbox key does not authenticate this endpoint and a Sandbox identity cannot complete it, because it changes state that every Sandbox caller shares. It is published here because the Sandbox runs the same build. See Sandbox.
Register a new SOXAI user on behalf of a partner company, identified by the company’s own external user id.
Parameters
ex_uid(form, required) - the identifier the partner company uses for this user.signed_cer(form, required) - the signing certificate, described below. It must be one issued for registration.
Response
200returns the new SOXAI user id and an access token for it.
Errors
| Status | Condition |
|---|---|
| 400 | The certificate is invalid for this purpose, or ex_uid is already registered |
Authorization
- No SOXAI user token. The caller authenticates with
signed_cer, a payload signed with the partner company’s private key and verified against the certificate SOXAI issued to that company. The certificate also fixes which company the request may act on. - A certificate that is unknown, revoked, expired, wrongly signed or issued for a different
purpose is refused with
400.
POST
/
api
/
companies
/
users
Register a company user with a certificate
curl --request POST \
--url https://web-api.dev.soxai.site/api/companies/users \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data ex_uid=external_123 \
--data 'signed_cer=<signed-certificate>'import requests
url = "https://web-api.dev.soxai.site/api/companies/users"
payload = {
"ex_uid": "external_123",
"signed_cer": "<signed-certificate>"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({ex_uid: 'external_123', signed_cer: '<signed-certificate>'})
};
fetch('https://web-api.dev.soxai.site/api/companies/users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"uid": "user123",
"token": "<custom token>"
}{
"error": "bad-request",
"error_msg": "Invalid certificate"
}{
"error": "unprocessable-entity",
"error_msg": "body.<field>: <validation message>"
}{
"error": "rate-limited",
"error_msg": "Rate limit exceeded. Retry after <n> seconds."
}{
"error": "internal-server-error",
"error_msg": "Failed to fetch data: <error_message>"
}