API Keys
This object represents an API key, it allows you to gain programmatic access to all of Felloh's functions.
The API Key Object
{"id": "6baa5798-46c7-4701-98a6-c1462f57df0d","name": "my_access_key","public_key": "22bc9c6eaa2d8aa7ce4a233b0790bc3248fbdab33cb393c7a8gg2b4fd9fcb551","secret_key_last_four": "e653","created_at": "2022-06-24T09:59:57.891Z","user": {"id": "decc740c-c942-4624-9b5c-b57688a1f356"}}
idstring
Unique identifier for the object.
namestring
A human friendly name for the api keys
public_keystring
The public key
secret_key_last_fourstring
The last four digits of the api key
created_atdatetime
The datetime at which the api key object was created within our systems
user.idstring
The user id that all actions of the api key will be linked to
Fetch all
POST/token/keys
import axios from 'axios';const response = await axios({method: 'post',url: 'https://api.felloh.com/token/keys',data: {organisation: 'X9876',},headers: {'Content-Type': 'application/json',Authorization: `Bearer <YOUR TOKEN HERE>`,},},);
RESPONSE
{"data": [{"id": "6baa5798-46c7-4701-98a6-c1462f57df0d","name": "my_access_key","public_key": "22bc9c6eaa2d8aa7ce4a233b0790bc3248fbdab33cb393c7a8gg2b4fd9fcb551","secret_key_last_four": "e653","created_at": "2022-06-24T09:59:57.891Z","user": {"id": "decc740c-c942-4624-9b5c-b57688a1f356"}}],"errors": {},"meta": {"code": 200,"reason": "OK","message": "The request was successful","request_id": "cdd40f5c-9d82-44c2-92e3-b5d2cad364f6","count": 1}}
This endpoint retrieves all api keys.
HTTP Method
POST
HTTP Endpoint
PRODhttps://api.felloh.com/token/keys
SANDBOXhttps://sandbox.felloh.com/token/keys
Payload
Parameter | Required | Type | Description |
---|---|---|---|
organisation | true | string | The organisation ID that you want to fetch api keys for. You can find the organisation that you have access to by using the List all organisations method. |
Response
Returns an array of API Keys Objects
Create one
PUT/token/key
import axios from 'axios';const response = await axios({method: 'post',url: 'https://api.felloh.com/token/key',data: JSON.stringify({organisation: 'X9876',name: 'Test Key',}),headers: {'Content-Type': 'application/json',Authorization: `Bearer <YOUR TOKEN HERE>`,},});
RESPONSE
{"data": {"name": "Test Key","public_key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDXKkK/TIQ9YhoEoGj7rFwrAxYs7A3DBdc","secret_key": "5oMfu26n4VorWC3gNgdDXt6uuVONsA+nPBuvtxe4BUAuv38oI21LGCj/ffJmT2Ie+BhYcK3o1AE/0OFaF80yLEnat2xSoioQkb4zBUP1REEYewRN3CauZ989G"},"errors": {},"meta": {"code": 200,"reason": "OK","message": "The request was successful","request_id": "cdd40f5c-9d82-44c2-92e3-b5d2cad364f6"}}
This endpoint allows you to create a new API key for an organisation
HTTP Method
PUT
HTTP Endpoint
PRODhttps://api.felloh.com/token/key
SANDBOXhttps://sandbox.felloh.com/token/key
Payload
Parameter | Required | Type | Description |
---|---|---|---|
organisation | true | string | The organisation ID that you want to create the api key in. |
name | true | string | The human friendly name of the api key |
Delete one
PUT/token/key
import axios from 'axios';const keyToDelete = 'd5f8e8f5-fa6f-4c00-b943-60d1855afe85';const response = await axios({method: 'delete',url: 'https://api.felloh.com/token/key/${keyToDelete}',headers: {'Content-Type': 'application/json',Authorization: `Bearer <YOUR TOKEN HERE>`,},});
RESPONSE
{"data": {},"errors": {},"meta": {"code": 200,"reason": "OK","message": "The request was successful","request_id": "cdd40f5c-9d82-44c2-92e3-b5d2cad364f6"}}
This endpoint allows you to delete an API key for an organisation
HTTP Method
DELETE
HTTP Endpoint
PRODhttps://api.felloh.com/token/key/<KEY_ID>
SANDBOXhttps://sandbox.felloh.com/token/key/<KEY_ID>
Path parameter
Parameter | Required | Type | Description |
---|---|---|---|
key_id | true | string | The key ID that you wish to delete |