API Keys
API keys offer an alternate method of authentication to the Matatika API using a client ID and secret. Access using API key credentials is supported by the Matatika CLI and SDK, which allows a user to remain authenticated permanently.
Objects
API Key
Path | JSON Type | Format | Description |
---|---|---|---|
id |
string |
Version 4 UUID | The API key ID |
created |
string |
ISO 8601 timestamp | The instant when the API key was created |
lastModified |
string |
ISO 8601 timestamp | The instant when the API key was last modified |
name |
string |
The API key name | |
clientId |
string |
The API key client ID | |
profileId |
string |
The API key owner profile ID |
{
"id" : "0ecdc744-a36b-4a4a-9065-967a8653a67e",
"created" : "2025-04-10T10:49:17.61756",
"lastModified" : "2025-04-10T10:49:17.61756",
"name" : "SIT-generated api key (2025-04-10T11:49:17.572842)",
"clientId" : "eoQ2RIUYKdFT29sXpkITIVcNqi6vgIIc",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/apikeys/0ecdc744-a36b-4a4a-9065-967a8653a67e"
},
"update apikey" : {
"href" : "https://app.matatika.com/api/apikeys/0ecdc744-a36b-4a4a-9065-967a8653a67e"
},
"delete apikey" : {
"href" : "https://app.matatika.com/api/apikeys/0ecdc744-a36b-4a4a-9065-967a8653a67e"
},
"profile" : {
"href" : "https://app.matatika.com/api/profiles/auth0%7C5eb0327cbfd7490bff55feeb"
}
}
}
Requests
- View all API keys
- View an API key
- Initialise an API key
- Create an API key
- Update an API key
- Delete an API key
View all API keys
GET
/api/apikeys
Returns all API keys owned by the authenticated user profile.
Prerequisites
- The authenticated user must own a Matatika account
- The API key
{apikey-id}
must exist
Request
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.matatika.com:443/api/apikeys/' -i -X GET \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json'
Python (requests
)
import requests
url = "https://app.matatika.com:443/api/apikeys/"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
API key collection with HAL links.
{
"_embedded" : {
"apikeys" : [ {
"id" : "e9f774d1-addb-401e-a327-c701cdc13327",
"created" : "2025-04-10T10:49:16.540882",
"lastModified" : "2025-04-10T10:49:16.540882",
"name" : "default",
"clientId" : "aDgaCMqRf6ZZnhx3VwsYEU3oCUKzyIXq",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"accessToken" : "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IlJFRkNRamczTlRRMk16QTROalpHT0RjNFFUWkJOemMyTkRGR1FUSkVOVEEyUkRkR1JrSkRPQSJ9.eyJpc3MiOiJodHRwczovL2lkZW50aXR5Lm1hdGF0aWthLmNvbS8iLCJzdWIiOiJhRGdhQ01xUmY2WlpuaHgzVndzWUVVM29DVUt6eUlYcUBjbGllbnRzIiwiYXVkIjoiaHR0cHM6Ly9hcHAubWF0YXRpa2EuY29tL2FwaSIsImlhdCI6MTc0NDI4MjE1NywiZXhwIjoxNzQ0MzY4NTU3LCJndHkiOiJjbGllbnQtY3JlZGVudGlhbHMiLCJhenAiOiJhRGdhQ01xUmY2WlpuaHgzVndzWUVVM29DVUt6eUlYcSJ9.wCxLu_82CdVwjRA5bOMU7745gOl5UTrtU0rCzl-dw61-E10EUX6pFBRofGEnxdf9RjF91w2_RUIjJbUWx-HJkG3E_XmUfdMydr9Yepk2JLqrg_0VcmvXSLokuKRxJHIWaub_u3nNq_rxhvHwED4jEm3T3lwIJmWDFfsAFboyrlPS5aRpw71mhTRbg5iJ2ayKRWUVeb4g-gbbfVur47Ao-6xt52hWUFop-sKgmV5IVMT4sKk8G_1W_YeQgcR-1k5XirPCi9MwNR5tfcvdx6Wvmb4m9pyjDQl1HphQ2mDw9vW8yJGTV8pvVibkhoKl3kTJVAIoBP5MO2CSVuZStVhLhg",
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/apikeys/e9f774d1-addb-401e-a327-c701cdc13327"
},
"update apikey" : {
"href" : "https://app.matatika.com/api/apikeys/e9f774d1-addb-401e-a327-c701cdc13327"
},
"delete apikey" : {
"href" : "https://app.matatika.com/api/apikeys/e9f774d1-addb-401e-a327-c701cdc13327"
},
"profile" : {
"href" : "https://app.matatika.com/api/profiles/auth0%7C5eb0327cbfd7490bff55feeb"
}
}
}, {
"id" : "0ecdc744-a36b-4a4a-9065-967a8653a67e",
"created" : "2025-04-10T10:49:17.61756",
"lastModified" : "2025-04-10T10:49:17.61756",
"name" : "SIT-generated api key (2025-04-10T11:49:17.572842)",
"clientId" : "eoQ2RIUYKdFT29sXpkITIVcNqi6vgIIc",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/apikeys/0ecdc744-a36b-4a4a-9065-967a8653a67e"
},
"update apikey" : {
"href" : "https://app.matatika.com/api/apikeys/0ecdc744-a36b-4a4a-9065-967a8653a67e"
},
"delete apikey" : {
"href" : "https://app.matatika.com/api/apikeys/0ecdc744-a36b-4a4a-9065-967a8653a67e"
},
"profile" : {
"href" : "https://app.matatika.com/api/profiles/auth0%7C5eb0327cbfd7490bff55feeb"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/apikeys/?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
View an API key
GET
/api/apikeys/{apikey-id}
Returns the API key {apikey-id}
.
Prerequisites
- The authenticated user must own a Matatika account
- The API key
{apikey-id}
must exist
Request
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.matatika.com:443/api/apikeys/0ecdc744-a36b-4a4a-9065-967a8653a67e' -i -X GET \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json'
Python (requests
)
import requests
url = "https://app.matatika.com:443/api/apikeys/0ecdc744-a36b-4a4a-9065-967a8653a67e"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
API key with HAL links.
{
"id" : "0ecdc744-a36b-4a4a-9065-967a8653a67e",
"created" : "2025-04-10T10:49:17.61756",
"lastModified" : "2025-04-10T10:49:17.61756",
"name" : "SIT-generated api key (2025-04-10T11:49:17.572842)",
"clientId" : "eoQ2RIUYKdFT29sXpkITIVcNqi6vgIIc",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/apikeys/0ecdc744-a36b-4a4a-9065-967a8653a67e"
},
"update apikey" : {
"href" : "https://app.matatika.com/api/apikeys/0ecdc744-a36b-4a4a-9065-967a8653a67e"
},
"delete apikey" : {
"href" : "https://app.matatika.com/api/apikeys/0ecdc744-a36b-4a4a-9065-967a8653a67e"
},
"profile" : {
"href" : "https://app.matatika.com/api/profiles/auth0%7C5eb0327cbfd7490bff55feeb"
}
}
}
Initialise an API key
POST
/api/apikeys
Initialises a new API key.
Prerequisites
- The authenticated user must own a Matatika account
Request
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.matatika.com:443/api/apikeys/' -i -X POST \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json'
Python (requests
)
import requests
url = "https://app.matatika.com:443/api/apikeys/"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("POST", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
API key with HAL links.
{
"id" : "0ecdc744-a36b-4a4a-9065-967a8653a67e",
"created" : "2025-04-10T10:49:17.533438981",
"lastModified" : "2025-04-10T10:49:17.533439481",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"create apikey" : {
"href" : "https://app.matatika.com/api/apikeys/0ecdc744-a36b-4a4a-9065-967a8653a67e"
}
}
}
Create an API key
PUT
/api/apikeys/{apikey-id}
Creates the API key {apikey-id}
.
Prerequisites
- The authenticated user must own a Matatika account
Request
Body
API key resource.
{
"name" : "SIT-generated api key (2025-04-10T11:49:17.572842)"
}
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.matatika.com:443/api/apikeys/0ecdc744-a36b-4a4a-9065-967a8653a67e' -i -X PUT \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json' \
-d '{
"name" : "SIT-generated api key (2025-04-10T11:49:17.572842)"
}'
Python (requests
)
import requests
url = "https://app.matatika.com:443/api/apikeys/0ecdc744-a36b-4a4a-9065-967a8653a67e"
data = {
"name" : "SIT-generated api key (2025-04-10T11:49:17.572842)"
}
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("PUT", url, headers=headers, data=data)
print(response.text.encode('utf8'))
Response
201 Created
API key with HAL links.
{
"id" : "0ecdc744-a36b-4a4a-9065-967a8653a67e",
"created" : "2025-04-10T10:49:17.617559546",
"lastModified" : "2025-04-10T10:49:17.617560046",
"name" : "SIT-generated api key (2025-04-10T11:49:17.572842)",
"clientId" : "eoQ2RIUYKdFT29sXpkITIVcNqi6vgIIc",
"clientSecret" : "SGdqxkEjmDmeejMe-6gnUVStqaAooUF5PlGXCAPcyvAh2qTh7K6mLKr-hO3_XWP6",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/apikeys/0ecdc744-a36b-4a4a-9065-967a8653a67e"
},
"update apikey" : {
"href" : "https://app.matatika.com/api/apikeys/0ecdc744-a36b-4a4a-9065-967a8653a67e"
},
"delete apikey" : {
"href" : "https://app.matatika.com/api/apikeys/0ecdc744-a36b-4a4a-9065-967a8653a67e"
},
"profile" : {
"href" : "https://app.matatika.com/api/profiles/auth0%7C5eb0327cbfd7490bff55feeb"
}
}
}
Update an API key
PUT
/api/apikeys/{apikey-id}
Updates the API key {apikey-id}
.
Prerequisites
- The authenticated user must own a Matatika account
Request
Body
API key resource.
{
"name" : "SIT-generated api key (2025-04-10T11:49:17.572842) (updated)"
}
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.matatika.com:443/api/apikeys/0ecdc744-a36b-4a4a-9065-967a8653a67e' -i -X PUT \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json' \
-d '{
"name" : "SIT-generated api key (2025-04-10T11:49:17.572842) (updated)"
}'
Python (requests
)
import requests
url = "https://app.matatika.com:443/api/apikeys/0ecdc744-a36b-4a4a-9065-967a8653a67e"
data = {
"name" : "SIT-generated api key (2025-04-10T11:49:17.572842) (updated)"
}
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("PUT", url, headers=headers, data=data)
print(response.text.encode('utf8'))
Response
200 OK
API key with HAL links.
{
"id" : "0ecdc744-a36b-4a4a-9065-967a8653a67e",
"created" : "2025-04-10T10:49:17.61756",
"lastModified" : "2025-04-10T10:49:18.581655119",
"name" : "SIT-generated api key (2025-04-10T11:49:17.572842) (updated)",
"clientId" : "eoQ2RIUYKdFT29sXpkITIVcNqi6vgIIc",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/apikeys/0ecdc744-a36b-4a4a-9065-967a8653a67e"
},
"update apikey" : {
"href" : "https://app.matatika.com/api/apikeys/0ecdc744-a36b-4a4a-9065-967a8653a67e"
},
"delete apikey" : {
"href" : "https://app.matatika.com/api/apikeys/0ecdc744-a36b-4a4a-9065-967a8653a67e"
},
"profile" : {
"href" : "https://app.matatika.com/api/profiles/auth0%7C5eb0327cbfd7490bff55feeb"
}
}
}
Delete an API key
DELETE
/api/apikeys/{apikey-id}
Deletes the API key {apikey-id}
.
Prerequisites
- The authenticated user must own a Matatika account
- The API key
{apikey-id}
must exist
Request
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.matatika.com:443/api/apikeys/0ecdc744-a36b-4a4a-9065-967a8653a67e' -i -X DELETE \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json'
Python (requests
)
import requests
url = "https://app.matatika.com:443/api/apikeys/0ecdc744-a36b-4a4a-9065-967a8653a67e"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("DELETE", url, headers=headers)
print(response.text.encode('utf8'))
Response
204 No Content
No response body provided.