Create an API key
curl --request POST \
--url https://go-fetch.io/api/v1/api-keys/create/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>"
}
'import requests
url = "https://go-fetch.io/api/v1/api-keys/create/"
payload = { "name": "<string>" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://go-fetch.io/api/v1/api-keys/create/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"api_key": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_name": "<string>",
"environment": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environment_name": "<string>",
"environment_slug": "<string>",
"name": "<string>",
"prefix": "<string>",
"scopes": [
"read"
],
"last_used_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"rate_limit": 50000,
"is_active": true,
"expires_at": "2023-11-07T05:31:56Z"
},
"raw_key": "<string>"
}API keys
Create an API key
Needs a key with the admin scope. raw_key in the response is the new key, shown this once.
POST
/
api
/
v1
/
api-keys
/
create
/
Create an API key
curl --request POST \
--url https://go-fetch.io/api/v1/api-keys/create/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>"
}
'import requests
url = "https://go-fetch.io/api/v1/api-keys/create/"
payload = { "name": "<string>" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://go-fetch.io/api/v1/api-keys/create/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"api_key": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_name": "<string>",
"environment": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environment_name": "<string>",
"environment_slug": "<string>",
"name": "<string>",
"prefix": "<string>",
"scopes": [
"read"
],
"last_used_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"rate_limit": 50000,
"is_active": true,
"expires_at": "2023-11-07T05:31:56Z"
},
"raw_key": "<string>"
}Authorizations
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Required string length:
1 - 255read- readwrite- writeadmin- admin
Available options:
read, write, admin Requests per hour, from 1 to 100,000. A value outside that range is refused with a 400 that names rate_limit.
Required range:
1 <= x <= 100000