Create a scoped workspace API key
curl --request POST \
--url https://api.refmatter.com/v1/workspaces/{workspaceId}/api-keys \
--header 'Content-Type: application/json' \
--cookie social_session= \
--data '
{
"name": "<string>",
"scopes": [],
"expiresAt": "<string>"
}
'const options = {
method: 'POST',
headers: {cookie: 'social_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', scopes: [], expiresAt: '<string>'})
};
fetch('https://api.refmatter.com/v1/workspaces/{workspaceId}/api-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.refmatter.com/v1/workspaces/{workspaceId}/api-keys"
payload = {
"name": "<string>",
"scopes": [],
"expiresAt": "<string>"
}
headers = {
"cookie": "social_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"prefix": "<string>",
"scopes": [
"references:read"
],
"createdAt": "<string>",
"expiresAt": "<string>",
"revokedAt": "<string>",
"lastUsedAt": "<string>",
"secret": "<string>"
}{
"error": {
"code": "invalid_input",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_input",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_input",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_input",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_input",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_input",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_input",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_input",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_input",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"details": {}
}
}workspaces
Create a scoped workspace API key
POST
/
v1
/
workspaces
/
{workspaceId}
/
api-keys
Create a scoped workspace API key
curl --request POST \
--url https://api.refmatter.com/v1/workspaces/{workspaceId}/api-keys \
--header 'Content-Type: application/json' \
--cookie social_session= \
--data '
{
"name": "<string>",
"scopes": [],
"expiresAt": "<string>"
}
'const options = {
method: 'POST',
headers: {cookie: 'social_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', scopes: [], expiresAt: '<string>'})
};
fetch('https://api.refmatter.com/v1/workspaces/{workspaceId}/api-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.refmatter.com/v1/workspaces/{workspaceId}/api-keys"
payload = {
"name": "<string>",
"scopes": [],
"expiresAt": "<string>"
}
headers = {
"cookie": "social_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"prefix": "<string>",
"scopes": [
"references:read"
],
"createdAt": "<string>",
"expiresAt": "<string>",
"revokedAt": "<string>",
"lastUsedAt": "<string>",
"secret": "<string>"
}{
"error": {
"code": "invalid_input",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_input",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_input",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_input",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_input",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_input",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_input",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_input",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_input",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"details": {}
}
}Authorizations
Path Parameters
Opaque workspace identifier
Body
application/json
Required string length:
1 - 160Required array length:
1 - 5 elementsAvailable options:
references:read, references:write, ingestions:read, ingestions:write, media:read Pattern:
^\d{4}-(0[1-9]|1[0-2])-([0-2]\d|3[01])T([01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d{1,9})?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$Response
API key created with one-time secret
Pattern:
^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$Required string length:
1 - 160Required string length:
6 - 24Required array length:
1 - 5 elementsAvailable options:
references:read, references:write, ingestions:read, ingestions:write, media:read Pattern:
^\d{4}-(0[1-9]|1[0-2])-([0-2]\d|3[01])T([01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d{1,9})?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$Pattern:
^\d{4}-(0[1-9]|1[0-2])-([0-2]\d|3[01])T([01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d{1,9})?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$Pattern:
^\d{4}-(0[1-9]|1[0-2])-([0-2]\d|3[01])T([01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d{1,9})?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$Pattern:
^\d{4}-(0[1-9]|1[0-2])-([0-2]\d|3[01])T([01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d{1,9})?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$Required string length:
32 - 256