Sign up from an agent (no key)
curl --request POST \
--url https://api.westkite.com/v1/agent-signup \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"key_name": "Agent",
"client_name": "<string>"
}
'import requests
url = "https://api.westkite.com/v1/agent-signup"
payload = {
"email": "jsmith@example.com",
"key_name": "Agent",
"client_name": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({email: 'jsmith@example.com', key_name: 'Agent', client_name: '<string>'})
};
fetch('https://api.westkite.com/v1/agent-signup', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"claim_token": "<string>",
"verification_uri": "<string>",
"user_code": "<string>",
"expires_in": 600,
"interval": 5
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryable": true,
"docs_url": "<string>",
"reason": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"quoted_usd": 123,
"concurrent": 123,
"balance_usd": 123,
"available_usd": 123,
"spend_cap_usd": 123,
"spent_usd": 123
},
"request_id": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryable": true,
"docs_url": "<string>",
"reason": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"quoted_usd": 123,
"concurrent": 123,
"balance_usd": 123,
"available_usd": 123,
"spend_cap_usd": 123,
"spent_usd": 123
},
"request_id": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryable": true,
"docs_url": "<string>",
"reason": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"quoted_usd": 123,
"concurrent": 123,
"balance_usd": 123,
"available_usd": 123,
"spend_cap_usd": 123,
"spent_usd": 123
},
"request_id": "<string>"
}Account
Sign up from an agent (no key)
Gets the person you work for an API key, with no key of your own. Send their email; show them verification_uri and user_code (West Kite never emails the code). They open the link, sign in or sign up with the email filled in, check the code matches and approve. Keep claim_token to yourself and poll POST /agent-signup/token every interval seconds until expires_in (600 s) runs out. verification_uri carries the email after # so the sign-in form is filled in; show it as given. At most 5 open sign-ups per email; on 429, stop and tell the person.
POST
/
agent-signup
Sign up from an agent (no key)
curl --request POST \
--url https://api.westkite.com/v1/agent-signup \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"key_name": "Agent",
"client_name": "<string>"
}
'import requests
url = "https://api.westkite.com/v1/agent-signup"
payload = {
"email": "jsmith@example.com",
"key_name": "Agent",
"client_name": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({email: 'jsmith@example.com', key_name: 'Agent', client_name: '<string>'})
};
fetch('https://api.westkite.com/v1/agent-signup', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"claim_token": "<string>",
"verification_uri": "<string>",
"user_code": "<string>",
"expires_in": 600,
"interval": 5
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryable": true,
"docs_url": "<string>",
"reason": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"quoted_usd": 123,
"concurrent": 123,
"balance_usd": 123,
"available_usd": 123,
"spend_cap_usd": 123,
"spent_usd": 123
},
"request_id": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryable": true,
"docs_url": "<string>",
"reason": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"quoted_usd": 123,
"concurrent": 123,
"balance_usd": 123,
"available_usd": 123,
"spend_cap_usd": 123,
"spent_usd": 123
},
"request_id": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryable": true,
"docs_url": "<string>",
"reason": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"quoted_usd": 123,
"concurrent": 123,
"balance_usd": 123,
"available_usd": 123,
"spend_cap_usd": 123,
"spent_usd": 123
},
"request_id": "<string>"
}Body
application/json
Response
Show the link and code; poll with the claim token.
https://app.westkite.com/developers/claim?code=<user_code>, with #login_hint=.