Account
Create an API key
POST /v1/account/api-keys- Permission
write:tokens- Tokens
- CLI user token
Create an API key for your account. The response holds its secret, returned only this once. Only a GitHub administrator of your organization can create a key, and an API key cannot create another.
{
"name": str
}
{
"secret": str
}
1
import os
2
3
from ellipsis import Ellipsis
4
5
client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])
6
7
result = client.account.api_keys.create("...")
8
print(result)
1
import { Ellipsis } from '@ellipsis-dev/sdk';
2
3
const client = new Ellipsis({
4
apiKey: process.env.ELLIPSIS_API_TOKEN!,
5
});
6
7
const result = await client.account.apiKeys.create({ name: '...' });
8
console.log(result);
1
curl -X POST "https://api.ellipsis.dev/v1/account/api-keys" \
2
-H "Authorization: Bearer $ELLIPSIS_API_TOKEN" \
3
-H "Content-Type: application/json" \
4
-d '{
5
"name": "..."
6
}'
Request
namestringrequired
Response
api_keyApiKeyApirequired
An API key. Its secret is returned only when the key is created.
secretstringrequired